@jsswift/ui 1.0.54 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/css/animation.css +36 -36
  2. package/dist/css/base.css +374 -374
  3. package/dist/css/docs.css +54 -54
  4. package/dist/css/fonts-nunito.css +2 -2
  5. package/dist/css/min-ui.css +1 -1
  6. package/dist/css/responsive-base.css +549 -549
  7. package/dist/css/responsive.css +3225 -3225
  8. package/dist/css/ui-components.css +2902 -2930
  9. package/dist/css/ui-light.css +3853 -3881
  10. package/dist/css/ui-light.min.css +1 -1
  11. package/dist/css/ui.css +6530 -6558
  12. package/dist/css/ui.min.css +1 -1
  13. package/dist/min-ui.js +12 -12
  14. package/dist/ui.js +4354 -9379
  15. package/dist/ui.min.js +12 -12
  16. package/package.json +2 -2
  17. package/src/00-bootstrap.js +305 -305
  18. package/src/01-foundation-helpers.js +328 -325
  19. package/src/10-primitives-layout.js +242 -242
  20. package/src/20-display-content.js +76 -76
  21. package/src/21-list-content.js +21 -21
  22. package/src/22-banner-content.js +376 -376
  23. package/src/23-tooltip.js +9 -9
  24. package/src/31-form-advanced.js +141 -141
  25. package/src/40-navigation.js +81 -81
  26. package/src/41-tab-panel.js +37 -37
  27. package/src/50-feedback.js +52 -52
  28. package/src/51-feedback-service.js +166 -166
  29. package/src/60-shell-app.js +1082 -1082
  30. package/src/61-form-service.js +5 -5
  31. package/src/70-dialog.js +34 -34
  32. package/src/71-menu-overlays.js +73 -73
  33. package/src/80-data.js +38 -38
  34. package/src/css/animation.css +36 -36
  35. package/src/css/base.css +374 -374
  36. package/src/css/docs.css +54 -54
  37. package/src/css/fonts-nunito.css +2 -2
  38. package/src/css/responsive.css +3225 -3225
  39. package/src/css/ui-components.css +2902 -2930
package/dist/min-ui.js CHANGED
@@ -1,34 +1,34 @@
1
- (function(je){var xl;je.ui=je.ui||{},je.services=je.services||{},je.services.notify=je.services.notify||{};const ts=Symbol("cms.ui.rodPathRaw"),Fn=Symbol("cms.ui.rodPathEnhanced"),Ls=Symbol("cms.ui.rodPathPatchedH"),On=Symbol("cms.ui.rodPathWrappedUI"),xn=new WeakMap,Is=new WeakMap,zs=new WeakMap,Bt=[],Ps=t=>{if(typeof t=="number")return Number.isInteger(t)&&t>=0;if(typeof t!="string"||t===""||t[0]==="-"||t.includes("."))return!1;const e=Number(t);return Number.isInteger(e)&&e>=0&&String(e)===t},ns=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"},an=t=>{if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};let ss=!1;const ql=()=>{ss||(ss=!0,queueMicrotask(()=>{ss=!1,Bt.length=0}))},Xl=t=>{Bt.push(t),Bt.length>128&&Bt.splice(0,Bt.length-128),ql()},Js=()=>{if(!Bt.length)return null;const t=Bt.slice();return Bt.length=0,{items:t,index:0}},Es=(t,e)=>{if(!t)return null;const n=t.items[t.index];return!n||!Object.is(n.value,e)?null:(t.index+=1,n)},ls=t=>t&&typeof t=="object"&&t[ts]?t[ts]:t,os=(t,e)=>{const n=xn.get(t);if(!n)return;let s=n.rawGet();for(const o of e){if(s==null)return;s=s[o]}return s},Ql=(t,e,n)=>{const s=xn.get(t);if(!s)return;const o=ls(n);if(!e.length){if(Object.is(s.rawGet(),o))return;s.rawSet(o);return}let r=s.rawGet();(!r||typeof r!="object")&&(r=Ps(e[0])?[]:{});let v=r;for(let c=0;c<e.length-1;c++){const a=e[c];let b=v[a];if(!b||typeof b!="object"){const E=e[c+1];b=Ps(E)?[]:{},v[a]=b}v=b}Object.is(v[e[e.length-1]],o)||(v[e[e.length-1]]=o,s.rawSet(r))},Ts=(t,e)=>[()=>os(t,e),n=>Ql(t,e,n)],Rs=(t,e,n=[])=>{if(!e||typeof e!="object")return e;let s=Is.get(t);s||(s=new WeakMap,Is.set(t,s));const o=s.get(e);if(o)return o;const r=new Proxy(e,{get(v,c,a){if(c===ts)return v;const b=Reflect.get(v,c,a);if(typeof c=="symbol")return b;const E=n.concat(c);return b&&typeof b=="object"?Rs(t,b,E):typeof b=="function"?b.bind(a):(ns(b)&&Xl({rod:t,path:E,value:b}),b)},set(v,c,a,b){const E=ls(a),k=Reflect.get(v,c,b);if(Object.is(k,E))return!0;const S=Reflect.set(v,c,E,b);if(S){const I=xn.get(t);I==null||I.rawSet(I.rawGet())}return S},deleteProperty(v,c){const a=Reflect.has(v,c),b=Reflect.deleteProperty(v,c);if(b&&a){const E=xn.get(t);E==null||E.rawSet(E.rawGet())}return b}});return s.set(e,r),r},Ms=t=>{if(!t||typeof t!="object"||t.type!=="rod"||t[Fn])return t;const e=Object.getOwnPropertyDescriptor(t,"value");if(!e||typeof e.get!="function"||typeof e.set!="function")return t;const n=()=>e.get.call(t),s=o=>e.set.call(t,ls(o));return xn.set(t,{rawGet:n,rawSet:s}),Object.defineProperty(t,"value",{get(){const o=n();return!o||typeof o!="object"?o:Rs(t,o,[])},set(o){s(o)},configurable:!0}),Object.defineProperty(t,Fn,{value:!0,configurable:!1}),t},Zl=()=>{if(typeof window._.rod!="function"||window._.rod[Fn])return;const t=window._.rod,e=function(...s){return Ms(t(...s))};Object.defineProperty(e,Fn,{value:!0,configurable:!1}),window._.rod=e};je.ui.withoutRodPathCapture=t=>{const e=Bt.length;try{return t()}finally{Bt.length=e}};const is=(t,e,n="")=>{if(Array.isArray(t)){let r=!1;const v=t.map(c=>{const a=is(c,e,"");return a!==c&&(r=!0),a});return r?v:t}if(ns(t)){const r=Es(e,t);return r?n==="model"?Ts(r.rod,r.path):()=>os(r.rod,r.path):t}if(!an(t))return t;let s=!1;const o={};for(const r of Object.keys(t)){const v=is(t[r],e,r);o[r]=v,v!==t[r]&&(s=!0)}return s?o:t},as=(t,e,n="")=>{if(Array.isArray(t)){let r=!1;const v=t.map(c=>{const a=as(c,e,"");return a!==c&&(r=!0),a});return r?v:t}if(ns(t)){const r=Es(e,t);return r?n==="model"?Ts(r.rod,r.path):()=>os(r.rod,r.path):t}if(!an(t))return t;let s=!1;const o={};for(const r of Object.keys(t)){const c=r==="model"||r==="children"?as(t[r],e,r):t[r];o[r]=c,c!==t[r]&&(s=!0)}return s?o:t},Fs=t=>{if(typeof t!="function"||t[On])return t;const e=zs.get(t);if(e)return e;const n=function(...o){const r=Js();if(!r)return t.apply(this,o);let v=!1;const c=o.map(a=>{const b=as(a,r,"");return b!==a&&(v=!0),b});return t.apply(this,v?c:o)};return Object.defineProperty(n,On,{value:!0,configurable:!1}),zs.set(t,n),n},eo=()=>{const t=je.ui;if(!(!t||t[On])){Object.defineProperty(t,On,{value:!0,configurable:!1});for(const e of Object.keys(t))typeof t[e]=="function"&&(t[e]=Fs(t[e]));je.ui=new Proxy(t,{get(e,n,s){return Reflect.get(e,n,s)},set(e,n,s,o){const r=typeof s=="function"?Fs(s):s;return Reflect.set(e,n,r,o)}})}},to=()=>{if(!window._||window._[Ls])return;Object.defineProperty(window._,Ls,{value:!0,configurable:!1});const t=new Set(["rod","rodBind","rodFromSignal"]);for(const e of Object.keys(window._)){if(t.has(e))continue;const n=window._[e];typeof n=="function"&&(window._[e]=function(...o){const r=Js();if(!r)return n.apply(this,o);let v=!1;const c=o.map(a=>{const b=is(a,r,"");return b!==a&&(v=!0),b});return n.apply(this,v?c:o)})}};Zl(),((xl=JSswift.rod)==null?void 0:xl._all)instanceof Set&&JSswift.rod._all.forEach(t=>Ms(t)),to(),eo();const Os={error:"danger",danger:"danger",warn:"warning",warning:"warning",success:"success",info:"info",primary:"primary",secondary:"secondary",light:"light",dark:"dark"},fi=new Set(Object.values(Os)),no=new Set(["none","xxs","xs","sm","md","lg","xl","xxl","xxxl","full"]),so=new Set(["none","sm","md","lg"]),_n={xxs:{font:"9px",pad:"2px 5px"},xs:{font:"10px",pad:"2px 6px"},sm:{font:"11px",pad:"2px 7px"},md:{font:"12px",pad:"2px 8px"},lg:{font:"13px",pad:"3px 10px"},xl:{font:"14px",pad:"4px 12px"},xxl:{font:"15px",pad:"5px 14px"},xxxl:{font:"16px",pad:"6px 16px"}},Zt=t=>{if(t.indexOf("-")>-1)return!0},gt=t=>{if(!t)return"";const e=String(t).toLowerCase();return Os[e]||""},lo=t=>{if(t==null)return null;const e=String(t).toLowerCase();return e==="full"?"xxxl":no.has(e)?e:null},Dn=t=>{if(t===!0)return"sm";if(t==null||t===!1)return null;const e=String(t).toLowerCase();return so.has(e)?e:null},kn=t=>t&&typeof t=="object"&&!t.nodeType&&!Array.isArray(t)&&!(t instanceof Function),rs=t=>t&&t.nodeType===1&&String(t.tagName||"").toLowerCase()==="li",en=t=>t==null||t===!1||t===""?[]:Array.isArray(t)?t:[t];JSswift.isUIPlainObject=kn,JSswift.isListItemNode=rs,JSswift.asNodeArray=en;const fn=[{key:"mobile",aliases:["mobile","mobil"],prefix:"cms-"},{key:"tablet",aliases:["tablet"],prefix:"cms-tablet-"},{key:"pc",aliases:["pc","desktop"],prefix:"cms-pc-"}],cs=fn.flatMap(t=>t.aliases),$n=(t,e)=>Object.prototype.hasOwnProperty.call(t||{},e),Nn=(t={},e)=>{if(!e)return null;for(const n of e.aliases){if(!$n(t,n))continue;const s=l(t[n]);if(kn(s))return s}return null},Ds=(t={},e)=>{const n=Array.isArray(e)?e:[e];return fn.some(s=>{const o=Nn(t,s);return!!o&&n.some(r=>$n(o,r))})},oo=t=>String(t).trim().toLowerCase().replace(/\s+/g,"-"),io=(t={},e=[])=>{const n=[];for(const s of fn){const o=Nn(t,s);if(o)for(const r of e){const v=Array.isArray(r.prop)?r.prop:[r.prop];let c=!1,a,b="";for(const S of v)if($n(o,S)){a=l(o[S]),b=S,c=!0;break}if(!c||a==null||a===""||a===!1&&!r.allowFalse)continue;const E=typeof r.map=="function"?r.map(a,{propName:b,props:o,device:s,rule:r}):`${r.class}-${oo(a)}`,k=Array.isArray(E)?E:[E];for(const S of k)S&&n.push(String(S).startsWith("cms-")?S:`${s.prefix}${S}`)}}return n},$s=(t={})=>fn.some(e=>!!Nn(t,e)),ao=(t={},e=[])=>{for(const n of e){if(!$n(t,n))continue;const s=l(t[n]);if(!(s==null||s===""))return s}},ro=(t,e={})=>{var n;return t==null||t===""||t===!1&&!e.allowFalse?"":typeof e.mapValue=="function"?e.mapValue(t,e):typeof t=="number"?e.number==="raw"?String(t):`${t}px`:e.token&&typeof t=="string"&&((n=JSswift.uiSizes)!=null&&n.includes(t))?`var(--cms-${e.token}-${t})`:String(t)},co=(t,e,n)=>{!t||n==null||n===""||(typeof t.setProperty=="function"?t.setProperty(e,n):t[e]=n)},uo=(t,e)=>t==="mobile"?`cms-rsp-${e}`:`cms-rsp-${t}-${e}`,Vs=(t,e)=>{var n;if(!(!t||!e)){if((n=t.classList)!=null&&n.add){t.classList.add(e);return}t.class=ie([t.class,e])}},Bs=(t,e={},n=[])=>{if(!t||!e||!$s(e))return t;const s=t.style||{};let o=!1;for(const r of n){const v=Array.isArray(r.prop)?r.prop:[r.prop],c=(a,b)=>{const E=ao(b,v),k=ro(E,r);if(!k)return;const S=r.var||r.css,I=a==="mobile"?"--cms-rsp-":`--cms-rsp-${a}-`;co(s,`${I}${S}`,k),Vs(t,uo(a,S)),o=!0};c("mobile",e);for(const a of fn){const b=Nn(e,a);b&&c(a.key,b)}}return o&&(t.nodeType||(t.style=s),Vs(t,"cms-rsp")),t};JSswift.uiResponsiveDevices=fn,JSswift.uiResponsiveOmitProps=cs,JSswift.uiResponsivePropsFor=Nn,JSswift.uiResponsiveHasConfig=$s,JSswift.uiResponsiveHasProp=Ds,JSswift.uiResponsiveClasses=io,JSswift.uiApplyResponsiveProps=Bs;const fo=JSswift.omit;JSswift.omit=(t,e=[])=>{const n=Array.isArray(e)?e.concat(cs):cs;return fo(t,n)};const Kt=(t={})=>{var s;const e=[],n={};if(e.push(ge(t.clickable,"cms-clickable"),ge(t.dense,"cms-dense"),ge(t.flat,"cms-flat"),ge(t.border,"cms-border"),ge(t.glossy,"cms-glossy"),ge(t.glow,"cms-glow"),ge(t.glass,"cms-glass"),ge(t.shadow,"cms-shadow"),ge(t.outline,"cms-outline"),ge(t.rounded,"cms-rounded"),ge(t.gradient,"cms-gradient"),ge(t.textGradient,"cms-text-gradient"),ge(t.lightShadow,"cms-light-shadow")),at(t.color))e.push(()=>{const o=l(t.color),r=gt(o);return r?`cms-state-${r}`:""}),n.backgroundColor=()=>{const o=l(t.color);return gt(o)?"":o&&Zt(String(o))?`var(--cms-${o})`:o||""};else{const o=gt(t.color);o?e.push(`cms-state-${o}`):t.color&&Zt(t.color)?n.backgroundColor=`var(--cms-${t.color})`:t.color&&(n.backgroundColor=t.color)}if(at(t.textColor)?n.color=()=>{const o=l(t.textColor);return o&&Zt(String(o))?`var(--cms-${o})`:o||""}:t.textColor&&Zt(t.textColor)?n.color=`var(--cms-${t.textColor})`:t.textColor&&(n.color=t.textColor),at(t.size))e.push(()=>{var r;const o=l(t.size);return typeof o=="string"&&((r=JSswift.uiSizes)!=null&&r.includes(o))?`cms-size-${o}`:""});else{const o=t.size;typeof o=="string"&&((s=JSswift.uiSizes)!=null&&s.includes(o))&&e.push(`cms-size-${o}`)}if(at(t.shadow))e.push(()=>{const o=l(t.shadow),r=Dn(o);return r?`cms-shadow-${r}`:""}),n.boxShadow=()=>{const o=l(t.shadow);return Dn(o)||o==null||o===!1?"":typeof o=="string"?o:""};else{const o=Dn(t.shadow);o?e.push(`cms-shadow-${o}`):t.shadow&&typeof t.shadow=="string"&&(n.boxShadow=t.shadow)}e.length&&(t.class=ie([t.class,...e])),Object.keys(n).length&&(t.style={...n,...t.style||{}})},mo=JSswift.uiNormalizeArgs;JSswift.uiNormalizeArgs=function(t){const e=mo(t),n=e.props||{};if(n&&Object.prototype.hasOwnProperty.call(n,"children")){const s=n.children;(!e.children||e.children.length===0)&&(e.children=Array.isArray(s)?s:[s]),delete n.children}return Kt(n),e};const he=window._;function rn(t){if(!t)return null;if(!Array.isArray(t))return t;const e=[],n=t.slice();for(;n.length;){const s=n.shift();s&&(Array.isArray(s)?n.unshift(...s):e.push(s))}return e.length?e:null}const Hs={padding:"p",paddingTop:"p",paddingRight:"p",paddingBottom:"p",paddingLeft:"p",paddingInline:"p",paddingInlineStart:"p",paddingInlineEnd:"p",paddingBlock:"p",paddingBlockStart:"p",paddingBlockEnd:"p",margin:"m",marginTop:"m",marginRight:"m",marginBottom:"m",marginLeft:"m",marginInline:"m",marginInlineStart:"m",marginInlineEnd:"m",marginBlock:"m",marginBlockStart:"m",marginBlockEnd:"m",width:"w",minWidth:"w",maxWidth:"w",height:"h",minHeight:"h",maxHeight:"h"},go=t=>t===!0?"wrap":t===!1?"nowrap":String(t),js=t=>typeof t=="number"?`repeat(${Math.max(1,Math.round(t))}, minmax(0, 1fr))`:String(t),Ws=[{prop:"display",css:"display",var:"display"},{prop:"direction",css:"flex-direction",var:"flex-direction"},{prop:"wrap",css:"flex-wrap",var:"flex-wrap",allowFalse:!0,mapValue:go},{prop:"align",css:"align-items",var:"align-items"},{prop:"justify",css:"justify-content",var:"justify-content"},{prop:"self",css:"align-self",var:"align-self"},{prop:"justifySelf",css:"justify-self",var:"justify-self"},{prop:"place",css:"place-items",var:"place-items"},{prop:"placeSelf",css:"place-self",var:"place-self"},{prop:["cols","columns"],css:"grid-template-columns",var:"grid-template-columns",mapValue:js},{prop:"rows",css:"grid-template-rows",var:"grid-template-rows",mapValue:js},{prop:"flow",css:"grid-auto-flow",var:"grid-auto-flow",mapValue:t=>String(t).trim().toLowerCase().replace("-"," ")},{prop:"autoRows",css:"grid-auto-rows",var:"grid-auto-rows"},{prop:["span","gridColumn"],css:"grid-column",var:"grid-column",number:"raw"},{prop:["row","rowSpan"],css:"grid-row",var:"grid-row",number:"raw"},{prop:"area",css:"grid-area",var:"grid-area"},{prop:"gap",css:"gap",var:"gap",token:"gap"},{prop:"rowGap",css:"row-gap",var:"row-gap",token:"gap"},{prop:["columnGap","colGap"],css:"column-gap",var:"column-gap",token:"gap"},{prop:"width",css:"width",var:"width",token:"w"},{prop:"minWidth",css:"min-width",var:"min-width",token:"min-w"},{prop:"maxWidth",css:"max-width",var:"max-width",token:"max-w"},{prop:"height",css:"height",var:"height",token:"h"},{prop:"minHeight",css:"min-height",var:"min-height",token:"min-h"},{prop:"maxHeight",css:"max-height",var:"max-height",token:"max-h"},{prop:"padding",css:"padding",var:"padding",token:"p"},{prop:"paddingLeft",css:"padding-left",var:"padding-left",token:"p"},{prop:"paddingRight",css:"padding-right",var:"padding-right",token:"p"},{prop:"paddingTop",css:"padding-top",var:"padding-top",token:"p"},{prop:"paddingBottom",css:"padding-bottom",var:"padding-bottom",token:"p"},{prop:"margin",css:"margin",var:"margin",token:"m"},{prop:"marginLeft",css:"margin-left",var:"margin-left",token:"m"},{prop:"marginRight",css:"margin-right",var:"margin-right",token:"m"},{prop:"marginTop",css:"margin-top",var:"margin-top",token:"m"},{prop:"marginBottom",css:"margin-bottom",var:"margin-bottom",token:"m"},{prop:"fontSize",css:"font-size",var:"font-size",token:"f"},{prop:"fontWeight",css:"font-weight",var:"font-weight",token:"fw",number:"raw"},{prop:"lineHeight",css:"line-height",var:"line-height",token:"lh",number:"raw"},{prop:"letterSpacing",css:"letter-spacing",var:"letter-spacing",token:"ls"},{prop:["borderRadius","radius"],css:"border-radius",var:"border-radius",token:"r"},{prop:"overflow",css:"overflow",var:"overflow"},{prop:"order",css:"order",var:"order",number:"raw"}],Us=Ws.filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return e.some(n=>Object.prototype.hasOwnProperty.call(Hs,n))||e.includes("fontSize")||e.includes("fontWeight")||e.includes("lineHeight")||e.includes("letterSpacing")||e.includes("borderRadius")||e.includes("radius")});JSswift.uiResponsiveStyleRules=Ws,JSswift.uiResponsiveCommonStyleRules=Us;const ho=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),po=(t,e,n,s)=>{e==null||e===!1||e===""||t.style.setProperty(ho(n),ms(e,s))};function Ye(t,e){e.size&&(typeof e.size=="number"?t.style.setProperty("--cms-font-size",`${e.size}px`):JSswift.uiSizes.includes(e.size)&&t.style.setProperty("--cms-font-size",`var(--cms-font-size-${e.size})`)),Object.entries(Hs).forEach(([n,s])=>{Ds(e,n)||po(t,e[n],n,s)}),Bs(t,e,Us),e.gradient&&typeof e.gradient=="number"&&t.style.setProperty("--set-gradient-deg",`${e.gradient}deg`),e.radius&&(typeof e.radius=="number"?t.style.setProperty("--set-border-radius",`${e.radius}px`):JSswift.uiSizes.includes(e.radius)?t.style.setProperty("--set-border-radius",`var(--cms-r-${e.radius})`):t.style.setProperty("--set-border-radius",`${e.radius}`))}function us(t={},...e){const n=document.createElement("option");t&&typeof t=="object"&&(t.value!=null&&(n.value=String(t.value)),t.label!=null&&(n.label=String(t.label)),t.disabled!=null&&(n.disabled=!!t.disabled),t.selected!=null&&(n.selected=!!t.selected),t.class!=null&&(n.className=String(t.class)));const s=e.flat?e.flat(1/0):e;return s.length?s.forEach(o=>{o==null||o===!1||(o instanceof Node?n.appendChild(o):n.appendChild(document.createTextNode(String(o))))}):t&&t.text!=null&&(n.textContent=String(t.text)),n}JSswift.ui.getSlot=(t,e)=>t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:null,JSswift.ui.renderSlot=(t,e,n,s)=>{const o=JSswift.ui.getSlot(t,e),v=o!=null?typeof o=="function"?o(n||{}):o:s;return v==null?null:rn(JSswift.ui.slot(v))};const P=(t,e,n,s)=>{const o=JSswift.ui.renderSlot(t,e,n,s);return o?Array.isArray(o)?o:[o]:[]},mn=new Set;let Vn=!1;const bo=new Set(["ctrl","alt","shift","meta"]),yo={control:"ctrl",ctl:"ctrl",option:"alt",opt:"alt",command:"meta",cmd:"meta","\u2318":"meta","\u2303":"ctrl","\u2325":"alt","\u21E7":"shift",esc:"escape",return:"enter",plus:"+",spacebar:"space",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete"},wo={ctrl:"Ctrl",alt:"Alt",shift:"Shift",meta:"Meta",escape:"Esc",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",delete:"Del",arrowup:"Up",arrowdown:"Down",arrowleft:"Left",arrowright:"Right",pageup:"PgUp",pagedown:"PgDn"},Gs=()=>{if(typeof navigator=="undefined")return!1;const t=String(navigator.platform||navigator.userAgent||"");return/(mac|iphone|ipad|ipod)/i.test(t)},ds=t=>{if(t==null)return"";const e=String(t).trim().toLowerCase();return e?yo[e]||e:""},Ks=t=>{if(t==null||t===!1)return null;const e=String(t).trim();if(!e)return null;const n=e.split("+").map(ds).filter(Boolean);if(!n.length)return null;const s={raw:e,key:"",ctrl:!1,alt:!1,shift:!1,meta:!1};return n.forEach(o=>{if(o==="mod"){Gs()?s.meta=!0:s.ctrl=!0;return}if(bo.has(o)){s[o]=!0;return}s.key=o}),s.key?s:null},vo=t=>t==null||t===!1?[]:(Array.isArray(t)?t:[t]).map(n=>{var o,r,v;if(n==null||n===!1)return null;if(typeof n=="object"&&!Array.isArray(n)){const c=Ks((v=(r=(o=n.shortcode)!=null?o:n.shortcut)!=null?r:n.keys)!=null?v:n.key);return c?{...n,...c}:null}const s=Ks(n);return s?{...s}:null}).filter(Boolean),Ys=(t={})=>{var e,n,s;return vo((s=(n=(e=t.shortcode)!=null?e:t.shortcut)!=null?n:t.hotkey)!=null?s:t.keys)},So=(t={})=>t.showShortcode===!0||t.showShortcut===!0,An=t=>{const e=ds(t);if(!e)return"";const n={...wo};return Gs()&&(n.alt="Option",n.meta="Cmd"),n[e]?n[e]:e.length===1?e.toUpperCase():e.replace(/(^|[-_ ])(\w)/g,(s,o,r)=>`${o}${r.toUpperCase()}`)},Co=t=>{if(!t)return"";const e=[];return t.ctrl&&e.push(An("ctrl")),t.alt&&e.push(An("alt")),t.shift&&e.push(An("shift")),t.meta&&e.push(An("meta")),e.push(An(t.key)),e.filter(Boolean).join("+")},xo=t=>(Array.isArray(t)?t:[]).map(Co).filter(Boolean).join(" / "),fs=(t={},e={})=>{const n=Ys(t);if(!So(t)||!n.length||typeof document=="undefined")return null;const s=document.createElement("span");return s.className=e.className||"cms-shortcode",s.setAttribute("aria-hidden","true"),s.textContent=xo(n),s},_o=t=>{const e=(t==null?void 0:t.nodeType)===1?t:t==null?void 0:t.parentElement;if(!e||typeof e.closest!="function")return!1;if(e.isContentEditable)return!0;const n=e.closest("input, textarea, select, [contenteditable], [contenteditable='true'], [contenteditable='plaintext-only']");return!(!n||"disabled"in n&&n.disabled)},ko=(t,e)=>!t||!e||!!t.ctrlKey!=!!e.ctrl||!!t.altKey!=!!e.alt||!!t.shiftKey!=!!e.shift||!!t.metaKey!=!!e.meta?!1:ds(t.key)===e.key,qs=()=>{mn.size||!Vn||typeof document=="undefined"||(document.removeEventListener("keydown",Xs,!0),Vn=!1)};function Xs(t){var s,o,r,v,c,a;if(!mn.size||!t||t.defaultPrevented||t.isComposing)return;const e=_o(t.target),n=Array.from(mn);for(let b=n.length-1;b>=0;b-=1){const E=n[b],k=E==null?void 0:E.anchor;if(!k||!k.isConnected){mn.delete(E);continue}if(((s=E.isEnabled)==null?void 0:s.call(E))===!1)continue;const S=E.specs.find(ae=>{var K,oe;const F=(oe=(K=ae.allowInEditable)!=null?K:E.allowInEditable)!=null?oe:!1;return e&&!F?!1:ko(t,ae)});if(!S)continue;const I=(r=(o=S.preventDefault)!=null?o:E.preventDefault)!=null?r:!0,V=(c=(v=S.stopPropagation)!=null?v:E.stopPropagation)!=null?c:!0;if(I&&t.preventDefault(),V&&t.stopPropagation(),((a=E.action)==null?void 0:a.call(E,t,S,k))!==!1)break}qs()}const cn=(t,e={},n={})=>{var v,c;const s=Ys(e);if(!t||!s.length||typeof document=="undefined")return null;const o={anchor:t,specs:s,action:typeof n.action=="function"?n.action:()=>{var a;return(a=t.click)==null?void 0:a.call(t)},isEnabled:typeof n.isEnabled=="function"?n.isEnabled:null,allowInEditable:!!n.allowInEditable,preventDefault:(v=n.preventDefault)!=null?v:!0,stopPropagation:(c=n.stopPropagation)!=null?c:!0};mn.add(o),Vn||(document.addEventListener("keydown",Xs,!0),Vn=!0);const r=()=>{mn.delete(o),qs()};return JSswift._registerCleanup(t,r),r},gn=(t,e={})=>{var n;if(!t||typeof t.focus!="function")return!1;try{t.focus({preventScroll:(n=e.preventScroll)!=null?n:!0})}catch(s){t.focus()}if(e.selectText&&typeof t.select=="function")try{t.select()}catch(s){}return!0},ms=(t,e="size")=>typeof t=="number"?t+"px":JSswift.uiSizes.includes(t)?`var(--cms-${e}-${t})`:t,Ot=(t,e=JSswift.uiSizes)=>n=>{const s=String(n).trim();return e!=null&&e.includes(s)?`${t}-${s}`:""},Ht=t=>e=>`${t}-${String(e).trim().toLowerCase().replace(/\s+/g,"-")}`,No=t=>{if(t===!0)return"wrap-wrap";if(t===!1)return"wrap-nowrap";const e=String(t).trim().toLowerCase();return e==="false"||e==="no"||e==="none"?"wrap-nowrap":e==="reverse"?"wrap-reverse":`wrap-${e}`},gs=(t,e,n)=>t?e:n,Ao=t=>{const e=l(t);if(e==null||e==="")return"";if(e==="auto")return"col-auto";if(e===!0)return"col-24";const n=Number(e);if(Number.isFinite(n)&&n>0)return`col-${Math.max(1,Math.min(24,Math.round(n)))}`;if(typeof e=="string"){const s=e.trim();if(/^\d+$/.test(s))return`col-${Math.max(1,Math.min(24,Number(s)))}`}return""},Lo=t=>{const e=Number(t);return Number.isFinite(e)&&e>0?`grid-cols-${Math.max(1,Math.min(24,Math.round(e)))}`:""},Ue=(t,e)=>{const n=Array.isArray(e)?e:[e];return JSswift.uiResponsiveDevices.some(s=>{const o=JSswift.uiResponsivePropsFor(t,s);return!!o&&n.some(r=>Object.prototype.hasOwnProperty.call(o,r))})},hn=t=>JSswift.uiResponsiveDevices.find(e=>e.key===t),un=[{prop:"gap",class:"gap",map:Ot("gap")},{prop:"rowGap",class:"gap-y",map:Ot("gap-y")},{prop:["columnGap","colGap"],class:"gap-x",map:Ot("gap-x")},{prop:"direction",class:"dir",map:Ht("dir")},{prop:"wrap",class:"wrap",allowFalse:!0,map:No},{prop:"align",class:"align",map:Ht("align")},{prop:"justify",class:"justify",map:Ht("justify")},{prop:"width",class:"w",map:Ot("w")},{prop:"minWidth",class:"min-w",map:Ot("min-w")},{prop:"maxWidth",class:"max-w",map:Ot("max-w")},{prop:"height",class:"h",map:Ot("h")},{prop:"minHeight",class:"min-h",map:Ot("min-h")},{prop:"maxHeight",class:"max-h",map:Ot("max-h")},{prop:"padding",class:"p",map:Ot("p")},{prop:"margin",class:"m",map:Ot("m")}],Io=un.filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return!e.includes("align")&&!e.includes("justify")}),Qs=[{prop:["col","span"],class:"col",map:Ao},{prop:"auto",class:"col",map:t=>t?"col-auto":""},{prop:"inline",class:"display",allowFalse:!0,map:t=>gs(t,"display-inline-flex","display-flex")},{prop:"self",class:"self",map:Ht("self")},...un],Zs=[{prop:["cols","columns"],class:"grid-cols",map:Lo},{prop:"inline",class:"display",allowFalse:!0,map:t=>gs(t,"display-inline-grid","display-grid")},{prop:"flow",class:"grid-flow",map:t=>`grid-flow-${String(t).trim().toLowerCase().replace(/\s+/g,"-")}`},...un],el=[{prop:"inline",class:"display",allowFalse:!0,map:t=>gs(t,"display-inline-flex","display-flex")},{prop:"direction",class:"dir",map:Ht("dir")},{prop:"contentAlign",class:"align",map:Ht("align")},{prop:"contentJustify",class:"justify",map:Ht("justify")},{prop:"align",class:"self",map:Ht("self")},{prop:"justify",class:"justify-self",map:Ht("justify-self")},{prop:"place",class:"place-self",map:Ht("place-self")},...Io],zo=(JSswift.uiResponsiveStyleRules||[]).filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return!e.includes("span")&&!e.includes("gridColumn")});he.Row=(...t)=>{var g,f,p,O,W;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(u,x,h={})=>{const z=Array.isArray(u)?u:[u];for(const B of z)if(JSswift.ui.getSlot(s,B)!=null)return P(s,B,h,x);return x==null?[]:P(null,"default",h,x)},r=u=>{var x;return u==null||u===!1||u===""?"":typeof u=="number"?`${u}px`:typeof u=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(u))?`var(--cms-s-${u})`:String(u)},v=u=>{var x;return u==null||u===!1||u===""?"":typeof u=="number"?`${u}px`:typeof u=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(u))?`var(--cms-w-${u})`:String(u)},c=JSswift.omit(e,["slots","start","left","startClass","body","center","bodyClass","centerClass","end","right","endClass","align","justify","wrap","gap","rowGap","columnGap","direction","reverse","inline","full","width","minWidth","maxWidth",...JSswift.uiResponsiveOmitProps]);c.class=ie(["cms-row",JSswift.uiResponsiveClasses({mobile:e},un),JSswift.uiResponsiveClasses(e,un),e.class]);const a={...e.style||{}},b=Xe([e.direction,e.reverse],()=>{const u=l(e.direction);return u!=null&&u!==""?String(u):l(e.reverse)?"row-reverse":""}),E=Le(e.align),k=Le(e.justify),S=Le(e.wrap,u=>typeof u=="boolean"?u?"wrap":"nowrap":String(u)),I=Le(e.gap,r),V=Le(e.rowGap,r),$=Le(e.columnGap,r),ae=Le(e.inline,u=>u?"inline-flex":"flex"),F=Le(e.width,v),K=Le(e.minWidth,v),oe=Le(e.maxWidth,v),H=Le(e.full,u=>u?"100%":"",""),Y=Xe([e.inline,e.full,e.width],()=>{const u=!!l(e.inline),x=!!l(e.full),h=l(e.width)!=null&&l(e.width)!==!1&&l(e.width)!=="";return!u||x||h?"":"max-content"});b!=null&&!Ue(e,"direction")&&(a.flexDirection=b),E!=null&&!Ue(e,"align")&&(a.alignItems=E),k!=null&&!Ue(e,"justify")&&(a.justifyContent=k),S!=null&&!Ue(e,"wrap")&&(a.flexWrap=S),I!=null&&!Ue(e,"gap")&&(a.gap=I),V!=null&&!Ue(e,"rowGap")&&(a.rowGap=V),$!=null&&!Ue(e,"columnGap")&&(a.columnGap=$),ae!=null&&(a.display=ae),Y!=null&&(a.width=Y),F!=null&&!Ue(e,"width")&&(a.width=F),K!=null&&!Ue(e,"minWidth")&&(a.minWidth=K),oe!=null&&!Ue(e,"maxWidth")&&(a.maxWidth=oe),H!=null&&(a.width=H),Object.keys(a).length&&(c.style=a),JSswift.uiApplyResponsiveProps(c,e,JSswift.uiResponsiveStyleRules);const Q={props:e},le=o(["start","left"],(g=e.start)!=null?g:e.left,Q),re=o(["body","center","default"],(p=(f=e.body)!=null?f:e.center)!=null?p:n,Q),Z=o(["end","right"],(O=e.end)!=null?O:e.right,Q);if(!(le.length||Z.length||e.body!=null||e.center!=null||e.startClass||e.bodyClass||e.centerClass||e.endClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"left")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"center")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"right")!=null)){const u=P(s,"default",Q,n),x=_.div(c,...u);return Ye(x,e),x}const T={display:"flex",alignItems:"inherit",gap:"inherit",flexWrap:"inherit",minWidth:0},j=(W=e.bodyClass)!=null?W:e.centerClass,q=Xe([e.direction,e.reverse],()=>(l(e.direction)||(l(e.reverse)?"row-reverse":"row"))==="row"?"auto":""),ce=[le.length?_.div({class:ie(["cms-row-start",e.startClass]),style:{...T}},...le):null,re.length?_.div({class:ie(["cms-row-body",j]),style:{...T,flex:"1 1 auto"}},...re):null,Z.length?_.div({class:ie(["cms-row-end",e.endClass]),style:{...T,justifyContent:"flex-end",marginInlineStart:q}},...Z):null].filter(Boolean),J=_.div(c,...ce);return Ye(J,e),J};function Lt(t){return Array.isArray(t)&&(t.length===2||t.length===3&&typeof t[2]=="function")&&typeof t[0]=="function"&&typeof t[1]=="function"}function Jt(t){return!!t&&t.type==="rod"}function at(t){return typeof t=="function"||Jt(t)||Lt(t)}function l(t){return typeof t=="function"?t():Jt(t)?t.value:Lt(t)?t[0]():t}function Po(t){const e=Array.isArray(t)?[...t]:[t];for(;e.length;){const n=e.pop();if(at(n))return!0;Array.isArray(n)&&e.push(...n)}return!1}function ie(t){const e=Po(t),n=()=>{const s=[],o=Array.isArray(t)?[...t]:[t];for(;o.length;){const r=o.shift();if(r==null||r===!1)continue;const v=l(r);if(!(v==null||v===!1||v==="")){if(Array.isArray(v)){o.unshift(...v);continue}s.push(v)}}return s.join(" ")};return e?n:n()}function Dt(t){const e=ie(t);return typeof e=="function"?e():e}function ge(t,e,n=""){return at(t)?()=>l(t)?e:n:t?e:n}function tl(t,e,n=""){return at(t)?()=>{const s=l(t);return s==null||s===""?"":`${e}${s}${n}`}:t==null||t===""?"":`${e}${t}${n}`}function Xe(t,e){return(Array.isArray(t)?t:[t]).some(at)?()=>e():e()}function Le(t,e,n=""){return at(t)?()=>{const s=l(t);return s==null||s===!1?n:e?e(s):s}:t==null||t===!1?null:e?e(t):t}JSswift.uiIsReactive=at,JSswift.uiUnwrap=l,JSswift.uiClass=ie,JSswift.uiClassStatic=Dt,JSswift.uiWhen=ge,JSswift.uiClassValue=tl,JSswift.uiComputed=Xe,JSswift.uiStyleValue=Le,he.Col=(...t)=>{var z,B,U,de,L,m;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=N=>Object.prototype.hasOwnProperty.call(e,N),r=(N,A,ee={})=>{const me=Array.isArray(N)?N:[N];for(const ye of me)if(JSswift.ui.getSlot(s,ye)!=null)return P(s,ye,ee,A);return A==null?[]:P(null,"default",ee,A)},v=N=>{var A;return N==null||N===!1||N===""?"":typeof N=="number"?`${N}px`:typeof N=="string"&&((A=JSswift.uiSizes)!=null&&A.includes(N))?`var(--cms-s-${N})`:String(N)},c=N=>{var A;return N==null||N===!1||N===""?"":typeof N=="string"&&((A=JSswift.uiSizes)!=null&&A.includes(N))?ms(N,"size"):Be(N)},a=(N,A)=>{const ee=l(N);if(ee==null||ee===!1||ee==="")return"";if(ee==="auto")return A==="cms-col-"?"cms-col-auto":"";if(ee===!0)return`${A}24`;const me=Number(ee);if(Number.isFinite(me)&&me>0)return`${A}${Math.max(1,Math.min(24,Math.round(me)))}`;if(typeof ee=="string"){const ye=ee.trim();if(!ye)return"";if(ye.startsWith(A))return ye;if(/^\d+$/.test(ye))return`${A}${Math.max(1,Math.min(24,Number(ye)))}`}return""},b=()=>{const N=l(e.flex);if(N!=null&&N!==!1&&N!=="")return String(N);if(l(e.fill))return"1 1 auto";const A=o("grow"),ee=o("shrink"),me=o("basis");if(!A&&!ee&&!me)return"";const ye=A?l(e.grow):0,be=ee?l(e.shrink):1,M=me?c(l(e.basis)):"auto";return`${ye} ${be} ${M||"auto"}`},E=Xe([e.auto,e.col,e.span],()=>{if(l(e.auto))return"cms-col-auto";const N=o("span")?e.span:e.col;return a(N,"cms-col-")||"cms-col"}),k=JSswift.omit(e,["slots","col","span","sm","md","lg","auto","size","width","minWidth","maxWidth","height","minHeight","maxHeight","gap","rowGap","columnGap","align","justify","inline","center","stack","flex","fill","grow","shrink","basis","self","order","scroll","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass",...JSswift.uiResponsiveOmitProps]),S={...e.style||{}};!Ue(e,"minWidth")&&S.minWidth==null&&(S.minWidth=0);const I=Le(e.gap,v),V=Le(e.rowGap,v),$=Le(e.columnGap,v),ae=Le(e.align),F=Le(e.justify),K=o("width")?e.width:e.size,oe=Le(K,c),H=Le(e.minWidth,c),Y=Le(e.maxWidth,c),Q=Le(e.height,c),le=Le(e.minHeight,c),re=Le(e.maxHeight,c),Z=Le(e.self),ne=Le(e.order,N=>String(N)),T=Le(e.scroll,N=>N?"auto":"",""),j=Xe([e.flex,e.fill,e.grow,e.shrink,e.basis],b),q=Xe([e.center,e.align,e.justify],()=>!!l(e.center)&&(l(e.align)==null||l(e.align)==="")&&(l(e.justify)==null||l(e.justify)===""));j!=null&&j!==""&&(S.flex=j),Z!=null&&!Ue(e,"self")&&(S.alignSelf=Z),ne!=null&&(S.order=ne),T!=null&&T!==""&&(S.overflow=T),oe!=null&&oe!==""&&!Ue(e,["width","size"])&&(S.width=oe,!o("flex")&&!o("fill")&&!o("grow")&&!o("shrink")&&!o("basis")&&(S.flex="0 0 auto")),H!=null&&!Ue(e,"minWidth")&&(S.minWidth=H),Y!=null&&!Ue(e,"maxWidth")&&(S.maxWidth=Y),Q!=null&&!Ue(e,"height")&&(S.height=Q),le!=null&&!Ue(e,"minHeight")&&(S.minHeight=le),re!=null&&!Ue(e,"maxHeight")&&(S.maxHeight=re),Object.keys(S).length&&(k.style=S);const ce={props:e},J=r(["start","top","header","before"],(U=(B=(z=e.start)!=null?z:e.top)!=null?B:e.header)!=null?U:e.before,ce),g=o("body")?e.body:o("content")?e.content:n,f=r(["body","content","default"],g,ce),p=r(["end","bottom","footer","after"],(m=(L=(de=e.end)!=null?de:e.bottom)!=null?L:e.footer)!=null?m:e.after,ce),O=J.length||p.length||o("start")||o("top")||o("header")||o("before")||o("body")||o("content")||o("end")||o("bottom")||o("footer")||o("after")||e.startClass||e.bodyClass||e.contentClass||e.endClass||e.topClass||e.headerClass||e.bottomClass||e.footerClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"top")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"content")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"bottom")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,W=Xe([e.stack,e.gap,e.rowGap,e.columnGap,e.align,e.justify,e.center],()=>l(e.stack)||O||[l(e.gap),l(e.rowGap),l(e.columnGap),l(e.align),l(e.justify)].some(A=>A!=null&&A!==!1&&A!=="")?!0:!!l(e.center));if(k.class=ie(["cms-col",E,Xe(e.sm,()=>a(e.sm,"cms-sm-col-")),Xe(e.md,()=>a(e.md,"cms-md-col-")),Xe(e.lg,()=>a(e.lg,"cms-lg-col-")),JSswift.uiResponsiveClasses({mobile:e},Qs),JSswift.uiResponsiveClasses(e,Qs),ge(W,"cms-col-flex"),ge(e.inline,"cms-col-inline"),e.class]),I!=null&&!Ue(e,"gap")&&(S.gap=I),V!=null&&!Ue(e,"rowGap")&&(S.rowGap=V),$!=null&&!Ue(e,"columnGap")&&(S.columnGap=$),ae!=null&&!Ue(e,"align")?S.alignItems=ae:q!=null&&q!==""&&(S.alignItems=q?"center":""),F!=null&&!Ue(e,"justify")?S.justifyContent=F:q!=null&&q!==""&&(S.justifyContent=q?"center":""),Object.keys(S).length&&(k.style=S),JSswift.uiApplyResponsiveProps(k,e,JSswift.uiResponsiveStyleRules),!O){const N=_.div(k,...P(s,"default",ce,n));return Ye(N,e),N}const u={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},x=[J.length?_.div({class:ie(["cms-col-start",e.startClass,e.topClass,e.headerClass]),style:{...u}},...J):null,f.length?_.div({class:ie(["cms-col-body",e.bodyClass,e.contentClass]),style:{...u,flex:"1 1 auto"}},...f):null,p.length?_.div({class:ie(["cms-col-end",e.endClass,e.bottomClass,e.footerClass]),style:{...u}},...p):null].filter(Boolean),h=_.div(k,...x);return Ye(h,e),h},he.Spacer=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=JSswift.omit(e,["slots"]);o.class=ie(["cms-spacer",e.class]);const r=P(s,"default",{},n);return _.div(o,...r)},he.Container=(...t)=>{var p,O,W,u;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o={...e},r=x=>Object.prototype.hasOwnProperty.call(e,x),v={xxs:"360px",xs:"480px",sm:"640px",md:"820px",lg:"1100px",xl:"1280px",xxl:"1440px",narrow:"760px",prose:"760px",wide:"1360px"},c=x=>{if(x==null||x===!1||x==="")return"";if(typeof x=="number")return`${x}px`;const h=String(x).trim().toLowerCase();return h?h==="full"||h==="fluid"?"100%":v[h]||String(x):""},a=x=>{var h;return x==null||x===!1||x===""?"":typeof x=="number"?`${x}px`:typeof x=="string"&&((h=JSswift.uiSizes)!=null&&h.includes(x))?`var(--cms-s-${x})`:String(x)},b=x=>{if(x==null||x===!1||x==="")return"";if(typeof x=="number"&&Number.isFinite(x))return`repeat(${Math.max(1,Math.floor(x))}, minmax(0, 1fr))`;const h=String(x).trim();return h?/^\d+$/.test(h)?`repeat(${Math.max(1,Number(h))}, minmax(0, 1fr))`:h:""},E=x=>x==null||x===""?"":x===!0?"wrap":x===!1?"nowrap":String(x),k={props:e},S=(x,h)=>{if(!(h==null||h===!1)){if(Array.isArray(h)){h.forEach(z=>S(x,z));return}if(h!=null&&h.nodeType){x.appendChild(h);return}x.appendChild(document.createTextNode(String(h)))}},I=(x,h)=>{const z=JSswift.ui.getSlot(s,x);if(z!=null)return P(s,x,k,null);if(typeof h=="function"){const B=_.div({class:`cms-container-slot-${x}`});return JSswift.reactive.effect(()=>{const U=rn(JSswift.ui.slot(h(k)));B.replaceChildren(),Array.isArray(U)?U.forEach(de=>S(B,de)):S(B,U)},`UI.Container:${x}`),[B]}return P(s,x,k,h)},V=r("content")?e.content:n!=null&&n.length?n:null,$=I("before",(p=e.before)!=null?p:e.top),ae=I("header",e.header),F=[...I("left",e.left),...I("start",e.start)],K=I("body",r("body")?e.body:null),oe=(()=>{const x=I("content",r("content")?e.content:null);return x.length?x:I("default",V)})(),H=[...I("right",e.right),...I("end",e.end)],Y=I("footer",e.footer),Q=I("after",(O=e.after)!=null?O:e.bottom),le=$.length||ae.length||F.length||H.length||Y.length||Q.length||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"left")!=null||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"right")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,re=!!le||K.length>0&&(JSswift.ui.getSlot(s,"body")!=null||le),Z=()=>{var h;const x=String(l((h=e.layout)!=null?h:e.display)||"").trim().toLowerCase();return["flex","grid","stack"].includes(x)?x:["inline","inline-flex","inlineflex"].includes(x)||l(e.inline)?"inline":l(e.grid)||l(e.cols)!=null?"grid":x==="block"?"block":l(e.direction)!=null||l(e.wrap)!=null||l(e.align)!=null||l(e.justify)!=null||l(e.gap)!=null||F.length||H.length?"flex":"block"},ne=Xe([e.layout,e.display,e.inline,e.grid,e.cols,e.direction,e.wrap,e.align,e.justify,e.gap],()=>{const x=Z();return x==="block"?"":`is-${x}`}),T={...o.style||{}},j=(x,h)=>{h!=null&&(T[x]=h)};j("maxWidth",Xe([e.maxWidth,e.fluid],()=>l(e.fluid)?"none":c(l(e.maxWidth))||"")),j("width",Le(e.width,c)),j("minWidth",Le(e.minWidth,c)),j("--cms-container-padding",Le(e.padding,a)),j("--cms-container-padding-x",Le((W=e.paddingX)!=null?W:e.gutter,a)),j("--cms-container-padding-y",Le(e.paddingY,a)),j("--cms-container-gap",Le(e.gap,a)),j("--cms-container-section-gap",Le((u=e.sectionGap)!=null?u:e.gap,a)),j("--cms-container-cols",Le(e.cols,b)),j("--cms-container-align",Le(e.align,x=>String(x))),j("--cms-container-justify",Le(e.justify,x=>String(x))),j("--cms-container-direction",Le(e.direction,x=>String(x))),j("--cms-container-wrap",Le(e.wrap,E));const q=JSswift.omit(o,["after","afterClass","align","as","before","beforeClass","body","bodyClass","bottom","cols","content","contentClass","direction","display","end","endClass","fluid","footer","footerClass","gap","grid","gutter","header","headerClass","inline","justify","layout","left","mainClass","maxWidth","minWidth","padding","paddingX","paddingY","right","sectionGap","slots","start","startClass","tag","top","width","wrap"]);q.class=ie(["cms-container",ge(e.fluid,"is-fluid"),ge(re,"has-structure"),re?"":ne,o.class]),q.style=T,JSswift.uiApplyResponsiveProps(q,e,JSswift.uiResponsiveStyleRules);const ce=(x,h,z)=>h.length?_.div({class:ie(["cms-container-section",`cms-container-${x}`,z])},...h):null,J=K.length?_.div({class:ie(["cms-container-body",re?ne:"",e.bodyClass])},...K):F.length||oe.length||H.length?_.div({class:ie(["cms-container-body",re?ne:"",e.bodyClass])},ce("start",F,e.startClass),oe.length?_.div({class:ie(["cms-container-main",e.mainClass,e.contentClass])},...oe):null,ce("end",H,e.endClass)):null,g=(()=>{var h;const x=String(l((h=e.tag)!=null?h:e.as)||"div").toLowerCase();return typeof _[x]=="function"?_[x]:_.div})(),f=re?g(q,ce("before",$,e.beforeClass),ce("header",ae,e.headerClass),J,ce("footer",Y,e.footerClass),ce("after",Q,e.afterClass)):g(q,...K.length?K:oe);return Ye(f,e),f},he.Card=(...t)=>{var de,L;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o={...e};Kt(o);const r=(m,N)=>{var A;return!!(m&&m.nodeType===1&&((A=m.classList)!=null&&A.contains(`cms-card-${N}`)))},c=(m=>m==null?null:typeof m=="string"?he.Icon({name:m,size:e.iconSize||e.size||"lg"}):JSswift.ui.slot(m,{as:"icon"}))(e.icon),a=e.image?_.img({src:e.image,alt:e.imageAlt||"",class:ie(["cms-card-cover-media",e.imageClass]),style:e.imageStyle}):e.cover,b={dense:!!l(e.dense),flat:!!l(e.flat),clickable:!!l(e.clickable),to:l(e.to)||null},E=P(s,"default",b,n!=null&&n.length?n:[]),k={identifier:[],cover:[],media:[],header:[],body:[],footer:[],actions:[]},S=[];E.forEach(m=>{r(m,"identifier")?k.identifier.push(m):r(m,"cover")?k.cover.push(m):r(m,"media")?k.media.push(m):r(m,"header")?k.header.push(m):r(m,"body")?k.body.push(m):r(m,"footer")?k.footer.push(m):r(m,"actions")?k.actions.push(m):S.push(m)});const I=P(s,"identifier",b,e.identifier),V=P(s,"cover",b,a),$=P(s,"media",b,e.media),ae=P(s,"eyebrow",b,(de=e.eyebrow)!=null?de:e.kicker),F=P(s,"title",b,e.title),K=P(s,"subtitle",b,e.subtitle),oe=P(s,"header",b,e.header),H=P(s,"icon",b,c),Y=P(s,"aside",b,(L=e.aside)!=null?L:e.headerAside),Q=P(s,"body",b,e.body),le=P(s,"footer",b,e.footer),re=P(s,"actions",b,e.actions),Z=I.length?_.div({class:ie(["cms-card-identifier",e.identifierClass])},...I):null,ne=V.length?_.div({class:ie(["cms-card-cover",e.coverClass])},...V):null,T=$.length?_.div({class:ie(["cms-card-media",e.mediaClass])},...$):null,q=H.length||ae.length||F.length||K.length||oe.length||Y.length?_.div({class:ie(["cms-card-header",e.headerClass])},_.div({class:"cms-card-head"},H.length?_.div({class:"cms-card-icon"},...H):null,_.div({class:"cms-card-head-main"},ae.length?_.div({class:ie(["cms-card-eyebrow",e.eyebrowClass])},...ae):null,F.length?_.div({class:ie(["cms-card-title",e.titleClass])},...F):null,K.length?_.div({class:ie(["cms-card-subtitle",e.subtitleClass])},...K):null,oe.length?_.div({class:ie(["cms-card-header-content",e.headerContentClass])},...oe):null),Y.length?_.div({class:ie(["cms-card-aside",e.asideClass])},...Y):null)):null,ce=[...Q,...S],J=ce.length?_.div({class:ie(["cms-card-body",e.bodyClass])},...ce):null,g=[...re,...k.actions],f=le.length||g.length?_.div({class:ie(["cms-card-footer",e.footerClass])},...le,g.length?_.div({class:"cms-card-actions"},...g):null):null,p=Xe([e.clickable,e.to],()=>l(e.clickable)||l(e.to)?"cms-card-clickable":""),O=I.length||k.identifier.length,W=V.length||k.cover.length||$.length||k.media.length,u=JSswift.omit(o,["actions","aside","asideClass","body","bodyClass","clickable","cover","coverClass","coverHeight","dense","eyebrow","eyebrowClass","flat","footer","footerClass","header","headerAside","headerClass","headerContentClass","icon","iconSize","identifier","identifierClass","image","imageAlt","imageClass","imageStyle","kicker","media","mediaClass","slots","subtitle","subtitleClass","title","titleClass","to","display","direction","wrap","align","justify","gap","rowGap","columnGap","cols","columns"]);u.class=ie(["cms-panel","cms-card","cms-clear-set","cms-singularity",ge(e.flat,"cms-card-flat"),ge(e.dense,"cms-card-dense"),ge(O,"cms-card-has-identifier"),ge(W,"cms-card-has-top-visual"),p,o.class]),u.style={...o.style||{}},e.coverHeight!=null&&(u.style["--cms-card-cover-height"]=Be(l(e.coverHeight))),JSswift.uiApplyResponsiveProps(u,e,JSswift.uiResponsiveStyleRules);const x=e.onClick,h=e.onKeydown,z=m=>{var A;if(x==null||x(m),m.defaultPrevented)return;const N=l(e.to);N&&((A=JSswift.router)!=null&&A.navigate)&&(m.preventDefault(),JSswift.router.navigate(N))},B=m=>{h==null||h(m),!m.defaultPrevented&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),z(m))};(l(e.clickable)||l(e.to))&&(u.onClick=z,u.onKeydown=B,u.tabIndex==null&&(u.tabIndex=0),u.role==null&&(u.role="button"));const U=_.div(u,Z,...k.identifier,ne,...k.cover,T,...k.media,q,...k.header,J,...k.body,f,...k.footer);return Ye(U,e),U},he.Btn=(...t)=>{var ne;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Xe([e.color,e.state],()=>{const T=l(e.color)||l(e.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(T)?T:l(e.state)||""}),r=ie(["cms-clear-set","cms-btn","cms-singularity","cms-clickable",o,ge(e.outline,"outline"),e.class]),v=JSswift.omit(e,["icon","iconRight","label","loading","loadingText","disabled","outline","iconAlign","slots","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);v.class=r;const c=()=>!!l(e.loading),a=()=>!!l(e.disabled)||c(),b=e.icon!=null?typeof e.icon=="string"?he.Icon({name:e.icon}):e.icon:null,E=e.iconRight!=null?typeof e.iconRight=="string"?he.Icon({name:e.iconRight}):e.iconRight:null,k=JSswift.ui.renderSlot(s,"icon",{},b),S=JSswift.ui.renderSlot(s,"iconRight",{},E),I=JSswift.ui.renderSlot(s,"label",{},e.label),V=P(s,"default",{},n),$=[],ae=T=>{T&&(Array.isArray(T)?$.push(...T):$.push(T))},F=e.iconAlign;(F==="after"||F==="right")&&!E?(ae(I),V.length&&$.push(...V),ae(k)):(ae(k),ae(I),V.length&&$.push(...V)),ae(S),ae(fs(e,{className:"cms-shortcode cms-btn-shortcode"})),$.length===0&&$.push(_.span("Button"));const oe=_.span({class:"cms-btn-loading",hidden:!0}),H=_.span({class:"cms-btn-content"},...$);let Y=!1;const Q=()=>{const T=he.Spinner?he.Spinner({size:e.loadingSize||e.spinnerSize||16,thickness:e.loadingThickness||2,color:e.loadingColor||"currentColor",label:e.loadingText||null,"aria-label":e.loadingText?null:"Loading"}):_.span({class:"cms-muted",style:{marginRight:"8px"}},e.loadingText||"Loading");return P(null,"default",{},JSswift.ui.renderSlot(s,"loading",{},T))},le=T=>{var g;if((g=e.onPointerDown)==null||g.call(e,T),a()||!(T!=null&&T.currentTarget))return;const j=T.currentTarget,q=j.getBoundingClientRect(),ce=typeof T.clientX=="number"?T.clientX-q.left:q.width/2,J=typeof T.clientY=="number"?T.clientY-q.top:q.height/2;j.style.setProperty("--cms-burst-x",`${ce}px`),j.style.setProperty("--cms-burst-y",`${J}px`),j.classList.remove("cms-btn-burst"),j.offsetWidth,j.classList.add("cms-btn-burst")},re=_.button({...v,disabled:a(),onClick:T=>{var j,q;return a()?((j=T==null?void 0:T.preventDefault)==null||j.call(T),!1):(q=e.onClick)==null?void 0:q.call(e,T)},onPointerDown:le,"aria-disabled":a()?"true":null,"aria-busy":c()?"true":null},oe,H),Z=JSswift.reactive.effect(()=>{const T=c(),j=a();re.disabled=j,re.classList.toggle("is-loading",T),re.setAttribute("aria-disabled",j?"true":"false"),T?re.setAttribute("aria-busy","true"):re.removeAttribute("aria-busy"),oe.hidden=!T,T!==Y&&(oe.replaceChildren(...T?Q():[]),Y=T)},"UI.Btn:state");return(ne=JSswift._registerCleanup)==null||ne.call(JSswift,re,Z),Ye(re,e),cn(re,e,{isEnabled:()=>!a(),action:()=>{if(a())return!1;re.click()}}),re},he.Button=he.Btn,JSswift.ui.Btn=he.Btn,JSswift.ui.Button=he.Button;let Jo=0;he.FormField=(t={})=>{var ne,T,j,q,ce,J,g;Kt(t);const e=t.slots||{},n=Xe([t.color,t.state],()=>{const f=l(t.color)||l(t.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(f)?f:l(t.state)||""}),s=_.div({class:ie(["cms-clear-field-set","cms-field","cms-singularity-field",n,ge(t.fill,"cms-field-fill"),ge(t.outline,"outline"),t.wrapClass,t.class])}),o=P(e,"topLabel",{},t.topLabel);o.length&&s.appendChild(_.div({class:"cms-field-label"},...o));const r=t.multi||t.multiple,v=typeof t.control=="function"?t.control():t.control,c=()=>{if(typeof t.hasValue=="function")return!!t.hasValue();if(t.hasValue!=null)return!!l(t.hasValue);const f=t.getValue?t.getValue():null;return!(f==null||f==="")},a=()=>JSswift.reactive.untracked(c),b=()=>{var f,p;t.disabled||t.readonly||((f=t.onClear)==null||f.call(t),(p=t.onFocus)==null||p.call(t))},E=JSswift.ui.renderSlot(e,"control",{control:v,clear:b,disabled:!!t.disabled,readonly:!!t.readonly,hasValue:a()},null);let k=null,S=null;if(E)k=Array.isArray(E)?_.div({class:"cms-control"},...E):E;else{k=_.div({class:"cms-control"});const f=_.div({class:"cms-addon cms-addon-left"}),p=t.icon!=null?typeof t.icon=="string"?he.Icon({name:t.icon}):t.icon:null,O=JSswift.ui.renderSlot(e,"icon",{},p),W=JSswift.ui.renderSlot(e,"prefix",{},t.prefix);P(null,"default",{},O).forEach(N=>f.appendChild(N)),P(null,"default",{},W).forEach(N=>f.appendChild(N)),f.childNodes.length&&k.appendChild(f);const u=_.div({class:"cms-mid"+(f.childNodes.length>0?" cms-with-left":""),style:{position:"relative",flex:"1",minWidth:"0"}});v&&u.appendChild(v);const x=P(e,"label",{},t.label);if(x.length){const N=_.div({class:ie(["cms-float-label",ge(r,"cms-multiselect")])},...x);u.appendChild(N)}k.appendChild(u);const h=t.clearable?_.div({class:"cms-clear",title:"Clear",onClick:b},he.Icon({name:"close"})):null,z=JSswift.ui.renderSlot(e,"clear",{disabled:!!t.disabled,readonly:!!t.readonly,hasValue:a()},h);z&&(z.onclick=N=>{N.stopPropagation(),b()},P(null,"default",{},z).forEach(N=>k.appendChild(N))),S=h,S&&((ne=t.clearable)!=null&&ne.action)&&t.clearable.action(N=>N?S.classList.remove("cms-d-none"):S.classList.add("cms-d-none"));const B=_.div({class:"cms-addon cms-addon-right"}),U=t.iconRight!=null?typeof t.iconRight=="string"?he.Icon({name:t.iconRight}):t.iconRight:null,de=JSswift.ui.renderSlot(e,"iconRight",{},U),L=JSswift.ui.renderSlot(e,"suffix",{},t.suffix),m=JSswift.ui.renderSlot(e,"shortcode",{props:t},fs(t,{className:"cms-shortcode cms-field-shortcode"}));P(null,"default",{},L).forEach(N=>B.appendChild(N)),P(null,"default",{},de).forEach(N=>B.appendChild(N)),P(null,"default",{},m).forEach(N=>B.appendChild(N)),B.childNodes.length&&(k.appendChild(B),u.classList.add("cms-with-right"))}const I=f=>f&&(f&&typeof f.action=="function"?f.value:Array.isArray(f)&&typeof f[0]=="function"?f[0]():typeof f=="function"?f():f),V=f=>f==null||f===!1||f===""?!1:Array.isArray(f)?f.length>0:!0;let $=null;const ae=`jsswift-field-message-${++Jo}`,F=()=>{if(!(v!=null&&v.setAttribute))return;const f=[l(t.ariaDescribedBy),$==null?void 0:$.id].filter(Boolean).join(" ").trim();f?v.setAttribute("aria-describedby",[...new Set(f.split(/\s+/))].join(" ")):v.removeAttribute("aria-describedby")};s._syncDescription=F;const K=()=>{const f=[{key:"error",value:I(t.error),slot:"errorMessage",className:"cms-error"},{key:"warning",value:I(t.warning),slot:"warning",className:"cms-warning"},{key:"success",value:I(t.success),slot:"success",className:"cms-success"},{key:"note",value:I(t.note),slot:"note",className:"cms-note"},{key:"hint",value:I(t.hint),slot:"hint",className:"cms-hint"}];let p=null;for(const h of f)if(V(h.value)){p=h;break}const O={error:f[0].value,warning:f[1].value,success:f[2].value,note:f[3].value,hint:f[4].value,props:t},W=p?P(e,p.slot,O,p.value):[],u=W.length?_.div({id:ae,class:p==null?void 0:p.className},...W):null;["error","warning","success","note"].forEach(h=>{var z;return(z=k==null?void 0:k.classList)==null?void 0:z.toggle(h,(p==null?void 0:p.key)===h)}),$?u?$.replaceWith(u):$.remove():u&&s.appendChild(u),$=u,F()},oe=()=>{var p;const f=c();(p=k==null?void 0:k.classList)==null||p.toggle("has-value",f),S&&(S.style.display=f?"":"none")};JSswift.reactive.untracked(oe),(T=k==null?void 0:k.classList)==null||T.toggle("disabled",!!t.disabled),s.appendChild(k);const H=JSswift.ui.getSlot(e,"errorMessage"),Y=JSswift.ui.getSlot(e,"warning"),Q=JSswift.ui.getSlot(e,"success"),le=JSswift.ui.getSlot(e,"note"),re=JSswift.ui.getSlot(e,"hint");if(!!((j=t.error)!=null&&j.action||(q=t.warning)!=null&&q.action||(ce=t.success)!=null&&ce.action||(J=t.note)!=null&&J.action||(g=t.hint)!=null&&g.action)||Array.isArray(t.error)&&typeof t.error[0]=="function"||Array.isArray(t.warning)&&typeof t.warning[0]=="function"||Array.isArray(t.success)&&typeof t.success[0]=="function"||Array.isArray(t.note)&&typeof t.note[0]=="function"||Array.isArray(t.hint)&&typeof t.hint[0]=="function"||typeof t.error=="function"||typeof t.warning=="function"||typeof t.success=="function"||typeof t.note=="function"||typeof t.hint=="function"||typeof H=="function"||typeof Y=="function"||typeof Q=="function"||typeof le=="function"||typeof re=="function"){const f=JSswift.reactive.effect(()=>{K()},"UI.FormField:message");JSswift._registerCleanup(s,f)}else K();return s._refresh=oe,s._control=k,s._el=v,s},he.InputRaw=(t={})=>{var I;const e=_.input({class:ie(["cms-input-raw",t.class]),type:t.type||"text",name:t.name,placeholder:t.placeholder,autocomplete:t.autocomplete,value:t.value});let n=!1;const s=new Set,o=(V,$)=>{if(n)return;const ae=setTimeout(()=>{s.delete(ae),n||V()},$);s.add(ae)};let r=(I=e.value)!=null?I:"";const v=()=>{var $;const V=($=e.value)!=null?$:"";V!==r&&(r=V,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))};let c=null,a=!1;const b=()=>{if(n||a)return;a=!0;let V=0;const $=()=>{if(v(),V+=1,V>=10){a=!1;return}o($,120)};o($,40)},E=()=>{n||c||(c=setInterval(()=>{if(document.activeElement!==e){clearInterval(c),c=null;return}v()},250))},k=()=>{c&&(clearInterval(c),c=null)};e.addEventListener("input",()=>{var V;r=(V=e.value)!=null?V:""}),e.addEventListener("change",()=>{var V;r=(V=e.value)!=null?V:""}),e.addEventListener("animationstart",V=>{V.animationName==="cms-autofill"&&(v(),E(),b())}),e.addEventListener("focus",()=>{E(),b(),o(v,50)}),e.addEventListener("blur",()=>{k(),o(v,0)}),o(v,0),b(),JSswift._registerCleanup(e,()=>{n=!0,k(),s.forEach(clearTimeout),s.clear()});const S=t.model;if(S){if(typeof S=="object"&&typeof S._bind=="function")JSswift._registerCleanup(e,je.rodModel(e,S));else if(Array.isArray(S)&&typeof S[0]=="function"&&typeof S[1]=="function"){const V=JSswift.reactive.untracked(()=>je.signalModel(e,S[0],S[1]));JSswift._registerCleanup(e,V)}}return cn(e,t,{isEnabled:()=>!e.disabled,action:()=>gn(e,{selectText:!!t.selectOnShortcode})}),e};function nl(t,e,n,s=!1){t.focus=v=>e.focus(v);const o=(v,c)=>{c==null||c===!1?e.removeAttribute(v):e.setAttribute(v,String(c))},r=JSswift.reactive.effect(()=>{var b,E;const v=(b=l(n.ariaLabel))!=null?b:typeof n.label=="string"?n.label:null;o("aria-label",v),o("aria-labelledby",l(n.ariaLabelledBy)),(E=t._syncDescription)==null||E.call(t);const c=n.ariaInvalid==null?!!l(n.error):!!l(n.ariaInvalid);e.setAttribute("aria-invalid",String(c));const a=!!l(n.required);if(e.setAttribute("aria-required",String(a)),s){e.required=a;for(const k of["min","max","step","pattern","minLength","maxLength"])o(k.toLowerCase(),l(n[k]))}},"UI.Field:controlAttributes");JSswift._registerCleanup(t,r)}he.Input=(t={})=>{var K,oe,H;const e=t.slots||{},n={...t,label:(K=t.label)!=null?K:t.placeholder},s=_.input({class:ie(["cms-input",t.class]),type:t.type||"text",name:t.name,autocomplete:t.autocomplete,inputmode:t.inputmode,value:(oe=t.value)!=null?oe:"",disabled:!!t.disabled,readOnly:!!t.readonly});let o=!1;const r=new Set,v=(Y,Q)=>{if(o)return;const le=setTimeout(()=>{r.delete(le),o||Y()},Q);r.add(le)};let c=(H=s.value)!=null?H:"";const a=()=>{var Q;const Y=(Q=s.value)!=null?Q:"";Y!==c&&(c=Y,s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})))};let b=null,E=!1;const k=()=>{if(o||E)return;E=!0;let Y=0;const Q=()=>{if(a(),Y+=1,Y>=10){E=!1;return}v(Q,120)};v(Q,40)},S=()=>{o||b||(b=setInterval(()=>{if(document.activeElement!==s){clearInterval(b),b=null;return}a()},250))},I=()=>{b&&(clearInterval(b),b=null)};s.addEventListener("input",()=>{var Y,Q;c=(Y=s.value)!=null?Y:"",(Q=t.onInput)==null||Q.call(t,s.value)}),s.addEventListener("change",()=>{var Y,Q;c=(Y=s.value)!=null?Y:"",(Q=t.onChange)==null||Q.call(t,s.value)}),s.addEventListener("focus",Y=>{var Q;(Q=t.onFocus)==null||Q.call(t,Y),S(),k(),v(a,50)}),s.addEventListener("blur",Y=>{var Q;(Q=t.onBlur)==null||Q.call(t,Y),I(),v(a,0)}),s.addEventListener("animationstart",Y=>{Y.animationName==="cms-autofill"&&(a(),S(),k())}),v(a,0),k(),JSswift._registerCleanup(s,()=>{o=!0,I(),r.forEach(clearTimeout),r.clear()});const V=t.model;if(V){const Y=Q=>{var q;let le=!1;const re=ce=>{const J=ce!=null?ce:"";s.value!==J&&(s.value=J,c=J)},Z=ce=>{if(!le){le=!0;try{re(ce)}finally{le=!1}}};Q.action(Z),JSswift.reactive.untracked(()=>re(Q.value));const ne=ce=>{if(le||ce!=null&&ce.isComposing)return;const J=s.value;if(Q.value!==J){le=!0;try{Q.value=J}finally{le=!1}}};s.addEventListener("input",ne),s.addEventListener("compositionend",ne);let T=!1;const j=()=>{var g,f,p,O;if(T)return;T=!0,s.removeEventListener("input",ne),s.removeEventListener("compositionend",ne);const ce=(f=(g=Q._actions)==null?void 0:g.indexOf(Z))!=null?f:-1;ce>=0&&Q._actions.splice(ce,1);const J=(O=(p=Q._disposeHooks)==null?void 0:p.indexOf(j))!=null?O:-1;J>=0&&!Q._disposed&&Q._disposeHooks.splice(J,1)};(q=Q.onDispose)==null||q.call(Q,j),JSswift._registerCleanup(s,j)};if(typeof V=="object"&&typeof V._bind=="function")Y(V);else if(Array.isArray(V)&&typeof V[0]=="function"&&typeof V[1]=="function"){const Q=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(V[0],V[1]));Y(Q),JSswift._registerCleanup(s,()=>Q.dispose())}}const $=JSswift.ui.renderSlot(e,"input",{input:s,props:t},s),ae=Array.isArray($)?_.div({style:{display:"contents"}},...$):$,F=he.FormField({...n,control:ae,getValue:()=>s.value,onClear:()=>{s.disabled||s.readOnly||(s.value="",s.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>s.focus()});return s.addEventListener("input",()=>{var Y;return(Y=F._refresh)==null?void 0:Y.call(F)}),s.addEventListener("change",()=>{var Y;return(Y=F._refresh)==null?void 0:Y.call(F)}),F._input=s,nl(F,s,t,!0),cn(s,t,{isEnabled:()=>!s.disabled,action:()=>gn(s,{selectText:!!t.selectOnShortcode})}),F},he.Textarea=(t={})=>{var b,E,k,S;const e=t.slots||{},n={...t,label:(b=t.label)!=null?b:t.placeholder,wrapClass:ie(["cms-textarea-field",t.wrapClass])},s=_.textarea({class:ie(["cms-input","cms-textarea",t.class]),name:t.name,autocomplete:t.autocomplete,inputmode:t.inputmode,rows:t.rows,cols:t.cols,maxLength:(E=t.maxLength)!=null?E:t.maxlength,minLength:(k=t.minLength)!=null?k:t.minlength,wrap:t.wrap,value:(S=t.value)!=null?S:"",disabled:!!t.disabled,readOnly:!!t.readonly});s.addEventListener("input",()=>{var I;(I=t.onInput)==null||I.call(t,s.value)}),s.addEventListener("change",()=>{var I;(I=t.onChange)==null||I.call(t,s.value)}),s.addEventListener("focus",I=>{var V;(V=t.onFocus)==null||V.call(t,I)}),s.addEventListener("blur",I=>{var V;(V=t.onBlur)==null||V.call(t,I)});const o=t.model;if(o){const I=V=>{var Y;let $=!1;const ae=Q=>{const le=Q!=null?Q:"";s.value!==le&&(s.value=le)},F=Q=>{if(!$){$=!0;try{ae(Q)}finally{$=!1}}};V.action(F),JSswift.reactive.untracked(()=>ae(V.value));const K=Q=>{if($||Q!=null&&Q.isComposing)return;const le=s.value;if(V.value!==le){$=!0;try{V.value=le}finally{$=!1}}};s.addEventListener("input",K),s.addEventListener("compositionend",K);let oe=!1;const H=()=>{var re,Z,ne,T;if(oe)return;oe=!0,s.removeEventListener("input",K),s.removeEventListener("compositionend",K);const Q=(Z=(re=V._actions)==null?void 0:re.indexOf(F))!=null?Z:-1;Q>=0&&V._actions.splice(Q,1);const le=(T=(ne=V._disposeHooks)==null?void 0:ne.indexOf(H))!=null?T:-1;le>=0&&!V._disposed&&V._disposeHooks.splice(le,1)};(Y=V.onDispose)==null||Y.call(V,H),JSswift._registerCleanup(s,H)};if(typeof o=="object"&&typeof o._bind=="function")I(o);else if(Array.isArray(o)&&typeof o[0]=="function"&&typeof o[1]=="function"){const V=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(o[0],o[1]));I(V),JSswift._registerCleanup(s,()=>V.dispose())}}const r=JSswift.ui.getSlot(e,"textarea")!=null?"textarea":"input",v=JSswift.ui.renderSlot(e,r,{textarea:s,input:s,props:t},s),c=Array.isArray(v)?_.div({style:{display:"contents"}},...v):v,a=he.FormField({...n,control:c,getValue:()=>s.value,onClear:()=>{s.disabled||s.readOnly||(s.value="",s.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>s.focus()});return s.addEventListener("input",()=>{var I;return(I=a._refresh)==null?void 0:I.call(a)}),s.addEventListener("change",()=>{var I;return(I=a._refresh)==null?void 0:I.call(a)}),a._input=s,a._textarea=s,cn(s,t,{isEnabled:()=>!s.disabled,action:()=>gn(s,{selectText:!!t.selectOnShortcode})}),a};function sl(){const t=[];return{effect:(e,n)=>{const s=JSswift.reactive.effect(e,n);return t.push(s),s},action:(e,n)=>{e.action(n),t.push(()=>{var o,r;const s=(r=(o=e._actions)==null?void 0:o.indexOf(n))!=null?r:-1;s>=0&&e._actions.splice(s,1)})},dispose:()=>t.splice(0).forEach(e=>e())}}he.Search=(t={})=>{var X,xe;const e=sl();let n=!1;const s=t.slots||{},o=R=>!!R&&(typeof R=="object"&&typeof R._bind=="function"||Lt(R)),r=o(t.model)?t.model:o(t.value)?t.value:null,v=r?typeof r=="object"&&typeof r._bind=="function"?r.value:r[0]():l(t.value),[c,a]=JSswift.reactive.signal(v==null?"":String(v)),[b,E]=JSswift.reactive.signal(!1),[k,S]=JSswift.reactive.signal(!1),[I,V]=JSswift.reactive.signal(null),[$,ae]=JSswift.reactive.signal([]),[F,K]=JSswift.reactive.signal(-1),oe=`cms-search-${Math.random().toString(36).slice(2,10)}`,H=new Map;let Y=null,Q=null,le=null,re=0,Z=0,ne=!1,T=-1,j=[];const q=(R,d)=>{const i=Number(l(R));return Number.isFinite(i)?i:d},ce=(R,d=!1)=>{const i=l(R);return i==null?d:!!i},J=()=>ce(t.disabled,!1),g=()=>ce(t.readonly,!1),f=()=>Math.max(0,q(t.minLength,t.endpoint?1:0)),p=()=>Math.max(0,q(t.debounce,250)),O=R=>{var i,C,se,_e,Ne;const d=t.getLabel||t.labelOf;return typeof d=="function"?d(R):R==null?"":typeof R=="string"||typeof R=="number"?String(R):(Ne=(_e=(se=(C=(i=R.label)!=null?i:R.title)!=null?C:R.name)!=null?se:R.text)!=null?_e:R.value)!=null?Ne:""},W=R=>{var i,C,se;const d=t.getValue||t.valueOf;return typeof d=="function"?d(R):R==null?"":typeof R=="string"||typeof R=="number"?R:(se=(C=(i=R.value)!=null?i:R.id)!=null?C:R.key)!=null?se:O(R)},u=R=>Array.isArray(R)?R:!R||typeof R!="object"?[]:Array.isArray(R.items)?R.items:Array.isArray(R.results)?R.results:Array.isArray(R.data)?R.data:[],x=async(R,d)=>{const i=typeof R=="function"?R(d,{props:t}):l(R);return i&&typeof i.then=="function"?await i:i},h=(R,d)=>{const i=typeof R=="function"?R(d,{props:t}):l(R);if(!i)return"";const C=String(i),se=new URL(C,window.location.href),_e=l(t.queryParam)||"q";_e&&se.searchParams.set(_e,d);const Ne=typeof t.params=="function"?t.params(d,{props:t}):l(t.params);return Ne&&typeof Ne=="object"&&Object.keys(Ne).forEach(ue=>{const Se=l(Ne[ue]);Se==null||Se===!1||se.searchParams.set(ue,String(Se))}),se.toString()},z=(R,d={})=>{var C,se;const i=R==null?"":String(R);c()!==i&&a(i),pe.value!==i&&(pe.value=i),Y&&!d.fromModel&&Y(i),d.fromModel||(C=t.onInput)==null||C.call(t,i,d.event),(se=Ae==null?void 0:Ae._refresh)==null||se.call(Ae)},B=()=>{E(!1),K(-1)},U=()=>k()||I()||$().length?!0:c().trim().length>=f()?!!(t.emptyText||JSswift.ui.getSlot(s,"empty")!=null):!!(t.startText||JSswift.ui.getSlot(s,"empty")!=null),de=()=>{J()||U()&&(E(!0),M())},L=()=>{ae([]),V(null),K(-1)},m=async(R,d={})=>{var Se,Fe,Ee,Je,He,Ge;if(n)return;const i=R==null?"":String(R).trim(),C=++re,se=l((Se=t.endpoint)!=null?Se:t.url),_e=(Ee=(Fe=t.items)!=null?Fe:t.options)!=null?Ee:t.suggestions;if(le&&(le.abort(),le=null),i.length<f()){S(!1),L(),d.open&&U()?de():U()||B();return}const Ne=t.cache!==!1,ue=`${se||"local"}::${i}`;if(Ne&&H.has(ue)){ae(H.get(ue)),V(null),S(!1),K(H.get(ue).length?0:-1),d.open!==!1&&de();return}S(!0),V(null),d.open!==!1&&de(),(Je=t.onSearch)==null||Je.call(t,i);try{let qe;if(se){le=new AbortController;const We=h(se,i),st=await fetch(We,{method:"GET",headers:t.headers,credentials:t.credentials,signal:le.signal});if(!st.ok)throw new Error(`Search request failed (${st.status})`);qe=await(t.parseResponse||(ot=>ot.json()))(st)}else if(_e!=null){const We=u(await x(_e,i)),st=t.filter||((De,ot)=>String(O(De)).toLowerCase().includes(ot.toLowerCase()));qe=We.filter(De=>st(De,i))}else qe=[];if(n||C!==re)return;const Ze=typeof t.mapResponse=="function"?t.mapResponse(qe,i):u(qe),et=u(Ze);Ne&&H.set(ue,et),ae(et),K(et.length?0:-1),(He=t.onResults)==null||He.call(t,et,i)}catch(qe){if((qe==null?void 0:qe.name)==="AbortError"||n||C!==re)return;V(qe),ae([]),K(-1),(Ge=t.onError)==null||Ge.call(t,qe,i)}finally{!n&&C===re&&(S(!1),le=null,M())}},N=(R,d={})=>{if(n)return;Q&&clearTimeout(Q);const i=d.immediate?0:p();Q=setTimeout(()=>{Q=null,m(R,d)},i)},A=R=>{var i;const d=c();(i=t.onSubmit)==null||i.call(t,d,R),t.submitOnEnter!==!1&&N(d,{immediate:!0,open:!0})},ee=(R,d)=>{var se;if(!R)return;const i=W(R),C=O(R);t.commitValue==="value"?z(i,{event:d}):t.commitValue!==!1&&z(C,{event:d}),(se=t.onSelect)==null||se.call(t,R,{value:i,label:C,query:c(),event:d}),t.closeOnSelect!==!1&&B()},me=R=>{const d=$();if(!d.length)return;const i=F(),C=i<0?R>0?0:d.length-1:Math.max(0,Math.min(d.length-1,i+R));K(C)},ye=R=>{const d=R==null?"":String(R),i=c().trim();if(!i||t.highlight===!1)return[document.createTextNode(d)];const C=d.toLowerCase().indexOf(i.toLowerCase());return C<0?[document.createTextNode(d)]:[document.createTextNode(d.slice(0,C)),_.mark({class:"cms-search-highlight"},d.slice(C,C+i.length)),document.createTextNode(d.slice(C+i.length))]},be=R=>{var C,se;const d=O(R),i=R&&typeof R=="object"?(se=(C=R.description)!=null?C:R.subtitle)!=null?se:R.note:null;return _.div({class:"cms-search-result-content"},_.div({class:"cms-search-result-label"},...ye(d)),i?_.div({class:"cms-search-result-description"},String(i)):null)},M=()=>{!b()||Me.parentNode!==document.body||Z||(Z=requestAnimationFrame(()=>{if(Z=0,!b()||!Pe.isConnected||Me.parentNode!==document.body)return;const R=Pe.getBoundingClientRect(),d=6,i=8,C=Math.max(180,window.innerWidth-i*2),se=Math.min(Math.max(R.width,q(t.minMenuWidth,260)),C),_e=Math.max(i,Math.min(R.left,window.innerWidth-se-i));Me.style.width=`${se}px`,Me.style.left=`${_e}px`,Me.style.right="auto";const Ne=Me.getBoundingClientRect().height||0,ue=window.innerHeight-R.bottom-d-i,Se=R.top-d-i;let Ee=ue<180&&Se>ue?R.top-d-Ne:R.bottom+d;Ee=Math.max(i,Math.min(Ee,window.innerHeight-Ne-i)),Me.style.top=`${Ee}px`}))},D=()=>{ne||(ne=!0,window.addEventListener("resize",M),window.addEventListener("scroll",M,!0))},G=()=>{ne&&(ne=!1,window.removeEventListener("resize",M),window.removeEventListener("scroll",M,!0))},Ce=()=>{Me.parentNode!==document.body&&(Z&&(cancelAnimationFrame(Z),Z=0),Me.classList.add("portal"),Me.style.display="block",document.body.appendChild(Me),D(),M())},ke=()=>{Z&&(cancelAnimationFrame(Z),Z=0),G(),Me.parentNode!==Pe&&Pe.appendChild(Me),Me.classList.remove("portal"),Me.style.display="",Me.style.position="",Me.style.top="",Me.style.left="",Me.style.right="",Me.style.width=""},fe=t.label!=null||JSswift.ui.getSlot(s,"label")!=null,ve=()=>{if(!fe){pe.placeholder=l(t.placeholder)||"";return}pe.placeholder=document.activeElement===pe&&l(t.placeholder)||""},pe=_.input({id:t.id,class:ie(["cms-input","cms-search-input",t.inputClass]),type:"search",name:t.name,placeholder:fe?"":t.placeholder,autocomplete:t.autocomplete||"off",inputmode:t.inputmode,value:c(),disabled:J(),readOnly:g(),role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-controls":`${oe}-list`}),ze=_.div({id:`${oe}-list`,class:"cms-search-results",role:"listbox"}),Me=_.div({class:ie(["cms-search-menu","cms-singularity-menu-select",t.menuClass,ge(t.fill,"cms-select-menu-fill")]),"data-cms-overlay-portal":"true",onClick:R=>R.stopPropagation()},ze),Pe=_.div({class:ie(["cms-search",t.class]),role:"presentation"},pe,Me);let Ae=null;if(r){if(typeof r=="object"&&typeof r._bind=="function")e.action(r,R=>z(R,{fromModel:!0})),Y=R=>{r.value!==R&&(r.value=R)};else if(Array.isArray(r)&&typeof r[0]=="function"&&typeof r[1]=="function"){const R=r[0],d=r[1];e.effect(()=>{z(R(),{fromModel:!0})},"UI.Search:model"),Y=i=>d(i)}}else at(t.value)&&e.effect(()=>{z(l(t.value),{fromModel:!0})},"UI.Search:value");pe.addEventListener("input",R=>{z(pe.value,{event:R}),t.searchOnInput!==!1&&N(pe.value,{open:!0})}),pe.addEventListener("change",R=>{var d;return(d=t.onChange)==null?void 0:d.call(t,pe.value,R)}),pe.addEventListener("focus",R=>{var d;ve(),(d=t.onFocus)==null||d.call(t,R),t.openOnFocus!==!1&&(t.searchOnFocus&&!$().length?N(pe.value,{immediate:!0,open:!0}):de())}),pe.addEventListener("blur",R=>{var d;ve(),(d=t.onBlur)==null||d.call(t,R)}),pe.addEventListener("keydown",R=>{if(J()||g())return;const d=b(),i=$(),C=F();if(R.key==="Escape"){d&&(R.preventDefault(),B());return}if(R.key==="ArrowDown"){R.preventDefault(),d?me(1):(de(),i.length||N(pe.value,{immediate:!0,open:!0}));return}if(R.key==="ArrowUp"){R.preventDefault(),d?me(-1):de();return}if(R.key==="Home"&&d&&i.length&&(R.metaKey||R.ctrlKey)){R.preventDefault(),K(0);return}if(R.key==="End"&&d&&i.length&&(R.metaKey||R.ctrlKey)){R.preventDefault(),K(i.length-1);return}R.key==="Enter"&&(d&&C>=0&&i[C]?(R.preventDefault(),ee(i[C],R)):A(R))});const y=R=>{if(!Pe.isConnected)return;const d=R.target;Pe.contains(d)||Me.contains(d)||B()};return document.addEventListener("click",y,!0),e.effect(()=>{const R=b();Pe.classList.toggle("open",R),pe.setAttribute("aria-expanded",R?"true":"false"),R?Ce():ke()},"UI.Search:open"),e.effect(()=>{const R=J(),d=g();Pe.classList.toggle("disabled",R),Pe.classList.toggle("readonly",d),pe.disabled=R,pe.readOnly=d},"UI.Search:disabled"),e.effect(()=>{const R=k(),d=I(),i=$(),C=c();if(ze.innerHTML="",j=[],T=-1,R){const se=JSswift.ui.renderSlot(s,"loading",{query:C},t.loadingText||"Caricamento...");ze.appendChild(_.div({class:"cms-search-empty is-loading"},...P(null,"default",{},se)))}else if(d){const se=JSswift.ui.renderSlot(s,"error",{error:d,query:C},t.errorText||"Errore ricerca");ze.appendChild(_.div({class:"cms-search-empty is-error"},...P(null,"default",{},se)))}else if(i.length)i.forEach((se,_e)=>{const ue=O(se),Se=W(se),Fe=He=>ee(se,He),Ee=JSswift.ui.renderSlot(s,"result",{item:se,index:_e,active:!1,label:ue,value:Se,query:C,select:Fe},be(se)),Je=_.div({id:`${oe}-result-${_e}`,class:ie(["cms-search-result",""]),role:"option","aria-selected":"false",onMouseEnter:()=>K(_e),onMouseDown:He=>He.preventDefault(),onClick:Fe},...P(null,"default",{},Ee));ze.appendChild(Je),j[_e]=Je});else{const _e=C.trim().length>=f()?t.emptyText||"Nessun risultato":t.startText||"",Ne=JSswift.ui.renderSlot(s,"empty",{query:C},_e);(_e||JSswift.ui.getSlot(s,"empty")!=null)&&ze.appendChild(_.div({class:"cms-search-empty"},...P(null,"default",{},Ne)))}U()||B(),M()},"UI.Search:render"),e.effect(()=>{const R=F();R!==T&&(j[T]&&(j[T].classList.remove("active"),j[T].setAttribute("aria-selected","false")),j[R]?(j[R].classList.add("active"),j[R].setAttribute("aria-selected","true"),j[R].scrollIntoView({block:"nearest"}),pe.setAttribute("aria-activedescendant",`${oe}-result-${R}`)):pe.removeAttribute("aria-activedescendant"),T=R)},"UI.Search:active"),Ae=he.FormField({...t,icon:(X=t.icon)!=null?X:"search",wrapClass:ie(["cms-search-field",t.wrapClass]),control:Pe,getValue:()=>c(),onClear:()=>{var R;J()||g()||(z("",{}),L(),(R=t.onClear)==null||R.call(t))},onFocus:()=>pe.focus()}),pe.addEventListener("input",()=>{var R;return(R=Ae._refresh)==null?void 0:R.call(Ae)}),pe.addEventListener("change",()=>{var R;return(R=Ae._refresh)==null?void 0:R.call(Ae)}),Ae._input=pe,Ae._search=Pe,Ae._open=de,Ae._close=B,Ae._searchNow=()=>m(c(),{immediate:!0,open:!0}),Ae._getResults=$,Ae._setValue=R=>z(R,{}),Ae._dispose=()=>{n||(n=!0,e.dispose(),re++,H.clear(),document.removeEventListener("click",y,!0),Q&&clearTimeout(Q),le&&le.abort(),ke())},(xe=JSswift._registerCleanup)==null||xe.call(JSswift,Ae,Ae._dispose),cn(pe,t,{isEnabled:()=>!pe.disabled,action:()=>gn(pe,{selectText:!!t.selectOnShortcode})}),(t.autoSearch||t.searchOnMount)&&N(c(),{immediate:!0,open:!1}),Ae},he.Select=(t={})=>{var xe,R;const e=sl();let n=!1;const s={...t,label:(xe=t.label)!=null?xe:t.placeholder},o=t.filterable,r=!!t.multiple||!!t.multi,v=!!t.allowCustom||!!t.allowCustomValue,c=t.slots||{},a=d=>!!d&&(typeof d=="object"&&typeof d._bind=="function"||Lt(d)),b=a(t.model)?t.model:a(t.value)?t.value:null,E=d=>Array.isArray(d)?d.slice():d==null||d===""?[]:[d],k=d=>r?E(d):d,S=b?JSswift.reactive.untracked(()=>typeof b=="object"&&typeof b._bind=="function"?b.value:b[0]()):t.value,[I,V]=JSswift.reactive.signal(!1),[$,ae]=JSswift.reactive.signal(""),[F,K]=JSswift.reactive.signal(r?E(S):S!=null?S:""),[oe,H]=JSswift.reactive.signal(!1),[Y,Q]=JSswift.reactive.signal([]),[le,re]=JSswift.reactive.signal([]),[Z,ne]=JSswift.reactive.signal(-1);let T=null;if(b){if(typeof b=="object"&&typeof b._bind=="function")JSswift.reactive.untracked(()=>K(k(b.value))),e.action(b,d=>K(k(d))),T=d=>{const i=k(d);b.value!==i&&(b.value=i)};else if(Array.isArray(b)&&typeof b[0]=="function"&&typeof b[1]=="function"){const d=b[0],i=b[1];JSswift.reactive.untracked(()=>{e.effect(()=>{K(k(d()))},"UI.Select:model")}),T=C=>i(k(C))}}function j(){var d;return typeof t.disabled=="function"?t.disabled():typeof t.disabled=="boolean"?t.disabled:(d=t==null?void 0:t.disabled)!=null&&d.action?t.disabled.value:!1}function q(d){var i,C,se,_e;if(d==null)return null;if(typeof d=="string"||typeof d=="number")return{type:"option",label:String(d),value:d,disabled:!1};if(typeof d=="object"){if(Array.isArray(d.options))return{type:"group",label:String((i=d.label)!=null?i:""),options:d.options};const Ne=(C=d.label)!=null?C:d.value!=null?String(d.value):"";return{type:"option",label:String(Ne),value:(_e=(se=d.value)!=null?se:d.label)!=null?_e:"",disabled:!!d.disabled}}return{type:"option",label:String(d),value:d,disabled:!1}}function ce(d){const C=(Array.isArray(d)?d:[]).map(q).filter(Boolean),se=[],_e=[];for(const Ne of C)if(Ne.type==="group"){se.push({type:"group",label:Ne.label});const ue=(Ne.options||[]).map(q).filter(Boolean).filter(Se=>Se.type==="option");for(const Se of ue)se.push(Se),_e.push(Se)}else se.push(Ne),_e.push(Ne);Q(se),re(_e)}async function J(){if(n)return;const d=t.options;let i;try{const C=typeof d=="function"?JSswift.ui.withoutRodPathCapture(()=>d()):d;C&&typeof C.then=="function"?(H(!0),i=await C):i=C,n||ce(i)}catch(C){if(n)return;console.error("[UI.Select] options load error:",C),ce([])}finally{n||H(!1)}}function g(d){var C;const i=k(d);K(i),T&&T(i),(C=t.onChange)==null||C.call(t,i)}function f(d){const i=E(F()),se=i.some(_e=>_e==d)?i.filter(_e=>_e!=d):[...i,d];g(se)}function p(d,i=!1){r?(f(d),i&&O()):(g(d),W())}function O(){ae(""),m&&(m.value="")}function W(){V(!1),O(),ne(-1)}async function u(){if(n||j()||(V(!0),await J(),n))return;const d=F(),i=le();let C=-1;if(r){const se=E(d);for(const _e of se)if(C=i.findIndex(Ne=>Ne.value==_e&&!Ne.disabled),C>=0)break}else C=i.findIndex(se=>se.value==d&&!se.disabled);C<0&&(C=i.findIndex(se=>!se.disabled)),ne(C),m&&setTimeout(()=>m.focus(),0)}function x(){I()?W():u()}const h=_.div({class:ie(["cms-select",r?"multiple":"",t.class]),tabIndex:j()?-1:0,role:"combobox","aria-expanded":"false","aria-disabled":j()?"true":"false"}),z=_.div({class:ie(["cms-select-value",r?"cms-select-value-multi":""])});e.effect(()=>{const d=le();if(z.innerHTML="",r){const i=E(F());for(const C of i){const se=d.find(Se=>Se.value==C),_e=se?se.label:C==null?"":String(C);let Ne=!1;const ue=he.Chip({label:_e,dense:!0,color:t.chipColor||t.color,icon:t.chipIcon||null,iconRight:t.chipIconRight||null,glossy:t.glossy,glow:t.glow,glass:t.chipGlass||t.glass,class:t.chipClass,flat:t.flat,rounded:t.rounded,outline:t.outline,shadow:t.chipShadow,lightShadow:t.lightShadow,gloss:t.gloss,border:t.border,size:t.chipSize,removable:!0,onRemove:Se=>{var Fe,Ee,Je;(Fe=Se==null?void 0:Se.preventDefault)==null||Fe.call(Se),(Ee=Se==null?void 0:Se.stopPropagation)==null||Ee.call(Se),(Je=Se==null?void 0:Se.stopImmediatePropagation)==null||Je.call(Se),!Ne&&(Ne=!0,f(C))}});z.appendChild(ue)}}else{const i=F(),C=d.find(se=>se.value==i);z.textContent=C?C.label:i==null||i===""?"":String(i)}},"UI.Select:value");const B=_.div({class:"cms-select-arrow"});e.effect(()=>{const d=JSswift.ui.renderSlot(c,"arrow",{open:I()},he.Icon("#chevron-down"));B.innerHTML="",P(null,"default",{},d).forEach(i=>B.appendChild(i))},"UI.Select:arrow");const U=_.div({class:"cms-select-control",onClick:x},z,B),de=_.div({class:"cms-select-options",role:"listbox","aria-multiselectable":r?"true":"false"}),L=_.div({class:"cms-select-filter cms-d-none"});let m=null;const N=_.input({class:"cms-input",type:"text",placeholder:t.filterPlaceholder||"Cerca...",onInput:d=>ae(d.target.value||"")}),A=()=>{const d=JSswift.ui.renderSlot(c,"filter",{value:$(),setValue:C=>{const se=C==null?"":String(C);ae(se),m&&"value"in m&&(m.value=se)},close:W},N);L.innerHTML="";const i=P(null,"default",{},d);i.forEach(C=>L.appendChild(C)),m=i.length===1&&i[0]&&i[0].tagName==="INPUT"?i[0]:null,m&&(m.value=$()||"")};JSswift.reactive.untracked(A),e.effect(()=>{const d=$()||"";m&&"value"in m&&m.value!==d&&(m.value=d)},"UI.Select:filterValue"),typeof o=="boolean"?o?L.classList.remove("cms-d-none"):L.classList.add("cms-d-none"):o!=null&&o.action&&(e.action(o,d=>{d?L.classList.remove("cms-d-none"):L.classList.add("cms-d-none")}),o.value?L.classList.remove("cms-d-none"):L.classList.add("cms-d-none"));const ee={...t};Kt(ee);const me=Xe([ee.color,ee.state],()=>{const d=l(ee.color)||l(ee.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(d)?d:l(ee.state)||""}),ye=_.div({class:ie(["cms-select-menu","cms-singularity-menu-select",me,ee.class,ge(t.fill,"cms-select-menu-fill")]),"data-cms-overlay-portal":"true",onClick:d=>d.stopPropagation()},L,de);let be=0,M=!1;const D=()=>{!I()||ye.parentNode!==document.body||be||(be=requestAnimationFrame(()=>{if(be=0,!I()||!h.isConnected||ye.parentNode!==document.body)return;const d=h.getBoundingClientRect(),i=6,C=8,se=Math.max(160,window.innerWidth-C*2),_e=Math.min(Math.max(d.width,180),se),Ne=Math.max(C,Math.min(d.left,window.innerWidth-_e-C));ye.style.width=`${_e}px`,ye.style.left=`${Ne}px`,ye.style.right="auto",ye.style.marginTop="0";const ue=ye.getBoundingClientRect().height||0,Se=window.innerHeight-d.bottom-i-C,Fe=d.top-i-C;let Je=Se<180&&Fe>Se?d.top-i-ue:d.bottom+i;Je=Math.max(C,Math.min(Je,window.innerHeight-ue-C)),ye.style.top=`${Je}px`}))},G=()=>{M||(M=!0,window.addEventListener("resize",D),window.addEventListener("scroll",D,!0))},Ce=()=>{M&&(M=!1,window.removeEventListener("resize",D),window.removeEventListener("scroll",D,!0))},ke=()=>{ye.parentNode!==document.body&&(be&&(cancelAnimationFrame(be),be=0),ye.classList.add("portal"),ye.style.display="block",document.body.appendChild(ye),G(),D())},fe=()=>{be&&(cancelAnimationFrame(be),be=0),Ce(),ye.parentNode!==h&&h.appendChild(ye),ye.classList.remove("portal"),ye.style.display="",ye.style.position="",ye.style.top="",ye.style.left="",ye.style.right="",ye.style.width="",ye.style.marginTop=""};h.appendChild(U),h.appendChild(ye),e.effect(()=>{const d=I();h.classList.toggle("open",d),h.setAttribute("aria-expanded",d?"true":"false"),d?ke():fe()},"UI.Select:open"),e.effect(()=>{const d=j();h.classList.toggle("disabled",d),h.tabIndex=d?-1:0,h.setAttribute("aria-disabled",d?"true":"false")},"UI.Select:disabled");let ve=[],pe=-1,ze=-1;function Me(){var i;const d=Z();ze=d,d!==pe&&(ve[pe]&&ve[pe].classList.remove("active"),ve[d]&&ve[d].classList.add("active"),pe=d,d>=0&&((i=ve[d])==null||i.scrollIntoView({block:"nearest"})))}e.effect(()=>{const d=Y(),i=le(),C=($()||"").toLowerCase().trim(),se=F(),_e=r?E(se):[se],Ne=oe(),ue=ze;de.innerHTML="",ve=[],pe=-1;const Se=[];let Fe=0;const Ee=Je=>{const He=_e.some(De=>De==Je.value),Ge=!!Je.disabled,qe=["cms-select-option",He?"selected":"",Ge?"disabled":""].filter(Boolean).join(" "),Ze=()=>{r?f(Je.value):(g(Je.value),W())},et=JSswift.ui.renderSlot(c,"option",{opt:Je,selected:He,active:Fe===ue,disabled:Ge,select:Ze},Je.label),We=P(null,"default",{},et),st=_.div({class:qe,"data-flat-index":String(Fe),onClick:Ge?null:Ze},...We);Se.push(st),ve[Fe]=st,Fe++};if(C){const Je=i.filter(He=>He.label.toLowerCase().includes(C));if(Je.length===0){const He=JSswift.ui.renderSlot(c,"empty",{filter:C},t.emptyText||"Nessuna opzione");de.appendChild(_.div({class:"cms-select-empty"},...P(null,"default",{},He))),I()&&D();return}for(const He of Je)Ee(He)}else{let Je=!1;for(const He of d)if(He.type==="group"){const Ge=JSswift.ui.renderSlot(c,"group",{label:He.label},He.label);Se.push(_.div({class:"cms-select-group"},...P(null,"default",{},Ge)))}else Je=!0,Ee(He);if(!Je){const He=JSswift.ui.renderSlot(c,"empty",{filter:C},t.emptyText||"Nessuna opzione");de.appendChild(_.div({class:"cms-select-empty"},...P(null,"default",{},He))),I()&&D();return}}if(Ne){const Je=JSswift.ui.renderSlot(c,"loading",{},"Caricamento...");de.appendChild(_.div({class:"cms-select-empty"},...P(null,"default",{},Je))),I()&&D();return}for(const Je of Se)de.appendChild(Je);Me(),I()&&D()},"UI.Select:render"),e.effect(()=>{Me()},"UI.Select:paintActive");const Pe=d=>{if(!h.isConnected)return;const i=d.target;h.contains(i)||ye.contains(i)||W()};document.addEventListener("click",Pe,!0);const Ae=d=>{if(j())return;const i=I(),C=le(),se=Z(),_e=m&&d.target===m,Ne=(Se,Fe)=>{let Ee=Se;for(;Ee>=0&&Ee<C.length;){if(!C[Ee].disabled)return Ee;Ee+=Fe}return-1},ue=Se=>{if(!Se)return null;const Fe=Se.toLowerCase();let Ee=C.find(Je=>String(Je.label).toLowerCase()===Fe||String(Je.value).toLowerCase()===Fe);return Ee||(Ee=C.find(Je=>String(Je.label).toLowerCase().includes(Fe))),Ee&&!Ee.disabled?Ee:null};if(d.key==="Escape"){i&&(d.preventDefault(),W());return}if(_e&&(d.key==="Enter"||d.key===" ")){const Se=($()||"").trim();if(Se){const Fe=ue(Se);if(Fe){d.preventDefault(),p(Fe.value,!0);return}if(v&&d.key==="Enter"){d.preventDefault(),p(Se,!0);return}if(d.key==="Enter"){d.preventDefault();return}}if(d.key===" ")return}if(d.key==="Enter"||d.key===" "){if(d.preventDefault(),!i){u();return}se>=0&&C[se]&&!C[se].disabled&&(r?f(C[se].value):(g(C[se].value),W()));return}if(d.key==="ArrowDown"){if(d.preventDefault(),!i){u();return}const Se=Ne(se<0?0:se+1,1);Se>=0&&ne(Se);return}if(d.key==="ArrowUp"){if(d.preventDefault(),!i){u();return}const Se=Ne(se<0?C.length-1:se-1,-1);Se>=0&&ne(Se);return}if(d.key==="Home"){if(!i)return;d.preventDefault();const Se=Ne(0,1);Se>=0&&ne(Se);return}if(d.key==="End"){if(!i)return;d.preventDefault();const Se=Ne(C.length-1,-1);Se>=0&&ne(Se);return}};h.addEventListener("keydown",Ae),L.addEventListener("keydown",Ae),h._dispose=()=>{n||(n=!0,e.dispose(),document.removeEventListener("click",Pe,!0),h.removeEventListener("keydown",Ae),L.removeEventListener("keydown",Ae),fe())};const y=()=>{const d=F();return r?Array.isArray(d)&&d.length>0:d==null?!1:d!==""?!0:le().some(i=>i.value==="")},X=he.FormField({...s,control:h,clearable:t.clearable,disabled:j(),readonly:!1,hasValue:y,getValue:()=>{const d=F();return r?Array.isArray(d)&&d.length?d:"":d},onClear:()=>{j()||(g(r?[]:null),W())},onFocus:()=>{u()}});return e.effect(()=>{var d;(d=X._refresh)==null||d.call(X)},"UI.Select:fieldRefresh"),nl(X,h,t),X._select=h,X._dispose=h._dispose,(R=JSswift._registerCleanup)==null||R.call(JSswift,X,X._dispose),cn(X,t,{isEnabled:()=>!j(),action:()=>{if(j())return!1;gn(h),u()}}),J(),X},he.Upload=(t={})=>{var Ae;Kt(t);const e=t.slots||{},[n,s]=JSswift.reactive.signal([]),[o,r]=JSswift.reactive.signal(!1),[v,c]=JSswift.reactive.signal(!1),[a,b]=JSswift.reactive.signal(null);let E=0,k=!1;const S=()=>!!l(t.disabled)||!!l(t.readonly),I=()=>t.multiple!==!1&&t.single!==!0,V=()=>{var y,X;return["form","native","submit","external"].includes(String(l((X=(y=t.submitMode)!=null?y:t.modeSubmit)!=null?X:t.uploadMode)||"").toLowerCase())},$=()=>{var y;return l((y=t.showBrowse)!=null?y:t.browseButton)!==!1},ae=()=>{var y;return!V()&&l((y=t.showUpload)!=null?y:t.uploadButton)!==!1},F=()=>{var y;return l((y=t.showClear)!=null?y:t.clearButton)!==!1},K=()=>{var y;return l((y=t.showFiles)!=null?y:t.files)!==!1},oe=()=>{const y=gt(l(t.state)||l(t.status));return y?`cms-state-${y}`:""},H=()=>t.fieldName||t.paramName||t.name||"file",Y=()=>{var y;return Math.max(1,Number(l((y=t.parallelUploads)!=null?y:t.parallel)||1))},Q=()=>{var X,xe,R,d;const y=l(t.retry);return y===!0?{attempts:2,delay:350,factor:2}:y?{attempts:Math.max(0,Number((xe=(X=y.attempts)!=null?X:y.retries)!=null?xe:0)),delay:Math.max(0,Number((R=y.delay)!=null?R:350)),factor:Math.max(1,Number((d=y.factor)!=null?d:2))}:{attempts:0,delay:350,factor:2}},le=y=>y?Array.isArray(y)?y:Array.from(y):[],re=y=>{const X=Number(y||0);return X<1024?`${X} B`:X<1024*1024?`${(X/1024).toFixed(1)} KB`:X<1024*1024*1024?`${(X/1024/1024).toFixed(1)} MB`:`${(X/1024/1024/1024).toFixed(1)} GB`},Z=()=>{var y;return String(l((y=t.acceptedFiles)!=null?y:t.accept)||"").trim()},ne=y=>{const X=Z();if(!X)return!0;const xe=String(y.name||"").toLowerCase(),R=String(y.type||"").toLowerCase();return X.split(",").map(d=>d.trim().toLowerCase()).filter(Boolean).some(d=>d.startsWith(".")?xe.endsWith(d):d.endsWith("/*")?R.startsWith(d.slice(0,-1)):R===d)},T=()=>n().filter(y=>y.status!=="rejected"&&y.status!=="removed"),j=(y=0)=>T().reduce((X,xe)=>X+Number(xe.size||0),y),q=()=>{var y;s(n().slice()),D.classList.toggle("is-busy",n().some(X=>X.status==="uploading")),D.classList.toggle("has-files",n().some(X=>X.status!=="removed")),(y=t.onChange)==null||y.call(t,n().slice(),G)},ce=(y,X,xe=null)=>{var d;const R={id:`upload_${Date.now()}_${++E}`,file:y,name:(y==null?void 0:y.name)||"file",size:Number((y==null?void 0:y.size)||0),type:(y==null?void 0:y.type)||"",status:"rejected",progress:0,error:X,detail:xe,attempts:0,response:null,xhr:null};return n().push(R),(d=t.onRejected)==null||d.call(t,R,{reason:X,detail:xe,api:G}),R},J=async(y,X)=>{const xe=t.maxFiles==null?null:Number(l(t.maxFiles)),R=t.maxFileSize==null?null:Number(l(t.maxFileSize)),d=t.minFileSize==null?null:Number(l(t.minFileSize)),i=t.maxTotalSize==null?null:Number(l(t.maxTotalSize));if(xe!=null&&X>xe)return"max-files";if(R!=null&&Number(y.size||0)>R)return"max-file-size";if(d!=null&&Number(y.size||0)<d)return"min-file-size";if(i!=null&&j(Number(y.size||0))>i)return"max-total-size";if(!ne(y))return"accept";const C=t.filter||t.acceptFile||t.validate;if(typeof C=="function"){const se=await C(y,{files:n().slice(),api:G});if(se===!1)return"filter";if(typeof se=="string")return se}return null},g=async()=>{for(const y of n()){if(y.status!=="rejected"||y.error!=="max-files")continue;const X=await J(y.file,T().length+1);if(X){y.error=X;continue}y.status="queued",y.progress=0,y.error=null,y.detail=null}},f=y=>({id:`upload_${Date.now()}_${++E}`,file:y,name:(y==null?void 0:y.name)||"file",size:Number((y==null?void 0:y.size)||0),type:(y==null?void 0:y.type)||"",status:"queued",progress:0,bytesUploaded:0,error:null,detail:null,attempts:0,response:null,xhr:null}),p=async(y,X={})=>{var d;if(S())return[];b(null);const xe=le(y),R=[];!I()&&xe.length&&O({silent:!0});for(const i of xe){const C=await J(i,T().length+1);if(C){ce(i,C);continue}const se=f(i);if(n().push(se),R.push(se),(d=t.onAdded)==null||d.call(t,se,{file:i,meta:X,api:G}),!I())break}return q(),R.length&&t.autoUpload&&!V()&&m(),R},O=(y={})=>{var X;for(const xe of n())xe.status==="uploading"&&u(xe),xe.status="removed";s([]),b(null),q(),y.silent||(X=t.onClear)==null||X.call(t,G)},W=async y=>{var R;const X=typeof y=="string"?n().find(d=>d.id===y):y;if(!X)return;X.status==="uploading"&&u(X);const xe=n().filter(d=>d!==X);s(xe),await g(),q(),(R=t.onRemove)==null||R.call(t,X,{api:G})},u=y=>{var xe,R,d;const X=typeof y=="string"?n().find(i=>i.id===y):y;!X||X.status!=="uploading"||(X.status="canceled",X.error="canceled",(R=(xe=X.xhr)==null?void 0:xe.abort)==null||R.call(xe),(d=t.onCancel)==null||d.call(t,X,{api:G}),q())},x=()=>n().filter(y=>y.status==="uploading").forEach(u),h=async y=>{var xe,R;const X={url:l(t.url),method:l(t.method||"POST"),headers:t.headers,formFields:t.formFields||t.fields,fieldName:H(),withCredentials:!!l((xe=t.withCredentials)!=null?xe:t.credentials),sendRaw:!!l(t.sendRaw)};if(typeof t.factory=="function")try{const d=await t.factory(y.file,{item:y,files:n().slice(),api:G});if(d&&typeof d=="object")Object.assign(X,d);else if(d!=null)throw new Error("factory must return an object")}catch(d){throw(R=t.onFactoryFailed)==null||R.call(t,d,{item:y,api:G}),d}return X},z=(y,X,xe)=>{const R=typeof X=="function"?X(xe.file,{item:xe,api:G}):X;R&&(R instanceof Headers?R.forEach((d,i)=>y.setRequestHeader(i,d)):Array.isArray(R)?R.forEach(d=>{Array.isArray(d)?y.setRequestHeader(d[0],d[1]):d!=null&&d.name&&y.setRequestHeader(d.name,d.value)}):typeof R=="object"&&Object.keys(R).forEach(d=>y.setRequestHeader(d,R[d])))},B=(y,X,xe)=>{const R=typeof X=="function"?X(xe.file,{item:xe,api:G}):X;R&&(Array.isArray(R)?R.forEach(d=>{Array.isArray(d)?y.append(d[0],d[1]):d!=null&&d.name&&y.append(d.name,d.value)}):typeof R=="object"&&Object.keys(R).forEach(d=>y.append(d,R[d])))},U=(y,X)=>new Promise((xe,R)=>{if(!X.url){R(new Error("UI.Upload: url is required"));return}if(typeof XMLHttpRequest!="function"){R(new Error("UI.Upload: XMLHttpRequest is not available"));return}const d=new XMLHttpRequest;y.xhr=d,d.open(String(X.method||"POST").toUpperCase(),X.url,!0),d.withCredentials=!!X.withCredentials,z(d,X.headers,y),d.upload.onprogress=C=>{var se;C.lengthComputable&&(y.bytesUploaded=C.loaded,y.progress=Math.max(0,Math.min(100,Math.round(C.loaded/C.total*100))),(se=t.onProgress)==null||se.call(t,y,{event:C,api:G}),q())},d.onload=()=>{const C=d.status>=200&&d.status<300,se={status:d.status,text:d.responseText,xhr:d};C?xe(se):R(Object.assign(new Error(`HTTP error ${d.status}`),{response:se}))},d.onerror=()=>R(new Error("network-error")),d.onabort=()=>R(new Error("canceled"));const i=X.sendRaw?y.file:(()=>{const C=new FormData;return B(C,X.formFields,y),C.append(X.fieldName||"file",y.file,y.name),C})();d.send(i)}),de=async y=>{var R,d,i,C,se,_e;const X=Q();let xe=X.delay;y.status="uploading",y.error=null,y.progress=Math.max(0,y.progress||0),(R=t.onStart)==null||R.call(t,y,{api:G}),q();for(let Ne=0;Ne<=X.attempts;Ne++){y.attempts=Ne+1;try{const ue=await h(y),Se=typeof t.upload=="function"||typeof t.uploader=="function"?await(t.upload||t.uploader)(y.file,{item:y,options:ue,progress:Fe=>{var Ee;y.progress=Math.max(0,Math.min(100,Number(Fe)||0)),(Ee=t.onProgress)==null||Ee.call(t,y,{api:G}),q()},api:G}):await U(y,ue);return y.status="done",y.progress=100,y.response=Se,y.xhr=null,(d=t.onSuccess)==null||d.call(t,y,{response:Se,api:G}),(i=t.onComplete)==null||i.call(t,y,{response:Se,api:G}),q(),y}catch(ue){if(String((ue==null?void 0:ue.message)||ue)==="canceled"||y.status==="canceled")return y.status="canceled",y.error="canceled",y.xhr=null,(C=t.onComplete)==null||C.call(t,y,{error:ue,api:G}),q(),y;if(Ne<X.attempts){await new Promise(Se=>setTimeout(Se,xe)),xe=Math.round(xe*X.factor);continue}return y.status="error",y.error=ue,y.xhr=null,b(ue),(se=t.onError)==null||se.call(t,y,{error:ue,api:G}),(_e=t.onComplete)==null||_e.call(t,y,{error:ue,api:G}),q(),y}}return y},L=()=>{var R;if(k||S())return;const y=n().filter(d=>d.status==="uploading").length,X=Math.max(0,Y()-y),xe=n().filter(d=>d.status==="queued").slice(0,X);if(!xe.length){const d=n().some(i=>i.status==="uploading");c(d),d||(R=t.onFinish)==null||R.call(t,n().slice(),{api:G});return}c(!0),xe.forEach(d=>{de(d).finally(()=>L())})},m=(y=null)=>{(y?le(y):n().filter(xe=>["queued","error","canceled"].includes(xe.status))).forEach(xe=>{const R=typeof xe=="string"?n().find(d=>d.id===xe):xe;R&&R.status!=="uploading"&&R.status!=="done"&&R.status!=="rejected"&&(R.status="queued",R.progress=0,R.error=null)}),q(),L()},N=y=>m([y]),A=()=>{S()||ee.click()},ee=_.input({type:"file",class:"cms-upload-input",name:H(),accept:Z()||null,multiple:I(),capture:t.capture||null,disabled:S(),onChange:y=>{p(y.target.files,{event:y,source:"browse"}),y.target.value=""}}),me=_.div({class:"cms-upload-list"}),ye=_.div({class:"cms-upload-summary"}),be=_.div({class:"cms-upload-actions"});let M=oe();const D=_.div({class:ie(["cms-upload","cms-singularity",M,ge(t.box||t.variant==="box","cms-upload-box"),ge(t.compact,"is-compact"),ge(V(),"is-form-mode"),ge(!K(),"is-files-hidden"),t.class]),tabindex:S()?"-1":"0",role:"group","aria-disabled":S()?"true":"false"}),G={addFiles:p,browse:A,upload:m,retry:N,retryAll:()=>m(n().filter(y=>y.status==="error"||y.status==="canceled")),remove:W,clear:O,abort:u,abortAll:x,files:()=>n().slice(),state:()=>({files:n().slice(),busy:v(),dragging:o(),error:a()}),reset:O},Ce=()=>{const y={api:G,files:n().slice(),busy:v(),disabled:S(),submitMode:V()?"form":"upload"},X=[];return $()&&X.push(JSswift.ui.renderSlot(e,"browse",y,he.Btn({size:"sm",icon:"folder_open",label:t.browseText||"Browse",onClick:A}))),ae()&&X.push(JSswift.ui.renderSlot(e,"upload",y,he.Btn({size:"sm",color:"primary",icon:"upload",label:t.uploadText||"Upload",loading:v(),disabled:S()||!n().some(xe=>["queued","error","canceled"].includes(xe.status)),onClick:()=>m()}))),F()&&X.push(JSswift.ui.renderSlot(e,"clear",y,he.Btn({size:"sm",color:"secondary",outline:!0,icon:"delete",label:t.clearText||"Clear",disabled:S()||!n().length,onClick:()=>O()}))),P(e,"actions",y,X)},ke=(y,X)=>{var i;const xe={item:y,file:y.file,index:X,api:G,remove:()=>W(y),retry:()=>N(y),abort:()=>u(y)},R=_.div({class:ie(["cms-upload-file",`is-${y.status}`])},_.div({class:"cms-upload-file-icon"},he.Icon({name:y.status==="done"?"check_circle":y.status==="error"||y.status==="rejected"?"error":"description"})),_.div({class:"cms-upload-file-main"},_.div({class:"cms-upload-file-name"},...P(e,"fileName",xe,y.name)),_.div({class:"cms-upload-file-meta"},...P(e,"fileMeta",xe,y.error?String(((i=y.error)==null?void 0:i.message)||y.error):y.status==="queued"?"Queued":y.status)),_.div({class:"cms-upload-progress",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":String(y.progress||0)},_.div({class:"cms-upload-progress-bar",style:{width:`${y.progress||0}%`}}))),_.div({class:"cms-upload-file-trailing"},_.div({class:"cms-upload-file-size"},re(y.size)),_.div({class:"cms-upload-file-actions"},...P(e,"fileActions",xe,[y.status==="uploading"?he.Btn({size:"sm",outline:!0,icon:"close","aria-label":"Cancel",onClick:()=>u(y)}):null,y.status==="error"||y.status==="canceled"?he.Btn({size:"sm",outline:!0,icon:"refresh","aria-label":"Retry",onClick:()=>N(y)}):null,he.Btn({size:"sm",dense:!0,outline:!0,icon:"delete","aria-label":"Remove",onClick:()=>W(y)})])))),d=JSswift.ui.renderSlot(e,"file",xe,R);return _.div({class:"cms-upload-file-wrap","data-status":y.status,"data-id":y.id},...P(null,"default",{},d))},fe=()=>{const y=n();if(be.replaceChildren(...Ce()),me.replaceChildren(),ye.hidden=!K(),me.hidden=!K(),y.length)y.forEach((xe,R)=>me.appendChild(ke(xe,R)));else{const xe=JSswift.ui.renderSlot(e,"empty",{api:G},t.emptyText||"No files selected");me.appendChild(_.div({class:"cms-upload-empty"},...P(null,"default",{},xe)))}const X=y.filter(xe=>xe.status!=="rejected"&&xe.status!=="removed");ye.textContent=`${X.length} file \u2022 ${re(X.reduce((xe,R)=>xe+Number(R.size||0),0))}`},ve=JSswift.ui.renderSlot(e,"icon",{api:G},he.Icon({name:t.icon||"cloud_upload"})),pe=JSswift.ui.renderSlot(e,"title",{api:G},t.title||"Upload files"),ze=JSswift.ui.renderSlot(e,"subtitle",{api:G},t.subtitle||(Z()?`Accepted: ${Z()}`:"Drag files here or browse from your device")),Me=_.div({class:"cms-upload-dropzone",onClick:y=>{var X,xe;(xe=(X=y.target)==null?void 0:X.closest)!=null&&xe.call(X,".cms-upload-actions, .cms-upload-list")||t.clickable!==!1&&A()},onDragenter:y=>{t.drag===!1||S()||(y.preventDefault(),r(!0),D.classList.add("is-dragging"))},onDragover:y=>{t.drag===!1||S()||y.preventDefault()},onDragleave:y=>{y.currentTarget===y.target&&(r(!1),D.classList.remove("is-dragging"))},onDrop:y=>{var X,xe;t.drag===!1||S()||(y.preventDefault(),r(!1),D.classList.remove("is-dragging"),(X=t.onDrop)==null||X.call(t,y,{api:G}),p(((xe=y.dataTransfer)==null?void 0:xe.files)||[],{event:y,source:"drop"}))}},_.div({class:"cms-upload-head"},_.div({class:"cms-upload-icon"},...P(null,"default",{},ve)),_.div({class:"cms-upload-copy"},_.div({class:"cms-upload-title"},...P(null,"default",{},pe)),_.div({class:"cms-upload-subtitle"},...P(null,"default",{},ze))),be),ye,me),Pe=JSswift.ui.renderSlot(e,"header",{api:G},null);return P(null,"default",{},Pe).forEach(y=>D.appendChild(y)),D.appendChild(ee),P(e,"default",{api:G,dropzone:Me},Me).forEach(y=>D.appendChild(y)),JSswift.reactive.effect(()=>{fe()},"UI.Upload:render"),JSswift.reactive.effect(()=>{D.classList.toggle("is-disabled",S()),D.classList.toggle("is-form-mode",V()),D.classList.toggle("is-files-hidden",!K());const y=oe();y!==M&&(M&&D.classList.remove(M),y&&D.classList.add(y),M=y),D.setAttribute("aria-disabled",S()?"true":"false"),ee.disabled=S(),ee.multiple=I(),ee.name=H()},"UI.Upload:disabled"),D._upload=G,D._addFiles=p,D._browse=A,D._uploadFiles=m,D._input=ee,D._dispose=()=>{k||(k=!0,x())},(Ae=JSswift._registerCleanup)==null||Ae.call(JSswift,D,D._dispose),D},he.BoxUpload=(t={})=>he.Upload({...t,box:!0}),he.boxUpload=(t={})=>he.BoxUpload(t),JSswift.ui.Upload=he.Upload,JSswift.ui.BoxUpload=he.BoxUpload,JSswift.ui.boxUpload=he.boxUpload;function Nt(t,e){if(!t)return null;if(typeof t=="object"&&typeof t._bind=="function")return{get:()=>t.value,set:n=>{t.value!==n&&(t.value=n)},watch:n=>{var s;return(s=t.action)==null||s.call(t,n),()=>{var r,v;const o=(v=(r=t._actions)==null?void 0:r.indexOf(n))!=null?v:-1;o>=0&&t._actions.splice(o,1)}}};if(Array.isArray(t)&&typeof t[0]=="function"&&typeof t[1]=="function"){const n=t[0],s=t[1];return{get:n,set:s,watch:o=>je.reactive.effect(()=>{o(n())},e||"UI:model")}}return null}const ll={classic:{side:"left",nav:"top",rows:["header","nav","body","footer"]},classicright:{side:"right",nav:"top",rows:["header","nav","body","footer"]},sidebarfullleft:{side:"left",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},sidebarfullright:{side:"right",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},appshell:{side:"left",nav:"top",rows:["header","nav","body","footer"]},dashboard:{side:"left",nav:"top",rows:["header","nav","body","footer"]},website:{side:null,nav:"top",rows:["header","nav","body","footer"]},documentation:{side:"right",nav:"left",rows:["header","body","footer"]},landing:{side:null,nav:null,rows:["header","body","footer"]}},Eo=t=>{const e=l(t);return e==null||e===!1||e===""?"":String(e).trim().toLowerCase().replace(/[\s_-]+/g,"")},To=(t,e)=>{if(!t||!e.main)return null;const n=t.side||(e.aside?"left":null),s=t.nav||(e.nav?"top":null),o=!!e.aside&&!!n,r=!!e.nav&&!!s,a=[r&&s==="left"?"nav":o&&n==="left"?"aside":".","main",r&&s==="right"?"nav":o&&n==="right"?"aside":"."],b=[],E=[...t.rows||[]];if(r&&s==="top"&&!E.includes("nav")){const k=E.indexOf("body");E.splice(k>=0?k:E.length,0,"nav")}for(const k of E)k==="header"&&e.header?b.push(t.fullSide&&o&&n==="left"?["aside","header","header"]:t.fullSide&&o&&n==="right"?["header","header","aside"]:["header","header","header"]):k==="nav"&&r&&s==="top"?b.push(t.fullSide&&o&&n==="left"?["aside","nav","nav"]:t.fullSide&&o&&n==="right"?["nav","nav","aside"]:["nav","nav","nav"]):k==="body"?b.push(a):k==="footer"&&e.footer&&b.push(t.fullSide&&o&&n==="left"?["aside","footer","footer"]:t.fullSide&&o&&n==="right"?["footer","footer","aside"]:["footer","footer","footer"]);return b.length?b.map(k=>`"${k.join(" ")}"`).join(" "):null};he.Layout=(...t)=>{var sn,ln,on;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(Ie,Ve)=>!!Ie&&Object.prototype.hasOwnProperty.call(Ie,Ve),r=()=>typeof window=="undefined"?1024:window.innerWidth,v=()=>{const Ie=r(),Ve=JSswift.uiResponsivePropsFor(e,hn("mobile"))||{},nt=Ie>=768?JSswift.uiResponsivePropsFor(e,hn("tablet"))||{}:{},rt=Ie>=1024?JSswift.uiResponsivePropsFor(e,hn("pc"))||{}:{};return{...Ve,...nt,...rt}},c=(...Ie)=>{for(const Ve of Ie)if(o(e,Ve))return e[Ve]},a=(...Ie)=>{const Ve=v();for(const nt of Ie)if(o(Ve,nt))return Ve[nt];return c(...Ie)},b=(...Ie)=>{const Ve=JSswift.uiResponsivePropsFor(e,hn(G()))||{};for(const nt of Ie)if(o(Ve,nt))return Ve[nt];return c(...Ie)},E=()=>Eo(b("disposition","layoutDisposition","layout")),k=()=>{const Ie=l(a("mode","layoutMode"));if(Ie==null||Ie===!1||Ie==="")return"";const Ve=String(Ie).trim().toLowerCase();return Ve==="global"||Ve==="local"?Ve:""},S=(Ie,Ve=null)=>Ie==null||Ie===!1||Ie===""?Ve:typeof Ie=="number"?`${Ie}px`:String(Ie),I=(Ie,Ve=null)=>{if(Ie==null||Ie===!1||Ie==="")return Ve;if(typeof Ie=="number"&&Number.isFinite(Ie))return Ie;const nt=Number.parseFloat(String(Ie));return Number.isFinite(nt)?nt:Ve},V=Ie=>{const Ve=l(Ie);return Ve==null||Ve===!1||Ve===""?null:Array.isArray(Ve)?Ve.map(nt=>`"${Array.isArray(nt)?nt.join(" "):String(nt)}"`).join(" "):String(Ve)},$=(Ie,Ve=null,nt=null)=>{let rt=Number.isFinite(Ie)?Ie:0;return Number.isFinite(Ve)&&(rt=Math.max(Ve,rt)),Number.isFinite(nt)&&(rt=Math.min(nt,rt)),rt},ae=c("header","headerContent"),F=c("aside","drawer"),K=c("nav","asideRight","drawerRight"),oe=c("page","main","content","body"),H=c("footer","footerContent"),Y=()=>l(a("drawerEnabled","asideEnabled")),Q=()=>l(a("navEnabled","asideRightEnabled","rightAsideEnabled")),le=()=>Y()!==!1,re=()=>Q()===!0||l(a("noNav"))===!1,Z=()=>l(a("noDrawer"))===!0||Y()===!1||F===!1,ne=()=>l(a("noNav"))===!0||Q()===!1||K===!1,T=()=>l(a("drawerFloating"))===!0,j=()=>l(a("navFloating"))===!0,q=()=>l(a("drawerResizable"))===!0,ce=()=>l(a("navResizable"))===!0,J=()=>I(l(a("drawerMinWidth")),180),g=()=>I(l(a("drawerMaxWidth")),null),f=()=>I(l(a("navMinWidth")),180),p=()=>I(l(a("navMaxWidth")),null),O=I(l(a("drawerWidth")),280),W=I((sn=l(a("navWidth")))!=null?sn:l(a("asideRightWidth")),280),[u,x]=JSswift.reactive.signal($(O,J(),g())),[h,z]=JSswift.reactive.signal($(W,f(),p())),B=Nt(e.drawerOpen,"UI.Layout:drawerOpen"),U=B?!!B.get():typeof e.drawerOpen=="boolean"?!!e.drawerOpen:!0,[de,L]=JSswift.reactive.signal(U),m=Ie=>{const Ve=!!Ie;de()!==Ve&&L(Ve),B==null||B.set(Ve)},N=(ln=B==null?void 0:B.watch)==null?void 0:ln.call(B,()=>{const Ie=!!B.get();de()!==Ie&&L(Ie)}),A=Nt(e.navOpen,"UI.Layout:navOpen"),ee=A?!!A.get():typeof e.navOpen=="boolean"?!!e.navOpen:!0,[me,ye]=JSswift.reactive.signal(ee),be=Ie=>{const Ve=!!Ie;me()!==Ve&&ye(Ve),A==null||A.set(Ve)},M=(on=A==null?void 0:A.watch)==null?void 0:on.call(A,()=>{const Ie=!!A.get();me()!==Ie&&ye(Ie)}),D=()=>{var rt,pt,yt;const Ie=Number((rt=l(a("layoutBreakpoint")))!=null?rt:0),Ve=Number((pt=l(a("drawerBreakpoint")))!=null?pt:Ie||1024),nt=Number((yt=l(a("navBreakpoint")))!=null?yt:Ie||Ve);return Math.max(Ve,nt,0)},G=()=>{const Ie=r();return Ie>=1024?"pc":Ie>=768?"tablet":"mobile"},[Ce,ke]=JSswift.reactive.signal(!1),[fe,ve]=JSswift.reactive.signal(G()),pe=()=>{typeof window!="undefined"&&(ve(G()),ke(window.innerWidth<D()))};typeof window!="undefined"&&(pe(),window.addEventListener("resize",pe));const ze=()=>({props:e,openAside:()=>m(!0),closeAside:()=>m(!1),toggleAside:()=>m(!de()),openNav:()=>be(!0),closeNav:()=>be(!1),toggleNav:()=>be(!me()),isDrawerOpen:()=>!!de(),isNavOpen:()=>!!me(),isMobile:()=>!!Ce(),isDrawerFloating:()=>T(),isNavFloating:()=>j()}),Me=(Ie,Ve)=>{const nt=ze();for(const pt of Ie){if(!o(s,pt))continue;const yt=typeof s[pt]=="function"?s[pt](nt):s[pt];return P(null,"default",nt,yt)}const rt=typeof Ve=="function"?Ve(nt):Ve;return P(null,"default",nt,rt)},Pe=oe!==void 0?oe:n,Ae=ie(["cms-app","cms-layout",JSswift.uiResponsiveClasses({mobile:e},un),JSswift.uiResponsiveClasses(e,un),e.class]),y=JSswift.omit(e,["header","headerContent","aside","drawer","nav","asideRight","drawerRight","page","main","content","body","footer","footerContent","noDrawer","drawerEnabled","asideEnabled","noNav","navEnabled","asideRightEnabled","rightAsideEnabled","drawerOpen","navOpen","layoutBreakpoint","drawerBreakpoint","navBreakpoint","drawerWidth","navWidth","asideRightWidth","drawerResizable","drawerMinWidth","drawerMaxWidth","navResizable","navMinWidth","navMaxWidth","drawerPeek","navPeek","asideRightPeek","drawerFloating","navFloating","overlayClose","escClose","stickyHeader","stickyFooter","stickyAside","stickyNav","tagPage","mode","layoutMode","disposition","layoutDisposition","layout","shellClass","headerClass","asideClass","navClass","pageClass","footerClass","overlayClass","gap","headerOffset","minHeight","areas","gridTemplateAreas","templateAreas","slots"]);y.class=Ae,y.style={...e.style||{}},JSswift.uiApplyResponsiveProps(y,e,JSswift.uiResponsiveStyleRules);const X=_.div(y);N&&JSswift._registerCleanup(X,N),M&&JSswift._registerCleanup(X,M);const R=l(a("tagPage"))===!0?{header:"header",aside:"aside",nav:"nav",page:"main",footer:"footer"}:{header:"div",aside:"div",nav:"div",page:"div",footer:"div"},d=_.div({class:ie(["cms-layout-shell-grid",e.shellClass])}),i=_[R.header]({class:ie(["cms-layout-section","cms-layout-header","header",ge(e.stickyHeader,"sticky"),e.headerClass])}),C=_[R.aside]({class:ie(["cms-layout-section","cms-layout-aside","aside",ge(e.stickyAside!==!1,"sticky"),e.asideClass]),role:"navigation","aria-hidden":"true"}),se=_.div({class:"cms-layout-panel-body cms-layout-aside-body"}),_e=_.div({class:"cms-layout-resize-handle cms-layout-resize-handle-drawer","aria-hidden":"true"});C.appendChild(se),C.appendChild(_e);const Ne=_[R.nav]({class:ie(["cms-layout-section","cms-layout-nav","nav",ge(e.stickyNav,"sticky"),e.navClass]),role:R.nav==="nav"?null:"complementary","aria-hidden":"true"}),ue=_.div({class:"cms-layout-panel-body cms-layout-nav-body"}),Se=_.div({class:"cms-layout-resize-handle cms-layout-resize-handle-nav","aria-hidden":"true"});Ne.appendChild(ue),Ne.appendChild(Se);const Fe=_[R.page]({class:ie(["cms-layout-section","cms-layout-main","main",e.pageClass]),role:R.page==="main"?null:"main"}),Ee=_[R.footer]({class:ie(["cms-layout-section","cms-layout-footer","footer",ge(e.stickyFooter,"sticky"),e.footerClass])});d.appendChild(i),d.appendChild(C),d.appendChild(Fe),d.appendChild(Ne),d.appendChild(Ee),X.appendChild(d);const Je=_.div({class:ie(["cms-aside-overlay",e.overlayClass]),onClick:()=>{l(a("overlayClose"))!==!1&&(de()&&m(!1),me()&&be(!1))}});X.appendChild(Je);let He=!1,Ge=!1,qe=!1,Ze=!1,et=!1,We=null,st=null;const De=Ie=>{!Ie||typeof Ie!="object"||(typeof Ie._dispose=="function"&&Ie._dispose(),!(!Ie.childNodes||!Ie.childNodes.length)&&Array.from(Ie.childNodes).forEach(De))},ot=Ie=>{Ie&&Array.from(Ie.childNodes).forEach(Ve=>{De(Ve),Ve.remove()})},ct=Ie=>{const Ve=ze(),nt=typeof Ie=="function"?Ie(Ve):Ie;return P(null,"default",Ve,nt)},dt=()=>{const Ie=He?i.getBoundingClientRect().height:0;X.style.setProperty("--layout-header-height",`${Ie}px`)},tt=(Ie,Ve)=>(ot(Ie),Ve.forEach(nt=>Ie.appendChild(nt)),Ve.length>0),ft=()=>{var rt,pt,yt,w,te,we;X.style.setProperty("--cms-layout-drawer-width",S((rt=l(a("drawerWidth")))!=null?rt:280,"280px")),X.style.setProperty("--cms-layout-nav-width",S((yt=(pt=l(a("navWidth")))!=null?pt:l(a("asideRightWidth")))!=null?yt:280,"280px")),X.style.setProperty("--cms-layout-drawer-peek",S((w=l(a("drawerPeek")))!=null?w:20,"20px")),X.style.setProperty("--cms-layout-nav-peek",S((we=(te=l(a("navPeek")))!=null?te:l(a("asideRightPeek")))!=null?we:20,"20px"));const Ie=S(l(a("gap")),null);Ie!=null?X.style.setProperty("--cms-layout-gap",Ie):X.style.removeProperty("--cms-layout-gap");const Ve=S(l(a("headerOffset")),null);Ve!=null&&X.style.setProperty("--layout-header-height",Ve);const nt=S(l(a("minHeight")),null);nt!=null?X.style.setProperty("--cms-layout-min-height",nt):X.style.removeProperty("--cms-layout-min-height")},St=()=>{if(q()){const Ie=$(u(),J(),g());Ie!==u()&&x(Ie),X.style.setProperty("--cms-layout-drawer-width",`${Ie}px`)}if(ce()){const Ie=$(h(),f(),p());Ie!==h()&&z(Ie),X.style.setProperty("--cms-layout-nav-width",`${Ie}px`)}},Ct=(Ie,Ve)=>{if(Ve.button!==0)return;const nt=Ie==="drawer"?C:Ne;if(nt.hidden)return;const rt=Ie==="drawer"?u:h,pt=Ie==="drawer"?x:z,yt=Ie==="drawer"?J:f,w=Ie==="drawer"?g:p,te=nt.getBoundingClientRect(),we=te.width||rt(),Te=Oe=>{const $e=Ie==="drawer"?Oe.clientX-te.left:te.right-Oe.clientX;pt($($e||we,yt(),w())),St(),ht()},Re=()=>{X.classList.remove("is-resizing-layout"),document.removeEventListener("pointermove",Te,!0),document.removeEventListener("pointerup",Re,!0),st=null};X.classList.add("is-resizing-layout"),document.addEventListener("pointermove",Te,!0),document.addEventListener("pointerup",Re,!0),st=Re,Ve.preventDefault()},mt=Ie=>Ct("drawer",Ie),At=Ie=>Ct("nav",Ie);_e.addEventListener("pointerdown",mt),Se.addEventListener("pointerdown",At);const ht=()=>{const Ie=!!Ce(),Ve=!!de(),nt=!!me(),rt=!Z()&&le()&&Ge,pt=!ne()&&re()&&qe,yt=rt&&(Ie||T()),w=pt&&(Ie||j()),te=rt&&Ve,we=pt&&nt,Te=te&&!yt,Re=we&&!w,Oe=Te&&q(),$e=Re&&ce(),Qe=te&&yt||we&&w;ft(),St(),X.classList.toggle("is-mobile",Ie),X.classList.toggle("drawer-open",te),X.classList.toggle("nav-open",we),X.classList.toggle("no-drawer",!rt),X.classList.toggle("no-nav",!pt),X.classList.toggle("has-header",He),X.classList.toggle("has-drawer",rt),X.classList.toggle("has-nav",pt),X.classList.toggle("has-footer",et),X.classList.toggle("drawer-floating",yt),X.classList.toggle("nav-floating",w);const ut=E(),wt=ut?k():"";X.dataset.disposition=ut||"",X.dataset.layoutMode=wt||"",X.classList.toggle("has-disposition",!!ut),X.classList.toggle("mode-local",wt==="local"),X.classList.toggle("mode-global",wt==="global"),i.classList.toggle("sticky",l(a("stickyHeader"))===!0),Ee.classList.toggle("sticky",l(a("stickyFooter"))===!0),C.classList.toggle("sticky",l(a("stickyAside"))!==!1),Ne.classList.toggle("sticky",l(a("stickyNav"))===!0),i.hidden=!He,Ee.hidden=!et,Fe.hidden=!Ze,Je.hidden=!(yt||w),Je.classList.toggle("show",Qe),C.hidden=!rt||!te&&!yt,C.classList.toggle("open",te),C.classList.toggle("is-floating",yt),C.classList.toggle("is-resizable",Oe),C.setAttribute("aria-hidden",te?"false":"true"),_e.hidden=!Oe,Ne.hidden=!pt||!we&&!w,Ne.classList.toggle("open",we),Ne.classList.toggle("is-floating",w),Ne.classList.toggle("is-resizable",$e),Ne.setAttribute("aria-hidden",we?"false":"true"),Se.hidden=!$e;const bt=ll[ut]||null,Mt=(bt==null?void 0:bt.side)||(Te&&bt?"left":null),zt=(bt==null?void 0:bt.nav)||(Re&&bt?"top":null),kt=Te?bt?Mt:"left":"",Vt=Re?bt?zt==="left"||zt==="right"?zt:"":"right":"";X.classList.toggle("drawer-left",rt&&Mt==="left"),X.classList.toggle("drawer-right",rt&&Mt==="right"),X.classList.toggle("nav-top",Re&&zt==="top"),X.classList.toggle("nav-side",Re&&(Vt==="left"||Vt==="right")),d.style.gridTemplateColumns=[kt==="left"?"minmax(0, var(--cms-layout-drawer-width))":Vt==="left"?"minmax(0, var(--cms-layout-nav-width))":"0px","minmax(0, 1fr)",kt==="right"?"minmax(0, var(--cms-layout-drawer-width))":Vt==="right"?"minmax(0, var(--cms-layout-nav-width))":"0px"].join(" ");const Xt=['"header header header"',`"${Te?"aside":"."} main ${Re?"nav":"."}"`,'"footer footer footer"'].join(" "),Qt=To(ll[ut],{header:He,aside:Te,nav:Re,main:Ze,footer:et});d.style.gridTemplateAreas=V(b("areas","gridTemplateAreas","templateAreas"))||Qt||Xt},vt=(Ie,Ve)=>(He=tt(i,ct(Ie)),dt(),ht(),Ve&&JSswift.router.setURLOnly(Ve),i),Gt=(Ie,Ve)=>(Ge=tt(se,ct(Ie)),Ge||m(!1),ht(),Ve&&JSswift.router.setURLOnly(Ve),C),xt=(Ie,Ve)=>(qe=tt(ue,ct(Ie)),qe||be(!1),ht(),Ve&&JSswift.router.setURLOnly(Ve),Ne),dn=(Ie,Ve)=>(Ze=tt(Fe,ct(Ie)),ht(),Ve&&JSswift.router.setURLOnly(Ve),Fe),wn=(Ie,Ve)=>(et=tt(Ee,ct(Ie)),ht(),Ve&&JSswift.router.setURLOnly(Ve),Ee);He=tt(i,Me(["header"],ae)),Ge=tt(se,F===!1?[]:Me(["aside","drawer"],F)),qe=tt(ue,K===!1?[]:Me(["nav","asideRight","drawerRight"],K)),Ze=tt(Fe,Me(["page","main","default"],Pe)),et=tt(Ee,Me(["footer"],H)),typeof ResizeObserver!="undefined"&&(We=new ResizeObserver(()=>dt()),We.observe(i)),dt(),JSswift.reactive.effect(()=>{fe(),Ce(),de(),me(),ht()},"UI.Layout:state");const nn=Ie=>{l(a("escClose"))!==!1&&(!Ce()&&!T()&&!j()||!de()&&!me()||Ie.key==="Escape"&&(Ie.preventDefault(),de()&&m(!1),me()&&be(!1)))};return typeof document!="undefined"&&document.addEventListener("keydown",nn,!0),X.openAside=()=>m(!0),X.closeAside=()=>m(!1),X.toggleAside=()=>m(!de()),X.openNav=()=>be(!0),X.closeNav=()=>be(!1),X.toggleNav=()=>be(!me()),X.isDrawerOpen=()=>!!de(),X.isNavOpen=()=>!!me(),X.isMobile=()=>!!Ce(),X.header=()=>i,X.aside=()=>C,X.drawer=()=>C,X.nav=()=>Ne,X.page=()=>Fe,X.main=()=>Fe,X.footer=()=>Ee,X.headerUpdate=vt,X.asideUpdate=Gt,X.drawerUpdate=Gt,X.navUpdate=xt,X.pageUpdate=dn,X.mainUpdate=dn,X.footerUpdate=wn,X.reflow=ht,X._dispose=()=>{var Ie;typeof window!="undefined"&&window.removeEventListener("resize",pe),typeof document!="undefined"&&document.removeEventListener("keydown",nn,!0),_e.removeEventListener("pointerdown",mt),Se.removeEventListener("pointerdown",At),st==null||st(),(Ie=We==null?void 0:We.disconnect)==null||Ie.call(We)},Ye(X,e),ht(),X},he.Footer=(...t)=>{var ce,J,g;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=f=>Object.prototype.hasOwnProperty.call(e,f),r={props:e},v=(f,p)=>{if(!(p==null||p===!1)){if(Array.isArray(p)){p.forEach(O=>v(f,O));return}if(p!=null&&p.nodeType){f.appendChild(p);return}f.appendChild(document.createTextNode(String(p)))}},c=(f,p,O=W=>W)=>{const W=JSswift.ui.getSlot(s,f);if(W!=null)return P(s,f,r,null);if(typeof p=="function"){const u=new Set(["eyebrow","title","subtitle"]),x=_[u.has(f)?"span":"div"]({class:`cms-footer-slot-${f}`});return JSswift.reactive.effect(()=>{const h=O(p(r)),z=rn(JSswift.ui.slot(h));x.replaceChildren(),Array.isArray(z)?z.forEach(B=>v(x,B)):v(x,z)},`UI.Footer:${f}`),[x]}return P(s,f,r,O(p))},a=(f,p="icon",O=e.iconSize||e.size||"md")=>f==null||f===!1?null:typeof f=="string"?he.Icon({name:f,size:O}):JSswift.ui.slot(f,{as:p}),b=o("left")?e.left:e.start,E=o("right")?e.right:e.end,k=o("title")?e.title:e.label,S=(J=(ce=e.subtitle)!=null?ce:e.description)!=null?J:e.note,I=o("content")?e.content:o("body")?e.body:n!=null&&n.length?n:null,V=[...c("left",b),...c("start",null)],$=c("icon",e.icon,a),ae=c("eyebrow",(g=e.eyebrow)!=null?g:e.kicker),F=c("title",k),K=c("subtitle",S),oe=c("meta",e.meta),H=(()=>{const f=c("content",null);return f.length?f:c("default",I)})(),Y=[...c("center",null),...c("body",null)],Q=[...c("right",E),...c("end",null)],le=c("actions",e.actions),re=_.div({class:ie(["cms-footer-body",e.bodyClass,e.centerClass])},_.div({class:"cms-footer-heading"},$.length?_.div({class:"cms-footer-icon"},...$):null,_.div({class:"cms-footer-copy"},ae.length?_.div({class:ie(["cms-footer-eyebrow",e.eyebrowClass])},...ae):null,F.length?_.div({class:ie(["cms-footer-title",e.titleClass])},...F):null,K.length?_.div({class:ie(["cms-footer-subtitle",e.subtitleClass])},...K):null,H.length?_.div({class:ie(["cms-footer-content",e.contentClass])},...H):null),oe.length?_.div({class:ie(["cms-footer-meta",e.metaClass])},...oe):null)),Z=[];Y.length?Z.push(_.div({class:ie(["cms-footer-body",e.bodyClass,e.centerClass])},...Y)):($.length||ae.length||F.length||K.length||H.length||oe.length)&&Z.push(re),(Q.length||le.length)&&Z.push(_.div({class:ie(["cms-footer-end",e.endClass])},...Q,...le.length?[_.div({class:ie(["cms-footer-actions",e.actionsClass])},...le)]:[]));const ne=JSswift.omit(e,["actions","actionsClass","align","body","bodyClass","center","centerClass","content","contentClass","dense","description","divider","elevated","end","endClass","eyebrow","eyebrowClass","gap","icon","iconSize","kicker","label","left","meta","metaClass","minHeight","note","right","slots","stack","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap","justify"]);ne.class=ie(["cms-panel","cms-footer","cms-singularity",ge(e.sticky,"sticky"),ge(e.dense,"dense"),ge(e.elevated,"elevated"),ge(e.divider!==!1,"divider"),ge(e.stack,"stack"),tl(e.align,"align-"),e.class]),ne.style={...e.style||{}};const T=Le(e.justify);T!=null&&(ne.style.justifyContent=T);const j=Le(e.wrap,f=>f?"wrap":"nowrap");j!=null&&(ne.style.flexWrap=j),e.gap!=null&&(ne.style["--cms-footer-gap"]=Be(l(e.gap))),e.minHeight!=null&&(ne.style.minHeight=Be(l(e.minHeight))),JSswift.uiApplyResponsiveProps(ne,e,JSswift.uiResponsiveStyleRules);const q=_.footer(ne,...V.length?[_.div({class:ie(["cms-footer-start",e.startClass])},...V)]:[],...Z.length?[_.div({class:"cms-footer-main"},...Z)]:[]);return Ye(q,e),q};const gi=t=>{const e=[];for(const n of t||[]){const s=rn(JSswift.ui.slot(n));s&&(Array.isArray(s)?e.push(...s):e.push(s))}return e},Ln=(t,e)=>{const n=rn(JSswift.ui.slot(t,e));return n?Array.isArray(n)?n:[n]:[]},Be=t=>{var e;return typeof t=="number"?`${t}px`:typeof t=="string"&&((e=JSswift.uiSizes)!=null&&e.includes(t))?`var(--cms-size-${t})`:String(t)};he.Toolbar=(...t)=>{var p,O,W,u,x,h,z,B;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(U,de,L={})=>{const m=Array.isArray(U)?U:[U];for(const N of m)if(JSswift.ui.getSlot(s,N)!=null)return P(s,N,L,de);return de==null?[]:P(null,"default",L,de)},r=U=>(Array.isArray(U)?U:[U]).some(L=>JSswift.ui.getSlot(s,L)!=null),v={props:e},c=o(["before"],e.before,v),a=o(["start","left"],(p=e.start)!=null?p:e.left,v),b=o(["center","body","content","default"],(u=(W=(O=e.center)!=null?O:e.body)!=null?W:e.content)!=null?u:n,v),E=o(["end","right","actions"],(h=(x=e.end)!=null?x:e.right)!=null?h:e.actions,v),k=o(["after"],e.after,v),S=o(["title"],e.title,v),I=o(["subtitle"],e.subtitle,v),V=o(["meta"],e.meta,v),$=!!(c.length||a.length||E.length||k.length||S.length||I.length||V.length||e.before!=null||e.start!=null||e.left!=null||e.end!=null||e.right!=null||e.actions!=null||e.after!=null||e.title!=null||e.subtitle!=null||e.meta!=null||e.body!=null||e.center!=null||e.content!=null||e.beforeClass||e.startClass||e.bodyClass||e.centerClass||e.contentClass||e.endClass||e.afterClass||e.titleClass||e.subtitleClass||e.metaClass||e.copyClass||r(["before","start","left","center","body","content","end","right","actions","after","title","subtitle","meta"])),ae=ie(["cms-toolbar",ge($,"structured"),ge(e.dense,"dense"),ge(e.divider,"divider"),ge(e.elevated,"elevated"),ge(e.sticky,"sticky"),e.class]),F=JSswift.omit(e,["actions","after","afterClass","align","before","beforeClass","body","bodyClass","center","centerClass","content","contentClass","copyClass","dense","divider","elevated","end","endClass","gap","justify","left","meta","metaClass","right","size","slots","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap"]);F.class=ae;const K={...e.style||{}};K.display=K.display||"flex";const oe=Le(e.align),H=Le(e.justify),Y=Le(e.wrap,U=>typeof U=="boolean"?U?"wrap":"nowrap":String(U),"wrap"),Q=Le(e.gap,Be,"var(--cms-s-md)"),le=Ue(e,"gap");K["--cms-toolbar-gap"]=Q!=null?Q:"var(--cms-s-md)",le||(K.gap=K.gap||"var(--cms-toolbar-gap)");const re={xxs:"4px 6px",xs:"6px 8px",sm:"6px 10px",md:"10px 12px",lg:"12px 16px",xl:"14px 18px",xxl:"16px 20px"},Z=Le(e.size,U=>re[U]||"");if(Z!=null&&(K.padding=Z),$?(K.flexDirection=K.flexDirection||"column",K.alignItems=K.alignItems||"stretch"):(oe!=null&&(K.alignItems=oe),H!=null&&(K.justifyContent=H),Y!=null&&(K.flexWrap=Y)),Object.keys(K).length&&(F.style=K),JSswift.uiApplyResponsiveProps(F,e,JSswift.uiResponsiveStyleRules),!$){const U=P(s,"default",v,n),de=_.div(F,...U);return Ye(de,e),de}const ne=(B=(z=e.bodyClass)!=null?z:e.centerClass)!=null?B:e.contentClass,T=Xe([e.justify],()=>{const U=l(e.justify);return!U||U==="flex-start"?"auto":""}),j={display:"flex",alignItems:"inherit",gap:"var(--cms-toolbar-gap)",flexWrap:"inherit",minWidth:0},q={};oe!=null&&(q.alignItems=oe),H!=null&&(q.justifyContent=H),Y!=null&&(q.flexWrap=Y);const ce=V.length||S.length||I.length?_.div({class:ie(["cms-toolbar-copy",e.copyClass])},V.length?_.div({class:ie(["cms-toolbar-meta",e.metaClass])},...V):null,S.length?_.div({class:ie(["cms-toolbar-title",e.titleClass])},...S):null,I.length?_.div({class:ie(["cms-toolbar-subtitle",e.subtitleClass])},...I):null):null,J=!!(a.length||ce||b.length||E.length),g=[c.length?_.div({class:ie(["cms-toolbar-before",e.beforeClass]),style:{...j}},...c):null,J?_.div({class:"cms-toolbar-main",style:q},a.length?_.div({class:ie(["cms-toolbar-start",e.startClass]),style:{...j}},...a):null,ce||b.length?_.div({class:ie(["cms-toolbar-center",ne]),style:{...j,flex:"1 1 240px"}},ce,...b):null,E.length?_.div({class:ie(["cms-toolbar-end",e.endClass]),style:{...j,justifyContent:"flex-end",marginInlineStart:T}},...E):null):null,k.length?_.div({class:ie(["cms-toolbar-after",e.afterClass]),style:{...j}},...k):null].filter(Boolean),f=_.div(F,...g);return Ye(f,e),f};const Ro=t=>{var e;return t&&t.nodeType===1&&((e=t.classList)==null?void 0:e.contains("cms-grid-col"))};he.Grid=(...t)=>{var f,p,O,W;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=l(e.items),r=Array.isArray(o)?o:o==null?[]:[o],v=(u={})=>{const x=e.itemProps||{},h={...x,...u};return h.class=ie([x.class,e.itemClass,u.class]),h.style={...x.style||{},...e.itemStyle||{},...u.style||{}},h},c=(u,x={})=>{if(u==null||u===!1)return[];if(Ro(u))return[u];if(kn(u)){const h=u.children!=null?en(u.children):u.content!=null?en(u.content):u.node!=null?en(u.node):u.label!=null?en(u.label):[];return[he.GridCol(v(u),...h)]}return Array.isArray(u)?[he.GridCol(v(x),...u)]:[he.GridCol(v(x),u)]},a=(u,x,h,z=!0)=>{if(u==null||u===!1)return[];const B=kn(u)?u:{};if(z){const U={item:u,index:x,count:h,first:x===0,last:x===h-1},de=P(s,"item",U,null);if(de.length)return de.flatMap(L=>c(L,B))}return c(u,B)},b=[];r.forEach((u,x)=>{b.push(...a(u,x,r.length))}),P(s,"default",{items:r,count:r.length},n).forEach(u=>{b.push(...c(u))}),b.length||P(s,"empty",{items:r,count:0},e.empty).forEach(x=>{const h=c(x,{style:{gridColumn:"1 / -1"}});b.push(...h)});const k=ie(["cms-grid",JSswift.uiResponsiveClasses({mobile:e},Zs),JSswift.uiResponsiveClasses(e,Zs),ge(e.dense,"dense"),ge(e.inline,"cms-grid-inline"),ge(e.debug,"cms-grid-debug"),e.class]),S=JSswift.omit(e,["gap","rowGap","columnGap","colGap","cols","columns","rows","areas","align","justify","alignItems","justifyItems","placeItems","placeContent","dense","flow","inline","debug","autoFit","autoFill","min","max","autoRows","items","itemClass","itemStyle","itemProps","empty","slots","full","width","minWidth","maxWidth","padding",...JSswift.uiResponsiveOmitProps]);S.class=k;const I={...e.style||{}};(f=JSswift.uiResponsiveHasConfig)!=null&&f.call(JSswift,e)&&e.display==null&&!Ue(e,"display")&&I.display==null&&(I.display=e.inline?"inline-grid":"grid");const V=Le(e.gap,Be);V!=null&&!Ue(e,"gap")&&(I["--cms-grid-gap"]=V,I.gap=V);const $=Le(e.rowGap,Be);$!=null&&!Ue(e,"rowGap")&&(I.rowGap=$);const ae=Le((p=e.columnGap)!=null?p:e.colGap,Be);ae!=null&&!Ue(e,["columnGap","colGap"])&&(I.columnGap=ae);const F=Le(e.max,Be,"1fr"),K=Le(e.min,Be);if(K!=null){const u=l(e.autoFill)?"auto-fill":"auto-fit";I.gridTemplateColumns=`repeat(${u}, minmax(${K}, ${F||"1fr"}))`}else{const u=Le((O=e.columns)!=null?O:e.cols,x=>typeof x=="number"?`repeat(${x}, minmax(0, 1fr))`:String(x));u!=null&&!Ue(e,["cols","columns"])&&(I.gridTemplateColumns=u)}const oe=Le(e.rows,u=>typeof u=="number"?`repeat(${u}, minmax(0, auto))`:String(u));oe!=null&&(I.gridTemplateRows=oe);const H=Le(e.autoRows,Be);H!=null&&(I.gridAutoRows=H);const Y=Le(e.flow,u=>{const x=String(u);return e.dense&&!x.includes("dense")?`${x} dense`:x});Y!=null&&!Ue(e,"flow")&&(I.gridAutoFlow=Y);const Q=Le(e.areas,u=>Array.isArray(u)?u.map(x=>`"${Array.isArray(x)?x.join(" "):String(x)}"`).join(" "):String(u));Q!=null&&(I.gridTemplateAreas=Q);const le=Le((W=e.align)!=null?W:e.alignItems);le!=null&&!Ue(e,["align","alignItems"])&&(I.alignItems=le);const re=Le(e.justify);re!=null&&!Ue(e,"justify")&&(I.justifyContent=re);const Z=Le(e.justifyItems);Z!=null&&(I.justifyItems=Z);const ne=Le(e.placeItems);ne!=null&&(I.placeItems=ne);const T=Le(e.placeContent);T!=null&&(I.placeContent=T);const j=Le(e.width,Be);j!=null&&!Ue(e,"width")&&(I.width=j),l(e.full)===!0&&(I.width="100%");const q=Le(e.minWidth,Be);q!=null&&!Ue(e,"minWidth")&&(I.minWidth=q);const ce=Le(e.maxWidth,Be);ce!=null&&!Ue(e,"maxWidth")&&(I.maxWidth=ce);const J=Le(e.padding,Be);J!=null&&!Ue(e,"padding")&&(I.padding=J),Object.keys(I).length&&(S.style=I),JSswift.uiApplyResponsiveProps(S,e,JSswift.uiResponsiveStyleRules);const g=_.div(S,...b);return Ye(g,e),g},he.GridCol=(...t)=>{var ze,Me,Pe,Ae,y,X,xe,R;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=d=>Object.prototype.hasOwnProperty.call(e,d),r=(d,i,C={})=>{const se=Array.isArray(d)?d:[d];for(const _e of se)if(JSswift.ui.getSlot(s,_e)!=null)return P(s,_e,C,i);return i==null?[]:P(null,"default",C,i)},v=d=>{var i;return d==null||d===!1||d===""?"":typeof d=="string"&&((i=JSswift.uiSizes)!=null&&i.includes(d))?`var(--cms-s-${d})`:Be(d)},c=d=>{var i;return d==null||d===!1||d===""?"":typeof d=="string"&&((i=JSswift.uiSizes)!=null&&i.includes(d))?ms(d,"size"):Be(d)},a={...e.style||{}},b=d=>{if(d==null||d==="")return null;if(d==="auto")return"auto";if(d==="full"||d===!0)return"1 / -1";const i=Number(d);if(Number.isFinite(i)&&i>0){const C=Math.max(1,Math.round(i));return`span ${C} / span ${C}`}return String(d)},E=d=>{if(d==null||d==="")return null;if(d==="full"||d===!0)return"1 / -1";const i=Number(d);if(Number.isFinite(i)&&i>0){const C=Math.max(1,Math.round(i));return`span ${C} / span ${C}`}return String(d)},k=o("span")?e.span:e.col,S=Le(k,b),I=Le(e.sm,b),V=Le(e.md,b),$=Le(e.lg,b),ae=JSswift.uiResponsivePropsFor(e,hn("tablet"))||{},F=JSswift.uiResponsivePropsFor(e,hn("pc"))||{},K=(ze=ae.span)!=null?ze:ae.col,oe=(Me=F.span)!=null?Me:F.col,H=Le(K,b),Y=Le(oe,b),Q=Le(e.rowSpan,E),le=Le(e.row,E),re=Le(e.area),Z=Le(e.align),ne=Le(e.justify),T=Le(e.place),j=Le(e.gap,v),q=Le(e.rowGap,v),ce=Le(e.columnGap,v),J=Le(e.padding,v),g=Le(e.width,c),f=Le(e.minHeight,c),p=Le(e.height,c),O=Le(e.maxHeight,c),W=Le(e.contentAlign),u=Le(e.contentJustify),x=Le(e.direction),h=Le(e.scroll,d=>d===!0?"auto":String(d),""),z=Le(e.fullHeight,d=>d?"100%":"",""),B=Xe([e.center,e.contentAlign,e.contentJustify],()=>!!l(e.center)&&(l(e.contentAlign)==null||l(e.contentAlign)==="")&&(l(e.contentJustify)==null||l(e.contentJustify)==="")),U={props:e},de=r(["start","top","header","before"],(y=(Ae=(Pe=e.start)!=null?Pe:e.top)!=null?Ae:e.header)!=null?y:e.before,U),L=o("body")?e.body:o("content")?e.content:n,m=r(["body","content","default"],L,U),N=r(["end","bottom","footer","after"],(R=(xe=(X=e.end)!=null?X:e.bottom)!=null?xe:e.footer)!=null?R:e.after,U),A=de.length||N.length||o("start")||o("top")||o("header")||o("before")||o("body")||o("content")||o("end")||o("bottom")||o("footer")||o("after")||e.startClass||e.bodyClass||e.contentClass||e.endClass||e.topClass||e.headerClass||e.bottomClass||e.footerClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"top")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"content")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"bottom")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,ee=Xe([e.stack,e.gap,e.rowGap,e.columnGap,e.contentAlign,e.contentJustify,e.direction,e.center],()=>A||l(e.stack)||[l(e.gap),l(e.rowGap),l(e.columnGap),l(e.contentAlign),l(e.contentJustify),l(e.direction)].some(i=>i!=null&&i!==!1&&i!=="")?!0:!!l(e.center)),me=Xe([e.panel,e.color,e.clickable,e.border,e.glossy,e.glow,e.glass,e.shadow,e.outline,e.gradient,e.textGradient,e.lightShadow,e.radius],()=>!!(l(e.panel)||l(e.color)||l(e.clickable)||l(e.border)||l(e.glossy)||l(e.glow)||l(e.glass)||l(e.shadow)||l(e.outline)||l(e.gradient)||l(e.textGradient)||l(e.lightShadow)||l(e.radius))?["cms-clear-set","cms-singularity","cms-grid-col-surface"]:[]),ye=ie(["cms-grid-col",me,JSswift.uiResponsiveClasses({mobile:e},el),JSswift.uiResponsiveClasses(e,el),ge(e.panel,"cms-grid-col-panel"),ge(e.auto,"is-auto"),ge(ee,"cms-grid-col-stack"),ge(e.inline,"cms-grid-col-inline"),ge(B,"cms-grid-col-center"),e.class]),be=JSswift.omit(e,["span","col","sm","md","lg","auto","row","rowSpan","area","align","justify","place","gap","rowGap","columnGap","padding","width","height","minHeight","maxHeight","fullHeight","stack","inline","direction","contentAlign","contentJustify","center","scroll","panel","to","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass","slots","style","clickable","dense","flat","border","glossy","glow","glass","shadow","outline","rounded","gradient","textGradient","lightShadow","color","textColor","size","radius",...JSswift.uiResponsiveOmitProps]);be.class=ye,a["--cms-grid-col-base"]==null&&(a["--cms-grid-col-base"]="auto"),a["--cms-grid-col-tablet"]==null&&(a["--cms-grid-col-tablet"]="var(--cms-grid-col-base, auto)"),a["--cms-grid-col-pc"]==null&&(a["--cms-grid-col-pc"]="var(--cms-grid-col-tablet, var(--cms-grid-col-base, auto))"),l(e.auto)===!0?a["--cms-grid-col-base"]="auto":S!=null&&(a["--cms-grid-col-base"]=S),I!=null&&(a["--cms-grid-col-sm"]=I),V!=null&&(a["--cms-grid-col-md"]=V),$!=null&&(a["--cms-grid-col-lg"]=$),H!=null&&(a["--cms-grid-col-tablet"]=H),Y!=null&&(a["--cms-grid-col-pc"]=Y),Q!=null?a.gridRow=Q:le!=null&&(a.gridRow=le),re!=null&&(a.gridArea=re),Z!=null&&!Ue(e,"align")&&(a.alignSelf=Z),ne!=null&&!Ue(e,"justify")&&(a.justifySelf=ne),T!=null&&!Ue(e,"place")&&(a.placeSelf=T),j!=null&&!Ue(e,"gap")&&(a.gap=j),q!=null&&!Ue(e,"rowGap")&&(a.rowGap=q),ce!=null&&!Ue(e,"columnGap")&&(a.columnGap=ce),J!=null&&!Ue(e,"padding")&&(a.padding=J),g!=null&&!Ue(e,"width")&&(a.width=g),z!=null&&z!==""?a.height=z:p!=null&&!Ue(e,"height")&&(a.height=p),f!=null&&!Ue(e,"minHeight")&&(a.minHeight=f),O!=null&&!Ue(e,"maxHeight")&&(a.maxHeight=O),x!=null&&!Ue(e,"direction")&&(a.flexDirection=x),W!=null&&!Ue(e,"contentAlign")?a.alignItems=W:B!=null&&B!==""&&(a.alignItems=B?"center":""),u!=null&&!Ue(e,"contentJustify")?a.justifyContent=u:B!=null&&B!==""&&(a.justifyContent=B?"center":""),h!=null&&h!==""&&(a.overflow=h),Object.keys(a).length&&(be.style=a),JSswift.uiApplyResponsiveProps(be,e,zo);const M=e.onClick,D=e.onKeydown,G=!!(l(e.clickable)||l(e.to)),Ce=d=>{var C;if(M==null||M(d),d.defaultPrevented)return;const i=l(e.to);i&&((C=JSswift.router)!=null&&C.navigate)&&(d.preventDefault(),JSswift.router.navigate(i))},ke=d=>{D==null||D(d),!d.defaultPrevented&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Ce(d))};if(G&&(be.onClick=Ce,be.onKeydown=ke,be.tabIndex==null&&(be.tabIndex=0),be.role==null&&(be.role="button")),!A){const d=_.div(be,...P(s,"default",U,n));return Ye(d,e),d}const fe={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},ve=[de.length?_.div({class:ie(["cms-grid-col-start",e.startClass,e.topClass,e.headerClass]),style:{...fe}},...de):null,m.length?_.div({class:ie(["cms-grid-col-body",e.bodyClass,e.contentClass]),style:{...fe,flex:"1 1 auto"}},...m):null,N.length?_.div({class:ie(["cms-grid-col-end",e.endClass,e.bottomClass,e.footerClass]),style:{...fe}},...N):null].filter(Boolean),pe=_.div(be,...ve);return Ye(pe,e),pe},he.Icon=(...t)=>{var le,re;let e={},n=[],s="home",o=!1;const r=t[0],v=t[1],c=Z=>Z&&typeof Z=="object"&&!Z.nodeType&&!Array.isArray(Z)&&!(Z instanceof Function);typeof r=="string"?(s=r,o=!0,c(v)?(e=v,t.length>2&&(n=t.slice(2))):t.length>1&&(n=t.slice(1))):c(r)?(e=r,r.name!=null&&(s=r.name,o=!0),t.length>1&&(n=t.slice(1))):t.length&&(n=t),!o&&n.length&&(s=n.length===1?n[0]:n),Kt(e);const a=e.slots||{},b=l(e.size),E=l(e.color),k=String(s).endsWith("-fill"),S={...e.style||{}},I=Xe(e.size,()=>{const Z=l(e.size);return typeof Z=="string"&&_n[Z]?Z:""}),V=!!(e.color||e.clickable||e.border||e.glossy||e.glow||e.glass||e.shadow||e.outline||e.gradient||e.textGradient||e.lightShadow||e.radius),$={"chevron-down":{viewBox:"0 0 24 24",paths:[{d:"M6 9l6 6l6 -6",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}]}},ae=Z=>{const ne=$[Z];return ne?_.svg({width:"100%",height:"100%",viewBox:ne.viewBox,fill:"none","aria-hidden":"true",focusable:"false"},...ne.paths.map(T=>_.path(T))):null},F=Z=>{const ne=l(e.tooltip);if(ne==null||ne===!1||!he.Tooltip)return Z;const T=c(ne)?{...ne}:{text:ne};return c(e.tooltipProps)&&Object.assign(T,e.tooltipProps),he.Tooltip({...T,target:Z})},K=ie(["cms-icon","material-icons",...V?["cms-clear-set","cms-singularity"]:[],I,e.class]),oe=JSswift.omit(e,["name","size","class","style","label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots","spriteUrl","tooltip","tooltipProps"]);if(oe.class=K,Object.keys(S).length&&(oe.style=S),typeof s=="function"||s&&typeof s=="object"){const Z=JSswift.ui.renderSlot(a,"default",{},s),ne=P(null,"default",{},Z),T=_.span({...oe,"data-icon":"custom"},...ne);return Ye(T,e),F(T)}const H=String(s),Y=H.includes("#")?H:"";let Q=null;if(Y){const Z=e.spriteUrl||((le=JSswift.config)==null?void 0:le.iconSpriteUrl)||(typeof globalThis!="undefined"?(re=globalThis.JSswift_setting)==null?void 0:re.iconSpriteUrl:null),ne=Y.slice(Y.indexOf("#")+1),T=Z?_.svg({width:"100%",height:"100%"},_.use({href:Z+Y})):ae(ne)||_.svg({width:"100%",height:"100%"},_.use({href:Y}));k&&(T.style.fill="currentColor"),Q=_.span({...oe,"data-icon":H},T,...n)}else Q=_.span({...oe,"data-icon":H},H,...n);if(b!=null){let Z=b;JSswift.uiSizes.includes(b)&&(Z=`var(--cms-icon-size-${b})`),Z=typeof Z=="number"?Z+"px":String(Z),Q.style.setProperty("--set-icon-size",Z)}return Ye(Q,e),F(Q)},he.Badge=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Xe(e.size,()=>{const $=l(e.size);return typeof $=="string"&&_n[$]?`cms-size-${$}`:""}),r=ie(["cms-clear-set","cms-badge","cms-singularity",o,ge(e.outline,"outline"),e.class]),v=JSswift.omit(e,["label","color","outline","size","slots","notification","iconSize","topLeft","topRight","bottomLeft","bottomRight","left","right"]);v.class=r;const c={...e.style||{}};if(e.size){const $=l(e.size);typeof $=="string"&&_n[$]||(c.fontSize=Be(e.size))}v.style=c;const a=($,ae,F)=>{const K=Array.isArray($)?$:[$];for(const oe of K)if(JSswift.ui.getSlot(s,oe)!=null)return P(s,oe,ae,F);return F==null||F===!1||F===""?[]:P(null,"default",ae,F)},b=()=>{var ae;const $=l((ae=e.iconSize)!=null?ae:e.size);return typeof $=="number"?Math.max(10,Math.round($*.85)):typeof $=="string"&&{xxs:10,xs:11,sm:12,md:13,lg:14,xl:16,xxl:18,xxxl:20}[$]||14},E=($,ae)=>{const F=l($);return F==null||F===!1||F===""?null:typeof F=="string"?he.Icon({name:F,size:b()}):JSswift.ui.slot(F,{as:ae})},k=($,ae,F)=>_.dynamic(()=>{const K=E(e[ae],F),oe=a($,{position:F},K);return oe.length?_.span({class:`cms-badge-anchor cms-badge-anchor-${F}`,"data-badge-slot":F},...oe):null}),S=_.dynamic(()=>{const $=l(e.label);let ae=a(["label"],{},$);return ae.length||(ae=a(["default"],{},n)),_.span({class:"cms-badge-content"},_.span({class:"cms-badge-label"},...ae.length?ae:[""]))}),I=_.dynamic(()=>{const $=l(e.notification),ae=$==null||$===!1||$===""?null:$,F=a(["notification"],{notification:$},ae);return F.length?_.span({class:"cms-badge-notification","data-badge-slot":"notification","aria-label":typeof $=="number"?`${$} notifications`:null},...F):null}),V=_.span(k(["left"],"left","left"),k(["centerLeft","center-left"],"centerLeft","center-left"),v,S,k(["topLeft","top-left"],"topLeft","top-left"),k(["topRight","top-right"],"topRight","top-right"),k(["bottomLeft","bottom-left"],"bottomLeft","bottom-left"),k(["bottomRight","bottom-right"],"bottomRight","bottom-right"),k(["centerRight","center-right"],"centerRight","center-right"),k(["right"],"right","right"),I);return(e.topLeft||e.centerLeft||e.bottomLeft)&&V.style.setProperty("padding-left","15px"),(e.topRight||e.centerRight||e.bottomRight)&&V.style.setProperty("padding-right","15px"),Ye(V,e),V};const Mo=t=>{if(t==null||t===!1)return"";const e=String(t).replace(/[._-]+/g," ").replace(/\s+/g," ").trim();if(!e)return"";const n=e.split(" ").filter(Boolean);return n.length?n.length===1?n[0].replace(/[^a-z0-9]/gi,"").slice(0,2).toUpperCase():n.slice(0,2).map(s=>s.charAt(0).toUpperCase()).join(""):""},ol=(t,e)=>{const n=t==null||t===!0?e:t;if(n==null||n===!1)return gt(e);const s=String(n).toLowerCase();return s==="online"||s==="available"||s==="active"?"success":s==="away"||s==="pending"?"warning":s==="busy"||s==="dnd"||s==="blocked"?"danger":s==="offline"||s==="idle"?"secondary":gt(s)||gt(e)},il=(t,e="cms-avatar-badge")=>t==null||t===!1?null:t instanceof Node||Array.isArray(t)||typeof t=="function"?t:t===!0?_.span({class:e}):_.span({class:e},String(t)),Fo=(t,e)=>{if(t==null||t===!1){if(!e)return null;const s=ol(null,e);return _.span({class:ie(["cms-avatar-status",s?`cms-state-${s}`:""])})}if(t instanceof Node||Array.isArray(t)||typeof t=="function")return t;const n=ol(t,e);return t===!0||n?_.span({class:ie(["cms-avatar-status",n?`cms-state-${n}`:""])}):il(t,"cms-avatar-badge")},Bn=(t,e)=>!e||!e.length?null:_.span({class:ie(["cms-avatar-anchor",t])},...e);he.Avatar=(...t)=>{var p,O,W;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Xe(e.size,()=>{var x;const u=l(e.size);return typeof u=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(u))?`cms-size-${u}`:""}),r=Xe([e.color,e.state],()=>{const u=l(e.color)||l(e.state)||"",x=gt(u);return x?`cms-state-${x}`:""}),v=ie(["cms-clear-set","cms-avatar","cms-singularity",o,r,ge(e.square,"cms-avatar-square"),ge(e.elevated,"elevated"),e.class]),c=JSswift.omit(e,["src","srcset","srcSet","sizes","alt","label","name","initials","text","size","fontSize","textSize","radius","rounded","square","elevated","icon","iconSize","media","fit","badge","notification","status","statusColor","presence","topLeft","topRight","bottomLeft","bottomRight","slots"]);c.class=v;const a={...e.style||{}},b=Le(e.size,u=>{var x;return typeof u=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(u))?"":Be(u)},"");b!=null&&(a.width=b,a.height=b);const E=(p=e.fontSize)!=null?p:e.textSize,k=E!=null?Le(E,Be):Le(e.size,u=>{var x;return typeof u=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(u))?"":`clamp(11px, calc(${Be(u)} * 0.34), 28px)`},"");k!=null&&(a.fontSize=k);const S=Le(e.radius,u=>{const x=lo(u);return x==="xxxl"?"999px":x?`var(--cms-r-${x})`:typeof u=="number"?`${u}px`:String(u)});S!=null&&(a["--set-border-radius"]=S),c.style=a;const I={props:e},V=Xe([e.alt,e.label,e.name,e.text],()=>{const u=l(e.alt)||l(e.label)||l(e.name)||l(e.text)||"avatar";return String(u)}),$=e.icon!=null?typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||e.size||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"}):null,ae=Xe([e.initials,e.text,e.label,e.name],()=>{var h,z;const u=(h=l(e.initials))!=null?h:l(e.text);if(u!=null)return u;const x=(z=l(e.label))!=null?z:l(e.name);return typeof x=="string"?Mo(x):x}),F=il(l((O=e.badge)!=null?O:e.notification)),K=Fo(l((W=e.status)!=null?W:e.presence),l(e.statusColor));let oe=P(s,"media",I,e.media);if(!oe.length&&e.src){const u={class:"cms-avatar-img",src:e.src,alt:V,sizes:e.sizes,style:{}};e.srcset!=null&&(u.srcset=e.srcset),e.srcSet!=null&&(u.srcset=e.srcSet);const x=Le(e.fit);x!=null&&(u.style.objectFit=x),oe=[_.img(u)]}const H=P(s,"default",I,n),Y=P(s,"fallback",I,null),Q=P(s,"label",I,ae),le=P(s,"icon",I,$),re=oe.length?oe:H.length?H:Y.length?Y:Q.length?Q:le.length?le:["?"],Z=oe.length?"cms-avatar-media":"cms-avatar-fallback",ne=_.span({class:"cms-avatar-body"},_.span({class:Z},...re));let T=P(s,"topLeft",I,e.topLeft),j=P(s,"topRight",I,e.topRight),q=P(s,"bottomLeft",I,e.bottomLeft),ce=P(s,"bottomRight",I,e.bottomRight);const J=P(s,"badge",I,F),g=P(s,"status",I,K);!j.length&&J.length&&(j=J),!ce.length&&g.length&&(ce=g);const f=_.div(c,ne,Bn("cms-avatar-anchor-top-left",T),Bn("cms-avatar-anchor-top-right",j),Bn("cms-avatar-anchor-bottom-left",q),Bn("cms-avatar-anchor-bottom-right",ce));return Ye(f,e),f},he.Chip=(...t)=>{var ae,F,K,oe;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Xe(e.size,()=>{const H=l(e.size);return typeof H=="string"&&_n[H]?H:""}),r=ie(["cms-clear-set","cms-chip","cms-singularity",o,e.class]),v=JSswift.omit(e,["label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots"]);v.class=r,v.style={...e.style||{}};const c=e.icon?typeof e.icon=="string"?he.Icon({name:e.icon,size:(ae=e==null?void 0:e.size)!=null?ae:null}):JSswift.ui.slot(e.icon,{as:"icon"}):null,a=e.iconRight?typeof e.iconRight=="string"?he.Icon({name:e.iconRight,size:(F=e==null?void 0:e.size)!=null?F:null}):JSswift.ui.slot(e.iconRight,{as:"iconRight"}):null,b=JSswift.ui.renderSlot(s,"icon",{},c),E=JSswift.ui.renderSlot(s,"iconRight",{},a),k=P(s,"label",{},e.label),S=k.length?k:P(s,"default",{},n),I=P(null,"default",{},b),V=P(null,"default",{},E),$=_.span(v,...I,...S.length?S:[""],...V);if(e.removable){const H=he.Btn({class:"cms-chip-remove",onClick:e.onRemove,size:(K=e==null?void 0:e.size)!=null?K:null},he.Icon({size:(oe=e==null?void 0:e.size)!=null?oe:null,name:"close"}));$.appendChild(H),H.onclick=()=>{e.onRemove&&e.onRemove(),$.remove()}}return Ye($,e),$},he.Stat=(...t)=>{var le,re;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=()=>gt(l(e.state)||l(e.color)||""),r=Xe([e.state,e.color],()=>{const Z=o();return Z?`cms-state-${Z}`:""}),v=Xe(e.trend,()=>{const Z=String(l(e.trend)||"").toLowerCase();return["up","positive","success","gain","increase"].includes(Z)?"is-positive":["down","negative","danger","loss","decrease"].includes(Z)?"is-negative":["flat","neutral","steady","stable"].includes(Z)?"is-neutral":""}),c={...e},a=JSswift.omit(c,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","meta","note","slots","state","subtitle","title","trend","value"]);a.class=ie(["cms-clear-set","cms-stat","cms-singularity",r,v,c.class]),a.style={...c.style||{}};const b=(Z,ne,T={})=>P(s,Z,T,ne),E=e.icon==null?null:typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||"md"}):JSswift.ui.slot(e.icon,{as:"icon"}),k=b("eyebrow",e.eyebrow),S=b("label",(le=e.label)!=null?le:e.title),I=b("value",e.value),V=b("note",(re=e.note)!=null?re:e.subtitle),$=b("meta",e.meta),ae=b("delta",e.delta,{trend:e.trend}),F=b("icon",E),K=b("aside",e.aside),oe=b("footer",e.footer),H=b("actions",e.actions),Y=b("default",n),Q=_.article(a,_.div({class:"cms-stat-head"},_.div({class:"cms-stat-lead"},F.length?_.div({class:"cms-stat-icon"},...F):null,_.div({class:"cms-stat-copy"},k.length?_.div({class:"cms-stat-eyebrow"},...k):null,S.length?_.div({class:"cms-stat-label"},...S):null)),K.length?_.div({class:"cms-stat-aside"},...K):null),_.div({class:"cms-stat-body"},I.length?_.div({class:"cms-stat-value"},...I):null,ae.length?_.div({class:"cms-stat-delta"},...ae):null,V.length?_.div({class:"cms-stat-note"},...V):null,$.length?_.div({class:"cms-stat-meta"},...$):null,Y.length?_.div({class:"cms-stat-extra"},...Y):null),oe.length||H.length?_.div({class:"cms-stat-footer"},oe.length?_.div({class:"cms-stat-footer-copy"},...oe):null,H.length?_.div({class:"cms-stat-actions"},...H):null):null);return Ye(Q,e),Q},he.Kpi=(...t)=>{var le,re;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=()=>gt(l(e.state)||l(e.color)||""),r=Xe([e.state,e.color],()=>{const Z=o();return Z?`cms-state-${Z}`:""}),v={...e},c=JSswift.omit(v,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","media","meta","note","slots","state","subtitle","title","trend","value"]);c.class=ie(["cms-clear-set","cms-kpi","cms-singularity",r,v.class]),c.style={...v.style||{}};const a=(Z,ne,T={})=>P(s,Z,T,ne),b=e.icon==null?null:typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||"lg"}):JSswift.ui.slot(e.icon,{as:"icon"}),E=a("eyebrow",e.eyebrow),k=a("title",(le=e.title)!=null?le:e.label),S=a("value",e.value),I=a("delta",e.delta,{trend:e.trend}),V=a("note",(re=e.note)!=null?re:e.subtitle),$=a("meta",e.meta),ae=a("icon",b),F=a("aside",e.aside),K=a("media",e.media),oe=a("footer",e.footer),H=a("actions",e.actions),Y=a("default",n),Q=_.section(c,_.div({class:"cms-kpi-head"},_.div({class:"cms-kpi-title-wrap"},ae.length?_.div({class:"cms-kpi-icon"},...ae):null,_.div({class:"cms-kpi-copy"},E.length?_.div({class:"cms-kpi-eyebrow"},...E):null,k.length?_.div({class:"cms-kpi-title"},...k):null)),F.length?_.div({class:"cms-kpi-aside"},...F):null),_.div({class:"cms-kpi-core"},_.div({class:"cms-kpi-value-wrap"},S.length?_.div({class:"cms-kpi-value"},...S):null,I.length?_.div({class:"cms-kpi-delta"},...I):null),V.length?_.div({class:"cms-kpi-note"},...V):null,$.length?_.div({class:"cms-kpi-meta"},...$):null,K.length?_.div({class:"cms-kpi-media"},...K):null,Y.length?_.div({class:"cms-kpi-extra"},...Y):null),oe.length||H.length?_.div({class:"cms-kpi-footer"},oe.length?_.div({class:"cms-kpi-footer-copy"},...oe):null,H.length?_.div({class:"cms-kpi-actions"},...H):null):null);return Ye(Q,e),Q};const Oo=(t,e=180)=>{const n=getComputedStyle(t).transitionDuration;if(!n)return e;const s=n.split(",")[0].trim();if(!s)return e;const o=s.includes("ms")?parseFloat(s):parseFloat(s)*1e3;return Number.isFinite(o)?o:e},pn=t=>{!(t!=null&&t.overlay)||!(t!=null&&t.panel)||(t.overlay.classList.add("enter"),t.panel.classList.add("enter"),requestAnimationFrame(()=>{!(t!=null&&t.overlay)||!(t!=null&&t.panel)||(t.overlay.classList.add("entered"),t.panel.classList.add("entered"),t.overlay.classList.remove("enter"),t.panel.classList.remove("enter"))}))},bn=(t,e)=>{if(!(t!=null&&t.overlay)||!(t!=null&&t.panel)){e==null||e();return}if(t._closing)return;t._closing=!0,t.overlay.classList.add("leave"),t.panel.classList.add("leave");const n=()=>{t._closed||(t._closed=!0,e==null||e())},s=r=>{r.target===t.panel&&(t.panel.removeEventListener("transitionend",s),n())};t.panel.addEventListener("transitionend",s);const o=Oo(t.panel,180);setTimeout(n,o+40)};he.List=(...t)=>{var F;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=!!l((F=e.number)!=null?F:e.ordered),r=l(e.marker),v=l(e.items),c=Array.isArray(v)?v:v==null?[]:[v],a=(K={})=>{const oe=e.itemProps||{},H={...oe,...K};return e.divider!=null&&H.divider==null&&(H.divider=e.divider),H.class=ie([oe.class,e.itemClass,K.class]),H.style={...oe.style||{},...e.itemStyle||{},...K.style||{}},H},b=K=>{if(K==null||K===!1)return[];if(rs(K))return[K];if(kn(K)){const oe=K.children!=null?en(K.children):K.content!=null?en(K.content):en(K.node);return[he.Item(a(K),...oe)]}return Array.isArray(K)?[he.Item(a(),...K)]:K!=null&&K.nodeType?[he.Item(a(),K)]:[he.Item(a(),K)]},E=(K,oe,H,Y=!0)=>{if(K==null||K===!1)return[];if(Y){const Q={item:K,index:oe,count:H,first:oe===0,last:oe===H-1},le=P(s,"item",Q,null);if(le.length)return le.flatMap(re=>b(re))}return b(K)},k=[];c.forEach((K,oe)=>{k.push(...E(K,oe,c.length))});const S=P(s,"default",{items:c,count:c.length},n);if(S.forEach((K,oe)=>{k.push(...E(K,c.length+oe,c.length+S.length,!1))}),!k.length){const K=P(s,"empty",{items:c,count:0},e.empty);K.length&&(K.length===1&&rs(K[0])?k.push(K[0]):k.push(he.Item({class:"cms-item-empty",flat:!0},...K)))}const I=ie(["cms-list",ge(e.dense,"dense"),ge(e.divider,"divider"),ge(r===!1||r==="none","cms-list-no-marker"),e.class]),V=JSswift.omit(e,["dense","divider","slots","number","ordered","items","itemClass","itemStyle","itemProps","empty","marker","gap"]);V.class=I,V.style={...e.style||{}};const $=Le(e.gap,Be);return $!=null&&(V.style["--cms-list-gap"]=$),r!=null&&r!==!1&&r!==!0&&r!=="none"&&(V.style.listStyleType=String(r)),_[o?"ol":"ul"](V,...k)},he.Item=(...t)=>{var J,g,f,p,O,W,u,x;const{props:e,children:n}=JSswift.uiNormalizeArgs(t);e.state!=null&&e.color==null&&(e.color=e.state),Kt(e);const s=e.slots||{},o=Xe([e.clickable,e.to],()=>!!(l(e.clickable)||l(e.to))),r=Xe([e.active,e.selected],()=>!!(l(e.active)||l(e.selected))),v=!!(e.color!=null||e.outline||e.border||e.glossy||e.glow||e.glass||e.shadow||e.gradient||e.textGradient||e.lightShadow||e.radius||e.rounded||e.flat),c=(h,z,B)=>{const U=l(h);return U==null||U===!1||U===""?null:typeof U=="string"?he.Icon({name:U,size:z||"sm"}):JSswift.ui.slot(U,{as:B})},a=P(s,"icon",{},c(e.icon,e.iconSize||e.size,"icon")),b=P(s,"title",{},(J=e.title)!=null?J:e.label),E=P(s,"subtitle",{},(f=(g=e.subtitle)!=null?g:e.caption)!=null?f:e.description),k=P(s,"meta",{},(p=e.meta)!=null?p:e.eyebrow),S=P(s,"body",{},(O=e.body)!=null?O:e.content),I=P(s,"default",{},n),V=P(s,"actions",{},(W=e.actions)!=null?W:e.footer),$=(x=(u=e.aside)!=null?u:e.trailing)!=null?x:c(e.iconRight,e.iconSize||e.size,"iconRight"),ae=P(s,"aside",{},$),F=[...S,...I],K=!(v||e.clickable||e.to||a.length||b.length||E.length||k.length||V.length||ae.length||S.length),oe=ie(["cms-item",ge(e.divider,"divider"),ge(v,"cms-clear-set"),ge(v,"cms-singularity"),ge(v,"cms-item-surface"),ge(K,"cms-item-inline"),ge(o,"cms-item-clickable"),ge(r,"is-active"),ge(e.disabled,"is-disabled"),e.class]),H=JSswift.omit(e,["divider","slots","label","title","subtitle","caption","description","meta","eyebrow","body","content","children","node","icon","iconRight","iconSize","aside","trailing","actions","footer","clickable","to","active","selected","disabled","state","color","size","outline","flat","border","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","dense"]);H.class=oe,H.style={...e.style||{}};const Y=e.onClick,Q=e.onKeydown,le=h=>{var B;if(Y==null||Y(h),h.defaultPrevented||l(e.disabled))return;const z=l(e.to);z&&((B=JSswift.router)!=null&&B.navigate)&&(h.preventDefault(),JSswift.router.navigate(z))},re=h=>{Q==null||Q(h),!(h.defaultPrevented||l(e.disabled))&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),le(h))};l(e.disabled)&&(H["aria-disabled"]="true"),(l(e.clickable)||l(e.to))&&(H.onClick=le,H.onKeydown=re,H.tabIndex==null&&(H.tabIndex=l(e.disabled)?-1:0),H.role==null&&(H.role="button"));const Z=b.length?_.div({class:"cms-item-title"},...b):null,ne=E.length?_.div({class:"cms-item-subtitle"},...E):null,T=k.length?_.div({class:"cms-item-meta"},...k):null,j=F.length?_.div({class:ie(["cms-item-body",ge(!(b.length||E.length||k.length),"is-standalone")])},...F):null,q=V.length?_.div({class:"cms-item-actions"},...V):null,ce=_.li(H,_.div({class:"cms-item-row"},a.length?_.div({class:"cms-item-icon"},...a):null,_.div({class:"cms-item-main"},T,Z,ne,j,q),ae.length?_.div({class:"cms-item-aside"},...ae):null));return Ye(ce,e),ce},he.Separator=(...t)=>{const{props:e}=JSswift.uiNormalizeArgs(t),n=ie(["cms-separator",ge(e.vertical,"vertical"),e.class]),s=JSswift.omit(e,["vertical","size","slots"]);s.class=n;const o={borderColor:"var(--cms-border)",...e.style||{}},r=l(e.size),v=l(e.vertical);if(r!=null){const c=Be(r);v?o.width=c:o.height=c}return s.style=o,_.hr(s)},he.Banner=(...t)=>{var ce;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=()=>gt(l(e.type)||l(e.state)||""),r={state:o,dismissible:()=>!!l(e.dismissible)},v=Xe([e.type,e.state],()=>o()),c=Xe(e.variant,()=>{const J=String(l(e.variant)||"").toLowerCase();return["solid","outline","ghost"].includes(J)?`cms-banner-${J}`:""}),a=Xe([e.actionsPlacement,e.stack],()=>String(l(e.actionsPlacement)||"").toLowerCase()==="bottom"||l(e.stack)?"cms-banner-actions-bottom":""),b=Xe(e.stack,()=>l(e.stack)?"cms-banner-stack":""),E={...e},k=JSswift.omit(E,["actions","actionsPlacement","accent","aside","body","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","stack","state","subtitle","title","type","variant"]);k.class=ie(["cms-clear-set","cms-banner","cms-singularity",v,c,a,b,E.class]),k.style={...E.style||{}};const S=J=>{if(J==null||J==="")return"";const g=l(J);if(g==null||g==="")return"";const f=String(g);return Zt(f)?`var(--cms-${f})`:f};(e.accent!=null||at(e.accent))&&(k.style["--cms-banner-accent"]=()=>S(e.accent),k.style["--cms-banner-border"]=()=>{const J=S(e.accent);return J?`color-mix(in srgb, ${J} 38%, var(--cms-border-color))`:""},k.style["--cms-banner-bg"]=()=>{const J=S(e.accent);return J?`color-mix(in srgb, ${J} 14%, var(--cms-panel))`:""},k.style["--cms-banner-color"]=()=>{const J=S(e.accent);return J?`color-mix(in srgb, ${J} 78%, white)`:""});const I={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},V=(()=>{if(e.icon===!1||e.icon===null)return null;if(e.icon!=null)return typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||e.size||"md"}):JSswift.ui.slot(e.icon,{as:"icon"});const J=o(),g=J?I[J]:null;return g?he.Icon({name:g,size:e.iconSize||e.size||"md"}):null})(),$=P(s,"title",r,e.title),ae=P(s,"message",r,e.message!=null?e.message:n),F=P(s,"description",r,(ce=e.description)!=null?ce:e.subtitle),K=P(s,"meta",r,e.meta),oe=P(s,"default",r,e.body!=null?[e.body,...n||[]]:e.message!=null?n:null),H=P(s,"icon",r,V),Y=P(s,"aside",r,e.aside),Q=P(s,"actions",r,e.actions),le=P(s,"dismiss",r,e.dismiss),re=String(l(e.actionsPlacement)||"").toLowerCase()==="bottom"||!!l(e.stack),Z=!!l(e.dismissible)||!!e.onDismiss;let ne=null;const T=Z?he.Btn({class:"cms-banner-close",outline:!0,size:e.size||"sm","aria-label":e.closeLabel||"Chiudi banner",onClick:J=>{var g;(g=e.onDismiss)==null||g.call(e,J),!J.defaultPrevented&&(ne==null||ne.remove())}},he.Icon({name:"close",size:e.size||"sm"})):null,j=[...Y,...re?[]:Q,...le.length?le:T?[T]:[]];ne=_.div(k,H.length?_.div({class:"cms-banner-icon"},...H):null,_.div({class:"cms-banner-body"},_.div({class:"cms-banner-copy"},$.length?_.div({class:"cms-banner-title"},...$):null,ae.length?_.div({class:"cms-banner-message"},...ae):null,F.length?_.div({class:"cms-banner-description"},...F):null,oe.length?_.div({class:"cms-banner-extra"},...oe):null,K.length?_.div({class:"cms-banner-meta"},...K):null),re&&Q.length?_.div({class:"cms-banner-actions"},...Q):null),j.length?_.div({class:"cms-banner-side"},...j):null);const q=k.role||(()=>{const J=o();return J==="danger"||J==="warning"?"alert":"status"})();return ne.setAttribute("role",q),Ye(ne,e),ne},he.Alert=(...t)=>{var H;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=()=>gt(l(e.type)||l(e.state)||l(e.color)||"warning"),r=Xe([e.type,e.state,e.color],()=>{const Y=o();return Y?`cms-state-${Y}`:""}),v={...e},c=JSswift.omit(v,["actions","aside","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","state","subtitle","title","type","variant"]);c.class=ie(["cms-clear-set","cms-alert","cms-singularity",r,ge(e.dismissible,"is-dismissible"),v.class]),c.style={...v.style||{}};const a={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},b=(()=>{if(e.icon===!1||e.icon===null)return null;if(e.icon!=null)return typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"});const Y=a[o()]||a.warning;return he.Icon({name:Y,size:e.iconSize||"sm"})})(),E=P(s,"title",{},e.title),k=P(s,"message",{},e.message!=null?e.message:n),S=P(s,"description",{},(H=e.description)!=null?H:e.subtitle),I=P(s,"meta",{},e.meta),V=P(s,"actions",{},e.actions),$=P(s,"aside",{},e.aside),ae=P(s,"icon",{},b),F=P(s,"dismiss",{},e.dismiss);let K=null;const oe=e.dismissible||e.onDismiss?he.Btn({class:"cms-alert-close",outline:!0,size:"sm","aria-label":e.closeLabel||"Chiudi alert",onClick:Y=>{var Q;(Q=e.onDismiss)==null||Q.call(e,Y),!Y.defaultPrevented&&(K==null||K.remove())}},he.Icon({name:"close",size:"sm"})):null;return K=_.div(c,ae.length?_.div({class:"cms-alert-icon"},...ae):null,_.div({class:"cms-alert-body"},E.length?_.div({class:"cms-alert-title"},...E):null,k.length?_.div({class:"cms-alert-message"},...k):null,S.length?_.div({class:"cms-alert-description"},...S):null,I.length?_.div({class:"cms-alert-meta"},...I):null,V.length?_.div({class:"cms-alert-actions"},...V):null),$.length||F.length||oe?_.div({class:"cms-alert-side"},...$,...F.length?F:oe?[oe]:[]):null),K.setAttribute("role",o()==="danger"||o()==="warning"?"alert":"status"),Ye(K,e),K},he.EmptyState=(...t)=>{var oe;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=()=>gt(l(e.state)||l(e.color)||""),r=Xe([e.state,e.color],()=>{const H=o();return H?`cms-state-${H}`:""}),v={...e},c=JSswift.omit(v,["actions","description","eyebrow","icon","iconSize","illustration","media","message","meta","slots","state","title"]);c.class=ie(["cms-clear-set","cms-empty-state","cms-singularity",r,ge(e.compact,"compact"),ge(e.inline,"inline"),v.class]),c.style={...v.style||{}};const a=e.icon===!1?null:e.icon!=null?typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||"xl"}):JSswift.ui.slot(e.icon,{as:"icon"}):he.Icon({name:"inbox",size:e.iconSize||"xl"}),b=P(s,"illustration",{},(oe=e.illustration)!=null?oe:e.media),E=P(s,"icon",{},a),k=P(s,"eyebrow",{},e.eyebrow),S=P(s,"title",{},e.title),I=P(s,"message",{},e.message!=null?e.message:n),V=P(s,"description",{},e.description),$=P(s,"meta",{},e.meta),ae=P(s,"actions",{},e.actions),F=P(s,"default",{},e.message!=null?n:null),K=_.section(c,b.length?_.div({class:"cms-empty-state-illustration"},...b):null,E.length?_.div({class:"cms-empty-state-icon"},...E):null,k.length?_.div({class:"cms-empty-state-eyebrow"},...k):null,S.length?_.div({class:"cms-empty-state-title"},...S):null,I.length?_.div({class:"cms-empty-state-message"},...I):null,V.length?_.div({class:"cms-empty-state-description"},...V):null,$.length?_.div({class:"cms-empty-state-meta"},...$):null,F.length?_.div({class:"cms-empty-state-extra"},...F):null,ae.length?_.div({class:"cms-empty-state-actions"},...ae):null);return Ye(K,e),K};let Yt="jsswift:drawer-open";const al=new Set,hs=new Map,tn=(t=Yt)=>{const e=JSswift==null?void 0:JSswift.store;if(e!=null&&e.get){const n=e.get(t,void 0);if(typeof n=="boolean")return n}try{return localStorage.getItem(t)==="1"}catch(n){return!1}},Do=(t,e=Yt)=>{const n=JSswift==null?void 0:JSswift.store;if(n!=null&&n.set){n.set(e,!!t);return}try{localStorage.setItem(e,t?"1":"0")}catch(s){}};let Et=tn();const jt=(t,e=Yt)=>{Et=!!t;const n=hs.get(e);if(n&&n.size)n.forEach(s=>s==null?void 0:s.classList.toggle("open",Et));else{const s=document.querySelector(".cms-drawer");s&&s.classList.toggle("open",Et)}return al.forEach(s=>{if(!s)return;if(typeof s.update=="function"){s.update(Et);return}const{el:o,openIcon:r,closeIcon:v}=s;o&&(o.textContent=Et?r:v)}),Do(Et,e),Et};he.Tooltip=(...t)=>{var q,ce;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{};let o=null,r=null,v=null,c=null;const a=J=>Object.prototype.hasOwnProperty.call(e,J),b=a("target")||a("anchorEl")||a("triggerEl"),E=e.target||e.anchorEl||e.triggerEl||(n&&n.length?n[0]:null),k=(J,g)=>{const f=l(J);if(f==null||f==="")return g;const p=Number(f);return Number.isFinite(p)?p:g},S=()=>{clearTimeout(r),clearTimeout(v),r=null,v=null},I=()=>k(e.delay,350),V=()=>k(e.hideDelay,l(e.interactive)?120:0),$=()=>{if(S(),!o)return;const J=o;o=null,bn(J,()=>JSswift.overlay.close(J.id))},F=(J=>{if(J==null||J===!0)return new Set(["hover","focus"]);if(J===!1)return new Set(["manual"]);const g=Array.isArray(J)?J:String(J).split(/[\s,|/]+/),f=new Set;return g.forEach(p=>{const O=String(p||"").trim().toLowerCase();O&&(O==="mouseenter"||O==="mouseover"?f.add("hover"):O==="blur"||O==="focusin"?f.add("focus"):O==="tap"?f.add("click"):f.add(O))}),f.size?f:new Set(["manual"])})((ce=(q=e.trigger)!=null?q:e.triggers)!=null?ce:a("open")?"manual":null),K=F.has("hover"),oe=F.has("focus"),H=F.has("click"),Y=F.has("manual")||!K&&!oe&&!H,Q=()=>{var B,U,de,L,m,N;const J={anchorEl:c||E||null,close:()=>$(),hide:()=>$(),isOpen:()=>!!o},g=e.icon?typeof e.icon=="string"?he.Icon({name:e.icon,size:e.iconSize||e.size||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"}):null,f=P(s,"title",J,(B=e.title)!=null?B:e.heading),p=P(s,"icon",J,g),O=P(s,"footer",J,(U=e.footer)!=null?U:e.actions);let W=(N=(m=(L=(de=e.content)!=null?de:e.text)!=null?L:e.body)!=null?m:e.description)!=null?N:e.label;W==null&&(b?W=n:E&&n&&n.length>1?W=n.slice(1):E||(W=n));let u=P(s,"content",J,W);u.length||(u=P(s,"default",J,W));const x=u.length?_.div({class:"cms-tooltip-body"},...u):null,h=p.length||f.length?_.div({class:"cms-tooltip-head"},p.length?_.div({class:"cms-tooltip-icon"},...p):null,_.div({class:"cms-tooltip-head-main"},f.length?_.div({class:"cms-tooltip-title"},...f):null,x)):x,z=O.length?_.div({class:"cms-tooltip-footer"},...O):null;return _.div({class:"cms-tooltip-content"},...[h,z].filter(Boolean))},le=J=>{var u,x,h,z,B,U;const g=J||c;if(!g||l(e.disabled))return null;if(o&&o._anchorEl===g)return o;o&&$();const f=(u=e.closeOnOutside)!=null?u:H||l(e.interactive),p=(x=e.closeOnEsc)!=null?x:H||l(e.interactive);let O=null;if(o=JSswift.overlay.open(()=>Q(),{type:"tooltip",anchorEl:g,placement:e.placement||"top",offsetX:(h=e.offsetX)!=null?h:0,offsetY:(B=(z=e.offsetY)!=null?z:e.offset)!=null?B:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:f,closeOnBackdrop:!1,closeOnEsc:p,autoFocus:!1,className:Dt(["cms-tooltip",ge(e.interactive,"interactive"),e.class,e.panelClass]),onClose:()=>{var de,L;(de=O==null?void 0:O._tooltipCleanup)==null||de.call(O),o===O&&(o=null),(L=e.onClose)==null||L.call(e)}}),!(o!=null&&o.panel))return o;const W=o;if(O=W,W._anchorEl=g,W.panel.dataset.placement=String(l(e.placement||"top")),e.maxWidth!=null&&(W.panel.style.maxWidth=Be(l(e.maxWidth))),e.minWidth!=null&&(W.panel.style.minWidth=Be(l(e.minWidth))),e.width!=null&&(W.panel.style.width=Be(l(e.width))),e.style&&Object.assign(W.panel.style,e.style),Ye(W.panel,e),l(e.interactive)){const de=()=>{clearTimeout(v),v=null},L=()=>Z(),m=N=>{const A=N.target;A&&A.closest&&A.closest("[data-tooltip-close]")&&$()};W.panel.addEventListener("mouseenter",de),W.panel.addEventListener("mouseleave",L),W.panel.addEventListener("focusin",de),W.panel.addEventListener("focusout",L),W.panel.addEventListener("click",m),W._tooltipCleanup=()=>{var N,A,ee,me,ye;(N=W.panel)==null||N.removeEventListener("mouseenter",de),(A=W.panel)==null||A.removeEventListener("mouseleave",L),(ee=W.panel)==null||ee.removeEventListener("focusin",de),(me=W.panel)==null||me.removeEventListener("focusout",L),(ye=W.panel)==null||ye.removeEventListener("click",m)}}return pn(W),(U=e.onOpen)==null||U.call(e,W),W},re=J=>{clearTimeout(v),v=null,clearTimeout(r),r=setTimeout(()=>le(J),I())},Z=(J=!1)=>{if(clearTimeout(r),r=null,!!o){if(clearTimeout(v),J){$();return}v=setTimeout(()=>$(),V())}},ne=J=>{o?Z(!0):le(J)},T=()=>!!o,j=J=>{if(!J)return()=>{};c=J;const g=[],f=()=>{S(),g.forEach(p=>p())};if(a("open"))return at(e.open)?JSswift.reactive.effect(()=>{c&&(l(e.open)?le(c):Z(!0))},"UI.Tooltip:open"):e.open===!0?le(J):e.open===!1&&Z(!0),f;if(Y||l(e.disabled))return f;if(K){const p=()=>re(J),O=()=>Z();J.addEventListener("mouseenter",p),J.addEventListener("mouseleave",O),g.push(()=>{J.removeEventListener("mouseenter",p),J.removeEventListener("mouseleave",O)})}if(oe){const p=()=>re(J),O=()=>Z();J.addEventListener("focus",p),J.addEventListener("blur",O),g.push(()=>{J.removeEventListener("focus",p),J.removeEventListener("blur",O)})}if(H){const p=O=>{var W;(W=e.onTriggerClick)==null||W.call(e,O),!O.defaultPrevented&&ne(J)};J.addEventListener("click",p),g.push(()=>J.removeEventListener("click",p))}return f};if(E){const J=ie(["cms-tooltip-wrap",e.wrapClass,e.targetClass]),g=JSswift.omit(e,["actions","anchorEl","body","closeOnEsc","closeOnOutside","content","delay","description","disabled","footer","heading","hideDelay","icon","iconSize","interactive","label","maxWidth","minWidth","offset","offsetX","offsetY","onClose","onOpen","onTriggerClick","open","panelClass","placement","slots","style","target","targetClass","targetStyle","text","title","trigger","triggerEl","triggers","width","wrapClass","wrapStyle"]);g.class=J,g.style={display:"inline-flex",alignItems:"center",...e.wrapStyle||e.targetStyle||{}};const f=JSswift.ui.renderSlot(s,"target",{open:()=>le(c),show:()=>re(c),hide:()=>Z(!0),toggle:()=>ne(c),isOpen:T},E),p=_.span(g,...P(null,"default",{},f));return j(p),p._tooltip={bind:j,open:le,show:re,hide:Z,close:$,toggle:ne,isOpen:T},p}return{bind:j,open:le,show:re,hide:Z,close:$,toggle:ne,isOpen:T}};const ps=(t,e,n={})=>{var J;const{props:s,children:o}=JSswift.uiNormalizeArgs(e),r=s.slots||{},v=t==="radio",c=n.appearance==="toggle",a=!v,b=s.id||`cms-${t}-`+Math.random().toString(36).slice(2),E=Nt(s.model,n.modelName||(v?"UI.Radio:model":"UI.Checkbox:model")),k=JSswift.omit(s,["model","label","checked","class","style","dense","onChange","onInput","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","inputClass","iconSize","color","size","outline","behavior","mode","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);k.type=t,k.id=b,v&&s.name!=null&&(k.name=s.name),k.class=ie([`cms-${t}`,"cms-choice-input",s.inputClass]);const S=_.input(k),I=P(r,"label",{},s.label),V=I.length?I:P(r,"default",{},o),$=fs(s,{className:"cms-shortcode cms-choice-shortcode"}),ae=$?[...V,$]:V,F=JSswift.omit(s,["model","label","checked","onChange","onInput","value","name","id","type","dense","inputClass","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","iconSize","color","size","behavior","mode","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);F.class=ie(["cms-clear-set","cms-singularity-check","cms-choice-wrap",`cms-${t}-wrap`,ge(c,"cms-toggle-wrap"),ge(c&&v,"cms-toggle-radio-wrap"),ge(c&&!v,"cms-toggle-checkbox-wrap"),ge(s.dense,"dense"),s.class]),F.style={...s.style||{}};const K=l(s.size);K!=null&&!(typeof K=="string"&&((J=JSswift.uiSizes)!=null&&J.includes(K)))&&(F.style["--cms-choice-size"]=Be(K));const oe=_.span({class:ie(["cms-choice-mark",v?"cms-choice-radio-mark":"cms-choice-checkbox-mark",ge(c,"cms-toggle-mark")])}),H=c?_.span({class:"cms-toggle-thumb"}):oe;c&&oe.appendChild(H);const Y=ae.length?_.span({class:"cms-choice-label"},...ae):null,Q=_.label(F,S,oe,Y);Ye(Q,s);const le=s.iconSize?s.iconSize:s.size,re=c?null:v?"radio_button_checked":"check",Z=c?null:v?"radio_button_unchecked":null,ne=c||v?null:"indeterminate_check_box",T=g=>{if(v)return S.checked=g==s.value,S.checked;const f=g==null?null:!!g;return S.checked=f===!0,S.indeterminate=a&&f==null,f},j=()=>!v&&a&&S.indeterminate?null:!!S.checked,q=g=>g===!0?s.checkedIcon!=null?s.checkedIcon:s.icon!=null?s.icon:re:g===!1?s.uncheckedIcon!=null?s.uncheckedIcon:Z:s.indeterminateIcon!=null?s.indeterminateIcon:s.standbyIcon!=null?s.standbyIcon:s.iconStandby!=null?s.iconStandby:ne,ce=()=>{const g=j(),f=g===!0;for(;H.firstChild;)H.removeChild(H.firstChild);Q.classList.toggle("is-checked",f),Q.classList.toggle("is-indeterminate",g==null),Q.classList.toggle("is-disabled",!!S.disabled),f&&(s.checkedIcon||s.icon)?Q.classList.toggle("toggle-default",!1):f&&!s.checkedIcon||g==null&&!s.standbyIcon?Q.classList.toggle("toggle-default",!0):g==null&&s.standbyIcon?Q.classList.toggle("toggle-default",!1):S.disabled===!1&&!s.uncheckedIcon?Q.classList.toggle("toggle-default",!0):Q.classList.toggle("toggle-default",!1),c&&(g==null?H.style.transform="translateX(calc((var(--cms-toggle-width) - var(--cms-toggle-thumb-size) - 1px) / 2))":H.style.removeProperty("transform"));const p={checked:f,state:g,indeterminate:g==null,value:s.value,id:b,type:t};let O=null;if(g===!0?(O=JSswift.ui.renderSlot(r,"checkedIcon",p,null),O==null&&(O=JSswift.ui.renderSlot(r,"iconOn",p,null))):g===!1?(O=JSswift.ui.renderSlot(r,"uncheckedIcon",p,null),O==null&&(O=JSswift.ui.renderSlot(r,"iconOff",p,null))):(O=JSswift.ui.renderSlot(r,"indeterminateIcon",p,null),O==null&&(O=JSswift.ui.renderSlot(r,"standbyIcon",p,null)),O==null&&(O=JSswift.ui.renderSlot(r,"iconStandby",p,null))),O==null&&(O=JSswift.ui.renderSlot(r,"icon",p,null)),O==null){const W=q(g);typeof W=="string"?O=he.Icon({name:W,size:le,...c?{textColor:s.color,outline:!0}:{}}):W!=null&&(O=JSswift.ui.slot(W,{checked:f,state:g,indeterminate:g==null,as:g===!0?"checkedIcon":g===!1?"uncheckedIcon":"indeterminateIcon"}))}P(null,"default",{},O).forEach(W=>H.appendChild(W))};return E?(T(E.get()),E.watch(g=>{T(g),ce()},v?"UI.Radio:watch":"UI.Checkbox:watch"),S.addEventListener("change",g=>{var f,p;if(v)S.checked&&(E.set(s.value),(f=s.onChange)==null||f.call(s,s.value,g));else{const O=j();E.set(O),(p=s.onChange)==null||p.call(s,O,g)}ce()})):(T(v?s.checked===!0?s.value:void 0:s.checked),S.addEventListener("change",g=>{var f,p;v?(f=s.onChange)==null||f.call(s,s.value,g):(p=s.onChange)==null||p.call(s,j(),g),ce()})),s.onInput&&S.addEventListener("input",g=>{var f,p;v?(f=s.onInput)==null||f.call(s,s.value,g):(p=s.onInput)==null||p.call(s,j(),g)}),ce(),cn(Q,s,{isEnabled:()=>!S.disabled,action:()=>{if(S.disabled)return!1;gn(S),S.click()}}),Q};he.Checkbox=(...t)=>ps("checkbox",t),he.Radio=(...t)=>ps("radio",t),he.Toggle=(...t)=>{var s,o,r;const{props:e}=JSswift.uiNormalizeArgs(t),n=String((r=(o=(s=e.behavior)!=null?s:e.mode)!=null?o:e.type)!=null?r:"checkbox").toLowerCase()==="radio"?"radio":"checkbox";return ps(n,t,{appearance:"toggle",modelName:"UI.Toggle:model"})},he.Slider=(...t)=>{var ee,me,ye,be,M;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=e.model||(Lt(e.value)||Jt(e.value)?e.value:null),r=Nt(o,"UI.Slider:model"),v=JSswift.omit(e,["model","value","class","style","onChange","onInput","slots","label","icon","iconRight","thumbIcon","iconThumb","pointIcon","markers","markerLabels","labelMarks","leftLabel","rightLabel","startLabel","endLabel","minLabel","maxLabel","withQItem","qitem","item","itemClass","itemStyle","showValue","thumbLabel","labelValue","selectionColor","trackColor","thumbColor","inputClass","readonly","size"]);v.type="range",v.class=ie(["cms-slider-input",e.inputClass]);const c=_.input(v),a={...e.style||{}},b=l(e.size);if(b!=null){const D=typeof b=="string"&&((ee=JSswift.uiSizes)!=null&&ee.includes(b))?`var(--cms-size-${b})`:Be(b);a["--cms-slider-size"]=D,a["--cms-slider-track-size"]=`max(4px, calc(${D} / 4))`,a["--cms-slider-box-height"]=`calc(${D} * 1.5)`,a["--cms-slider-marker-size"]=`max(6px, calc(${D} / 3))`}const E=_.label({class:ie(["cms-clear-set","cms-singularity-check","cms-slider-wrap",ge(e.dense,"dense"),e.class]),style:a});Ye(E,e);const k=_.div({class:"cms-slider-header"}),S=_.span({class:"cms-slider-label"}),I=_.span({class:"cms-slider-value"});k.append(S,I);const V=_.div({class:"cms-slider-body"}),$=_.span({class:"cms-slider-icon cms-slider-icon-left"}),ae=_.span({class:"cms-slider-edge-label cms-slider-edge-label-left"}),F=_.div({class:"cms-slider-main"}),K=_.div({class:"cms-slider-box",style:{minHeight:"var(--cms-slider-box-height, 36px)"}}),oe=_.span({class:"cms-slider-rail",style:{height:"var(--cms-slider-track-size, 6px)"}}),H=_.span({class:"cms-slider-selection",style:{height:"var(--cms-slider-track-size, 6px)"}}),Y=_.span({class:"cms-slider-thumb",style:{width:"var(--cms-slider-size, 24px)",height:"var(--cms-slider-size, 24px)"}}),Q=_.span({class:"cms-slider-thumb-icon"}),le=_.span({class:"cms-slider-thumb-label"});Y.append(le,Q);const re=_.div({class:"cms-slider-markers"}),Z=_.span({class:"cms-slider-edge-label cms-slider-edge-label-right"}),ne=_.span({class:"cms-slider-icon cms-slider-icon-right"});K.append(oe,H,Y,c),F.append(K,re),V.append($,ae,F,Z,ne),E.append(k,V);const T=D=>{for(;D.firstChild;)D.removeChild(D.firstChild)},j=(D,G,Ce="")=>{T(D),(G||[]).forEach(ke=>D.appendChild(ke)),D.style.display=D.childNodes.length?Ce:"none"},q=D=>Lt(D)||Jt(D)?l(D):D,ce=(D,G={})=>Ln(q(D),G),J=(D,G,Ce={})=>{var fe,ve;const ke=q(D);return ke==null?[]:typeof ke=="string"?[he.Icon({name:ke,size:(ve=(fe=e.iconSize)!=null?fe:e.size)!=null?ve:16})]:ce(ke,{...Ce,as:G})},g=(D,G)=>{const Ce=Number(D);return Number.isFinite(Ce)?Ce:G},f=()=>g(l(e.min),0),p=()=>{const D=f(),G=g(l(e.max),100);return G<D?D:G},O=()=>{const D=l(e.step);if(D==="any")return"any";const G=g(D,1);return G>0?G:1},W=D=>{if(D==="any")return 0;const G=String(D);if(G.includes("e-"))return Number(G.split("e-")[1]||0);const Ce=G.indexOf(".");return Ce===-1?0:G.length-Ce-1},u=D=>{const G=f(),Ce=p(),ke=O();let fe=g(D,G);if(ke!=="any"){fe=G+Math.round((fe-G)/ke)*ke;const ve=W(ke);ve>0&&(fe=Number(fe.toFixed(ve)))}return Math.min(Ce,Math.max(G,fe))},x=D=>{const G=f(),ke=p()-G;if(!ke)return 0;const fe=(u(D)-G)/ke,ve=l(e.reverse)?1-fe:fe;return Math.max(0,Math.min(1,ve))},[h,z]=JSswift.reactive.signal(u(r?r.get():(ye=(me=l(e.value))!=null?me:l(e.min))!=null?ye:0)),B=(D,G={})=>{const Ce=u(D);return h()!==Ce&&z(Ce),String(c.value)!==String(Ce)&&(c.value=String(Ce)),r&&G.fromModel!==!0&&r.set(Ce),Ce},U=()=>{var ve;const D=l(e.markers),G=!!l((ve=e.markerLabels)!=null?ve:e.labelMarks);if(!D)return[];const Ce=f(),ke=p(),fe=(pe,ze)=>{var Pe,Ae,y,X,xe,R,d,i;if(pe==null)return null;if(typeof pe=="object"&&!Array.isArray(pe)){const C=u((y=(Ae=(Pe=pe.value)!=null?Pe:pe.position)!=null?Ae:pe.at)!=null?y:Ce);return{key:(X=pe.key)!=null?X:`marker-${ze}-${C}`,value:C,label:(xe=pe.label)!=null?xe:G?String(C):null,icon:(R=pe.icon)!=null?R:null,className:(i=(d=pe.class)!=null?d:pe.className)!=null?i:""}}const Me=u(pe);return{key:`marker-${ze}-${Me}`,value:Me,label:G?String(pe):null,icon:null,className:""}};if(Array.isArray(D))return D.map((pe,ze)=>fe(pe,ze)).filter(Boolean);if(typeof D=="number"&&D>1){const pe=Math.floor(D),ze=pe>1?(ke-Ce)/(pe-1):0;return Array.from({length:pe},(Me,Pe)=>fe(Ce+ze*Pe,Pe)).filter(Boolean)}if(D===!0){const pe=O();if(pe==="any")return[fe(Ce,0),fe(ke,1)].filter(Boolean);const ze=Math.floor((ke-Ce)/pe)+1;return ze>24?[fe(Ce,0),fe((Ce+ke)/2,1),fe(ke,2)].filter(Boolean):Array.from({length:ze},(Me,Pe)=>fe(Ce+pe*Pe,Pe)).filter(Boolean)}return typeof D=="object"?Object.keys(D).map((pe,ze)=>fe({value:Number(pe),label:D[pe]},ze)).filter(Boolean):[]},de=()=>{T(re);const D=U();re.style.display=D.length?"block":"none",re.style.minHeight=D.some(G=>G.label!=null&&G.label!=="")?"30px":"10px",D.forEach(G=>{const Ce=x(G.value),ke=l(e.reverse)?h()<=G.value:h()>=G.value,fe=_.button({type:"button",class:ie(["cms-slider-marker",G.className,ge(()=>ke,"active")]),style:{left:`${Ce*100}%`,color:ke?l(e.color)||"var(--cms-primary)":"var(--cms-muted)",cursor:l(e.disabled)||l(e.readonly)?"default":"pointer"},disabled:!!l(e.disabled)||!!l(e.readonly),onClick:()=>{var y,X;if(l(e.disabled)||l(e.readonly))return;const Ae=B(G.value);(y=e.onInput)==null||y.call(e,Ae),(X=e.onChange)==null||X.call(e,Ae)}}),ve={marker:G,active:ke,value:G.value,current:h(),input:c};let pe=JSswift.ui.renderSlot(s,"marker",ve,null);pe==null&&G.icon!=null&&(pe=typeof G.icon=="string"?he.Icon({name:G.icon,size:12}):JSswift.ui.slot(G.icon,{...ve,as:"marker"}));const ze=_.span({class:"cms-slider-marker-tick",style:{width:"var(--cms-slider-marker-size, 8px)",height:"var(--cms-slider-marker-size, 8px)",background:ke?l(e.color)||"var(--cms-primary)":"var(--cms-border-color)"}}),Me=pe==null?[ze]:P(null,"default",ve,pe),Pe=G.label==null?P(s,"markerLabel",ve,null):P(s,"markerLabel",ve,G.label);Me.forEach(Ae=>fe.appendChild(Ae)),Pe.length&&fe.appendChild(_.span({class:"cms-slider-marker-label"},...Pe)),re.appendChild(fe)})},L=()=>{var ve;const D={value:h(),input:c,props:e};let G=P(s,"label",D,q(e.label));G.length||(G=P(s,"default",D,n)),j(S,G,"inline-flex");const Ce=l(e.showValue),ke=Ce===!1?null:(ve=q(e.labelValue))!=null?ve:h(),fe=Ce||q(e.labelValue)!=null?P(s,"value",D,ke):[];j(I,fe,"inline-flex"),k.style.display=S.childNodes.length||I.childNodes.length?"flex":"none"},m=()=>{var ze,Me,Pe,Ae;const D={value:h(),input:c,props:e},G=P(s,"icon",D,null),Ce=G.length?G:J(e.icon,"icon",D);j($,Ce,"inline-flex");const ke=P(s,"iconRight",D,null),fe=ke.length?ke:J(e.iconRight,"iconRight",D);j(ne,fe,"inline-flex");const ve=q((Me=(ze=e.startLabel)!=null?ze:e.leftLabel)!=null?Me:e.minLabel),pe=q((Ae=(Pe=e.endLabel)!=null?Pe:e.rightLabel)!=null?Ae:e.maxLabel);j(ae,P(s,"startLabel",D,ve),"inline-flex"),j(Z,P(s,"endLabel",D,pe),"inline-flex")},N=()=>{var ve,pe,ze,Me;const D={value:h(),input:c,props:e},G=P(s,"thumbIcon",D,null),Ce=(pe=(ve=e.thumbIcon)!=null?ve:e.iconThumb)!=null?pe:e.pointIcon;j(Q,G.length?G:J(Ce,"thumbIcon",D),"inline-flex");const ke=(Me=(ze=q(e.thumbLabel))!=null?ze:q(e.labelValue))!=null?Me:l(e.showValue)?String(h()):null,fe=P(s,"thumbLabel",D,ke);j(le,fe,"inline-flex")},A=()=>{const D=u(h()),G=f(),Ce=p(),ke=O(),ve=`${x(D)*100}%`,pe=l(e.color)||l(e.selectionColor)||"var(--cms-primary)",ze=l(e.trackColor)||"var(--cms-border-color)",Me=l(e.thumbColor)||pe,Pe=!!l(e.readonly),Ae=!!l(e.disabled);c.min=String(G),c.max=String(Ce),c.step=ke==="any"?"any":String(ke),c.disabled=Ae,c.value=String(D),oe.style.background=ze,H.style.background=pe,H.style.width=ve,Y.style.left=ve,Y.style.borderColor=Me,Y.style.color=Me,le.style.background=pe,E.classList.toggle("is-disabled",Ae),E.classList.toggle("is-readonly",Pe),E.classList.toggle("has-markers",re.childNodes.length>0)};if(r?(B(r.get(),{fromModel:!0}),r.watch(D=>{B(D,{fromModel:!0})},"UI.Slider:watch")):at(e.value)?JSswift.reactive.effect(()=>{B(l(e.value),{fromModel:!0})},"UI.Slider:value"):B((M=(be=e.value)!=null?be:e.min)!=null?M:0,{fromModel:!0}),c.addEventListener("input",D=>{var Ce;if(l(e.disabled)||l(e.readonly)){c.value=String(h());return}const G=B(c.value);(Ce=e.onInput)==null||Ce.call(e,G,D)}),c.addEventListener("change",D=>{var Ce;if(l(e.disabled)||l(e.readonly)){c.value=String(h());return}const G=B(c.value);(Ce=e.onChange)==null||Ce.call(e,G,D)}),JSswift.reactive.effect(()=>{L(),m(),N(),de(),A()},"UI.Slider:render"),E._input=c,E._getValue=h,E._setValue=D=>B(D),e.withQItem||e.qitem||e.item===!0){const D=he.Item({class:ie(["cms-slider-item",e.itemClass]),style:e.itemStyle},E);return D._input=c,D._slider=E,D._getValue=h,D._setValue=E._setValue,D}return E},he.Rating=(...t)=>{var h;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=e.model||(Lt(e.value)||Jt(e.value)?e.value:null),r=Nt(o,"UI.Rating:model"),v=e.id||"cms-rating-"+Math.random().toString(36).slice(2),c=JSswift.omit(e,["model","value","max","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);c.type="hidden",c.id=v,e.name!=null&&(c.name=e.name),c.class=ie(["cms-rating-input","cms-choice-input",e.inputClass]);const a=_.input(c),b=JSswift.omit(e,["model","value","max","id","name","type","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);b.class=ie(["cms-clear-set","cms-singularity-check","cms-choice-wrap","cms-rating","cms-rating-wrap",ge(e.dense,"dense"),e.class]),b.style={...e.style||{}};const E=l(e.size);E!=null&&!(typeof E=="string"&&((h=JSswift.uiSizes)!=null&&h.includes(E)))&&(b.style["--cms-rating-size"]=Be(E));const k=l(e.gap);k!=null&&(b.style["--cms-rating-gap"]=Be(k));const S=_.span({class:"cms-rating-control",onMouseleave:z=>{var B;q!=null&&(q=null,u(),(B=e.onHover)==null||B.call(e,ne(),z))},onKeydown:z=>{if(!Z())return;const B=Y()?.5:1,U=ne();let de=U;switch(z.key){case"ArrowRight":case"ArrowUp":de=U+B;break;case"ArrowLeft":case"ArrowDown":de=U-B;break;case"Home":de=l(e.clearable)?0:B;break;case"End":de=H();break;case"Delete":case"Backspace":case"0":if(!l(e.clearable))return;de=0;break;case" ":case"Enter":de=U||(l(e.clearable)?B:Math.max(B,1));break;default:return}z.preventDefault(),x(de,z,{emit:!0})}}),I=_.span({class:"cms-choice-label cms-rating-label"}),V=_.label(b,a,S,I);Ye(V,e);const $=z=>{for(;z.firstChild;)z.removeChild(z.firstChild)},ae=(z,B,U="")=>{$(z),(B||[]).forEach(de=>z.appendChild(de)),z.style.display=z.childNodes.length?U:"none"},F=z=>Lt(z)||Jt(z)?l(z):z,K=(z,B={})=>Ln(F(z),B),oe=(z,B,U={})=>{var L,m;const de=F(z);return de==null?[]:typeof de=="string"?[he.Icon({name:de,color:e.color,size:(m=(L=e.iconSize)!=null?L:e.size)!=null?m:16})]:K(de,{...U,as:B})},H=()=>{var B;const z=Number((B=l(e.max))!=null?B:5);return Number.isFinite(z)&&z>0?Math.max(1,Math.round(z)):5},Y=()=>{var z;return!!l((z=e.half)!=null?z:e.allowHalf)},Q=(z,B=H())=>{let U=Number(l(z));Number.isFinite(U)||(U=0),U=Math.min(B,Math.max(0,U));const de=Y()?.5:1;return Math.round(U/de)*de},le=()=>!!l(e.disabled),re=()=>!!l(e.readonly),Z=()=>!le()&&!re(),ne=()=>Q(r?r.get():j),T=z=>{const B=z>0?String(z):"";a.value=B,a.setAttribute("value",B),a.disabled=le()};let j=Q(r?r.get():l(e.value)),q=null,ce=0,J=[];const g=(z,B)=>{if(!Y())return Q(z);const U=B.currentTarget.getBoundingClientRect(),de=B.clientX-U.left<=U.width/2;return Q(de?z-.5:z)},f=(z,B)=>z>=B?"full":Y()&&z>=B-.5?"half":"empty",p=(z,B)=>{var N,A,ee,me,ye,be,M,D,G,Ce,ke,fe,ve,pe,ze;const U=l((ee=(A=(N=e.colorSelected)!=null?N:e.activeColor)!=null?A:e.color)!=null?ee:e.textColor)||"var(--cms-warning, #f0b429)",de=l((D=(M=(be=(ye=(me=e.colorHalf)!=null?me:e.halfColor)!=null?ye:e.colorSelected)!=null?be:e.activeColor)!=null?M:e.color)!=null?D:e.textColor)||U,L=l((ve=(fe=(ke=(Ce=(G=e.colorHovered)!=null?G:e.hoverColor)!=null?Ce:e.colorSelected)!=null?ke:e.activeColor)!=null?fe:e.color)!=null?ve:e.textColor)||U,m=l((ze=(pe=e.colorInactive)!=null?pe:e.colorOff)!=null?ze:e.color)||"var(--cms-muted)";return B?L:z==="full"?U:z==="half"?de:m},O=z=>{var L,m,N,A,ee,me,ye,be,M,D,G,Ce,ke,fe,ve;const B=[];z.hovered&&z.state!=="empty"&&B.push("hoveredIcon","iconHovered"),z.state==="full"?B.push("checkedIcon","selectedIcon","iconSelected","iconOn"):z.state==="half"?B.push("halfIcon","iconHalf"):B.push("uncheckedIcon","iconOff"),B.push("icon","item","star");for(const pe of B){const ze=P(s,pe,z,null);if(ze.length)return ze}let U=null,de="icon";return z.hovered&&z.state!=="empty"&&(U=(L=e.hoveredIcon)!=null?L:e.iconHovered,de="hoveredIcon"),U==null&&z.state==="full"?(U=(ee=(A=(N=(m=e.checkedIcon)!=null?m:e.iconSelected)!=null?N:e.iconOn)!=null?A:e.icon)!=null?ee:"star",de="checkedIcon"):U==null&&z.state==="half"?(U=(D=(M=(be=(ye=(me=e.halfIcon)!=null?me:e.iconHalf)!=null?ye:e.checkedIcon)!=null?be:e.iconSelected)!=null?M:e.icon)!=null?D:"star_half",de="halfIcon"):U==null&&(U=(ve=(G=e.uncheckedIcon)!=null?G:e.iconOff)!=null?ve:l(e.noDimming)?(fe=(ke=(Ce=e.icon)!=null?Ce:e.checkedIcon)!=null?ke:e.iconSelected)!=null?fe:"star":"star_border",de="uncheckedIcon"),oe(U,de,z)},W=()=>{const z=H();if(ce!==z){ce=z,J=[],$(S);for(let B=1;B<=z;B++){const U=_.span({class:"cms-rating-item-icon"}),de=_.span({class:"cms-rating-item",role:"radio",tabIndex:-1,onMousemove:L=>{var N;if(!Z())return;const m=g(B,L);q!==m&&(q=m,u(),(N=e.onHover)==null||N.call(e,m,L))},onClick:L=>{if(!Z())return;let m=g(B,L);l(e.clearable)&&m===ne()&&(m=0),x(m,L,{emit:!0})}},U);J.push({item:de,iconHost:U,index:B}),S.appendChild(de)}}},u=()=>{var me,ye;W();const z=H(),B=ne(),U=q==null?B:Q(q,z),de=le(),L=re(),m=!!l(e.clearable),N=!!l(e.noDimming);V.classList.toggle("is-disabled",de),V.classList.toggle("is-readonly",L),V.classList.toggle("is-hovering",q!=null),V.classList.toggle("is-clearable",m),V.classList.toggle("is-half",Y()),V.classList.toggle("no-dimming",N);const A=Number((ye=l((me=e.tabindex)!=null?me:e.tabIndex))!=null?ye:0);S.tabIndex=de?-1:A,S.setAttribute("role","slider"),S.setAttribute("aria-valuemin","0"),S.setAttribute("aria-valuemax",String(z)),S.setAttribute("aria-valuenow",String(B)),S.setAttribute("aria-disabled",de?"true":"false"),S.setAttribute("aria-readonly",L?"true":"false"),T(B);const ee=P(s,"label",{value:B,max:z,disabled:de,readonly:L,clearable:m},e.label!=null?F(e.label):n);ae(I,ee,"inline-flex"),J.forEach(({item:be,iconHost:M,index:D})=>{const G=f(U,D),Ce=q!=null&&G!=="empty",ke={index:D,max:z,value:B,displayValue:U,state:G,active:G!=="empty",checked:G==="full",half:G==="half",hovered:Ce,disabled:de,readonly:L,clearable:m,setValue:fe=>x(fe,null,{emit:!1})};be.className=Dt(["cms-rating-item",`is-${G}`,ge(Ce,"is-hovered")]),be.style.color=p(G,Ce),be.style.opacity=G==="empty"&&!N?"0.48":"1",be.setAttribute("aria-checked",String(B===D)),ae(M,O(ke),"inline-flex")})},x=(z,B,U={})=>{var m,N;const de=Q(z),L=ne();return j=de,q=null,r&&U.fromModel!==!0&&r.set(de),T(de),u(),U.emit!==!1&&de!==L&&((m=e.onInput)==null||m.call(e,de,B),(N=e.onChange)==null||N.call(e,de,B)),de};return V._input=a,V._rating=S,V._getValue=ne,V._setValue=z=>x(z,null,{emit:!1}),r&&r.watch(z=>{const B=Q(z);serializeValue(B)!==serializeValue(j)&&(j=B,q=null,T(j),u())},"UI.Rating:watch"),JSswift.reactive.effect(()=>{!r&&e.value!=null&&(j=Q(l(e.value))),u()},"UI.Rating:render"),V};const it=t=>t?{hour:Number(t.hour)||0,minute:Number(t.minute)||0,second:Number(t.second)||0}:null,Wt=t=>String(Math.max(0,Number(t)||0)).padStart(2,"0"),$t=(t,e={})=>{var c,a,b,E,k,S,I,V,$,ae,F,K,oe,H,Y;if(t==null||t==="")return null;let n=null,s=null,o=0,r=null;if(t instanceof Date&&!Number.isNaN(t.getTime()))n=t.getHours(),s=t.getMinutes(),o=t.getSeconds();else if(typeof t=="number"&&Number.isFinite(t)){const Q=Math.max(0,Math.floor(t));n=Math.floor(Q/3600)%24,s=Math.floor(Q/60)%60,o=Q%60}else if(typeof t=="object"){if(t.time!=null||t.value!=null)return $t((c=t.time)!=null?c:t.value,e);n=Number((E=(b=(a=t.hour)!=null?a:t.hours)!=null?b:t.h)!=null?E:t.hh),s=Number((V=(I=(S=(k=t.minute)!=null?k:t.minutes)!=null?S:t.min)!=null?I:t.mm)!=null?V:0),o=Number((K=(F=(ae=($=t.second)!=null?$:t.seconds)!=null?ae:t.sec)!=null?F:t.ss)!=null?K:0),r=(Y=(H=(oe=t.meridiem)!=null?oe:t.ampm)!=null?H:t.period)!=null?Y:null}else if(typeof t=="string"){const Q=t.trim();if(!Q)return null;const le=Q.match(/^(\d{1,2})(\d{2})(\d{2})?$/),re=Q.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?\s*([ap]m)?/i);if(re)n=Number(re[1]),s=Number(re[2]),o=re[3]!=null?Number(re[3]):0,r=re[4]||null;else if(le)n=Number(le[1]),s=Number(le[2]),o=le[3]!=null?Number(le[3]):0;else return null}else return null;if(!Number.isFinite(n)||!Number.isFinite(s)||!Number.isFinite(o))return null;if(r){const Q=String(r).toLowerCase();Q==="pm"&&n<12&&(n+=12),Q==="am"&&n===12&&(n=0)}if(n<0||n>23||s<0||s>59||o<0||o>59)return null;const v={hour:Math.floor(n),minute:Math.floor(s),second:Math.floor(o)};return rl(v,e)},qt=(t,e={})=>{const n=t&&typeof t=="object"&&t.hour!=null?it(t):$t(t,e);if(!n)return"";const s=e.withSeconds===!0||Number(n.second||0)>0;return`${Wt(n.hour)}:${Wt(n.minute)}${s?`:${Wt(n.second)}`:""}`},Hn=(t,e)=>{const n=qt(t,{withSeconds:!0}),s=qt(e,{withSeconds:!0});return!n&&!s?0:n?s?n<s?-1:n>s?1:0:1:-1};function rl(t,e={}){if(!t)return null;const n=it(t),s=e.min!=null?$t(e.min,{withSeconds:!0}):null,o=e.max!=null?$t(e.max,{withSeconds:!0}):null;return s&&Hn(n,s)<0?it(s):o&&Hn(n,o)>0?it(o):n}const Tt=(t,e={})=>t==null||t===""?null:t instanceof Date?$t(t,e):typeof t=="object"?$t(t.time!=null?t.time:t,e):typeof t=="string"||typeof t=="number"?$t(t,e):null,jn=(t,e={})=>{var c;const n=$t(t,e);if(!n)return"";const s=e.withSeconds===!0||Number(n.second||0)>0;if(!!!l((c=e.use12h)!=null?c:e.ampm))return`${Wt(n.hour)}:${Wt(n.minute)}${s?`:${Wt(n.second)}`:""}`;const r=n.hour>=12?"PM":"AM",v=n.hour%12||12;return`${Wt(v)}:${Wt(n.minute)}${s?`:${Wt(n.second)}`:""} ${r}`},$o=(t,e,n={})=>{if(!t)return"";const s=qt(e,n);return s?`${t}T${s}`:t},bs=(t,e)=>{const n=Math.max(1,Math.min(e+1,Math.round(Number(t)||1))),s=[];for(let o=0;o<=e;o+=n)s.push(o);return s},cl=(t={})=>{const{props:e={},slots:n={},value:s=null,withSeconds:o=!1,minuteStep:r=5,secondStep:v=5,disabled:c=!1,readonly:a=!1,embedded:b=!1,className:E="",slotPrefix:k="",shortcuts:S=null,onSelect:I=null}=t,V=$t(s,{withSeconds:o,min:e.min,max:e.max}),$=V||$t(new Date,{withSeconds:o,min:e.min,max:e.max})||{hour:0,minute:0,second:0},ae=V?it(V):null,F=Z=>k?`${k}${Z[0].toUpperCase()}${Z.slice(1)}`:null,K=(Z,ne,T)=>{const j=[F(Z),Z].filter(Boolean);for(const q of j){if(JSswift.ui.getSlot(n,q)==null)continue;const J=JSswift.ui.renderSlot(n,q,ne,T);if(J!=null)return J}return JSswift.ui.slot(T,ne)},oe=Z=>{let ne=K("point",Z,null);return ne==null&&t.pointIcon!=null&&Z.selected&&(ne=typeof t.pointIcon=="string"?he.Icon({name:t.pointIcon,size:b?10:12}):JSswift.ui.slot(t.pointIcon,Z)),P(null,"default",Z,ne)},H=(Z,ne)=>{const T={hour:$.hour,minute:$.minute,second:o?$.second:0};return T[Z]=ne,T},Y=_.div({class:ie(["cms-time-section",ge(b,"is-embedded"),ge(o,"has-seconds"),E])}),Q=l(S)||[];if(Array.isArray(Q)&&Q.length){const Z=_.div({class:"cms-time-shortcuts"});Q.forEach((ne,T)=>{var g,f,p;if(!ne)return;const j=typeof ne.value=="function"?ne.value({now:qt(new Date,{withSeconds:o})}):ne.value,q=$t(j,{withSeconds:o,min:e.min,max:e.max});if(!q)return;const ce={item:ne,index:T,value:qt(q,{withSeconds:o}),displayValue:jn(q,{withSeconds:o,use12h:(g=e.use12h)!=null?g:e.ampm})},J=K("shortcut",ce,(p=(f=ne.label)!=null?f:ne.text)!=null?p:ce.displayValue);Z.appendChild(_.button({type:"button",class:ie(["cms-time-shortcut",ge(!!ae&&Hn(q,ae)===0,"is-selected")]),disabled:c||a,onClick:()=>I==null?void 0:I(q,{shortcut:ne,index:T})},...P(null,"default",ce,J)))}),Z.childNodes.length&&Y.appendChild(Z)}const le=_.div({class:"cms-time-columns"}),re=(Z,ne,T)=>{const j=_.div({class:"cms-time-column","data-time-part":ne}),q=_.div({class:"cms-time-options"});return T.forEach(ce=>{var x;const J=H(ne,ce),g=rl(J,{withSeconds:o,min:e.min,max:e.max}),f=c||a||Hn(g,J)!==0,p=!!ae&&ae[ne]===ce,O={part:ne,selected:p,disabled:f,value:ce,label:Wt(ce),timeValue:qt(g,{withSeconds:o}),displayValue:jn(g,{withSeconds:o,use12h:(x=e.use12h)!=null?x:e.ampm})},W=K("option",O,O.label),u=p?oe(O):[];q.appendChild(_.button({type:"button",class:ie(["cms-time-option",ge(p,"is-selected"),ge(f,"is-disabled")]),disabled:f,onClick:()=>I==null?void 0:I(g,{part:ne,optionValue:ce})},_.span({class:"cms-time-option-label"},...P(null,"default",O,W)),u.length?_.span({class:"cms-time-option-point"},...u):null))}),j.appendChild(q),j};return le.appendChild(re(l(e.hoursLabel)||"Ore","hour",bs(1,23))),le.appendChild(re(l(e.minutesLabel)||"Min","minute",bs(r,59))),o&&le.appendChild(re(l(e.secondsLabel)||"Sec","second",bs(v,59))),Y.appendChild(le),Y},Wn=t=>{if(!t)return null;const e={};return t.querySelectorAll(".cms-time-column").forEach((n,s)=>{const o=n.getAttribute("data-time-part")||String(s);e[o]=n.scrollTop}),e},ul=(t,e={})=>{var o;if(!t)return;const n=e.scrollState||null,s=(o=e.behavior)!=null?o:"smooth";t.querySelectorAll(".cms-time-column").forEach((r,v)=>{const c=r.getAttribute("data-time-part")||String(v),a=n&&Number.isFinite(n[c])?n[c]:null;a!=null&&(r.scrollTop=a);const b=r.querySelector(".cms-time-option.is-selected");if(!b)return;const E=Math.max(0,r.scrollHeight-r.clientHeight),k=b.offsetTop-(r.clientHeight-b.offsetHeight)/2,S=Math.max(0,Math.min(E,k));if(Math.abs(r.scrollTop-S)<1){r.scrollTop=S;return}if(s&&typeof r.scrollTo=="function"){r.scrollTo({top:S,behavior:s});return}r.scrollTop=S})},dl=(t,e={})=>{var dn,wn,nn,sn,ln,on,Ie,Ve,nt,rt,pt,yt;const{props:n,children:s}=JSswift.uiNormalizeArgs(t),o=e.calendar===!0,r=n.slots||{},v=Xe(n.size,()=>{const w=String(l(n.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(w)?`cms-size-${w}`:""}),c=String(l((sn=(nn=n.mode)!=null?nn:l((wn=(dn=n.rangeMultiple)!=null?dn:n.multipleRange)!=null?wn:n.multiRange)?"range-multiple":null)!=null?sn:n.range&&n.multiple?"range-multiple":n.range?"range":n.multiple?"multiple":"single")).toLowerCase(),a=["range-multiple","multiple-range","rangemultiple","multiplerange","range_multiple","multiple_range","multi-range","multi_range","ranges"].includes(c)?"range-multiple":c==="range"?"range":c==="multiple"?"multiple":"single",b=n.model||(Lt(n.value)||Jt(n.value)?n.value:null),E=Nt(b,o?"UI.Calendar:model":"UI.Datepicker:model"),k=E?E.get():l(n.value),S=l((ln=n.rangeAs)!=null?ln:n.rangeModel)==="array"||Array.isArray(k),I=l((on=n.rangeMultipleAs)!=null?on:n.multipleRangeAs)==="array"||Array.isArray(k)&&Array.isArray(k[0]),V=()=>{var w,te,we;return a==="single"&&!!l((we=(te=(w=n.withTime)!=null?w:n.time)!=null?te:n.timePicker)!=null?we:n.enableTime)},$=()=>{var te,we,Te,Re,Oe,$e,Qe,ut;const w=qt(Tt((we=(te=l(n.timeValue))!=null?te:E?E.get():l(n.value))!=null?we:k,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!l((Re=(Te=n.timeWithSeconds)!=null?Te:n.withSeconds)!=null?Re:n.showSeconds)||/:\d{2}:\d{2}$/.test(w)||/:\d{2}:\d{2}$/.test(l(n.timeFormat)||""),min:l((Oe=n.timeMin)!=null?Oe:n.minTime),max:l(($e=n.timeMax)!=null?$e:n.maxTime),use12h:l((ut=(Qe=n.time12h)!=null?Qe:n.use12h)!=null?ut:n.ampm)}},ae=()=>{var te,we;const w=Number(l((we=(te=n.timeMinuteStep)!=null?te:n.minuteStep)!=null?we:5));return Math.max(1,Math.min(30,Number.isFinite(w)?w:5))},F=()=>{var te,we;const w=Number(l((we=(te=n.timeSecondStep)!=null?te:n.secondStep)!=null?we:5));return Math.max(1,Math.min(30,Number.isFinite(w)?w:5))},K=w=>String(w).padStart(2,"0"),oe=(w,te,we)=>{const Te=new Date(w,te,we);return Te.getFullYear()!==w||Te.getMonth()!==te||Te.getDate()!==we?null:Te},H=w=>!(w instanceof Date)||Number.isNaN(w.getTime())?null:`${w.getFullYear()}-${K(w.getMonth()+1)}-${K(w.getDate())}`,Y=w=>{if(typeof w!="string")return null;const te=w.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!te)return null;const we=Number(te[1]),Te=Number(te[2])-1,Re=Number(te[3]),Oe=new Date(we,Te,Re);return Oe.getFullYear()!==we||Oe.getMonth()!==Te||Oe.getDate()!==Re?null:Oe},Q=(w,te)=>{const we=Y(w);return we?(we.setDate(we.getDate()+te),H(we)):null},le=(w,te)=>new Date(w.getFullYear(),w.getMonth()+te,1),re=w=>{if(w instanceof Date&&!Number.isNaN(w.getTime()))return new Date(w.getFullYear(),w.getMonth(),1);const te=u(w),we=Y(te);return we?new Date(we.getFullYear(),we.getMonth(),1):new Date},Z=()=>H(new Date),ne=(w,te)=>!!w&&!!te&&w===te,T=(w,te)=>w==null&&te==null?0:w==null?-1:te==null?1:w<te?-1:w>te?1:0,j=(w,te)=>{const we=Y(w),Te=Y(te);return!we||!Te?0:Math.round((Te.getTime()-we.getTime())/864e5)},q=w=>Array.isArray(w)?w.slice():w==null||w===""?[]:[w],ce=w=>({from:(w==null?void 0:w.from)||null,to:(w==null?void 0:w.to)||null}),J=w=>Array.isArray(w)?w.map(ce):[],g=w=>{const te=ce(w);return S?[te.from,te.to]:te},f=w=>J(w).map(te=>I?[te.from,te.to]:te),p=w=>a==="multiple"?Array.isArray(w)?w.slice():[]:a==="range"?ce(w):a==="range-multiple"?J(w):w||null,O=w=>a==="multiple"?Array.isArray(w)?w.slice():[]:a==="range"?g(w):a==="range-multiple"?f(w):w||"",W=w=>JSON.stringify(O(w)),u=w=>{if(w==null||w==="")return null;if(w instanceof Date)return H(w);if(typeof w=="number")return H(new Date(w));if(typeof w!="string")return typeof w=="object"&&w.date!=null?u(w.date):null;const te=w.trim();if(!te)return null;const we=te.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:$|[T\s])/);if(we){const $e=oe(Number(we[1]),Number(we[2])-1,Number(we[3]));return H($e)}const Te=te.match(/^(\d{1,2})[\/.\-](\d{1,2})[\/.\-](\d{2,4})$/);if(Te){const $e=Te[3].length===2?2e3+Number(Te[3]):Number(Te[3]),Qe=oe($e,Number(Te[2])-1,Number(Te[1]));return H(Qe)}if(/^\d{1,4}$/.test(te))return null;const Re=new Date(te);if(Number.isNaN(Re.getTime()))return null;const Oe=te.match(/(?:^|[^\d])(\d{4})(?!\d)/);return Oe&&Re.getFullYear()!==Number(Oe[1])?null:H(Re)},x=w=>{var Te,Re,Oe,$e,Qe,ut;if(w==null||w==="")return{from:null,to:null};let te=null,we=null;if(Array.isArray(w))te=u(w[0]),we=u(w[1]);else if(typeof w=="object")te=u((Oe=(Re=(Te=w.from)!=null?Te:w.start)!=null?Re:w.dateFrom)!=null?Oe:w.departure),we=u((ut=(Qe=($e=w.to)!=null?$e:w.end)!=null?Qe:w.dateTo)!=null?ut:w.return);else{const wt=String(w).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[];te=u(wt[0]),we=u(wt[1])}return te&&we&&te>we&&([te,we]=[we,te]),{from:te,to:we}},h=w=>{const te=[],we=new Set,Te=Re=>{const Oe=x(Re);if(!Oe.from)return;const $e=`${Oe.from||""}|${Oe.to||""}`;we.has($e)||(we.add($e),te.push(Oe))};if(w==null||w==="")return te;if(Array.isArray(w))if(w.every(Oe=>Oe==null||typeof Oe=="string"||typeof Oe=="number"||Oe instanceof Date)){const Oe=w.map(u).filter(Boolean);for(let $e=0;$e<Oe.length;$e+=2)Te({from:Oe[$e],to:Oe[$e+1]||null})}else w.forEach(Oe=>Te(Oe));else if(typeof w=="object"&&Array.isArray(w.ranges))w.ranges.forEach(Re=>Te(Re));else if(typeof w=="object")Te(w);else{const Oe=(String(w).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(u).filter(Boolean);for(let $e=0;$e<Oe.length;$e+=2)Te({from:Oe[$e],to:Oe[$e+1]||null})}return te.sort((Re,Oe)=>T(Re.from,Oe.from)||T(Re.to,Oe.to))},z=w=>{const te=[];return q(w).forEach(we=>{const Te=u(we);Te&&!te.includes(Te)&&te.push(Te)}),te.sort()},B=w=>a==="range"?x(w):a==="range-multiple"?h(w):a==="multiple"?z(w):u(w),U=()=>{var w;return u(l((w=n.min)!=null?w:n.minDate))},de=()=>{var w;return u(l((w=n.max)!=null?w:n.maxDate))},L=()=>l(n.locale)||void 0,m=()=>{var te,we;const w=Number(l((we=(te=n.firstDayOfWeek)!=null?te:n.weekStart)!=null?we:1));return Number.isFinite(w)?(w%7+7)%7:1},N=()=>{var we;const w=a==="range"||a==="range-multiple"?2:1,te=Number((we=l(n.monthsToShow))!=null?we:w);return Math.max(1,Math.min(4,Number.isFinite(te)?te:w))},A=()=>{const w=U(),te=de();let we=u(l(n.defaultMonth))||Z();return w&&we<w&&(we=w),te&&we>te&&(we=te),we||w||te||Z()},ee=()=>l(n.confirm)?Ae:Pe,me=w=>{const te=Y(w);return te?{date:w,value:w,year:te.getFullYear(),month:te.getMonth()+1,day:te.getDate(),weekday:te.getDay(),today:ne(w,Z())}:{date:w,value:w}},ye=(w,te)=>w==null?!1:Array.isArray(w)?w.some(we=>u(we)===te):w instanceof Set?w.has(te):typeof w=="function"?!!w(te,me(te)):typeof w=="string"||w instanceof Date||typeof w=="number"?u(w)===te:!1,be=w=>{var ut,wt,bt,Mt,zt,kt,Vt,Xt,Qt,vn,zn,Pn,Jn;if(!w)return!1;const te=U(),we=de();if(te&&w<te||we&&w>we)return!1;const Te=l((wt=(ut=n.options)!=null?ut:n.enableDates)!=null?wt:n.allowedDates);if(Te!=null&&!ye(Te,w))return!1;const Re=l((Mt=(bt=n.disableDates)!=null?bt:n.disabledDates)!=null?Mt:n.notAllowedDates);if(Re!=null&&ye(Re,w))return!1;const Oe=(zt=Y(w))==null?void 0:zt.getDay();if(Array.isArray(l((kt=n.allowedWeekdays)!=null?kt:n.weekdays))&&Oe!=null&&!l((Vt=n.allowedWeekdays)!=null?Vt:n.weekdays).map(Cn=>Number(Cn)).includes(Oe)||l(n.weekdaysOnly)&&(Oe===0||Oe===6)||l(n.weekendsOnly)&&Oe!=null&&Oe!==0&&Oe!==6)return!1;const $e=ee(),Qe=a==="range"?$e!=null&&$e.from&&!($e!=null&&$e.to)?$e:null:a==="range-multiple"&&Array.isArray($e)&&$e.length&&(Xt=$e[$e.length-1])!=null&&Xt.from&&!((Qt=$e[$e.length-1])!=null&&Qt.to)?$e[$e.length-1]:null;if(Qe!=null&&Qe.from){const Sn=Math.abs(j(Qe.from,w)),Cn=Number(l((zn=(vn=n.minRange)!=null?vn:n.minDays)!=null?zn:n.minNights)),En=Number(l((Jn=(Pn=n.maxRange)!=null?Pn:n.maxDays)!=null?Jn:n.maxNights));if(Number.isFinite(Cn)&&Sn<Cn||Number.isFinite(En)&&Sn>En)return!1}return!0},M=w=>{var Te,Re;if(!w)return"";const te=Y(w);return!te||String(l((Re=(Te=n.displayMask)!=null?Te:n.mask)!=null?Re:"")||"").toLowerCase()==="iso"||l(n.isoDisplay)===!0?w:new Intl.DateTimeFormat(L(),{year:"numeric",month:"short",day:"2-digit"}).format(te)},D=(w,te=y)=>{if(a==="range-multiple")return!Array.isArray(w)||!w.length?"":w.length>2&&l(n.compactMultiple)!==!1?`${w.length} ${l(n.multipleRangeLabel)||"intervalli selezionati"}`:w.map(Re=>{const Oe=Re!=null&&Re.from?M(Re.from):"",$e=Re!=null&&Re.to?M(Re.to):"";return Oe&&$e?`${Oe} -> ${$e}`:Oe||$e||""}).filter(Boolean).join("; ");if(a==="multiple")return!Array.isArray(w)||!w.length?"":w.length>3&&l(n.compactMultiple)!==!1?`${w.length} ${l(n.multipleLabel)||"date selezionate"}`:w.map(M).join(", ");if(a==="range"){const Re=w!=null&&w.from?M(w.from):"",Oe=w!=null&&w.to?M(w.to):"";return Re&&Oe?`${Re} -> ${Oe}`:Re||Oe||""}const we=M(w);if(!V())return we;const Te=Me(te);return[we,Te].filter(Boolean).join(" \u2022 ")},G=w=>(String(w||"").match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(u).filter(Boolean),Ce=w=>{if(w==null||w==="")return a==="multiple"||a==="range-multiple"?[]:a==="range"?{from:null,to:null}:null;const te=G(w);if(a==="range-multiple"){const we=[];for(let Te=0;Te<te.length;Te+=2)te[Te]&&we.push({from:te[Te],to:te[Te+1]||null});return we}return a==="multiple"?te:a==="range"?{from:te[0]||null,to:te[1]||null}:te[0]||u(w)},ke=()=>a==="multiple"||a==="range-multiple"?[]:a==="range"?{from:null,to:null}:null,fe=(w,te=null)=>{var $e;if(!V())return null;const we=$(),Te=l(n.timeValue),Re=w!=null?w:Te,Oe=Tt(Re,we);return it(($e=Oe!=null?Oe:te)!=null?$e:null)},ve=()=>l(n.confirm)?X:y,pe=(w=Pe,te=y)=>a==="single"&&V()?$o(w||null,te,$()):O(w),ze=(w=Pe,te=y)=>JSON.stringify(pe(w,te)),Me=w=>jn(w,$());let Pe=B(k),Ae=p(Pe),y=fe(k,Tt(l(n.timeValue),$())),X=it(y),xe=null,R=null,d=re(a==="range"?(Pe==null?void 0:Pe.from)||(Pe==null?void 0:Pe.to)||A():a==="range-multiple"?((Ie=Pe==null?void 0:Pe[Pe.length-1])==null?void 0:Ie.from)||((Ve=Pe==null?void 0:Pe[Pe.length-1])==null?void 0:Ve.to)||A():a==="multiple"?Pe[0]||A():Pe||A()),i=null,C=null;const se=w=>{const te=w instanceof Date?w:Y(u(w));if(!te)return-1;const we=te.getFullYear(),Te=te.getMonth();for(let Re=0;Re<N();Re+=1){const Oe=le(d,Re);if(Oe.getFullYear()===we&&Oe.getMonth()===Te)return Re}return-1},_e={...n,label:(nt=n.label)!=null?nt:n.placeholder},Ne=_e.label!=null||JSswift.ui.getSlot(r,"label")!=null,ue=a==="range"?"Seleziona andata e ritorno":a==="range-multiple"?"Seleziona intervalli":a==="multiple"?"Seleziona date":"Seleziona data",Se=o?null:_.input({class:ie(["cms-input","cms-date-display",v,ge(n.manualInput,"is-manual"),n.inputClass]),type:"text",autocomplete:"off",placeholder:Ne?"":(rt=n.placeholder)!=null?rt:ue,readOnly:!l(n.manualInput),disabled:!!l(n.disabled),value:D(Pe,y)}),Fe=_.div({style:{display:"contents"}}),Ee=o?null:_.div({class:"cms-date-control",style:{display:"contents"}},Se,Fe),Je=o?null:he.FormField({..._e,iconRight:(pt=n.iconRight)!=null?pt:"calendar_month",control:Ee,getValue:()=>Se.value,onClear:()=>{l(n.disabled)||l(n.readonly)||(Ze(ke(),null),i&&xt())},onFocus:()=>Se.focus()}),He=(w,te={})=>{var Re,Oe;const we=te.focusIso||(a==="range"?(w==null?void 0:w.from)||(w==null?void 0:w.to)||A():a==="range-multiple"?((Re=w==null?void 0:w[w.length-1])==null?void 0:Re.from)||((Oe=w==null?void 0:w[w.length-1])==null?void 0:Oe.to)||A():a==="multiple"?(w==null?void 0:w[0])||A():w||A());let Te=re(we);if(te.preserveMonthOffset){const $e=Number.isInteger(te.visibleMonthOffset)?te.visibleMonthOffset:se(te.anchorIso||te.focusIso||we);$e>0&&(Te=le(Te,-$e))}d=Te},Ge=()=>{Fe.replaceChildren();const w=l(n.name);if(!w)return;const te=(Re,Oe)=>{Fe.appendChild(_.input({type:"hidden",name:Re,value:Oe!=null?Oe:""}))},we=Pe;if(a==="single"){te(w,pe(we,y));return}if(a==="range"){te(l(n.nameFrom)||`${w}_from`,(we==null?void 0:we.from)||""),te(l(n.nameTo)||`${w}_to`,(we==null?void 0:we.to)||"");return}if(a==="range-multiple"){const Re=Array.isArray(we)?we:[],Oe=/\[\]$/.test(l(n.nameFrom)||"")?l(n.nameFrom):`${l(n.nameFrom)||`${w}_from`}[]`,$e=/\[\]$/.test(l(n.nameTo)||"")?l(n.nameTo):`${l(n.nameTo)||`${w}_to`}[]`;Re.forEach(Qe=>{te(Oe,(Qe==null?void 0:Qe.from)||""),te($e,(Qe==null?void 0:Qe.to)||"")});return}const Te=/\[\]$/.test(w)?w:`${w}[]`;(Array.isArray(we)?we:[]).forEach(Re=>te(Te,Re))},qe=()=>{var w;o||(Se.readOnly=!l(n.manualInput),Se.disabled=!!l(n.disabled),Se.setAttribute("aria-expanded",i?"true":"false"),Se.value=D(Pe,y),Ge(),(w=Je==null?void 0:Je._refresh)==null||w.call(Je))},Ze=(w,te,we={})=>{var Qe,ut,wt;const Te=B(w),Re=V()?it((Qe=Tt(we.timeValue!=null?we.timeValue:we.preserveTime?ve():w,$()))!=null?Qe:we.preserveTime?ve():null):null,Oe=ze(Pe,y);Pe=p(Te),Ae=p(Te),V()&&(y=it(Re),X=it(Re)),xe=null,He(Te,we),qe(),vt(),E&&we.fromModel!==!0&&E.set(pe(Te,Re));const $e=ze(Te,Re);if(we.emit!==!1&&$e!==Oe){const bt=pe(Te,Re);(ut=n.onInput)==null||ut.call(n,bt,te),(wt=n.onChange)==null||wt.call(n,bt,te)}return Te},et=(w,te,we={})=>{var $e,Qe;if(!V())return null;const Te=it(Tt(w,$()));if(l(n.confirm)&&we.commit!==!0)return X=Te,vt(),Te;const Re=ze(Pe,y);y=it(Te),X=it(Te),qe(),vt(),E&&we.fromModel!==!0&&E.set(pe(Pe,Te));const Oe=ze(Pe,Te);if(we.emit!==!1&&Oe!==Re){const ut=pe(Pe,Te);($e=n.onInput)==null||$e.call(n,ut,te),(Qe=n.onChange)==null||Qe.call(n,ut,te)}return Te},We=(w,te,we={})=>{if(l(n.confirm)){Ae=p(B(w)),V()&&(we.timeValue!=null||we.preserveTime)&&(X=it(Tt(we.timeValue!=null?we.timeValue:ve(),$()))),xe=null,He(Ae,we),vt();return}Ze(w,te,we)},st=()=>{const w=ee();if(a==="range")return!(w!=null&&w.from)||w!=null&&w.to||!xe?w:T(w.from,xe)<=0?{from:w.from,to:xe}:{from:xe,to:w.from};if(a==="range-multiple"){const te=Array.isArray(w)&&w.length?w[w.length-1]:null;return!(te!=null&&te.from)||te!=null&&te.to||!xe?te:T(te.from,xe)<=0?{from:te.from,to:xe}:{from:xe,to:te.from}}return w},De=()=>{if(a==="range"){const w=st();return w!=null&&w.from?[w]:[]}if(a==="range-multiple"){const w=Array.isArray(ee())?ee():[];if(!w.length)return[];const te=st();return te!=null&&te.from?[...w.slice(0,-1),te]:w}return[]},ot=w=>{const te=ee();return a==="multiple"?te.includes(w):a==="range-multiple"?Array.isArray(te)&&te.some(we=>ne(we==null?void 0:we.from,w)||ne(we==null?void 0:we.to,w)):a==="range"?ne(te==null?void 0:te.from,w)||ne(te==null?void 0:te.to,w):ne(te,w)},ct=w=>a!=="range"&&a!=="range-multiple"?!1:De().some(te=>(te==null?void 0:te.from)&&(te==null?void 0:te.to)&&w>=te.from&&w<=te.to),dt=(w,te={})=>{const we=ee(),Te=a==="range"?we:a==="range-multiple"&&Array.isArray(we)&&we.length?we[we.length-1]:null;!(Te!=null&&Te.from)||Te!=null&&Te.to||xe===w||(xe=w,te.render!==!1&&vt())},tt=()=>o||l(n.confirm)||n.closeOnSelect===!1?!1:a==="multiple"||a==="range-multiple"?!!n.closeOnSelect:!0,ft=(w,te,we={})=>{var Re;if(!be(w)||l(n.disabled)||l(n.readonly))return;const Te={focusIso:w,anchorIso:w,preserveTime:V(),timeValue:ve(),preserveMonthOffset:!!i&&N()>1,visibleMonthOffset:Number.isInteger(we.visibleMonthOffset)?we.visibleMonthOffset:null};if(a==="multiple"){const Oe=z(ee()),$e=Oe.includes(w)?Oe.filter(Qe=>Qe!==w):[...Oe,w];We($e.sort(),te,Te),tt()&&xt();return}if(a==="range"){const Oe=p(ee());let $e;!Oe.from||Oe.from&&Oe.to?$e={from:w,to:null}:T(w,Oe.from)<0?$e={from:w,to:Oe.from}:$e={from:Oe.from,to:w},We($e,te,Te),$e.to&&tt()&&xt();return}if(a==="range-multiple"){const Oe=h(ee()),$e=Oe.length?Oe[Oe.length-1]:null;let Qe;!($e!=null&&$e.from)||$e!=null&&$e.to?Qe=[...Oe,{from:w,to:null}]:T(w,$e.from)<0?Qe=[...Oe.slice(0,-1),{from:w,to:$e.from}]:Qe=[...Oe.slice(0,-1),{from:$e.from,to:w}],We(Qe,te,Te),(Re=Qe[Qe.length-1])!=null&&Re.to&&tt()&&xt();return}We(w,te,Te),tt()&&xt()},St=()=>{R=null,Ze(ke(),null,{timeValue:null})},Ct=()=>{const w=Z();if(!be(w)){He(w),vt();return}if(a==="range"){const te=Q(w,1),we=te&&be(te)?{from:w,to:te}:{from:w,to:null};We(we,null);return}if(a==="range-multiple"){const te=Q(w,1),we=te&&be(te)?[{from:w,to:te}]:[{from:w,to:null}];We(we,null);return}if(a==="multiple"){We([w],null);return}We(w,null,{preserveTime:V(),timeValue:ve()})},mt=(w={})=>{ul(C,w)},At=()=>{if(!V())return;const w=Wn(C);et(new Date,null,{commit:!l(n.confirm)}),mt({scrollState:w}),!l(n.confirm)&&n.closeOnSelect===!0&&xt()},ht=()=>{l(n.confirm)&&(Ze(Ae,null,{timeValue:X,preserveTime:!0}),n.closeOnSelect!==!1&&xt())},vt=()=>{var _l,kl,Nl,Al,Ll,Il,zl,Pl,Jl,El,Tl,Rl,Ml,Fl,Ol,Dl,$l,Vl,Bl;if(!C)return;const w=L(),te=new Intl.DateTimeFormat(w,{month:"long",year:"numeric"}),we=new Intl.DateTimeFormat(w,{weekday:"short"}),Te=Array.from({length:7},(Ke,lt)=>{const Ft=(m()+lt)%7;return we.format(new Date(2024,0,7+Ft))}),Re=ee(),Oe=Ke=>{let lt=JSswift.ui.renderSlot(r,"point",Ke,null);return lt==null&&(lt=JSswift.ui.renderSlot(r,"dayPoint",Ke,null)),lt==null&&n.pointIcon!=null&&(Ke.selected||Ke.inRange||Ke.today)&&(lt=typeof n.pointIcon=="string"?he.Icon({name:n.pointIcon,size:10}):JSswift.ui.slot(n.pointIcon,Ke)),P(null,"default",Ke,lt)},$e=(Ke,lt)=>{const Ft=Ke.getFullYear(),Tn=Ke.getMonth(),Rn=new Date(Ft,Tn,1),Zn=(Rn.getDay()-m()+7)%7,xs=new Date(Ft,Tn,1-Zn),es=_.div({class:"cms-date-month"});es.appendChild(_.div({class:"cms-date-month-title"},te.format(Rn)));const Hl=_.div({class:"cms-date-weekdays"});Te.forEach(Mn=>Hl.appendChild(_.div({class:"cms-date-weekday"},Mn))),es.appendChild(Hl);const jl=_.div({class:"cms-date-grid"});for(let Mn=0;Mn<42;Mn+=1){const _s=new Date(xs.getFullYear(),xs.getMonth(),xs.getDate()+Mn),Pt=H(_s),Wl=_s.getMonth()===Tn,Ul=ot(Pt),Gl=ct(Pt),Kl=(a==="range"||a==="range-multiple")&&De().some(It=>ne(It==null?void 0:It.from,Pt)),Yl=(a==="range"||a==="range-multiple")&&De().some(It=>ne(It==null?void 0:It.to,Pt)),ks=!be(Pt),Ns={...me(Pt),selected:Ul,inRange:Gl,rangeStart:Kl,rangeEnd:Yl,disabled:ks,outside:!Wl,value:Re,select:()=>ft(Pt,null,{visibleMonthOffset:lt})},As=Oe(Ns),ri=JSswift.ui.renderSlot(r,"day",Ns,String(_s.getDate())),ci=P(null,"default",Ns,ri),ui=_.button({type:"button",class:ie(["cms-date-day",ge(!Wl,"is-outside"),ge(Ul,"is-selected"),ge(Gl,"is-in-range"),ge(Kl,"is-range-start"),ge(Yl,"is-range-end"),ge(ks,"is-disabled"),ge(ne(Pt,Z()),"is-today"),ge(As.length,"has-point")]),disabled:ks,onMouseDown:It=>{It.button===0&&(R=Pt,It.preventDefault(),ft(Pt,It,{visibleMonthOffset:lt}))},onClick:It=>{if(R!=null&&It.detail!==0){R=null;return}R=null,ft(Pt,It,{visibleMonthOffset:lt})},onMouseEnter:()=>dt(Pt),onFocus:()=>dt(Pt,{render:!1})},_.span({class:"cms-date-day-label"},...ci),As.length?_.span({class:"cms-date-day-point"},...As):null);jl.appendChild(ui)}return es.appendChild(jl),es},Qe=U(),ut=de(),wt=[d.getFullYear(),(_l=Y(Z()))==null?void 0:_l.getFullYear(),(kl=Y(Qe))==null?void 0:kl.getFullYear(),(Nl=Y(ut))==null?void 0:Nl.getFullYear(),(Al=Y(l(n.defaultMonth)))==null?void 0:Al.getFullYear()];a==="range"?wt.push((Ll=Y(Re==null?void 0:Re.from))==null?void 0:Ll.getFullYear(),(Il=Y(Re==null?void 0:Re.to))==null?void 0:Il.getFullYear()):a==="range-multiple"?Re.forEach(Ke=>{var lt,Ft;wt.push((lt=Y(Ke==null?void 0:Ke.from))==null?void 0:lt.getFullYear(),(Ft=Y(Ke==null?void 0:Ke.to))==null?void 0:Ft.getFullYear())}):a==="multiple"?Re.forEach(Ke=>{var lt;return wt.push((lt=Y(Ke))==null?void 0:lt.getFullYear())}):wt.push((zl=Y(Re))==null?void 0:zl.getFullYear());const bt=wt.filter(Ke=>Number.isFinite(Ke)),Mt=(bt.length?Math.min(...bt):d.getFullYear())-100,zt=(bt.length?Math.max(...bt):d.getFullYear())+50,kt=Number(l((El=(Jl=n.yearStart)!=null?Jl:Qe?(Pl=Y(Qe))==null?void 0:Pl.getFullYear():null)!=null?El:Mt)),Vt=Number(l((Ml=(Rl=n.yearEnd)!=null?Rl:ut?(Tl=Y(ut))==null?void 0:Tl.getFullYear():null)!=null?Ml:zt)),Xt=_.select({class:"cms-date-select",value:String(d.getMonth()),onChange:Ke=>{var lt;d=new Date(d.getFullYear(),Number(Ke.currentTarget.value),1),(lt=n.onNavigate)==null||lt.call(n,{month:d.getMonth()+1,year:d.getFullYear()}),vt()}},...Array.from({length:12},(Ke,lt)=>us({value:String(lt)},new Intl.DateTimeFormat(w,{month:"long"}).format(new Date(2024,lt,1))))),Qt=_.select({class:"cms-date-select cms-date-select-year",value:String(d.getFullYear()),onChange:Ke=>{var lt;d=new Date(Number(Ke.currentTarget.value),d.getMonth(),1),(lt=n.onNavigate)==null||lt.call(n,{month:d.getMonth()+1,year:d.getFullYear()}),vt()}},...Array.from({length:Math.max(1,Vt-kt+1)},(Ke,lt)=>{const Ft=kt+lt;return us({value:String(Ft)},String(Ft))})),vn=_.div({class:"cms-date-header"},_.button({type:"button",class:"cms-date-nav",onClick:()=>{var Ke;d=le(d,-1),(Ke=n.onNavigate)==null||Ke.call(n,{month:d.getMonth()+1,year:d.getFullYear()}),vt()}},he.Icon({name:"chevron_left",size:16})),_.div({class:"cms-date-header-center"},Xt,Qt),_.button({type:"button",class:"cms-date-nav",onClick:()=>{var Ke;d=le(d,1),(Ke=n.onNavigate)==null||Ke.call(n,{month:d.getMonth()+1,year:d.getFullYear()}),vt()}},he.Icon({name:"chevron_right",size:16}))),zn=_.div({class:"cms-date-shortcuts"}),Pn=l((Fl=n.shortcuts)!=null?Fl:n.presets)||[];Pn.forEach((Ke,lt)=>{var Rn,Zn;if(!Ke)return;const Ft=typeof Ke.value=="function"?Ke.value({today:Z()}):Ke.value,Tn=(Zn=(Rn=Ke.label)!=null?Rn:Ke.text)!=null?Zn:`Preset ${lt+1}`;zn.appendChild(_.button({type:"button",class:"cms-date-shortcut",onClick:()=>We(Ft,null,{preserveTime:V(),timeValue:ve()})},Tn))});const Jn=_.div({class:"cms-date-months"});for(let Ke=0;Ke<N();Ke+=1)Jn.appendChild($e(le(d,Ke),Ke));const Sn=D(Re,ve()),Cn=_.div({class:"cms-date-value"},...P(r,"value",{value:Re,displayValue:Sn,mode:a,timeValue:ve()},Sn||P(r,"default",{},s))),En=_.div({class:"cms-time-header"}),ni=_.div({class:"cms-time-columns-2"},_.div({class:"cms-time-column-title"},l(n.hoursLabel)||"Ore"),_.div({class:"cms-time-column-title"},l(n.minutesLabel)||"Min"));En.appendChild(ni);const si=V()?cl({props:{min:l((Ol=n.timeMin)!=null?Ol:n.minTime),max:l((Dl=n.timeMax)!=null?Dl:n.maxTime),use12h:l((Vl=($l=n.time12h)!=null?$l:n.use12h)!=null?Vl:n.ampm),hoursLabel:l(n.timeHoursLabel)||"Ore",minutesLabel:l(n.timeMinutesLabel)||"Min",secondsLabel:l(n.timeSecondsLabel)||"Sec"},slots:r,slotPrefix:"time",value:ve(),withSeconds:!1,minuteStep:1,secondStep:F(),disabled:!!l(n.disabled),readonly:!!l(n.readonly),embedded:!0,pointIcon:l(n.timePointIcon),shortcuts:l((Bl=n.timeShortcuts)!=null?Bl:n.timePresets),onSelect:Ke=>{const lt=Wn(C);et(Ke,null),mt({scrollState:lt})}}):null,li=_.div({class:"cms-date-footer-info"},Cn),oi=_.div({class:ie(["cms-date-footer",ge(V(),"has-time")])},li,_.div({class:"cms-date-actions"},_.button({type:"button",class:"cms-date-action",onClick:Ct},l(n.todayLabel)||"Oggi"),l(n.clearable)!==!1?_.button({type:"button",class:"cms-date-action",onClick:St},l(n.clearLabel)||"Reset"):null,l(n.confirm)?_.button({type:"button",class:"cms-date-action is-primary",onClick:ht},l(n.applyLabel)||"Applica"):null)),ii=_.div(_.button({type:"button",class:"cms-date-action cms-w-lg",onClick:At},l(n.nowLabel)||"Ora")),ai=V()?_.div({class:"cms-date-time"},En,si,ii):null;C.replaceChildren(_.div({class:"cms-date-panel-root",onKeydown:Ke=>{var lt;Ke.key==="Escape"&&(Ke.preventDefault(),o?(lt=n.onEscape)==null||lt.call(n,Ke):xt())}},vn,Pn.length?zn:null,_.div({class:"cms-data-time"},Jn,ai),oi))};function Gt(){var w,te,we,Te;return i||l(n.disabled)||l(n.readonly)||(Ae=p(Pe),X=it(y),xe=null,R=null,He(Ae),i=JSswift.overlay.open(({close:Re})=>{var Qe;const Oe=a==="range"||a==="range-multiple"?2:1,$e=Number((Qe=l(n.monthsToShow))!=null?Qe:Oe);return C=_.div({class:Dt(["cms-date-panel",l(v),ge($e>1,"multi-month"),n.panelClass])}),vt(),C},{type:"date",anchorEl:Je._control||Se,placement:n.placement||"bottom-start",offsetX:(w=n.offsetX)!=null?w:0,offsetY:(we=(te=n.offsetY)!=null?te:n.offset)!=null?we:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:n.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Dt(["cms-date-overlay",n.panelClass,ge(V(),"has-time")]),onClose:()=>{var Re;i=null,C=null,xe=null,qe(),(Re=n.onClose)==null||Re.call(n)}}),n.panelStyle&&Object.assign(i.panel.style,n.panelStyle),pn(i),qe(),(Te=n.onOpen)==null||Te.call(n)),i}function xt(){if(!i)return;R=null;const w=i;bn(w,()=>JSswift.overlay.close(w.id))}if(o){const w=a==="range"||a==="range-multiple"?2:1,te=Number((yt=l(n.monthsToShow))!=null?yt:w);C=_.div({class:Dt(["cms-date-panel","cms-date-calendar",l(v),ge(te>1,"multi-month"),n.panelClass,n.class]),style:n.style})}return o||Se.addEventListener("focus",w=>{var te;(te=n.onFocus)==null||te.call(n,w),n.openOnFocus!==!1&&Gt()}),o||Se.addEventListener("click",w=>{var te;(te=n.onClick)==null||te.call(n,w),Gt()}),o||Se.addEventListener("keydown",w=>{if(w.key==="Escape"){i&&(w.preventDefault(),xt());return}(w.key==="ArrowDown"||w.key==="Enter"||w.key===" ")&&(w.preventDefault(),Gt()),(w.key==="Backspace"||w.key==="Delete")&&!l(n.manualInput)&&l(n.clearable)!==!1&&(w.preventDefault(),St())}),!o&&l(n.manualInput)?(Se.addEventListener("input",w=>{var te;(te=n.onTyping)==null||te.call(n,Se.value,w)}),Se.addEventListener("change",w=>{const te=Ce(Se.value);Ze(te,w,{timeValue:Tt(Se.value,$()),preserveTime:!Tt(Se.value,$())})}),Se.addEventListener("blur",w=>{var we;(we=n.onBlur)==null||we.call(n,w);const te=Ce(Se.value);Se.value===""?St():Ze(te,w,{timeValue:Tt(Se.value,$()),preserveTime:!Tt(Se.value,$())})})):o||Se.addEventListener("blur",w=>{var te;return(te=n.onBlur)==null?void 0:te.call(n,w)}),E&&E.watch(w=>{const te=B(w),we=fe(w);ze(te,we)!==ze(Pe,y)&&(Pe=te,Ae=p(Pe),y=it(we),X=it(we),xe=null,He(Pe),qe(),vt())},o?"UI.Calendar:watch":"UI.Datepicker:watch"),JSswift.reactive.effect(()=>{!E&&n.value!=null?(Pe=B(l(n.value)),Ae=p(Pe),y=fe(l(n.value)),X=it(y)):V()&&n.timeValue!=null&&(y=fe(l(n.timeValue)),X=it(y)),qe(),vt(),i&&l(n.disabled)&&xt()},o?"UI.Calendar:render":"UI.Datepicker:render"),o?(C._calendar=C,C._date=C,C._getValue=()=>pe(Pe,y),C._setValue=w=>Ze(w,null,{emit:!1,timeValue:fe(w)}),C._clear=St,C._select=w=>{const te=u(w);te&&ft(te,null)},C._time=()=>it(y),C):(Je._input=Se,Je._date=Se,Je._open=Gt,Je._close=xt,Je._getValue=()=>pe(Pe,y),Je._setValue=w=>Ze(w,null,{emit:!1,timeValue:fe(w)}),Je._time=()=>it(y),Je._panel=()=>(i==null?void 0:i.panel)||null,Je)};he.Datepicker=(...t)=>dl(t),he.Calendar=(...t)=>dl(t,{calendar:!0}),he.Date=he.Datepicker,JSswift.ui.Datepicker=he.Datepicker,JSswift.ui.Calendar=he.Calendar,JSswift.ui.Date=he.Date,he.Time=(...t)=>{var W,u,x;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Xe(e.size,()=>{const h=String(l(e.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(h)?`cms-size-${h}`:""}),r=()=>{var z,B,U,de,L;const h=qt(Tt(b?b.get():(z=l(e.value))!=null?z:E,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!l((B=e.withSeconds)!=null?B:e.showSeconds)||/:\d{2}:\d{2}$/.test(h),min:l((U=e.min)!=null?U:e.minTime),max:l((de=e.max)!=null?de:e.maxTime),use12h:l((L=e.use12h)!=null?L:e.ampm)}},v=()=>{var z;const h=Number(l((z=e.minuteStep)!=null?z:1));return Math.max(1,Math.min(30,Number.isFinite(h)?h:5))},c=()=>{var z;const h=Number(l((z=e.secondStep)!=null?z:1));return Math.max(1,Math.min(30,Number.isFinite(h)?h:5))},a=e.model||(Lt(e.value)||Jt(e.value)?e.value:null),b=Nt(a,"UI.Time:model"),E=b?b.get():l(e.value),k=h=>Tt(h,r()),S=h=>jn(h,r()),I=h=>qt(h,r()),V=h=>JSON.stringify(I(h));let $=it(k(E)),ae=it($),F=null,K=null;const oe={...e,label:(W=e.label)!=null?W:e.placeholder},H=oe.label!=null||JSswift.ui.getSlot(s,"label")!=null,Y=_.input({class:ie(["cms-input","cms-time-display",o,ge(e.manualInput,"is-manual"),e.inputClass]),type:"text",autocomplete:"off",placeholder:H?"":(u=e.placeholder)!=null?u:"Seleziona orario",readOnly:!l(e.manualInput),disabled:!!l(e.disabled),value:S($)});Y.setAttribute("aria-haspopup","dialog");const Q=_.div({style:{display:"contents"}}),le=_.div({class:"cms-time-control",style:{display:"contents"}},Y,Q),re=he.FormField({...oe,iconRight:(x=e.iconRight)!=null?x:"schedule",control:le,getValue:()=>Y.value,onClear:()=>{l(e.disabled)||l(e.readonly)||(j(null,null,{commit:!0}),F&&O())},onFocus:()=>Y.focus()}),Z=()=>l(e.confirm)?ae:$,ne=()=>{Q.replaceChildren();const h=l(e.name);h&&Q.appendChild(_.input({type:"hidden",name:h,value:I($)}))},T=()=>{var h;Y.readOnly=!l(e.manualInput),Y.disabled=!!l(e.disabled),Y.setAttribute("aria-expanded",F?"true":"false"),Y.value=S($),ne(),(h=re._refresh)==null||h.call(re)},j=(h,z,B={})=>{var m,N;const U=it(k(h));if(l(e.confirm)&&B.commit!==!0)return ae=it(U),f(),U;const de=V($);$=it(U),ae=it(U),T(),f(),b&&B.fromModel!==!0&&b.set(I(U));const L=V(U);if(B.emit!==!1&&L!==de){const A=I(U);(m=e.onInput)==null||m.call(e,A,z),(N=e.onChange)==null||N.call(e,A,z)}return U},q=h=>l(e.confirm)||e.closeOnSelect!==!0?!1:r().withSeconds?(h==null?void 0:h.part)==="second":(h==null?void 0:h.part)==="minute",ce=(h={})=>{ul(K,h)},J=()=>{const h=Wn(K);j(new Date,null,{commit:!l(e.confirm)}),ce({scrollState:h}),!l(e.confirm)&&e.closeOnSelect===!0&&O()},g=()=>{l(e.confirm)&&(j(ae,null,{commit:!0}),e.closeOnSelect!==!1&&O())},f=()=>{var N,A,ee,me;if(!K)return;const h=Z(),z=S(h),B=_.div({class:"cms-time-header"}),U=_.div({class:"cms-time-columns"},_.div({class:"cms-time-column-title"},l(e.hoursLabel)||"Ore"),_.div({class:"cms-time-column-title"},l(e.minutesLabel)||"Min")),de=r().withSeconds;de&&U.appendChild(_.div({class:"cms-time-column-title"},l(e.secondsLabel)||"Sec")),B.appendChild(U);const L=cl({props:{min:l((N=e.min)!=null?N:e.minTime),max:l((A=e.max)!=null?A:e.maxTime),use12h:l((ee=e.use12h)!=null?ee:e.ampm),hoursLabel:l(e.hoursLabel)||"Ore",minutesLabel:l(e.minutesLabel)||"Min",secondsLabel:l(e.secondsLabel)||"Sec"},slots:s,value:h,withSeconds:de,minuteStep:v(),secondStep:c(),disabled:!!l(e.disabled),readonly:!!l(e.readonly),pointIcon:l(e.pointIcon),shortcuts:l((me=e.shortcuts)!=null?me:e.presets),onSelect:(ye,be)=>{const M=Wn(K);j(ye,null),ce({scrollState:M}),q(be)&&O()}}),m=_.div({class:"cms-time-footer"},_.div({class:"cms-time-value"},...P(s,"value",{value:h,displayValue:z},z||P(s,"default",{},n))),_.div({class:"cms-time-actions"},_.button({type:"button",class:"cms-time-action",onClick:J},l(e.nowLabel)||"Ora"),l(e.clearable)!==!1?_.button({type:"button",class:"cms-time-action",onClick:()=>j(null,null,{commit:!l(e.confirm)})},l(e.clearLabel)||"Reset"):null,l(e.confirm)?_.button({type:"button",class:"cms-time-action is-primary",onClick:g},l(e.applyLabel)||"Applica"):null));K.replaceChildren(_.div({class:"cms-time-panel-root",onKeydown:ye=>{ye.key==="Escape"&&(ye.preventDefault(),O())}},B,L,m))};function p(){var h,z,B,U;return F||l(e.disabled)||l(e.readonly)||(ae=it($),F=JSswift.overlay.open(()=>(K=_.div({class:Dt(["cms-time-panel",l(o),e.panelClass])}),f(),K),{type:"time",anchorEl:re._control||Y,placement:e.placement||"bottom-start",offsetX:(h=e.offsetX)!=null?h:0,offsetY:(B=(z=e.offsetY)!=null?z:e.offset)!=null?B:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:e.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Dt(["cms-time-overlay",e.panelClass]),onClose:()=>{var de;F=null,K=null,T(),(de=e.onClose)==null||de.call(e)}}),e.panelStyle&&Object.assign(F.panel.style,e.panelStyle),pn(F),ce(),T(),(U=e.onOpen)==null||U.call(e)),F}function O(){if(!F)return;const h=F;bn(h,()=>JSswift.overlay.close(h.id))}return Y.addEventListener("focus",h=>{var z;(z=e.onFocus)==null||z.call(e,h),e.openOnFocus!==!1&&p()}),Y.addEventListener("click",h=>{var z;(z=e.onClick)==null||z.call(e,h),p()}),Y.addEventListener("keydown",h=>{if(h.key==="Escape"){F&&(h.preventDefault(),O());return}(h.key==="ArrowDown"||h.key==="Enter"||h.key===" ")&&(h.preventDefault(),p()),(h.key==="Backspace"||h.key==="Delete")&&!l(e.manualInput)&&l(e.clearable)!==!1&&(h.preventDefault(),j(null,h,{commit:!0}))}),l(e.manualInput)?(Y.addEventListener("input",h=>{var z;return(z=e.onTyping)==null?void 0:z.call(e,Y.value,h)}),Y.addEventListener("change",h=>j(Y.value,h)),Y.addEventListener("blur",h=>{var z;(z=e.onBlur)==null||z.call(e,h),Y.value===""?j(null,h):j(Y.value,h)})):Y.addEventListener("blur",h=>{var z;return(z=e.onBlur)==null?void 0:z.call(e,h)}),b&&b.watch(h=>{const z=it(k(h));V(z)!==V($)&&($=it(z),ae=it(z),T(),f())},"UI.Time:watch"),JSswift.reactive.effect(()=>{!b&&e.value!=null&&($=it(k(l(e.value))),ae=it($)),T(),f(),F&&l(e.disabled)&&O()},"UI.Time:render"),re._input=Y,re._time=Y,re._open=p,re._close=O,re._getValue=()=>I($),re._setValue=h=>j(h,null,{emit:!1,commit:!0}),re._panel=()=>(F==null?void 0:F.panel)||null,re},he.Tabs=(...t)=>{var N,A,ee,me,ye,be;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(M,D)=>!!M&&Object.prototype.hasOwnProperty.call(M,D),r=M=>String(l(M)||"horizontal").toLowerCase()==="vertical"?"vertical":"horizontal",v=M=>{const D=String(l(M)||"").toLowerCase();return D==="pills"||D==="pill"?"pills":D==="soft"||D==="card"?"soft":"line"},c=M=>{var G;const D=l(M);return D==null||D===""?null:(G=JSswift.uiColors)!=null&&G.includes(D)?`var(--cms-${D})`:String(D)},a=(M,D)=>Object.is(M,D)||M!=null&&D!=null&&M==D,b=Nt(e.model,"UI.Tabs:model"),E=r(e.orientation||e.orient||e.direction),k=v(e.variant||(e.pills?"pills":e.soft?"soft":"line")),S=!!l((A=(N=e.fill)!=null?N:e.navFill)!=null?A:e.stretch),I=!!l(e.wrap),V=!!l(e.disabled),$=e.id||"cms-tabs-"+Math.random().toString(36).slice(2,9),ae=l((ee=e.tabs)!=null?ee:e.items)||[],F=(Array.isArray(ae)?ae:[ae]).map((M,D)=>{var fe,ve,pe,ze,Me,Pe,Ae,y,X,xe,R,d,i,C;if(M==null)return null;if(typeof M!="object")return{raw:M,index:D,value:M,labelFallback:M,noteFallback:null,iconFallback:null,badgeFallback:null,disabled:!1,hidden:!1};const G=(Pe=(Me=(ze=(pe=(ve=(fe=M.value)!=null?fe:M.name)!=null?ve:M.id)!=null?pe:M.key)!=null?ze:M.label)!=null?Me:M.title)!=null?Pe:`tab-${D}`,Ce=(xe=(X=(y=(Ae=M.label)!=null?Ae:M.title)!=null?y:M.name)!=null?X:M.value)!=null?xe:`Tab ${D+1}`,ke=o(M,"badge")?M.badge:o(M,"counter")?M.counter:null;return{...M,raw:M,index:D,value:G,labelFallback:Ce,noteFallback:(i=(d=(R=M.note)!=null?R:M.subtitle)!=null?d:M.description)!=null?i:null,iconFallback:(C=M.icon)!=null?C:null,badgeFallback:ke}}).filter(Boolean).filter(M=>M.hidden!==!0&&M.visible!==!1),K=F.find(M=>!M.disabled)||null,oe=M=>F.findIndex(D=>a(D.value,M)),H=(M,D)=>{var Ce;if(!F.length)return-1;let G=M;for(let ke=0;ke<F.length;ke+=1)if(G+=D,G<0?G=F.length-1:G>=F.length&&(G=0),!((Ce=F[G])!=null&&Ce.disabled))return G;return-1},Y=(M,D=!1)=>{var Ce,ke;const G=oe(M);return G>=0&&!((Ce=F[G])!=null&&Ce.disabled)?F[G].value:D?(ke=K==null?void 0:K.value)!=null?ke:null:M!=null?M:null},Q=Y(b?b.get():o(e,"value")?l(e.value):(me=e.defaultValue)!=null?me:e.default,!0),[le,re]=JSswift.reactive.signal(Q),Z=ie(["cms-clear-set","cms-tabs","cms-singularity",E,`variant-${k}`,ge(e.dense,"dense"),ge(S,"fill"),ge(I,"wrap"),ge(V,"disabled"),e.class]),ne=JSswift.omit(e,["tabs","items","value","defaultValue","default","model","orientation","orient","direction","variant","pills","soft","fill","navFill","stretch","wrap","dense","disabled","slots","empty","gap","tabGap","align","justify","color","state","navClass","navStyle","barClass","barStyle","tabClass","tabStyle","itemClass","itemStyle","class","style"]);ne.class=Z,ne.style={...e.style||{}},e.gap!=null&&(ne.style["--cms-tabs-gap"]=Be(e.gap)),e.tabGap!=null&&(ne.style["--cms-tabs-tab-gap"]=Be(e.tabGap));const T=c((ye=e.color)!=null?ye:e.state);T&&(ne.style["--cms-tabs-accent"]=T);const j=_.div(ne),q=_.div({class:ie(["cms-tabs-bar",e.barClass]),style:{alignItems:e.align||(E==="vertical"?"stretch":"center"),justifyContent:e.justify||"flex-start",...e.barStyle||{}}}),ce=_.div({class:ie(["cms-tabs-nav",e.navClass]),style:e.navStyle||null,role:"tablist","aria-orientation":E}),J=[],g=()=>oe(le()),f=()=>{const M=g();return M>=0?F[M]:null},p=()=>({tabs:F,value:le(),active:le(),activeIndex:g(),activeTab:f(),orientation:E,variant:k,select:(M,D)=>h(M,{event:D,emit:!0}),next:()=>B(),prev:()=>U()}),O=(M,D,G)=>({...p(),tab:M,index:D,active:G,disabled:!!M.disabled,select:Ce=>z(D,{event:Ce,emit:!0})}),W=M=>{var G;const D=(G=J[M])==null?void 0:G.btn;!D||typeof D.focus!="function"||requestAnimationFrame(()=>D.focus())},u=M=>{const D=oe(M);j.dataset.value=M==null?"":String(M),j.dataset.activeIndex=D>=0?String(D):"",J.forEach(({btn:G,item:Ce,tab:ke,index:fe})=>{const ve=fe===D;Ce.classList.toggle("active",ve),Ce.classList.toggle("disabled",!!(ke.disabled||V)),G.classList.toggle("active",ve),G.setAttribute("aria-selected",ve?"true":"false"),G.setAttribute("tabindex",ve?"0":"-1")})},x=M=>{re(M),u(M)},h=(M,D={})=>{if(V)return null;const G=oe(M);return G<0?null:z(G,D)},z=(M,D={})=>{var ve,pe;const G=F[M];if(!G||G.disabled||V)return null;const Ce=G.value,ke=le(),fe=!a(ke,Ce);return x(Ce),b&&!a(b.get(),Ce)&&b.set(Ce),D.focus&&W(M),D.event&&((ve=G.onClick)==null||ve.call(G,Ce,D.event,G,M)),fe&&D.emit!==!1&&((pe=e.onChange)==null||pe.call(e,Ce,G,D.event||null,M)),G},B=()=>{const M=H(g()<0?-1:g(),1);M>=0&&z(M,{emit:!0,focus:!0})},U=()=>{const M=g()<0?0:g(),D=H(M,-1);D>=0&&z(D,{emit:!0,focus:!0})},de=(M,D)=>{var d,i,C,se,_e,Ne;const G=D===g(),Ce=O(M,D,G),ke=`${$}-tab-${D}`,fe=M.iconFallback!=null?typeof M.iconFallback=="string"?he.Icon({name:M.iconFallback,size:(C=(i=(d=M.iconSize)!=null?d:M.size)!=null?i:e.size)!=null?C:null}):M.iconFallback:null,ve=P(s,"icon",Ce,fe),pe=P(null,"default",{},JSswift.ui.renderSlot(s,"label",Ce,M.labelFallback)),ze=P(s,"note",Ce,M.noteFallback),Me=P(s,"badge",Ce,M.badgeFallback),Pe=_.span({class:"cms-tabs-tab-inner"},ve.length?_.span({class:"cms-tabs-tab-icon"},...ve):null,_.span({class:"cms-tabs-tab-copy"},_.span({class:"cms-tabs-tab-label"},...pe.length?pe:[""]),ze.length?_.span({class:"cms-tabs-tab-note"},...ze):null),Me.length?_.span({class:"cms-tabs-tab-badge"},...Me):null),Ae=P(s,"tab",{...Ce,tabId:ke,label:pe,icon:ve,note:ze,badge:Me},Pe),y=ue=>{var Je;if(M.disabled||V)return;const Se=ue.key;if(Se==="Enter"||Se===" "){ue.preventDefault(),z(D,{event:ue,emit:!0});return}if(Se==="Home"){ue.preventDefault();const He=F.findIndex(Ge=>!Ge.disabled);He>=0&&z(He,{event:ue,emit:!0,focus:!0});return}if(Se==="End"){ue.preventDefault();let He=-1;for(let Ge=F.length-1;Ge>=0;Ge-=1)if(!((Je=F[Ge])!=null&&Je.disabled)){He=Ge;break}He>=0&&z(He,{event:ue,emit:!0,focus:!0});return}const Fe=E==="vertical"?["ArrowUp"]:["ArrowLeft"],Ee=E==="vertical"?["ArrowDown"]:["ArrowRight"];if(Fe.includes(Se)){ue.preventDefault();const He=H(D,-1);He>=0&&z(He,{event:ue,emit:!0,focus:!0});return}if(Ee.includes(Se)){ue.preventDefault();const He=H(D,1);He>=0&&z(He,{event:ue,emit:!0,focus:!0})}},X=c((se=M.color)!=null?se:M.state),xe=_.div({class:ie(["cms-tabs-item",ge(G,"active"),ge(M.disabled||V,"disabled"),e.itemClass,M.itemClass]),style:{...X?{"--cms-tabs-item-accent":X}:{},...e.itemStyle||{},...M.itemStyle||{}},"data-name":String(M.value)}),R=he.Btn({class:ie(["cms-tabs-tab",ge(G,"active"),ge(M.disabled||V,"disabled"),e.tabClass,M.tabClass||M.class]),type:"button",id:ke,role:"tab",disabled:!!(M.disabled||V),"aria-selected":G?"true":"false",tabindex:G?"0":"-1",size:(Ne=(_e=M.size)!=null?_e:e.size)!=null?Ne:null,style:{...e.tabStyle||{},...M.tabStyle||{}},onClick:ue=>{z(D,{event:ue,emit:!0})},onKeydown:y},...Ae);return xe.appendChild(R),xe.appendChild(_.span({class:"tab-indicator"})),J[D]={tab:M,index:D,item:xe,btn:R},xe};if(F.length){const M=F.map((G,Ce)=>de(G,Ce)),D=JSswift.ui.renderSlot(s,"nav",{...p(),nodes:M},M);P(null,"default",{},D).forEach(G=>ce.appendChild(G))}else P(s,"empty",p(),(be=e.empty)!=null?be:_.div({class:"cms-tabs-empty"},"Nessuna tab disponibile.")).forEach(M=>ce.appendChild(M));const L=p(),m=[...P(null,"default",{},JSswift.ui.renderSlot(s,"extra",L,null)),...P(s,"default",L,n)];return q.appendChild(ce),m.length&&q.appendChild(_.div({class:"cms-tabs-extra"},...m)),j.appendChild(q),x(Q),b?b.watch(M=>{x(Y(M,!0))},"UI.Tabs:watch"):at(e.value)&&je.reactive.effect(()=>{x(Y(l(e.value),!0))},"UI.Tabs:value"),j._getValue=()=>le(),j._setValue=M=>h(M,{emit:!0}),j._select=M=>h(M,{emit:!0}),j._next=()=>B(),j._prev=()=>U(),j._getTabs=()=>F.slice(),Ye(j,e),j},he.RouteTab=(...t)=>{var W,u,x,h,z,B,U,de,L,m,N,A,ee,me,ye;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=JSswift.router||(je==null?void 0:je.router)||null,r=be=>Object.prototype.hasOwnProperty.call(e,be),v=r("active")||r("selected"),c=be=>{const M=String(l(be)||"").toLowerCase();return M==="pill"||M==="pills"?"pills":M==="soft"||M==="card"?"soft":"line"},a=be=>{var D;const M=l(be);return M==null||M===""?null:(D=JSswift.uiColors)!=null&&D.includes(M)?`var(--cms-${M})`:String(M)},b=be=>{if(be==null||be==="")return"";try{return new URL(String(be),window.location.origin).pathname||""}catch(M){return String(be).split(/[?#]/)[0]||""}},E=be=>l(e.external)===!0?!0:be?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(be)):!1,k=()=>{var be;return l((be=e.href)!=null?be:e.to)||"#"},S=()=>{var be;return l((be=e.to)!=null?be:e.href)||""},I=()=>{try{if(o!=null&&o.current)return o.current().pathname||window.location.pathname||""}catch(be){}return window.location.pathname||""},V=()=>{var fe,ve,pe;const be=S();if(!be)return!1;const M=l((ve=(fe=e.match)!=null?fe:e.activeMatch)!=null?ve:e.routeMatch),D=String(l((pe=e.matchMode)!=null?pe:e.startsWith?"startsWith":e.exact?"exact":"")||"").toLowerCase(),G=I();if(typeof M=="function")return!!M({currentPath:G,to:be,href:k(),router:o,props:e});if(M instanceof RegExp)return M.test(G);const Ce=b(typeof M=="string"&&!["exact","startsWith","prefix","section"].includes(M.toLowerCase())?M:be);if(!Ce)return!1;const ke=D||(typeof M=="string"&&["startsWith","prefix","section"].includes(M.toLowerCase())?"startsWith":"exact");return ke==="startswith"||ke==="prefix"||ke==="section"?G===Ce||G.startsWith(`${Ce}/`):o!=null&&o.isActive?!!o.isActive(be):G===Ce},$=()=>!!l(e.disabled);let ae=null;const F=()=>{var be;return ae!=null?!!ae:v?!!l((be=e.active)!=null?be:e.selected):V()},K=c(e.variant||(e.pills?"pills":e.soft?"soft":"line")),oe=!l(e.color)&&l(e.state)?gt(l(e.state)):"",H=oe?`cms-state-${oe}`:"",Y=JSswift.omit(e,["active","selected","label","title","text","to","icon","iconRight","iconSize","note","subtitle","caption","description","badge","counter","count","aside","trailing","slots","state","color","dense","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","variant","pills","soft","block","fill","match","matchMode","activeMatch","routeMatch","exact","startsWith","external","onNavigate"]);Y.href=k(),Y.class=ie(["cms-route-tab","cms-clear-set","cms-singularity",`variant-${K}`,ge((W=e.block)!=null?W:e.fill,"block"),ge(e.dense,"dense"),H,e.class]),Y.style={...e.style||{}};const Q=a((u=e.color)!=null?u:e.state);Q&&(Y.style["--cms-route-tab-accent"]=Q);const le=(h=(x=e.iconSize)!=null?x:e.size)!=null?h:null,re=(be,M)=>{const D=l(be);return D==null||D===!1||D===""?null:typeof D=="string"?he.Icon({name:D,size:le}):JSswift.ui.slot(D,{as:M})},Z=()=>({active:F(),disabled:$(),href:k(),to:S(),external:E(k()),navigate:be=>{var G,Ce;if($())return!1;const M=S();return!E(k())&&M&&(o!=null&&o.navigate)?(be!=null&&be.preventDefault&&be.preventDefault(),o.navigate(M),(G=e.onNavigate)==null||G.call(e,M,be||null),!0):((Ce=e.onNavigate)==null||Ce.call(e,M||k(),be||null),!1)}}),ne=P(s,"icon",Z(),re(e.icon,"icon")),T=P(s,"label",Z(),(U=(B=(z=e.label)!=null?z:e.title)!=null?B:e.text)!=null?U:n),j=P(s,"note",Z(),(m=(L=(de=e.note)!=null?de:e.subtitle)!=null?L:e.caption)!=null?m:e.description),q=P(s,"badge",Z(),(A=(N=e.badge)!=null?N:e.counter)!=null?A:e.count),ce=P(s,"aside",Z(),(me=(ee=e.aside)!=null?ee:e.trailing)!=null?me:re(e.iconRight,"iconRight")),J=P(s,"default",Z(),(ye=e.content)!=null?ye:e.body),g=_.span({class:"cms-route-tab-inner"},ne.length?_.span({class:"cms-route-tab-icon"},...ne):null,_.span({class:"cms-route-tab-copy"},_.span({class:"cms-route-tab-label"},...T.length?T:[S()||k()||""]),j.length?_.span({class:"cms-route-tab-note"},...j):null,J.length?_.span({class:"cms-route-tab-extra"},...J):null),q.length?_.span({class:"cms-route-tab-badge"},...q):null,ce.length?_.span({class:"cms-route-tab-aside"},...ce):null),f=_.a(Y,g);Ye(f,e);const p=()=>{const be=F(),M=$(),D=k(),G=E(D);f.classList.toggle("active",be),f.classList.toggle("is-disabled",M),f.classList.toggle("is-external",G),be?f.setAttribute("aria-current",String(l(e.ariaCurrent)||"page")):f.removeAttribute("aria-current"),f.setAttribute("href",D||"#"),M?(f.setAttribute("aria-disabled","true"),f.tabIndex=-1):(f.removeAttribute("aria-disabled"),!r("tabIndex")&&!r("tabindex")&&f.removeAttribute("tabindex")),S()?f.dataset.to=String(S()):delete f.dataset.to,G&&f.target==="_blank"&&!f.rel&&(f.rel="noopener noreferrer")},O=e.onClick;return f.onclick=be=>{if(O==null||O(be),!be.defaultPrevented){if($()){be.preventDefault();return}Z().navigate(be)}},!v&&S()&&(o!=null&&o.subscribe)&&o.subscribe(()=>p()),JSswift.reactive.effect(()=>{p()},"UI.RouteTab:render"),f._isActive=()=>F(),f._setActive=be=>(ae=be==null?null:!!be,p(),f),f._navigate=be=>Z().navigate(be),f},he.Breadcrumbs=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=JSswift.router||(je==null?void 0:je.router)||null,r=Nt(e.model,"UI.Breadcrumbs:model"),v=Xe(e.size,()=>{var j;const T=l(e.size);return typeof T=="string"&&((j=JSswift.uiSizes)!=null&&j.includes(T))?`cms-size-${T}`:""}),c=Xe(e.variant,()=>{const T=String(l(e.variant||(e.pills?"pills":e.soft?"soft":"line"))||"").toLowerCase();return T==="pill"||T==="pills"?"variant-pills":T==="soft"||T==="card"?"variant-soft":"variant-line"}),a=Xe([e.wrap,e.nowrap],()=>l(e.wrap)===!1||l(e.nowrap)?"no-wrap":""),b=_.nav({class:ie(["cms-breadcrumbs","cms-clear-set",v,c,a,ge(e.dense,"dense"),e.class]),style:{...e.style||{}},role:"navigation","aria-label":e.ariaLabel||"Breadcrumb"}),E=_.div({class:"cms-breadcrumbs-before"}),k=_.ol({class:"cms-breadcrumbs-list"}),S=_.div({class:"cms-breadcrumbs-after"});b.appendChild(E),b.appendChild(k),b.appendChild(S);const I=T=>{var q;const j=l(T);return j==null||j===""?null:(q=JSswift.uiColors)!=null&&q.includes(j)?`var(--cms-${j})`:String(j)},V=T=>{var q;if(!T)return!1;if(l(T.external)===!0)return!0;const j=l((q=T.href)!=null?q:T.to);return j?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(j)):!1},$=T=>T!=null&&T.nodeType&&T.cloneNode?T.cloneNode(!0):T,ae=(T,j)=>{T.innerHTML="",j.forEach(q=>T.appendChild(q))},F=(T,j,q,ce,J=null)=>{const g=JSswift.ui.getSlot(T,j)!=null?P(T,j,q,ce):[];return g.length?g:J&&JSswift.ui.getSlot(T,J)!=null?P(T,J,q,ce):P(null,"default",q,ce)},K=(T,j,q)=>{const ce=l(T);return ce==null||ce===!1||ce===""?null:typeof ce=="string"?he.Icon({name:ce,size:j}):JSswift.ui.slot(ce,{as:q})},oe=()=>{var J,g;const T=r?r.get():l((g=(J=e.items)!=null?J:e.value)!=null?g:e.breadcrumbs),j=[],q=f=>{if(!(f==null||f===!1)){if(Array.isArray(f)){f.forEach(q);return}if(typeof f=="string"||typeof f=="number"){j.push({label:String(f)});return}if(f!=null&&f.nodeType||typeof f=="function"){j.push({label:f});return}j.push(f)}},ce=l(e.home);return ce&&q(ce===!0?{label:"Home",to:"/",icon:"home"}:ce),q(T),!j.length&&(n!=null&&n.length)&&n.forEach(f=>q(f)),j.filter(f=>!l(f==null?void 0:f.hidden))},H=T=>{const j=T.findIndex(q=>{var ce,J;return!!l((J=(ce=q==null?void 0:q.current)!=null?ce:q==null?void 0:q.active)!=null?J:q==null?void 0:q.selected)});return j>-1?j:l(e.autoCurrent)===!1?-1:T.length?T.length-1:-1},Y=T=>{var p,O,W,u,x,h,z;const j=Number(l((W=(O=(p=e.max)!=null?p:e.maxItems)!=null?O:e.collapseAfter)!=null?W:e.collapse)),q=Number.isFinite(j)?Math.max(0,Math.trunc(j)):0;if(!q||q<3||T.length<=q)return T.map((B,U)=>({type:"item",item:B,index:U,key:`item-${U}`}));let ce=Number(l((x=(u=e.leadingCount)!=null?u:e.keepStart)!=null?x:1)),J=Number(l((z=(h=e.trailingCount)!=null?h:e.keepEnd)!=null?z:Math.max(1,q-2)));if(ce=Number.isFinite(ce)?Math.max(1,Math.trunc(ce)):1,J=Number.isFinite(J)?Math.max(1,Math.trunc(J)):Math.max(1,q-2),ce+J+1>q&&(J=Math.max(1,q-ce-1),ce+J+1>q&&(ce=Math.max(1,q-J-1))),ce+J>=T.length)return T.map((B,U)=>({type:"item",item:B,index:U,key:`item-${U}`}));const g=[];for(let B=0;B<ce;B++)g.push({type:"item",item:T[B],index:B,key:`item-${B}`});const f=T.slice(ce,T.length-J);g.push({type:"collapsed",key:`collapsed-${ce}-${T.length-J}`,items:f,from:ce,to:T.length-J-1});for(let B=T.length-J;B<T.length;B++)g.push({type:"item",item:T[B],index:B,key:`item-${B}`});return g},Q=(T,j=null)=>{var J,g,f,p,O;if(!T)return!1;const q=l((J=T.href)!=null?J:T.to)||"",ce=l(T.to)||"";return!V(T)&&ce&&(o!=null&&o.navigate)?(j!=null&&j.preventDefault&&j.preventDefault(),o.navigate(ce),(g=T.onNavigate)==null||g.call(T,ce,j||null),(f=e.onNavigate)==null||f.call(e,ce,T,j||null),!0):((p=T.onNavigate)==null||p.call(T,ce||q,j||null),(O=e.onNavigate)==null||O.call(e,ce||q,T,j||null),!1)},le=(T,j,q)=>{var O,W,u;const ce=T,J=q[j+1]||null,g={index:j,entry:T,previous:ce,next:J},f=$(l((u=(W=(T==null?void 0:T.type)==="item"?(O=T.item)==null?void 0:O.separator:null)!=null?W:e.separator)!=null?u:"/")),p=F(s,"separator",g,f);return _.li({class:"cms-breadcrumbs-separator-item","aria-hidden":"true"},_.span({class:"cms-breadcrumbs-separator"},...p))},re=(T,j,q)=>{const ce={type:"collapsed",collapsed:!0,items:j,hiddenItems:T.items,currentIndex:q,from:T.from,to:T.to},J=_.span({class:"cms-breadcrumb cms-breadcrumb-collapsed"},_.span({class:"cms-breadcrumb-inner"},_.span({class:"cms-breadcrumb-copy"},_.span({class:"cms-breadcrumb-label"},String(l(e.collapsedLabel)||"\u2026"))))),g=F(s,"collapsed",ce,J,"item");return _.li({class:"cms-breadcrumbs-entry is-collapsed"},...g)},Z=(T,j,q,ce)=>{var fe,ve,pe,ze,Me,Pe,Ae,y,X,xe,R,d,i,C,se,_e,Ne,ue,Se,Fe,Ee,Je,He,Ge,qe,Ze;const J=T.item||{},g=J.slots?{...s,...J.slots}:s,f=l((fe=J.href)!=null?fe:J.to)||"",p=!!l(J.disabled),O=T.index===q,W=(ze=(pe=(ve=J.iconSize)!=null?ve:e.itemSize)!=null?pe:e.size)!=null?ze:null,u=I((Ae=(Pe=(Me=J.color)!=null?Me:J.state)!=null?Pe:e.color)!=null?Ae:e.state),x=!l(J.color)&&l(J.state)?gt(l(J.state)):"",h=(d=(R=(xe=(X=(y=J.label)!=null?y:J.title)!=null?X:J.text)!=null?xe:J.to)!=null?R:J.href)!=null?d:"",z=(se=(C=(i=J.note)!=null?i:J.subtitle)!=null?C:J.caption)!=null?se:J.description,B=(Ne=(_e=J.badge)!=null?_e:J.counter)!=null?Ne:J.count,U=(Se=(ue=J.aside)!=null?ue:J.trailing)!=null?Se:K(J.iconRight,W,"iconRight"),de=(Fe=J.content)!=null?Fe:J.body,L={item:J,index:T.index,visibleIndex:ce,total:j.length,current:O,active:O,disabled:p,href:f,to:l(J.to)||"",external:V(J),isFirst:T.index===0,isLast:T.index===j.length-1,navigate:et=>Q(J,et)},m=F(g,"icon",L,K(J.icon,W,"icon")),N=F(g,"label",L,h),A=F(g,"note",L,z),ee=F(g,"badge",L,B),me=F(g,"aside",L,U),ye=F(g,"default",L,de),be=_.span({class:"cms-breadcrumb-inner"},m.length?_.span({class:"cms-breadcrumb-icon"},...m):null,_.span({class:"cms-breadcrumb-copy"},_.span({class:"cms-breadcrumb-label"},...N.length?N:[f||""]),A.length?_.span({class:"cms-breadcrumb-note"},...A):null,ye.length?_.span({class:"cms-breadcrumb-extra"},...ye):null),ee.length?_.span({class:"cms-breadcrumb-badge"},...ee):null,me.length?_.span({class:"cms-breadcrumb-aside"},...me):null),M=!p&&(!O||!!l((Ee=J.linkCurrent)!=null?Ee:e.linkCurrent)),D={class:ie(["cms-breadcrumb","cms-clear-set","cms-singularity",ge(O,"is-current"),ge(O,"active"),ge(p,"is-disabled"),x?`cms-state-${x}`:"",J.class]),style:{...J.style||{}},"aria-current":O?String(l((Je=J.ariaCurrent)!=null?Je:e.ariaCurrent)||"page"):null};u&&(D.style["--cms-breadcrumb-accent"]=u);let G=null;M&&f?(G=_.a({...D,href:f,target:J.target,rel:J.rel,onClick:et=>{var We,st;(We=J.onClick)==null||We.call(J,et,L),(st=e.onItemClick)==null||st.call(e,J,L,et),!et.defaultPrevented&&L.navigate(et)}},be),L.external&&G.target==="_blank"&&!G.rel&&(G.rel="noopener noreferrer")):M&&typeof J.onClick=="function"?G=_.button({...D,type:J.type||"button",onClick:et=>{var We,st;(We=J.onClick)==null||We.call(J,et,L),(st=e.onItemClick)==null||st.call(e,J,L,et)}},be):G=_.span({...D,"aria-disabled":p?"true":null},be),Ye(G,{size:(Ge=(He=J.size)!=null?He:e.itemSize)!=null?Ge:e.size,radius:(qe=J.radius)!=null?qe:e.radius,gradient:(Ze=J.gradient)!=null?Ze:e.gradient});const ke=F(g,"item",L,G);return _.li({class:ie(["cms-breadcrumbs-entry",ge(O,"is-current"),ge(p,"is-disabled")])},...ke)},ne=()=>{var g;const T=oe(),j=H(T),q=Y(T),ce=I((g=e.color)!=null?g:e.state);b.classList.toggle("is-empty",T.length===0),ce?b.style.setProperty("--cms-breadcrumb-accent",ce):b.style.removeProperty("--cms-breadcrumb-accent");const J={items:T,visibleItems:q,currentIndex:j,count:T.length,collapsed:q.some(f=>f.type==="collapsed")};if(ae(E,F(s,"before",J,e.before)),ae(S,F(s,"after",J,e.after)),k.innerHTML="",!T.length){const f=F(s,"empty",J,e.empty);f.length&&k.appendChild(_.li({class:"cms-breadcrumbs-entry is-empty"},...f));return}q.forEach((f,p)=>{p>0&&k.appendChild(le(q[p-1],p-1,q)),k.appendChild(f.type==="collapsed"?re(f,T,j):Z(f,T,j,p))})};return je.reactive.effect(()=>{ne()},"UI.Breadcrumbs:render"),b.getItems=()=>oe(),b.getVisibleItems=()=>Y(oe()),b.refresh=()=>(ne(),b),b.setItems=T=>(r?r.set(T):e.items=T,ne(),b),Ye(b,e),b},he.Pagination=(...t)=>{const{props:e}=JSswift.uiNormalizeArgs(t),n=e.slots||{},s=Nt(e.model,"UI.Pagination:model"),o=Xe(e.size,()=>{const u=l(e.size);return typeof u=="string"&&_n[u]?`cms-size-${u}`:""}),r=_.nav({class:ie(["cms-pagination","cms-clear-set",o,ge(e.dense,"dense"),ge(e.simple,"is-simple"),ge(e.disabled,"is-disabled"),e.class]),style:{...e.style||{}},role:"navigation","aria-label":e.ariaLabel||"Pagination"}),v=_.div({class:"cms-pagination-controls"}),c=_.div({class:"cms-pagination-start"}),a=_.div({class:"cms-pagination-pages"}),b=_.div({class:"cms-pagination-end"}),E=_.div({class:"cms-pagination-summary"});v.appendChild(c),v.appendChild(a),v.appendChild(b),r.appendChild(v),r.appendChild(E);let k=1,S=1;const I=(u,x=0)=>{const h=l(u);if(h==null||h==="")return x;const z=Number(h);return Number.isFinite(z)?Math.trunc(z):x},V=(u,x=$())=>{const h=Number(u),z=Number.isFinite(h)?Math.trunc(h):1;return Math.min(Math.max(z||1,1),Math.max(1,x||1))},$=()=>{var z,B,U,de,L,m,N;const u=I((U=(B=(z=e.max)!=null?z:e.pages)!=null?B:e.pageCount)!=null?U:e.totalPages,0);if(u>0)return u;const x=I((L=(de=e.total)!=null?de:e.totalItems)!=null?L:e.count,0),h=I((N=(m=e.pageSize)!=null?m:e.perPage)!=null?N:e.limit,0);return x>=0&&h>0?Math.max(1,Math.ceil(x/h)):1},ae=()=>{var u,x,h;return I(s?s.get():(h=(x=(u=e.page)!=null?u:e.value)!=null?x:e.current)!=null?h:e.currentPage,1)},F=()=>{var u,x;return Math.max(0,I((x=(u=e.siblings)!=null?u:e.siblingCount)!=null?x:e.window,1))},K=()=>{var u,x;return Math.max(0,I((x=(u=e.boundaryCount)!=null?u:e.boundaries)!=null?x:e.edges,1))},oe=()=>!!l(e.disabled),H=()=>{var u;return l((u=e.showSummary)!=null?u:e.showLabel)!==!1},Y=()=>l(e.showPages)!==!1&&!l(e.simple),Q=()=>l(e.showPrev)!==!1,le=()=>l(e.showNext)!==!1,re=()=>!!l(e.showEdges),Z=()=>{const u=l(e.showFirst);return u==null?re():!!u},ne=()=>{const u=l(e.showLast);return u==null?re():!!u},T=()=>!!l(e.hideOnSinglePage),j=()=>{var h,z;const u=l((z=(h=e.total)!=null?h:e.totalItems)!=null?z:e.count);if(u==null||u==="")return null;const x=Number(u);return Number.isFinite(x)?Math.max(0,Math.trunc(x)):null},q=()=>{var h,z;const u=l((z=(h=e.pageSize)!=null?h:e.perPage)!=null?z:e.limit);if(u==null||u==="")return null;const x=Number(u);return Number.isFinite(x)&&x>0?Math.trunc(x):null},ce=(u=k,x=S)=>{const h=j(),z=q(),B=h!=null&&z?h===0?0:(u-1)*z+1:null,U=h!=null&&z?Math.min(h,u*z):null;return{page:u,value:u,current:u,currentPage:u,pages:x,max:x,total:h,pageSize:z,from:B,to:U,disabled:oe(),isFirst:u<=1,isLast:u>=x,canPrev:u>1,canNext:u<x,setPage:(de,L)=>W(de,L),prev:de=>W(u-1,de),next:de=>W(u+1,de),first:de=>W(1,de),last:de=>W(x,de)}},J=(u,x)=>{if(x<=0)return[];const h=[],z=new Set,B=K(),U=F();for(let L=1;L<=Math.min(B,x);L++)z.add(L);for(let L=Math.max(1,u-U);L<=Math.min(x,u+U);L++)z.add(L);for(let L=Math.max(1,x-B+1);L<=x;L++)z.add(L);let de=0;for(let L=1;L<=x;L++)z.has(L)&&(de&&L-de>1&&h.push({type:"ellipsis",key:`ellipsis-${de}-${L}`}),h.push({type:"page",page:L,key:`page-${L}`}),de=L);return h.length||h.push({type:"page",page:1,key:"page-1"}),h},g=(u,x,h,z=null)=>{const B=JSswift.ui.getSlot(n,u)!=null?P(n,u,h,x):[];return B.length?B:z&&JSswift.ui.getSlot(n,z)!=null?P(n,z,h,x):P(null,"default",h,x)},f=(u,x)=>{u.innerHTML="",x.forEach(h=>u.appendChild(h))},p=(u,x,h,z={})=>{var U;const B={...ce(),kind:u,active:!!z.active};return he.Btn({class:ie(["cms-pagination-btn",`cms-pagination-${u}`,ge(z.active,"active"),z.class]),size:e.itemSize||e.size||(e.dense?"sm":"md"),color:z.active?e.color||e.state||"primary":z.color||null,outline:z.active?!1:(U=z.outline)!=null?U:!0,disabled:oe()||!!z.disabled,"aria-current":z.active?"page":null,onClick:de=>{oe()||z.disabled||h==null||h(de)}},...g(u,x,B,u==="summary"?"label":u==="page"?"item":null))},O=(u,x)=>{k=V(u,x),S=Math.max(1,x||1);const h=ce(k,S);r.style.display=T()&&S<=1?"none":"",E.style.display=H()?"":"none",a.style.display=Y()?"":"none",c.innerHTML="",a.innerHTML="",b.innerHTML="";const z=g("start",e.start,h);z.length&&c.appendChild(_.div({class:"cms-pagination-extra cms-pagination-extra-start"},...z)),Z()&&c.appendChild(p("first","\xAB",de=>W(1,de),{disabled:k<=1})),Q()&&c.appendChild(p("prev","Prev",de=>W(k-1,de),{disabled:k<=1})),Y()&&J(k,S).forEach(de=>{if(de.type==="ellipsis"){const N={...h,kind:"ellipsis"},A=g("ellipsis","\u2026",N);a.appendChild(_.span({class:"cms-pagination-ellipsis","aria-hidden":"true"},...A));return}const L=de.page,m={...h,page:L,value:L,item:de,active:L===k};a.appendChild(he.Btn({class:ie(["cms-pagination-btn","cms-pagination-page-btn",ge(L===k,"active")]),size:e.itemSize||e.size||(e.dense?"sm":"md"),color:L===k?e.color||e.state||"primary":null,outline:L!==k,disabled:oe(),"aria-current":L===k?"page":null,onClick:N=>W(L,N)},...g("page",String(L),m,"item")))}),le()&&b.appendChild(p("next","Next",de=>W(k+1,de),{disabled:k>=S})),ne()&&b.appendChild(p("last","\xBB",de=>W(S,de),{disabled:k>=S}));const B=g("end",e.end,h);B.length&&b.appendChild(_.div({class:"cms-pagination-extra cms-pagination-extra-end"},...B));let U=`Pagina ${k} di ${S}`;h.total!=null&&h.pageSize&&(U=h.total===0?"0 risultati":`${h.from}-${h.to} di ${h.total}`),f(E,g("summary",U,h,"label"))},W=(u,x=null)=>{var B,U;const h=$(),z=V(u,h);return z===k&&h===S||(O(z,h),s&&s.get()!==z&&s.set(z),(B=e.onChange)==null||B.call(e,z,ce(z,h),x),(U=e.onPageChange)==null||U.call(e,z,ce(z,h),x)),z};return je.reactive.effect(()=>{const u=$(),x=ae(),h=V(x,u);O(h,u),s&&x!==h&&s.set(h)},"UI.Pagination:sync"),r.getPage=()=>k,r.getPages=()=>S,r.setPage=u=>W(u),r.prev=()=>W(k-1),r.next=()=>W(k+1),r.first=()=>W(1),r.last=()=>W(S),Ye(r,e),r},he.Spinner=(...t)=>{var oe;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(H,Y,Q)=>{if(at(H))return()=>{const re=l(H);if(re==null||re===!1||re==="")return Q;const Z=Y?Y(re):re;return Z==null||Z===""?Q:Z};if(H==null||H===!1||H==="")return Q;const le=Y?Y(H):H;return le==null||le===""?Q:le},r=H=>{if(H==null||H===!1||H===""||gt(H))return"";const Q=String(H).trim();return Q?Q.startsWith("#")||Q.startsWith("rgb(")||Q.startsWith("rgba(")||Q.startsWith("hsl(")||Q.startsWith("hsla(")||Q.startsWith("var(")?Q:Zt(Q)?`var(--cms-${Q})`:Q:""},v=Xe(e.state,()=>{const H=gt(l(e.state));return H?`cms-state-${H}`:""}),c=ie(["cms-spinner",v,ge(e.vertical,"vertical"),ge(e.reverse,"reverse"),ge(e.center,"center"),ge(e.block,"block"),ge(e.pause||e.paused,"paused"),e.class]),a=JSswift.omit(e,["ariaLabel","block","center","color","indicatorClass","indicatorStyle","label","note","pause","paused","reverse","size","slots","speed","state","thickness","trackColor","vertical"]);a.class=c;const b={...e.style||{}};e.color!=null&&Object.prototype.hasOwnProperty.call(b,"backgroundColor")&&delete b.backgroundColor,a.style=b,a.role==null&&(a.role="status"),a["aria-live"]==null&&(a["aria-live"]="polite"),a["aria-busy"]==null&&(a["aria-busy"]="true");const E={props:e},k=P(s,"label",E,e.label),S=P(s,"default",E,n),I=P(s,"note",E,e.note),V=k.length||S.length||I.length;if(!V){const H=l((oe=e.ariaLabel)!=null?oe:e["aria-label"]);H?a["aria-label"]=H:a["aria-label"]==null&&(a["aria-label"]="Loading")}const $=_.span({class:ie(["cms-spinner-indicator",e.indicatorClass]),style:{"--cms-spinner-size":o(e.size,Be,"18px"),"--cms-spinner-thickness":o(e.thickness,Be,"2px"),"--cms-spinner-speed":o(e.speed,H=>typeof H=="number"?`${H}ms`:String(H),"900ms"),"--cms-spinner-color":o(e.color,r,"var(--set-border-color, var(--cms-primary))"),"--cms-spinner-track":o(e.trackColor,r,"color-mix(in srgb, var(--cms-spinner-color) 18%, transparent)"),...e.indicatorStyle||{}},"aria-hidden":"true"}),ae=P(s,"indicator",E,$),F=[];ae.length&&F.push(...ae),V&&F.push(_.div({class:"cms-spinner-content"},k.length?_.div({class:"cms-spinner-label"},...k):null,S.length?_.div({class:"cms-spinner-copy"},...S):null,I.length?_.div({class:"cms-spinner-note"},...I):null));const K=_.div(a,...F);return Ye(K,e),K},he.Progress=(...t)=>{var A,ee,me,ye,be,M,D,G,Ce,ke;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=e.model||(Lt(e.value)||Jt(e.value)?e.value:null),r=Nt(o,"UI.Progress:model"),v=Xe([e.state,e.color],()=>{const fe=gt(l(e.state)||l(e.color));return fe?`cms-state-${fe}`:""}),c=(fe,ve)=>{const pe=Number(fe);return Number.isFinite(pe)?pe:ve},a=()=>c(l(e.min),0),b=()=>{const fe=a(),ve=c(l(e.max),100);return ve<fe?fe:ve},E=()=>{var ve,pe;const fe=l((pe=(ve=e.height)!=null?ve:e.thickness)!=null?pe:e.size);return fe==null||fe===""?"8px":typeof fe=="number"?`${fe}px`:typeof fe=="string"?{xxs:"4px",xs:"6px",sm:"8px",md:"10px",lg:"12px",xl:"14px",xxl:"16px",xxxl:"18px"}[fe]||fe:"8px"},k=(fe,ve="")=>{const pe=l(fe);if(pe==null||pe===!1||pe==="")return ve;const ze=gt(pe);return ze?`var(--cms-${ze})`:typeof pe=="string"&&Zt(pe)?`var(--cms-${pe})`:String(pe)},S=fe=>{const ve=a(),pe=b(),ze=c(fe,ve);return Math.min(pe,Math.max(ve,ze))},I=fe=>{const ve=a(),ze=b()-ve;if(!ze)return 0;const Me=(S(fe)-ve)/ze,Pe=l(e.reverse)?1-Me:Me;return Math.max(0,Math.min(1,Pe))},V=fe=>{const ve=S(fe);return ve<Y()?Y():ve},$=(fe,ve,pe)=>{const ze=e.formatValue;if(typeof ze=="function"){const Me=ze(fe,ve,pe);if(Me!=null)return Me}return`${Math.round(ve)}%`},ae=fe=>{for(;fe.firstChild;)fe.removeChild(fe.firstChild)},F=(fe,ve,pe="flex")=>{ae(fe),(ve||[]).forEach(ze=>{if(!(ze==null||ze===!1)){if(ze instanceof Node){fe.appendChild(ze);return}fe.appendChild(document.createTextNode(String(ze)))}}),fe.style.display=fe.childNodes.length?pe:"none"},K=(fe,ve={})=>Ln(l(fe),ve),oe=(fe,ve,pe={})=>{var Me;const ze=l(fe);return ze==null||ze===!1||ze===""?[]:typeof ze=="string"?[he.Icon({name:ze,size:(Me=e.iconSize)!=null?Me:16})]:K(ze,{...pe,as:ve})},H=fe=>Jt(fe)||Lt(fe)?l(fe):typeof fe=="function"&&fe.length===0?fe():fe,[Y,Q]=JSswift.reactive.signal(S(r?r.get():(ee=(A=l(e.value))!=null?A:l(e.min))!=null?ee:0)),[le,re]=JSswift.reactive.signal(V((be=l(e.buffer))!=null?be:r?r.get():(ye=(me=l(e.value))!=null?me:l(e.min))!=null?ye:0)),Z=(fe,ve={})=>{const pe=S(fe);return Y()!==pe&&Q(pe),le()<pe&&re(pe),r&&ve.fromModel!==!0&&r.set(pe),pe},ne=fe=>{const ve=V(fe);return le()!==ve&&re(ve),ve},T=JSswift.omit(e,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor"]),j={width:l(e.width)||"100%",...e.style||{}},q=l(e.color);(q!=null||at(e.color))&&!gt(q||"")&&delete j.backgroundColor,T.class=ie(["cms-progress-wrap",ge(e.dense,"dense"),ge(e.reverse,"is-reverse"),ge(e.indeterminate,"is-indeterminate"),v,e.class]),T.style=j;const ce=_.div({class:"cms-progress-header"}),J=_.div({class:"cms-progress-heading"}),g=_.div({class:"cms-progress-label"}),f=_.div({class:"cms-progress-note"}),p=_.div({class:"cms-progress-value"});J.append(g,f),ce.append(J,p);const O=_.div({class:"cms-progress-body"}),W=_.span({class:"cms-progress-edge-label cms-progress-edge-label-left"}),u=_.div({class:"cms-progress",role:"progressbar"}),x=_.span({class:"cms-progress-buffer"}),h=_.span({class:ie(["cms-progress-bar","cms-singularity",v,ge(e.outline,"cms-outline"),ge(e.flat,"cms-flat"),ge(e.border,"cms-border"),ge(e.glossy,"cms-glossy"),ge(e.glow,"cms-glow"),ge(e.glass,"cms-glass"),ge(e.shadow,"cms-shadow"),Xe(e.shadow,()=>{const fe=Dn(l(e.shadow));return fe?`cms-shadow-${fe}`:""}),ge(e.gradient,"cms-gradient"),ge(e.textGradient,"cms-text-gradient"),ge(e.lightShadow,"cms-light-shadow"),ge(e.striped,"is-striped"),ge(e.animated||e.indeterminate,"is-animated")])}),z=_.span({class:"cms-progress-bar-label"});h.appendChild(z),u.append(x,h);const B=_.span({class:"cms-progress-edge-label cms-progress-edge-label-right"});O.append(W,u,B);const U=_.div(T,ce,O);Ye(h,e);const de=()=>{const fe=Y(),ve=I(fe)*100,pe={value:fe,percent:ve,min:a(),max:b(),buffer:le(),progress:U,track:u,bar:h,props:e},ze=P(s,"icon",pe,null),Me=ze.length?[]:oe(e.icon,"icon",pe),Pe=P(s,"label",pe,H(e.label)),Ae=Pe.length?Pe:P(s,"default",pe,n),y=P(s,"iconRight",pe,null),X=y.length?[]:oe(e.iconRight,"iconRight",pe),xe=P(s,"note",pe,H(e.note)),R=e.valueLabel!=null?H(e.valueLabel):$(fe,ve,pe),d=l(e.showValue),i=d===!0||e.valueLabel!=null||JSswift.ui.getSlot(s,"value")!=null?P(s,"value",pe,R):[];F(g,[...Me,...ze,...Ae,...X,...y],"inline-flex"),F(f,xe,"block"),F(p,d==="inside"?[]:i,"inline-flex"),ce.style.display=g.childNodes.length||f.childNodes.length||p.childNodes.length?"flex":"none"},L=()=>{var Pe,Ae;const fe=Y(),ve=I(fe)*100,pe={value:fe,percent:ve,min:a(),max:b(),buffer:le(),progress:U,track:u,bar:h,props:e},ze=H((Pe=e.startLabel)!=null?Pe:e.leftLabel),Me=H((Ae=e.endLabel)!=null?Ae:e.rightLabel);F(W,P(s,"startLabel",pe,ze),"inline-flex"),F(B,P(s,"endLabel",pe,Me),"inline-flex")},m=()=>{const fe=Y(),ve=I(fe)*100,pe={value:fe,percent:ve,min:a(),max:b(),buffer:le(),progress:U,track:u,bar:h,props:e},ze=l(e.showValue),Me=e.insideLabel!=null?H(e.insideLabel):$(fe,ve,pe),Pe=ze==="inside"||e.insideLabel!=null||JSswift.ui.getSlot(s,"inside")!=null?P(s,"inside",pe,Me):[];F(z,Pe,"inline-flex")},N=()=>{const fe=Y(),ve=le(),pe=a(),ze=b(),Me=I(fe)*100,Pe=I(ve)*100,Ae=k(e.color,""),y=k(e.trackColor,Ae?`color-mix(in srgb, ${Ae} 14%, transparent)`:"rgba(255,255,255,0.08)"),X=k(e.bufferColor,Ae?`color-mix(in srgb, ${Ae} 30%, transparent)`:"rgba(255,255,255,0.16)"),xe=l(e.ariaLabel),R=l(e.ariaValueText),d=!!l(e.indeterminate),i=l(e.radius);U.style.width=l(e.width)||"100%",U.style.setProperty("--cms-progress-height",E()),i!=null?typeof i=="number"?U.style.setProperty("--cms-progress-radius",`${i}px`):typeof i=="string"&&JSswift.uiSizes.includes(i)?U.style.setProperty("--cms-progress-radius",`var(--cms-r-${i})`):U.style.setProperty("--cms-progress-radius",String(i)):U.style.removeProperty("--cms-progress-radius"),u.style.background=y,x.style.background=X,x.style.width=`${Pe}%`,Ae&&!gt(l(e.state)||l(e.color))?(h.style.setProperty("--set-background-color",Ae),h.style.setProperty("--set-border-color",Ae),h.style.setProperty("--set-color",l(e.textColor)||"var(--cms-on-primary, #fff)")):gt(l(e.state)||l(e.color))?(h.style.removeProperty("--set-background-color"),h.style.removeProperty("--set-border-color"),h.style.removeProperty("--set-color")):(h.style.setProperty("--set-background-color","var(--cms-primary)"),h.style.setProperty("--set-border-color","var(--cms-primary)"),h.style.setProperty("--set-color",l(e.textColor)||"var(--cms-on-primary, #fff)")),d?(h.style.width="",u.removeAttribute("aria-valuenow"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuemax")):(h.style.width=`${Me}%`,u.setAttribute("aria-valuemin",String(pe)),u.setAttribute("aria-valuemax",String(ze)),u.setAttribute("aria-valuenow",String(fe))),xe!=null?u.setAttribute("aria-label",String(xe)):typeof l(e.label)=="string"?u.setAttribute("aria-label",String(l(e.label))):u.removeAttribute("aria-label"),R!=null?u.setAttribute("aria-valuetext",String(R)):d?u.removeAttribute("aria-valuetext"):u.setAttribute("aria-valuetext",$(fe,Me,{value:fe,percent:Me,min:pe,max:ze,buffer:ve,progress:U,track:u,bar:h,props:e})),U.classList.toggle("has-start-label",W.childNodes.length>0),U.classList.toggle("has-end-label",B.childNodes.length>0),U.classList.toggle("has-inside-label",z.childNodes.length>0)};return r?(Z(r.get(),{fromModel:!0}),r.watch(fe=>{Z(fe,{fromModel:!0})},"UI.Progress:watch")):at(e.value)?JSswift.reactive.effect(()=>{Z(l(e.value),{fromModel:!0})},"UI.Progress:value"):Z((D=(M=e.value)!=null?M:e.min)!=null?D:0,{fromModel:!0}),at(e.buffer)?JSswift.reactive.effect(()=>{ne(l(e.buffer))},"UI.Progress:buffer"):ne((ke=(Ce=(G=e.buffer)!=null?G:e.value)!=null?Ce:e.min)!=null?ke:0),JSswift.reactive.effect(()=>{de(),L(),m(),N()},"UI.Progress:render"),U._track=u,U._bar=h,U._buffer=x,U._getValue=Y,U._getBuffer=le,U._setValue=fe=>Z(fe),U._setBuffer=fe=>ne(fe),U},he.LoadingBar=function(...e){var m,N;const{props:n,children:s}=JSswift.uiNormalizeArgs(e),o=(A,ee)=>{const me=Number(A);return Number.isFinite(me)?me:ee},r=()=>o(l(n.min),0),v=()=>{const A=r(),ee=o(l(n.max),100);return ee<A?A:ee},c=A=>{const ee=r(),me=v(),ye=o(A,ee);return Math.min(me,Math.max(ee,ye))},a=(A,ee="")=>A==null||A===!1||A===""?ee:typeof A=="number"?`${A}px`:String(A),b=A=>{const ee=l(A);return!ee||ee===document?document.body:typeof ee=="string"?document.querySelector(ee)||document.body:ee&&ee.body instanceof HTMLElement?ee.body:ee instanceof HTMLElement?ee:document.body},E=n.model||(Lt(n.value)||Jt(n.value)?n.value:null),k=Nt(E,"UI.LoadingBar:model"),S=Lt(n.buffer)||Jt(n.buffer)?n.buffer:null,I=Nt(S,"UI.LoadingBar:buffer"),V=k?k.get():(m=l(n.value))!=null?m:r(),$=I?I.get():(N=l(n.buffer))!=null?N:V,[ae,F]=JSswift.reactive.signal(c(V)),[K,oe]=JSswift.reactive.signal(Math.max(c($),c(V))),[H,Y]=JSswift.reactive.signal(n.visible!=null?!!l(n.visible):c(V)>r()||!!l(n.indeterminate));let Q=null,le=null;const re=()=>{Q&&(clearInterval(Q),Q=null)},Z=()=>{le&&(clearTimeout(le),le=null)},ne=(A,ee={})=>{const me=!!A;return H()!==me&&Y(me),ee.fromExternal!==!0&&typeof n.onVisibleChange=="function"&&n.onVisibleChange(me),me},T=(A,ee={})=>{const me=c(A);return ae()!==me&&F(me),K()<me&&(oe(me),I&&ee.fromExternal!==!0&&I.set(me)),k&&ee.fromExternal!==!0&&k.set(me),me},j=(A,ee={})=>{const me=Math.max(T(ae(),{fromExternal:!0}),c(A));return K()!==me&&oe(me),I&&ee.fromExternal!==!0&&I.set(me),me},q=(A=ae())=>{n.visible==null&&(l(n.indeterminate)||A>r()?ne(!0):l(n.hideOnZero)!==!1&&ne(!1))},ce=()=>{if(re(),l(n.trickle)===!1||l(n.indeterminate))return;const A=o(l(n.trickleInterval),280);A<=0||(Q=setInterval(()=>{var be,M;const ee=ae(),me=c((M=(be=l(n.trickleTo))!=null?be:l(n.trickleMax))!=null?M:92);if(ee>=me)return;const ye=o(l(n.trickleStep),ee<45?12:ee<75?7:3);T(Math.min(me,ee+ye))},A))},J=JSswift.omit(n,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor","target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);J.class=ie(["cms-loading-bar",n.class]),J.style={...n.style||{}};const g=JSswift.omit(n,["target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);g.class=ie(["cms-loading-bar-progress",n.progressClass,g.class]),g.style={...n.progressStyle||{}},g.value=[ae,F],g.buffer=[K,oe],g.dense==null&&(g.dense=!0),g.height==null&&g.thickness==null&&g.size==null&&(g.height=3),g.width==null&&(g.width="100%");const f=_.div(J),p=he.Progress(g,...s);f.appendChild(p);const O=A=>{Z();const ee=T(A);return q(ee),f},W=A=>{Z();const ee=j(A);return q(ee),f},u=(A=(ee=>(ee=l(n.step))!=null?ee:8)())=>{Z();const me=ae(),ye=T(me+o(A,0));return q(ye),f},x=(A=(ee=>(ee=l(n.startValue))!=null?ee:12)())=>{Z();const me=Math.max(ae(),c(A));return T(me),j(Math.max(K(),me)),q(me),ce(),f},h=(A=(ee=>(ee=l(n.resetValue))!=null?ee:r())())=>{Z(),re();const me=c(A);return j(me),T(me),q(me),f},z=(A=(ee=>(ee=l(n.doneValue))!=null?ee:v())())=>{var be;Z(),re();const me=c(A);j(me),T(me),q(me);const ye=Math.max(0,o((be=l(n.hideDelay))!=null?be:l(n.doneDelay),220));return le=setTimeout(()=>{h()},ye),f},B=(...A)=>z(...A),U=()=>(ne(!0),f),de=()=>(Z(),re(),ne(!1),f),L=()=>(Z(),re(),f.remove(),null);return f.el=f,f._progress=p,f.get=()=>ae(),f.getBuffer=()=>K(),f.set=O,f.setBuffer=W,f.inc=u,f.start=x,f.done=z,f.complete=z,f.stop=B,f.reset=h,f.show=U,f.hide=de,f.destroy=L,f._dispose=L,k?k.watch(A=>{T(A,{fromExternal:!0}),q(c(A))},"UI.LoadingBar:watch"):at(n.value)&&JSswift.reactive.effect(()=>{const A=c(l(n.value));T(A,{fromExternal:!0}),q(A)},"UI.LoadingBar:value"),I?I.watch(A=>{j(A,{fromExternal:!0})},"UI.LoadingBar:bufferWatch"):at(n.buffer)&&JSswift.reactive.effect(()=>{j(l(n.buffer),{fromExternal:!0})},"UI.LoadingBar:buffer"),JSswift.reactive.effect(()=>{const A=r(),ee=v(),me=Math.min(ee,Math.max(A,ae())),ye=Math.max(me,Math.min(ee,Math.max(A,K())));me!==ae()&&F(me),ye!==K()&&oe(ye)},"UI.LoadingBar:range"),JSswift.reactive.effect(()=>{n.visible!=null&&ne(l(n.visible),{fromExternal:!0})},"UI.LoadingBar:visible"),JSswift.reactive.effect(()=>{var ke;const A=l(n.position)||"fixed",ee=l(n.inset),me=l(n.top),ye=l(n.right),be=l(n.bottom),M=l(n.left),D=l(n.width),G=n.visible!=null?!!l(n.visible):H(),Ce=A==="static"||A==="relative";f.classList.toggle("is-visible",G),f.classList.toggle("is-inline",Ce),f.classList.toggle("has-track",!!l(n.trackColor)),f.style.position=A,f.style.zIndex=String((ke=l(n.zIndex))!=null?ke:10002),f.style.width=a(D,Ce?"100%":""),ee!=null&&ee!==""?(f.style.inset=a(ee),f.style.removeProperty("top"),f.style.removeProperty("right"),f.style.removeProperty("bottom"),f.style.removeProperty("left")):(f.style.removeProperty("inset"),!Ce&&A!=="sticky"?(f.style.top=a(me,"0px"),f.style.right=a(ye,D==null||D===""?"0px":""),f.style.bottom=a(be,""),f.style.left=a(M,"0px")):(f.style.top=a(me,""),f.style.right=a(ye,""),f.style.bottom=a(be,""),f.style.left=a(M,"")))},"UI.LoadingBar:layout"),Ye(f,n),l(n.mount)!==!1&&b(n.target).appendChild(f),l(n.autoStart)&&x(),f};const fl=new Set(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]),Vo=new Set(["soft","solid","outline"]),Bo={success:"Success",warning:"Warning",danger:"Error",info:"Info",primary:"Notice",secondary:"Notice",light:"Notice",dark:"Notice"},Ho={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"notifications",light:"notifications",dark:"shield"},ml=t=>{const e=String(l(t)||"").trim().toLowerCase();return e?fl.has(e)?e:e==="top"?"top-right":e==="bottom"?"bottom-right":e==="left"?"bottom-left":e==="right"?"bottom-right":e==="center"?"bottom-center":"bottom-right":"bottom-right"},jo=t=>{const e=String(l(t)||"").trim().toLowerCase();return Vo.has(e)?e:"soft"},Wo=(t,e)=>{const n=l(t);if(n===!1||n===null)return 0;if(n===!0||n===""||n===void 0)return e==="danger"?3500:2500;const s=Number(n);return Number.isFinite(s)&&s>=0?s:e==="danger"?3500:2500},Ut=(t={},e="")=>{var c,a,b,E,k,S,I,V,$,ae,F,K,oe,H;const n=an(t)?{...t}:{message:t},s=gt(l(e)||l(n.type)||l(n.state)||l(n.color)||"info")||"info",o=Wo((a=(c=n.timeout)!=null?c:n.duration)!=null?a:n.delay,s),r=(k=(E=(b=n.closable)!=null?b:n.dismissible)!=null?E:n.dismiss!=null)!=null?k:o===0,v=n.title===void 0?n.label===void 0?Bo[s]:n.label:n.title;return{...n,type:s,state:s,title:v,message:(V=(I=(S=n.message)!=null?S:n.content)!=null?I:n.text)!=null?V:null,description:(F=(ae=($=n.description)!=null?$:n.subtitle)!=null?ae:n.note)!=null?F:null,meta:(oe=(K=n.meta)!=null?K:n.caption)!=null?oe:null,body:(H=n.body)!=null?H:null,timeout:o,closable:!!r,dismissLabel:n.dismissLabel||n.closeLabel||"Chiudi notifica",position:ml(n.position),variant:jo(n.variant),slots:n.slots||{},role:n.role||(s==="danger"||s==="warning"?"alert":"status")}},gl=(t,e="",n="")=>{if(!t.length)return Ut(n?{type:e,title:n}:{type:e});if(an(t[0])){const{props:c,children:a}=JSswift.uiNormalizeArgs(t),b={...c};return!b.type&&!b.state&&!b.color&&e&&(b.type=e),b.title==null&&n&&(b.title=n),a.length&&(b.message==null&&b.description==null&&b.body==null&&a.length===1?b.message=a[0]:b.body==null&&(b.body=a.length===1?a[0]:a)),Ut(b,e)}const[s,o,r]=t;let v={};return an(o)?v={...o,message:s}:an(r)?v={...r,message:s,title:o}:v={message:s,title:o},e&&!v.type&&!v.state&&!v.color&&(v.type=e),v.title==null&&n&&(v.title=n),Ut(v,e)},Rt=(t,e)=>(...n)=>{var s,o;return(o=(s=je.services.notify)==null?void 0:s.show)==null?void 0:o.call(s,gl(n,t,e))},Un=(t,e,n)=>{if(t===!1)return!1;if(typeof t=="function"){const s=t();return Un(s,e,n)}return an(t)?t:t!=null?{message:t,title:n}:{message:e,title:n}};he.Notify=(...t)=>{var e,n;return(n=(e=je.services.notify)==null?void 0:e.show)==null?void 0:n.call(e,gl(t))},he.Notify.show=he.Notify,he.Notify.success=Rt("success","Success"),he.Notify.error=Rt("danger","Error"),he.Notify.warning=Rt("warning","Warning"),he.Notify.info=Rt("info","Info"),he.Notify.primary=Rt("primary","Notice"),he.Notify.secondary=Rt("secondary","Notice"),he.Notify.remove=t=>{var e,n;return(n=(e=je.services.notify)==null?void 0:e.remove)==null?void 0:n.call(e,t)},he.Notify.clear=()=>{var t,e;return(e=(t=je.services.notify)==null?void 0:t.clear)==null?void 0:e.call(t)},he.Notify.update=(t,e={})=>{var n,s;return(s=(n=je.services.notify)==null?void 0:n.update)==null?void 0:s.call(n,t,e)},he.Notify.promise=async(t,e={})=>{var o,r,v,c,a,b,E,k,S,I,V,$,ae,F;const n=e.loading===!1?!1:Un(typeof e.loading=="function"?()=>e.loading():e.loading,"Operazione in corso...","In corso"),s=n===!1?null:(r=(o=je.services.notify)==null?void 0:o.show)==null?void 0:r.call(o,Ut({type:"info",timeout:0,closable:!1,...n},"info"));try{const oe=await(typeof t=="function"?t():t),H=Un(typeof e.success=="function"?()=>e.success(oe):e.success,"Operazione completata con successo.","Completato");return H!==!1?s!=null?(c=(v=je.services.notify)==null?void 0:v.update)==null||c.call(v,s,Ut(H,"success")):(b=(a=je.services.notify)==null?void 0:a.show)==null||b.call(a,Ut(H,"success")):s!=null&&((k=(E=je.services.notify)==null?void 0:E.remove)==null||k.call(E,s)),oe}catch(K){const oe=Un(typeof e.error=="function"?()=>e.error(K):e.error,(K==null?void 0:K.message)||"Operazione fallita.","Errore");throw oe!==!1?s!=null?(I=(S=je.services.notify)==null?void 0:S.update)==null||I.call(S,s,Ut(oe,"danger")):($=(V=je.services.notify)==null?void 0:V.show)==null||$.call(V,Ut(oe,"danger")):s!=null&&((F=(ae=je.services.notify)==null?void 0:ae.remove)==null||F.call(ae,s)),K}},he.Header=(...t)=>{var x,h,z,B,U,de,L;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o={...e};Kt(o);const r=m=>Object.prototype.hasOwnProperty.call(e,m),v=(x=e.drawerStateKey)!=null?x:Yt;v&&(Yt=v,Et=tn(v));const c=()=>tn(v),a=()=>jt(!0,v),b=()=>jt(!1,v),E=()=>jt(!c(),v),k={props:e,stateKey:v,isDrawerOpen:c,openDrawer:a,closeDrawer:b,toggleDrawer:E,toggleAside:E},S=(m,N)=>{if(!(N==null||N===!1)){if(Array.isArray(N)){N.forEach(A=>S(m,A));return}if(N!=null&&N.nodeType){m.appendChild(N);return}m.appendChild(document.createTextNode(String(N)))}},I=(m,N,A=ee=>ee)=>{const ee=JSswift.ui.getSlot(s,m);if(ee!=null)return P(s,m,k,null);if(typeof N=="function"){const me=new Set(["eyebrow","title","subtitle"]),ye=_[me.has(m)?"span":"div"]({class:`cms-header-slot-${m}`});return JSswift.reactive.effect(()=>{const be=A(N(k)),M=rn(JSswift.ui.slot(be));ye.replaceChildren(),Array.isArray(M)?M.forEach(D=>S(ye,D)):S(ye,M)},`UI.Header:${m}`),[ye]}return P(s,m,k,A(N))},V=(m,N="icon",A=e.iconSize||e.size||"md")=>m==null||m===!1?null:typeof m=="string"?he.Icon({name:m,size:A}):JSswift.ui.slot(m,{as:N}),$=m=>{var A,ee;const N=m?(A=e.drawerOpenIcon)!=null?A:"\u2715":(ee=e.drawerCloseIcon)!=null?ee:"\u2630";return N==null||N===!1?null:typeof N=="string"?N:JSswift.ui.slot(N,{as:m?"drawerOpenIcon":"drawerCloseIcon"})},ae=_.span({class:"cms-header-toggle-icon"}),F=m=>{const N=P(null,"default",k,$(m));ae.replaceChildren(...N.length?N:[""])};F(c());const K=he.Btn({class:"cms-header-toggle",outline:!0,size:(z=(h=e.toggleSize)!=null?h:e.size)!=null?z:"sm",onClick:E,"aria-label":e.toggleLabel||"Toggle navigation"},ae);e.left==null&&e.left!==!1&&!JSswift.ui.getSlot(s,"left")&&al.add({update:F});const oe=e.left===!1?null:e.left!=null?e.left:K,H=r("title")?e.title:(B=e.label)!=null?B:"App",Y=(de=(U=e.subtitle)!=null?U:e.description)!=null?de:"",Q=r("right")?e.right:e.end,le=r("content")?e.content:r("body")?e.body:n!=null&&n.length?n:null,re=[...I("left",oe),...I("start",null)],Z=I("icon",e.icon,V),ne=I("eyebrow",(L=e.eyebrow)!=null?L:e.kicker),T=I("title",H),j=I("subtitle",Y),q=I("meta",e.meta),ce=(()=>{const m=I("content",null);return m.length?m:I("default",le)})(),J=[...I("center",null),...I("body",null)],g=[...I("right",Q),...I("end",null)],f=I("actions",e.actions),p=_.div({class:ie(["cms-header-body",e.bodyClass,e.centerClass])},_.div({class:"cms-header-heading"},Z.length?_.div({class:"cms-header-icon"},...Z):null,_.div({class:"cms-header-copy"},ne.length?_.div({class:ie(["cms-header-eyebrow",e.eyebrowClass])},...ne):null,T.length?_.div({class:ie(["cms-header-title",e.titleClass])},...T):null,j.length?_.div({class:ie(["cms-header-subtitle",e.subtitleClass])},...j):null,ce.length?_.div({class:ie(["cms-header-content",e.contentClass])},...ce):null),q.length?_.div({class:ie(["cms-header-meta",e.metaClass])},...q):null)),O=[...g,...f.length?[_.div({class:ie(["cms-header-actions",e.actionsClass])},...f)]:[]],W=JSswift.omit(o,["actions","actionsClass","body","bodyClass","centerClass","content","contentClass","description","divider","drawerCloseIcon","drawerOpenIcon","drawerStateKey","elevated","end","eyebrow","eyebrowClass","icon","iconSize","kicker","label","left","meta","metaClass","right","slots","stack","sticky","subtitle","subtitleClass","title","titleClass","toggleLabel","toggleSize","gap","minHeight","startClass","endClass"]);W.class=ie(["cms-panel","cms-header","cms-singularity",ge(e.sticky!==!1,"sticky"),ge(e.stack,"stack"),ge(e.elevated,"elevated"),ge(e.divider!==!1,"divider"),o.class]),W.style={...o.style||{}},e.gap!=null&&(W.style["--cms-header-gap"]=Be(l(e.gap))),e.minHeight!=null&&(W.style.minHeight=Be(l(e.minHeight)));const u=_.div(W,...re.length?[_.div({class:ie(["cms-header-start",e.startClass])},...re)]:[],_.div({class:"cms-header-main"},...J.length?[_.div({class:ie(["cms-header-body",e.bodyClass,e.centerClass])},...J)]:[p],...O.length?[_.div({class:ie(["cms-header-end",e.endClass])},...O)]:[]));return Ye(u,e),u},he.Drawer=(...t)=>{var pe,ze,Me,Pe,Ae,y,X,xe,R,d;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o={...e},r=i=>Object.prototype.hasOwnProperty.call(e,i),v=(pe=e.stateKey)!=null?pe:Yt;v&&(Yt=v,Et=tn(v));const c=()=>tn(v),a=()=>jt(!0,v),b=()=>jt(!1,v),E=()=>jt(!c(),v),k={props:e,stateKey:v,isDrawerOpen:c,openDrawer:a,closeDrawer:b,toggleDrawer:E,toggleAside:E},S=JSswift==null?void 0:JSswift.store,I=!!(S!=null&&S.get&&(S!=null&&S.set)),V=`${v}:groups`,$=`${v}:active`;let ae=I?S.get(V,{})||{}:{},F=I&&(ze=S.get($,null))!=null?ze:null;const K=new Map,oe=new Map,H=i=>{const C=l(i);return C==null||C===!1?[]:Array.isArray(C)?C.flat(1/0):[C]},Y=(i,C,se=k)=>{const _e=Array.isArray(i)?i:[i];for(const Ne of _e)if(JSswift.ui.getSlot(s,Ne)!=null)return P(s,Ne,se,C);return C==null?[]:P(null,"default",se,l(C))},Q=i=>(Array.isArray(i)?i:[i]).some(se=>JSswift.ui.getSlot(s,se)!=null),le=i=>{if(typeof l(i.external)=="boolean")return!!l(i.external);const C=l(i.href||i.to||i.link||"");return/^(https?:)?\/\//.test(C)},re=(Me=e.closeOnSelect)!=null?Me:!0,Z=i=>!!re&&l(i.keepOpen)!==!0,ne=(Ae=(Pe=e.itemIconSize)!=null?Pe:e.size)!=null?Ae:"md",T=(y=e.groupOpenIcon)!=null?y:"arrow_drop_up",j=(X=e.groupCloseIcon)!=null?X:"arrow_drop_down",q=i=>!!i&&F===i,ce=i=>!!i&&!!F&&(F===i||F.startsWith(`${i}::`)),J=()=>{K.forEach(({el:i,baseActive:C},se)=>{const _e=!!C||q(se);i.classList.toggle("active",_e),_e?i.setAttribute("aria-current","page"):i.removeAttribute("aria-current")}),oe.forEach(({wrap:i,toggle:C,baseActive:se},_e)=>{const Ne=!!se||ce(_e);i.classList.toggle("active",Ne),C.classList.toggle("active",Ne)})},g=i=>{F=i||null,I&&S.set($,F),J()},f=(i,C)=>{if(l(i.active)!=null)return!!l(i.active);if(l(i.current)!=null)return!!l(i.current);if(!C||le(i))return!1;try{if(C.startsWith("#"))return window.location.hash===C;const se=`${window.location.pathname}${window.location.search}${window.location.hash}`;return C===se||C===window.location.pathname}catch(se){return!1}},p=(i,C,se)=>f(i,C)||q(se),O=(i=[],C=0,se=[])=>H(i).some((_e,Ne)=>{var Ge,qe,Ze,et,We;const ue=l(_e);if(!ue||typeof ue!="object"||ue.nodeType)return!1;const Se=l(ue.href||ue.to||ue.link||""),Fe=(We=l((et=(Ze=(qe=(Ge=ue.label)!=null?Ge:ue.title)!=null?qe:ue.text)!=null?Ze:Se)!=null?et:null))!=null?We:`item-${C}-${Ne}`,Ee=h(ue,Fe,C,Ne),Je=se.concat(Ee).join("::");if(p(ue,Se,Je))return!0;const He=ue.items||ue.children||ue.sub;return O(He,C+1,se.concat(Ee))}),W=(i,C={})=>{var Ne;const se=l(i);if(se==null||se===!1)return[];const _e=typeof se=="string"?he.Icon({name:se,size:(Ne=C.iconSize)!=null?Ne:ne}):JSswift.ui.slot(se,{...C,as:"icon"});return P(null,"default",C,_e)},u=(i,C,se={})=>{const _e=W(i,se);return _e.length?[_.span({class:ie(["cms-drawer-item-icon",C])},..._e)]:[]},x=i=>{const C=l(i.iconPosition)||"left",se=Object.prototype.hasOwnProperty.call(i,"iconLeft")?i.iconLeft:C!=="right"?i.icon:null,_e=Object.prototype.hasOwnProperty.call(i,"iconRight")?i.iconRight:C==="right"?i.icon:null;return{left:se,right:_e}},h=(i,C,se,_e)=>l(i.key||i.id||i.to||i.href||C||`item-${se}-${_e}`),z=(i,C)=>I&&Object.prototype.hasOwnProperty.call(ae,i)?!!ae[i]:C,B=(i,C)=>{I&&(ae={...ae,[i]:!!C},S.set(V,ae))},U=()=>{const i={...k,area:"header"},C=Y(["headerIcon","icon"],e.icon,i),se=Y(["eyebrow"],e.eyebrow,i),_e=Y(["title"],e.title,i),Ne=Y(["subtitle"],e.subtitle,i),ue=Y(["meta"],e.meta,i),Se=Y(["content"],e.content,i),Fe=Y(["actions"],e.actions,i),Ee=r("header")?P(null,"default",i,l(e.header)):[],Je=C.length||se.length||_e.length||Ne.length||ue.length||Se.length||Fe.length;return!Je&&!Ee.length?[]:Je?[_.div({class:ie(["cms-drawer-header",e.headerClass])},...C.length?[_.div({class:"cms-drawer-header-icon"},...C)]:[],_.div({class:"cms-drawer-header-body"},...se.length?[_.div({class:"cms-drawer-header-eyebrow"},...se)]:[],..._e.length?[_.div({class:"cms-drawer-header-title"},..._e)]:[],...Ne.length?[_.div({class:"cms-drawer-header-subtitle"},...Ne)]:[],...ue.length?[_.div({class:"cms-drawer-header-meta"},...ue)]:[],...Se.length?[_.div({class:"cms-drawer-header-content"},...Se)]:[],...Ee.length?[_.div({class:"cms-drawer-header-extra"},...Ee)]:[]),...Fe.length?[_.div({class:"cms-drawer-header-actions"},...Fe)]:[])]:Ee},de=(i,C,se)=>{var ue,Se;return!(((ue=i.onClick)==null?void 0:ue.call(i,se,C))===!1||se!=null&&se.defaultPrevented||((Se=e.onSelect)==null?void 0:Se.call(e,i,C,se))===!1||se!=null&&se.defaultPrevented)},L=(i,C,se={})=>{const _e=C.hasChildren?"group":"item",Ne=P(s,`${_e}Label`,C,C.label),ue=P(s,`${_e}Note`,C,C.note),Se=P(s,`${_e}Badge`,C,C.badge),Fe=P(s,`${_e}Aside`,C,C.aside),Ee=P(s,`${_e}Content`,C,C.content),Je=[];return(Ne.length||ue.length||Se.length||Fe.length)&&Je.push(_.div({class:"cms-drawer-item-top"},_.div({class:"cms-drawer-item-copy"},...Ne.length?[_.div({class:"cms-drawer-item-label"},...Ne)]:[],...ue.length?[_.div({class:"cms-drawer-item-note"},...ue)]:[]),...Se.length||Fe.length?[_.div({class:"cms-drawer-item-meta"},...Se.length?[_.div({class:"cms-drawer-item-badge"},...Se)]:[],...Fe.length?[_.div({class:"cms-drawer-item-aside"},...Fe)]:[])]:[])),Ee.length&&Je.push(_.div({class:"cms-drawer-item-content"},...Ee)),[...se.start||[],...u(C.iconLeft,"left",C),...Je.length?[_.div({class:"cms-drawer-item-main"},...Je)]:[],...u(C.iconRight,"right",C),...se.end||[]]},m=(i=[],C=0,se=[])=>H(i).map((_e,Ne)=>{var sn,ln,on,Ie,Ve,nt,rt,pt,yt,w,te;const ue=l(_e);if(ue==null||ue===!1)return null;if(ue.nodeType||typeof ue!="object"||Array.isArray(ue))return _.div({class:"cms-drawer-custom","data-level":String(C)},...P(null,"default",{...k,item:ue,level:C,index:Ne,path:se},ue));if(l(ue.hidden)===!0||l(ue.visible)===!1)return null;const Se=H(ue.items||ue.children||ue.sub),Fe=l(ue.href||ue.to||ue.link||null),Ee=l((Ie=(on=(ln=(sn=ue.label)!=null?sn:ue.title)!=null?ln:ue.text)!=null?on:Fe)!=null?Ie:null),Je=Ee!=null?Ee:`item-${C}-${Ne}`,He=l((rt=(nt=(Ve=ue.note)!=null?Ve:ue.subtitle)!=null?nt:ue.description)!=null?rt:null),Ge=l((pt=ue.badge)!=null?pt:null),qe=l((w=(yt=ue.aside)!=null?yt:ue.meta)!=null?w:null),Ze=l((te=ue.content)!=null?te:null),et=h(ue,Je,C,Ne),We=se.concat(et).join("::"),{left:st,right:De}=x(ue),ot=gt(l(ue.state)||l(ue.color)||""),ct=f(ue,Fe),dt=ct||q(We),tt=!!l(ue.disabled),ft={...k,item:ue,index:Ne,level:C,path:se,label:Je,note:He,badge:Ge,aside:qe,content:Ze,itemStateKey:We,iconLeft:st,iconRight:De,iconSize:l(ue.iconSize)||ne,active:dt,disabled:tt,hasChildren:!1},St=l(ue.divider)===!0||ue.type==="divider"||ue.type==="separator",Ct=l(ue.section)===!0||ue.type==="section"||ue.type==="heading"||ue.type==="label",mt=ue.type==="content"||ue.type==="custom"||!Fe&&!Se.length&&!l(ue.button)&&ue.type!=="button"&&Ee==null&&Ze!=null;if(St)return _.div({class:ie(["cms-drawer-separator",ue.class]),"data-level":String(C)});if(Ct){const we=P(s,"sectionLabel",ft,Je||Ze);return _.div({class:ie(["cms-drawer-section-label",ue.class]),"data-level":String(C)},...we)}if(mt){const we=P(s,"item",ft,Ze!=null?Ze:Je);return _.div({class:ie(["cms-drawer-custom",ot?`cms-drawer-tone-${ot}`:"",ue.class]),style:ue.style,"data-level":String(C)},...we)}if(Se.length){const we=ct||O(Se,C+1,se.concat(et)),Te=we||ce(We);let Re=z(We,!!l(ue.expanded)||!!l(ue.open)||Te);const Oe=_.span({class:"cms-drawer-group-icon"}),$e={...ft,active:Te,hasChildren:!0,isOpen:()=>Re,setOpen:kt=>zt(kt),toggle:()=>zt(!Re)},Qe=()=>{var Xt,Qt;const kt=Re?(Xt=ue.openIcon)!=null?Xt:T:(Qt=ue.closeIcon)!=null?Qt:j,Vt=l(Re?ue.iconSidePosition||ue.openIconSide||ue.openIconPosition||"right":ue.iconSidePosition||ue.closeIconSide||ue.closeIconPosition||"right")==="left"?"left":"right";Oe.innerHTML="",Oe.className=`cms-drawer-group-icon ${Vt}`,W(kt,{...$e,as:"toggleIcon"}).forEach(vn=>Oe.appendChild(vn))},ut=_.button({type:"button",class:ie(["cms-drawer-group-toggle","cms-drawer-entry",Re?"open":"",Te?"active":"",tt?"is-disabled":"",ot?`cms-drawer-tone-${ot}`:"",ue.class]),style:ue.style,"data-level":String(C),"aria-expanded":String(Re),"aria-disabled":tt?"true":null,onClick:kt=>{if(tt){kt.preventDefault();return}g(We),zt(!Re)}},...L(ue,$e,{start:l(ue.iconSidePosition||ue.openIconSide||ue.closeIconSide||ue.openIconPosition||ue.closeIconPosition||"right")==="left"?[Oe]:[],end:l(ue.iconSidePosition||ue.openIconSide||ue.closeIconSide||ue.openIconPosition||ue.closeIconPosition||"right")==="right"?[Oe]:[]})),wt=P(s,"group",$e,null),bt=_.div({class:"cms-drawer-group-items"},...m(Se,C+1,se.concat(et))),Mt=_.div({class:ie(["cms-drawer-group",Re?"open":"",Te?"active":"",ot?`cms-drawer-tone-${ot}`:""]),"data-level":String(C)},...wt.length?wt:[ut],bt),zt=kt=>{Re=!!kt,Mt.classList.toggle("open",Re),ut.classList.toggle("open",Re),ut.setAttribute("aria-expanded",String(Re)),Qe(),B(We,Re)};return oe.set(We,{wrap:Mt,toggle:ut,baseActive:we}),Qe(),Mt}const At=P(s,"item",ft,null),ht=l(ue.button)===!0||ue.type==="button"||!Fe&&typeof ue.onClick=="function",vt={class:ie(["cms-drawer-entry",ht?"cms-drawer-btn":"cms-drawer-link",dt?"active":"",tt?"is-disabled":"",ot?`cms-drawer-tone-${ot}`:"",ue.class]),style:ue.style,"data-level":String(C),"aria-current":dt?"page":null,"aria-disabled":tt?"true":null},Gt=At.length?At:L(ue,ft);if(ht){const we=_.button({...vt,type:ue.buttonType||"button",disabled:tt,onClick:Te=>{if(tt){Te.preventDefault();return}de(ue,ft,Te)&&(g(We),Z(ue)&&b())}},...Gt);return K.set(We,{el:we,baseActive:ct}),we}const xt=le(ue),dn=xt?l(ue.target)||"_blank":l(ue.target),wn=xt?l(ue.rel)||"noopener noreferrer":l(ue.rel),nn=_.a({...vt,href:Fe||"#",target:dn||null,rel:wn||null,tabIndex:tt?-1:null,onClick:we=>{var Te;if(tt){we.preventDefault();return}de(ue,ft,we)&&(!xt&&ue.to&&((Te=je.router)!=null&&Te.navigate)&&(we.preventDefault(),je.router.navigate(ue.to)),Z(ue)&&b())}},...Gt);return K.set(We,{el:nn,baseActive:ct}),nn}).filter(Boolean),N=Y(["before","beforeItems"],(xe=e.before)!=null?xe:e.beforeItems),A=Q(["body"])?Y(["body"],null):[],ee=m(e.items||[]),me=Y(["default"],n),ye=Y(["after","afterItems"],(R=e.after)!=null?R:e.afterItems),be=A.length?A:[...N,...ee,...me,...ye],M=r("empty")||r("emptyText")?(d=e.empty)!=null?d:_.div({class:ie(["cms-drawer-empty",e.emptyClass])},e.emptyText||"Nessun contenuto"):_.div({class:ie(["cms-drawer-empty",e.emptyClass])},"Nessun contenuto"),D=Y(["header"],U()),G=Y(["footer"],e.footer),Ce=be.length?be:Y(["empty"],M),ke=JSswift.omit(o,["items","header","footer","before","beforeItems","after","afterItems","title","subtitle","eyebrow","icon","content","meta","actions","empty","emptyText","closeOnSelect","groupOpenIcon","groupCloseIcon","stateKey","sticky","slots","headerClass","bodyClass","footerClass","emptyClass","itemIconSize","gap","indent","padding","minHeight","maxHeight","width","onSelect"]);ke.class=ie(["cms-panel","cms-drawer",Et?"open":"",ge(e.sticky,"sticky"),o.class]),ke.style={...o.style||{}},e.gap!=null&&(ke.style["--cms-drawer-gap"]=Be(l(e.gap))),e.indent!=null&&(ke.style["--cms-drawer-indent"]=Be(l(e.indent))),e.padding!=null&&(ke.style["--cms-drawer-padding"]=Be(l(e.padding))),e.width!=null&&(ke.style.width=Be(l(e.width))),e.minHeight!=null&&(ke.style.minHeight=Be(l(e.minHeight))),e.maxHeight!=null&&(ke.style.maxHeight=Be(l(e.maxHeight)));const fe=_.div(ke,...D.length?D:[],_.div({class:ie(["cms-drawer-body",e.bodyClass])},...Ce),...G.length?[_.div({class:ie(["cms-drawer-footer",e.footerClass])},...G)]:[]),ve=hs.get(v)||new Set;return ve.add(fe),hs.set(v,ve),jt(Et,v),fe.isDrawerOpen=c,fe.openDrawer=a,fe.closeDrawer=b,fe.toggleDrawer=E,fe.setActiveItem=g,Ye(fe,e),J(),fe},he.Page=(...t)=>{var p,O,W,u;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o={...e},r=(x,h)=>{var z;return!!(x&&x.nodeType===1&&((z=x.classList)!=null&&z.contains(`cms-page-${h}`)))},v=x=>x==null?null:typeof x=="string"?he.Icon({name:x,size:e.iconSize||e.size||"xl"}):JSswift.ui.slot(x,{as:"icon"}),c={dense:!!l(e.dense),flat:!!l(e.flat),centered:!!l(e.centered),narrow:!!l(e.narrow)},a=(x,h)=>{if(!(h==null||h===!1)){if(Array.isArray(h)){h.forEach(z=>a(x,z));return}if(h!=null&&h.nodeType){x.appendChild(h);return}x.appendChild(document.createTextNode(String(h)))}},b=(x,h,z=B=>B)=>{const B=JSswift.ui.getSlot(s,x);if(B!=null)return P(s,x,c,null);if(typeof h=="function"){const U=new Set(["eyebrow","title","subtitle"]),de=_[U.has(x)?"span":"div"]({class:`cms-page-slot-${x}`});return JSswift.reactive.effect(()=>{const L=z(h(c)),m=rn(JSswift.ui.slot(L));de.replaceChildren(),Array.isArray(m)?m.forEach(N=>a(de,N)):a(de,m)},`UI.Page:${x}`),[de]}return P(s,x,c,z(h))},E=P(s,"default",c,n!=null&&n.length?n:[]),k={hero:[],header:[],body:[],footer:[],actions:[]},S=[];E.forEach(x=>{r(x,"hero")?k.hero.push(x):r(x,"header")?k.header.push(x):r(x,"body")?k.body.push(x):r(x,"footer")?k.footer.push(x):r(x,"actions")?k.actions.push(x):S.push(x)});const I=b("icon",e.icon,v),V=b("hero",(p=e.hero)!=null?p:e.banner),$=b("eyebrow",(O=e.eyebrow)!=null?O:e.kicker),ae=b("title",e.title),F=b("subtitle",(W=e.subtitle)!=null?W:e.description),K=b("header",e.header),oe=b("aside",e.aside),H=b("body",(u=e.body)!=null?u:e.content),Y=b("footer",e.footer),Q=b("actions",e.actions),le=V.length?_.div({class:ie(["cms-page-hero",e.heroClass])},...V):null,re=I.length||$.length||ae.length||F.length||K.length||oe.length,Z=re?_.div({class:ie(["cms-page-header",e.headerClass])},_.div({class:"cms-page-head"},I.length?_.div({class:ie(["cms-page-icon",e.iconClass])},...I):null,_.div({class:"cms-page-head-main"},$.length?_.div({class:ie(["cms-page-eyebrow",e.eyebrowClass])},...$):null,ae.length?_.div({class:ie(["cms-page-title",e.titleClass])},...ae):null,F.length?_.div({class:ie(["cms-page-subtitle",e.subtitleClass])},...F):null,K.length?_.div({class:ie(["cms-page-header-content",e.headerContentClass])},...K):null),oe.length?_.div({class:ie(["cms-page-aside",e.asideClass])},...oe):null)):null,ne=[...H,...S],T=ne.length?_.div({class:ie(["cms-page-body",e.bodyClass])},...ne):null,j=[...Q,...k.actions],q=Y.length||j.length?_.div({class:ie(["cms-page-footer",e.footerClass])},...Y,j.length?_.div({class:"cms-page-actions"},...j):null):null,ce=!!(V.length||k.hero.length),J=!!(re||k.header.length),g=JSswift.omit(o,["actions","aside","asideClass","banner","body","bodyClass","centered","content","dense","description","eyebrow","eyebrowClass","flat","footer","footerClass","gap","header","headerClass","headerContentClass","headerGap","hero","heroClass","heroPadding","icon","iconClass","iconSize","kicker","maxWidth","minHeight","narrow","padding","size","slots","subtitle","subtitleClass","title","titleClass"]);g.class=ie(["cms-panel","cms-page",ge(e.dense,"dense"),ge(e.flat,"cms-page-flat"),ge(e.centered,"cms-page-centered"),ge(e.narrow,"cms-page-narrow"),ge(ce,"cms-page-has-hero"),ge(J,"cms-page-has-header"),o.class]),g.style={...o.style||{}},(e.gap!=null||at(e.gap))&&(g.style["--cms-page-gap"]=Le(e.gap,Be)),(e.padding!=null||at(e.padding))&&(g.style["--cms-page-padding"]=Le(e.padding,Be)),(e.maxWidth!=null||at(e.maxWidth))&&(g.style["--cms-page-max-width"]=Le(e.maxWidth,Be)),(e.minHeight!=null||at(e.minHeight))&&(g.style["--cms-page-min-height"]=Le(e.minHeight,Be)),(e.headerGap!=null||at(e.headerGap))&&(g.style["--cms-page-header-gap"]=Le(e.headerGap,Be)),(e.heroPadding!=null||at(e.heroPadding))&&(g.style["--cms-page-hero-padding"]=Le(e.heroPadding,Be));const f=_.div(g,le,...k.hero,Z,...k.header,T,...k.body,q,...k.footer);return Ye(f,e),f},he.AppShell=(...t)=>{var x,h;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=(z,B)=>!!z&&Object.prototype.hasOwnProperty.call(z,B),r=l(e.noDrawer)===!0||e.drawer===!1,v=l(e.reverse)===!0,c=l(e.stack)===!0,a=(h=(x=e.drawerStateKey)!=null?x:e.stateKey)!=null?h:Yt;a&&(Yt=a,Et=tn(a));const b={props:e,noDrawer:r,stateKey:a,isDrawerOpen:()=>tn(a),openDrawer:()=>jt(!0,a),closeDrawer:()=>jt(!1,a),toggleDrawer:()=>jt(!tn(a),a)},E=e.headerProps&&typeof e.headerProps=="object"?{...e.headerProps}:{};let k=e.header;!o(e,"header")&&(Object.keys(E).length||o(e,"title")||o(e,"subtitle")||o(e,"left")||o(e,"right"))&&(!o(E,"title")&&o(e,"title")&&(E.title=e.title),!o(E,"subtitle")&&o(e,"subtitle")&&(E.subtitle=e.subtitle),!o(E,"left")&&o(e,"left")&&(E.left=e.left),!o(E,"right")&&o(e,"right")&&(E.right=e.right),o(E,"drawerStateKey")||(E.drawerStateKey=a),r&&!o(E,"left")&&(E.left=!1),k=he.Header(E));const S=e.drawerProps&&typeof e.drawerProps=="object"?{...e.drawerProps}:{},I=o(e,"drawerItems")?e.drawerItems:e.items,V=o(e,"drawerHeader")?e.drawerHeader:void 0;let $=e.drawer;!o(e,"drawer")&&!r&&(Object.keys(S).length||I!=null||V!=null)&&(!o(S,"items")&&I!=null&&(S.items=I),!o(S,"header")&&V!=null&&(S.header=V),o(S,"stateKey")||(S.stateKey=a),$=he.Drawer(S));const ae=e.pageProps&&typeof e.pageProps=="object"?{...e.pageProps}:{},F=o(e,"content")?e.content:n,K=P(s,"default",b,F);let oe=e.page;!o(e,"page")&&(Object.keys(ae).length||K.length)&&(oe=he.Page(ae,...K));const H=e.footerProps&&typeof e.footerProps=="object"?{...e.footerProps}:{},Y=o(e,"footerContent")?e.footerContent:void 0;let Q=e.footer;!o(e,"footer")&&(Object.keys(H).length||Y!=null)&&(Q=he.Footer(H,...P(null,"default",b,Y)));const le=P(s,"header",b,k),re=r?[]:P(s,"drawer",b,$),Z=P(s,"page",b,oe),ne=P(s,"footer",b,Q),T=ie(["cms-app","cms-app-shell",ge(r,"no-drawer"),ge(v,"is-reverse"),ge(c,"is-stack"),ge(e.flush,"is-flush"),ge(e.divider,"is-divider"),e.class]),j=JSswift.omit(e,["header","drawer","page","footer","content","title","subtitle","left","right","items","drawerItems","drawerHeader","headerProps","drawerProps","pageProps","footerProps","footerContent","noDrawer","reverse","stack","flush","divider","drawerStateKey","stateKey","drawerWidth","gap","padding","slots"]);j.class=T,j.style={...e.style||{}};const q=Le(e.drawerWidth,Be);q!=null&&(j.style["--cms-app-shell-drawer-width"]=q);const ce=Le(e.gap,Be);ce!=null&&(j.style["--cms-app-shell-gap"]=ce);const J=Le(e.padding,Be);J!=null&&(j.style["--cms-app-shell-padding"]=J);const g=le.length?_.div({class:"cms-app-shell-header-slot"},...le):null,f=re.length?_.div({class:"cms-app-shell-drawer-slot"},...re):null,p=Z.length?_.div({class:"cms-app-shell-page-slot"},...Z):null,O=ne.length?_.div({class:"cms-app-shell-footer-slot"},...ne):null,W=v?[p,f]:[f,p],u=_.div(j,...g?[g]:[],_.div({class:"cms-app-shell-body"},...W.filter(Boolean)),...O?[O]:[]);return u.openDrawer=b.openDrawer,u.closeDrawer=b.closeDrawer,u.toggleDrawer=b.toggleDrawer,u.isDrawerOpen=b.isDrawerOpen,u.header=g,u.drawer=f,u.page=p,u.footer=O,Ye(u,e),u},he.Parallax=function(...e){var z,B;const{props:n,children:s}=JSswift.uiNormalizeArgs(e),o=n.slots||{},r={...n};r.color!=null&&r.textColor==null&&(r.textColor=r.color),delete r.color,Kt(r);const v=Xe(n.state,()=>{const U=gt(l(n.state));return U?`cms-state-${U}`:""}),c=U=>{if(U==null||U===!1||U==="")return"";const de=String(U);return Zt(de)?`var(--cms-${de})`:de},a=()=>{const U=l(n.background);if(U)return String(U);const de=l(n.image)||l(n.src)||"";if(!de)return"linear-gradient(120deg, #1b2c5a, #2f6d8f, #2a8f5c)";const L=String(de);return/^url\(/i.test(L)||/gradient\(/i.test(L)||/^var\(/i.test(L)?L:`url(${L})`},b=(U,de)=>{const L=Number(l(U));return Number.isFinite(L)?L:de},E={speed:()=>{var U;return(U=l(n.speed))!=null?U:.18},state:()=>l(n.state)||"",disabled:()=>!!l(n.disabled)},k=P(o,"badge",E,n.badge),S=P(o,"background",E,n.backgroundContent),I=P(o,"eyebrow",E,(z=n.eyebrow)!=null?z:n.kicker),V=P(o,"title",E,n.title),$=P(o,"subtitle",E,n.subtitle),ae=P(o,"header",E,n.header),F=P(o,"aside",E,n.aside),K=P(o,"media",E,n.media),oe=P(o,"content",E,(B=n.content)!=null?B:n.body),H=P(o,"default",E,s!=null&&s.length?s:[]),Y=P(o,"footer",E,n.footer),Q=P(o,"actions",E,n.actions),le=[...oe,...H],re=k.length?_.div({class:ie(["cms-parallax-badge",n.badgeClass])},...k):null,Z=I.length||V.length||$.length||ae.length||F.length,ne=Z?_.div({class:ie(["cms-parallax-header",n.headerClass])},_.div({class:"cms-parallax-head"},_.div({class:"cms-parallax-head-main"},I.length?_.div({class:ie(["cms-parallax-eyebrow",n.eyebrowClass])},...I):null,V.length?_.div({class:ie(["cms-parallax-title",n.titleClass])},...V):null,$.length?_.div({class:ie(["cms-parallax-subtitle",n.subtitleClass])},...$):null,ae.length?_.div({class:ie(["cms-parallax-header-content",n.headerContentClass])},...ae):null),F.length?_.div({class:ie(["cms-parallax-aside",n.asideClass])},...F):null)):null,T=K.length?_.div({class:ie(["cms-parallax-media",n.mediaClass])},...K):null,j=le.length?_.div({class:ie(["cms-parallax-body",n.bodyClass])},...le):null,q=Y.length||Q.length?_.div({class:ie(["cms-parallax-footer",n.footerClass])},Y.length?_.div({class:"cms-parallax-footer-content"},...Y):null,Q.length?_.div({class:"cms-parallax-actions"},...Q):null):null,ce=JSswift.omit(r,["actions","align","aside","asideClass","background","backgroundContent","backgroundContentClass","badge","badgeClass","bgClass","bgPosition","bgRepeat","bgSize","body","bodyClass","color","content","contentClass","contentMaxWidth","disabled","eyebrow","eyebrowClass","footer","footerClass","gap","header","headerClass","headerContentClass","height","image","imageAlt","imageClass","innerClass","justify","kicker","maxOffset","media","mediaClass","minHeight","overlay","padding","slots","speed","src","startTop","state","subtitle","subtitleClass","textColor","title","titleClass"]);ce.class=ie(["cms-parallax","cms-singularity",v,ge(n.disabled,"cms-parallax-static"),ge(re,"cms-parallax-has-badge"),ge(Z,"cms-parallax-has-header"),r.class]),ce.style={...r.style||{}},n.height!=null&&(ce.style["--cms-parallax-height"]=Le(n.height,Be)),n.minHeight!=null&&(ce.style["--cms-parallax-min-height"]=Le(n.minHeight,Be)),n.padding!=null&&(ce.style["--cms-parallax-padding"]=Le(n.padding,Be)),n.gap!=null&&(ce.style["--cms-parallax-gap"]=Le(n.gap,Be)),n.contentMaxWidth!=null&&(ce.style["--cms-parallax-content-max-width"]=Le(n.contentMaxWidth,Be)),n.justify!=null&&(ce.style["--cms-parallax-justify"]=Le(n.justify)),n.align!=null&&(ce.style["--cms-parallax-align"]=Le(n.align)),n.color!=null&&(ce.style["--cms-parallax-color"]=Le(n.color,c)),n.overlay!=null&&(ce.style["--cms-parallax-overlay"]=Le(n.overlay)),n.bgPosition!=null&&(ce.style["--cms-parallax-position"]=Le(n.bgPosition)),n.bgSize!=null&&(ce.style["--cms-parallax-size"]=Le(n.bgSize)),n.bgRepeat!=null&&(ce.style["--cms-parallax-repeat"]=Le(n.bgRepeat)),ce.style["--cms-parallax-image"]=at(n.background)||at(n.image)||at(n.src)?()=>a():a();const J=_.div({class:ie(["cms-parallax-bg",n.bgClass])},S.length?_.div({class:ie(["cms-parallax-bg-content",n.backgroundContentClass])},...S):null),g=_.div({class:ie(["cms-parallax-content",n.contentClass,n.innerClass])},re,ne,T,j,q),f=_.div(ce,J,g);let p=!1,O=!1,W=null;const u=()=>{var U;p||(p=!0,typeof window!="undefined"&&(window.removeEventListener("scroll",h),window.removeEventListener("resize",h)),(U=W==null?void 0:W.disconnect)==null||U.call(W),W=null)},x=()=>{if(p)return;if(!f.isConnected){u();return}if(l(n.disabled)){J.style.transform="translate3d(0, 0, 0)",f.style.setProperty("--cms-parallax-offset","0px");return}const U=f.getBoundingClientRect(),de=b(n.speed,.18),L=Math.abs(b(n.maxOffset,96)),m=l(n.startTop),N=m!=null&&m!==""?(U.top-b(n.startTop,0))*de:((typeof window!="undefined"&&(window.innerHeight||document.documentElement.clientHeight)||0)/2-(U.top+U.height/2))*de,ee=`${(L>0?Math.max(-L,Math.min(L,N)):N).toFixed(2)}px`;J.style.transform=`translate3d(0, ${ee}, 0)`,f.style.setProperty("--cms-parallax-offset",ee)};function h(){p||O||(O=!0,requestAnimationFrame(()=>{O=!1,x()}))}return typeof window!="undefined"&&(window.addEventListener("scroll",h,{passive:!0}),window.addEventListener("resize",h),typeof ResizeObserver!="undefined"&&(W=new ResizeObserver(()=>{h()}),W.observe(f)),requestAnimationFrame(()=>{h()}),setTimeout(()=>{h()},90)),f.refresh=()=>(h(),f),f.update=f.refresh,f.destroy=()=>(u(),f.remove(),null),f._dispose=u,Ye(f,n),f};const[Gn,Kn]=je.reactive.signal([]),Yn=new Map;function ys(t){const e=Yn.get(t);e&&(clearTimeout(e),Yn.delete(t))}function ws(t){return t?(ys(t),Kn(Gn().filter(e=>e.id!==t)),t):null}function Uo(){for(const t of Yn.keys())ys(t);Kn([])}function hl(t){t!=null&&t.id&&(ys(t.id),t.timeout>0&&Yn.set(t.id,setTimeout(()=>{ws(t.id)},t.timeout)))}function pl(t,e={}){if(!t)return null;let n=null;return Kn(Gn().map(s=>s.id!==t?s:(n=Ut({...s,...e,id:s.id},e.type||e.state||e.color||s.type),n))),n&&hl(n),(n==null?void 0:n.id)||null}function Go(t){const e=()=>ws(t.id),n=(ae={})=>pl(t.id,ae),s={toast:t,id:t.id,close:e,update:n},o=ae=>typeof ae=="function"?ae(s):ae,r=(()=>{if(t.icon===!1||t.icon===null)return null;if(t.icon!=null){const F=o(t.icon);return typeof F=="string"?he.Icon({name:F,size:"sm"}):JSswift.ui.slot(F,{as:"icon"})}const ae=Ho[t.type];return ae?he.Icon({name:ae,size:"sm"}):null})(),v=P(t.slots,"icon",s,r),c=P(t.slots,"title",s,o(t.title)),a=P(t.slots,"message",s,o(t.message)),b=P(t.slots,"description",s,o(t.description)),E=P(t.slots,"meta",s,o(t.meta)),k=P(t.slots,"actions",s,o(t.actions)),S=P(t.slots,"default",s,o(t.body)),I=P(t.slots,"dismiss",s,o(t.dismiss)),V=I.length?I:t.closable?[he.Btn({class:"cms-toast-close",outline:!0,size:"xs","aria-label":t.dismissLabel,onClick:e},he.Icon({name:"close",size:"xs"}))]:[],$=_.div({class:ie(["cms-toast",`cms-toast-${t.type}`,`cms-toast-${t.variant}`,ge(t.closable,"is-closable"),t.class]),style:t.style||{},role:t.role},v.length?_.div({class:"cms-toast-icon"},...v):null,_.div({class:"cms-toast-main"},_.div({class:"cms-toast-copy"},c.length?_.div({class:"cms-toast-title"},...c):null,a.length?_.div({class:"cms-toast-message"},...a):null,b.length?_.div({class:"cms-toast-description"},...b):null,S.length?_.div({class:"cms-toast-body"},...S):null,E.length?_.div({class:"cms-toast-meta"},...E):null),k.length?_.div({class:"cms-toast-actions"},...k):null),V.length?_.div({class:"cms-toast-dismiss"},...V):null);return Ye($,t),$}function Ko(){let t=document.querySelector(".cms-toast-layer");return t||(t=document.createElement("div"),t.className="cms-toast-layer",document.body.appendChild(t),je.reactive.effect(()=>{const e=Gn();t.innerHTML="";const n=new Map;for(const s of e){const o=ml(s.position);n.has(o)||n.set(o,[]),n.get(o).push(s)}for(const s of fl){const o=n.get(s);if(!(o!=null&&o.length))continue;const r=_.div({class:ie(["cms-toast-wrap",`is-${s}`])},...o.map(v=>Go(v)));t.appendChild(r)}},"JSswiftUI:toasts"),t)}function Yo(t={}){Ko();const e=Ut(t);return e.id=e.id||Math.random().toString(36).slice(2),Kn([...Gn().filter(n=>n.id!==e.id),e]),hl(e),e.id}je.services.notify.show=Yo,je.services.notify.success=Rt("success","Success"),je.services.notify.error=Rt("danger","Error"),je.services.notify.warning=Rt("warning","Warning"),je.services.notify.info=Rt("info","Info"),je.services.notify.primary=Rt("primary","Notice"),je.services.notify.secondary=Rt("secondary","Notice"),je.services.notify.update=pl,je.services.notify.remove=ws,je.services.notify.clear=Uo,je.services.notify.promise=he.Notify.promise,je.notify=je.services.notify,JSswift.form=JSswift.form||{},JSswift.form._isPromise=t=>t&&typeof t.then=="function",JSswift.form._normalizeRules=t=>{const e={};for(const n in t||{}){const s=t[n];e[n]=Array.isArray(s)?s:[s]}return e},JSswift.form._runRule=async(t,e,n)=>{let s=t,o=null;t&&typeof t=="object"&&typeof t.rule=="function"&&(s=t.rule,o=t.message||null);const r=s?s(e,n):!0,v=JSswift.form._isPromise(r)?await r:r;return v===!0?null:typeof v=="string"?v:v===!1?o||"Valore non valido":v?null:o||"Valore non valido"},JSswift.useForm=(t={})=>{const e=t.model||{},n=JSswift.form._normalizeRules(t.rules||{}),s=t.validateOn||"submit",o=t.initial||null,r=_.rod({}),v=_.rod({}),c=_.rod(!1),a=_.rod(null),b=()=>e&&typeof e=="object"&&"value"in e?e.value||{}:e,E=le=>{if(e&&typeof e=="object"&&"value"in e)e.value=le;else{const re=e||{};for(const Z in re)delete re[Z];Object.assign(re,le)}},k=le=>{const re=b();return re?re[le]:void 0},S=(le,re)=>{const Z={...b()||{}};Z[le]=re,E(Z)},I=(le,re)=>{const Z={...r.value||{}};re?Z[le]=re:delete Z[le],r.value=Z},V=le=>(r.value||{})[le]||null,$=le=>{v.value={...v.value||{},[le]:!0}},ae=le=>!!(v.value||{})[le],F=async le=>{const re=n[le]||[];if(!re.length)return I(le,null),!0;const Z=k(le),ne={name:le,value:Z,model:b(),form:Q};for(const T of re){if(!T)continue;const j=await JSswift.form._runRule(T,Z,ne);if(j)return I(le,j),!1}return I(le,null),!0},K=async()=>{a.value=null;const le=Object.keys(n);let re=!0;for(const Z of le)await F(Z)||(re=!1);return re},Q={model:e,errors:r,touched:v,submitting:c,submitError:a,getValue:k,setValue:S,getError:V,setError:I,touch:$,isTouched:ae,field:(le,re={})=>{var O;const Z=_.rod("");(O=Z.action)==null||O.call(Z,W=>{S(le,W)});const ne=()=>s==="submit"||s==="input"||s==="blur"?!0:ae(le);let T=null,j=!1,q=!1;const ce=async()=>{j||(j=!0,$(le),(s==="blur"||s==="input")&&await F(le),setTimeout(()=>{j=!1},0))},J=W=>{T&&(T===W.target||T.contains&&T.contains(W.target)||(ce(),T=null,q&&(q=!1,document.removeEventListener("pointerdown",J,!0))))},g=()=>{q||(q=!0,document.addEventListener("pointerdown",J,!0))},f=async()=>{T=document.activeElement,j=!1,g(),s==="input"&&await F(le)},p=async()=>{await ce(),T=null,q&&(q=!1,document.removeEventListener("pointerdown",J,!0))};return{name:le,model:Z,get value(){return Z.value},set value(W){Z.value=W},error:()=>ne()?V(le):null,success:re.success||null,warning:re.warning||null,note:re.note||null,touch:()=>$(le),validate:()=>F(le),onInput:f,onBlur:p,hint:re.hint||null}},validateField:F,validate:K,reset:()=>{a.value=null,r.value={},v.value={},o&&E({...o||{}})},submit:async le=>{c.value=!0,a.value=null;try{return await K()?{ok:!0,result:await(le==null?void 0:le(b(),Q))}:{ok:!1,reason:"validation"}}catch(re){return console.error("[useForm] submit error:",re),a.value=re&&re.message?re.message:String(re),{ok:!1,reason:"exception",error:re}}finally{c.value=!1}}};return Q},he.Form=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.form,o=e.onSubmit,r=ie(["cms-form",e.class]),v=JSswift.omit(e,["form","onSubmit"]);v.class=r;const c=_.form({...v,onSubmit:async b=>{b.preventDefault(),s&&await s.submit(o||(async()=>{}))}}),a=[];for(const b of n||[]){const E=typeof b=="function"?b(s):b,k=JSswift.ui.slot(E);k&&(Array.isArray(k)?a.push(...k):a.push(k))}return a.forEach(b=>c.appendChild(b)),s&&s.submitting&&JSswift.reactive.effect(()=>{c.classList.toggle("is-submitting",!!s.submitting.value)},"UI.Form:submitting"),c},je.services=je.services||{},je.services.dialog=je.services.dialog||{},je.dialog=je.services.dialog;let yn=null;function bl(){return yn||(yn=document.createElement("div"),yn.setAttribute("data-cms-modal-root","true"),document.body.appendChild(yn),yn)}he.cardHeader=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=ie(["cms-card-header",ge(e.divider,"divider"),e.class]),r=JSswift.omit(e,["divider","align","justify","gap","wrap","direction","slots"]);r.class=o;const v={...e.style||{}},c=Le(e.align);c!=null&&!Ue(e,"align")&&(v.alignItems=c);const a=Le(e.justify);a!=null&&!Ue(e,"justify")&&(v.justifyContent=a);const b=Le(e.wrap,I=>I?"wrap":"nowrap");b!=null&&!Ue(e,"wrap")&&(v.flexWrap=b);const E=Le(e.direction);E!=null&&!Ue(e,"direction")&&(v.flexDirection=E);const k=Le(e.gap,Be);k!=null&&!Ue(e,"gap")&&(v.gap=k),Object.keys(v).length&&(r.style=v),JSswift.uiApplyResponsiveProps(r,e,JSswift.uiResponsiveStyleRules);const S=_.div(r,...P(s,"default",{},n));return Ye(S,e),S},he.cardBody=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=ie(["cms-card-body",e.class]),r=JSswift.omit(e,["slots","display","direction","wrap","align","justify","gap","rowGap","columnGap","padding","width"]);r.class=o,JSswift.uiApplyResponsiveProps(r,e,JSswift.uiResponsiveStyleRules);const v=_.div(r,...P(s,"default",{},n));return Ye(v,e),v},he.cardFooter=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=ie(["cms-card-footer",ge(e.divider,"divider"),e.class]),r=JSswift.omit(e,["divider","align","justify","gap","wrap","direction","slots"]);r.class=o;const v={...e.style||{}},c=Le(e.align);c!=null&&!Ue(e,"align")&&(v.alignItems=c);const a=Le(e.justify);a!=null&&!Ue(e,"justify")&&(v.justifyContent=a);const b=Le(e.wrap,I=>I?"wrap":"nowrap");b!=null&&!Ue(e,"wrap")&&(v.flexWrap=b);const E=Le(e.direction);E!=null&&!Ue(e,"direction")&&(v.flexDirection=E);const k=Le(e.gap,Be);k!=null&&!Ue(e,"gap")&&(v.gap=k),Object.keys(v).length&&(r.style=v),JSswift.uiApplyResponsiveProps(r,e,JSswift.uiResponsiveStyleRules);const S=_.div(r,...P(s,"default",{},n));return Ye(S,e),S},he.Dialog=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=["primary","secondary","warning","danger","success","info","light","dark"],r=["xs","sm","md","lg","xl","full"];let v={...e},c=null,a=null;const b=(g,f)=>typeof g=="function"?g(f):g,E=g=>String(g||"").split(/\s+/).filter(Boolean),k=(g,f,p)=>{if(!g)return;const O=g[f]||[];O.length&&g.classList.remove(...O);const W=(p||[]).filter(Boolean);W.length&&g.classList.add(...W),g[f]=W},S=(g,f,p,O=W=>W)=>{if(g){if(p==null||p===""){g.style.removeProperty(f);return}g.style.setProperty(f,O(p))}},I=()=>{var u,x,h,z,B,U;const g=window.visualViewport,f=Math.max(0,Math.round((u=g==null?void 0:g.offsetLeft)!=null?u:0)),p=Math.max(0,Math.round((x=g==null?void 0:g.offsetTop)!=null?x:0)),O=Math.max(0,Math.round((z=(h=g==null?void 0:g.width)!=null?h:window.innerWidth)!=null?z:0)),W=Math.max(0,Math.round((U=(B=g==null?void 0:g.height)!=null?B:window.innerHeight)!=null?U:0));return{left:f,top:p,width:O,height:W}},V=g=>{if(!(g!=null&&g.panel))return;const{left:f,top:p,width:O,height:W}=I();S(g.panel,"position","fixed"),S(g.panel,"inset",0,u=>`${u}px`),S(g.panel,"top",p,u=>`${u}px`),S(g.panel,"left",f,u=>`${u}px`),S(g.panel,"right","auto"),S(g.panel,"bottom","auto"),S(g.panel,"width",O,u=>`${u}px`),S(g.panel,"height",W,u=>`${u}px`),S(g.panel,"min-height",W,u=>`${u}px`),S(g.panel,"max-width",O,u=>`${u}px`),S(g.panel,"max-height",W,u=>`${u}px`),S(g.panel,"min-width",0,u=>`${u}px`),S(g.panel,"margin",0,u=>`${u}px`),S(g.panel,"box-sizing","border-box"),S(g.panel,"border-width",0,u=>`${u}px`),S(g.panel,"border-radius",0,u=>`${u}px`),S(g.panel,"transform","none"),S(g.panel,"overflow","hidden"),S(g.panel,"--cms-dialog-fullscreen-left",f,u=>`${u}px`),S(g.panel,"--cms-dialog-fullscreen-top",p,u=>`${u}px`),S(g.panel,"--cms-dialog-fullscreen-width",O,u=>`${u}px`),S(g.panel,"--cms-dialog-fullscreen-height",W,u=>`${u}px`)},$=g=>{g!=null&&g.panel&&(S(g.panel,"position",null),S(g.panel,"inset",null),S(g.panel,"top",null),S(g.panel,"left",null),S(g.panel,"right",null),S(g.panel,"bottom",null),S(g.panel,"width",null),S(g.panel,"height",null),S(g.panel,"min-height",null),S(g.panel,"max-width",null),S(g.panel,"max-height",null),S(g.panel,"min-width",null),S(g.panel,"margin",null),S(g.panel,"box-sizing",null),S(g.panel,"border-width",null),S(g.panel,"border-radius",null),S(g.panel,"transform",null),S(g.panel,"overflow",null),S(g.panel,"--cms-dialog-fullscreen-left",null),S(g.panel,"--cms-dialog-fullscreen-top",null),S(g.panel,"--cms-dialog-fullscreen-width",null),S(g.panel,"--cms-dialog-fullscreen-height",null))},ae=(g,f)=>{var h,z,B,U,de;if(!g)return;if((h=g._dialogViewportCleanup)==null||h.call(g),g._dialogViewportCleanup=null,!f){$(g);return}let p=null;const O=globalThis.requestAnimationFrame||(L=>setTimeout(()=>L(Date.now()),0)),W=globalThis.cancelAnimationFrame||clearTimeout,u=()=>V(g),x=()=>{p!=null&&W(p),p=O(()=>{p=null,u()})};u(),x(),window.addEventListener("resize",u),window.addEventListener("orientationchange",x),(B=(z=window.visualViewport)==null?void 0:z.addEventListener)==null||B.call(z,"resize",u),(de=(U=window.visualViewport)==null?void 0:U.addEventListener)==null||de.call(U,"scroll",x),g._dialogViewportCleanup=()=>{var L,m,N,A;p!=null&&(W(p),p=null),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",x),(m=(L=window.visualViewport)==null?void 0:L.removeEventListener)==null||m.call(L,"resize",u),(A=(N=window.visualViewport)==null?void 0:N.removeEventListener)==null||A.call(N,"scroll",x)}},F=()=>v,K=g=>{var p;const f=l((p=g.state)!=null?p:g.color);return f?o.includes(f)?f:String(f):""},oe=g=>{const f=l(g.size);return typeof f=="string"&&r.includes(f)?f:""},H=g=>{var p,O,W;const f=String(l((W=(O=(p=g.actionsAlign)!=null?p:g.footerAlign)!=null?O:g.alignActions)!=null?W:"end")).toLowerCase();return["start","left"].includes(f)?"start":["center","middle"].includes(f)?"center":["between","space-between"].includes(f)?"between":["stretch","full"].includes(f)?"stretch":"end"},Y=g=>{var p,O,W;const f=String(l((W=(O=(p=g.align)!=null?p:g.verticalAlign)!=null?O:g.position)!=null?W:"center")).toLowerCase();return["top","start","flex-start"].includes(f)?"cms-dialog-align-top":["bottom","end","flex-end"].includes(f)?"cms-dialog-align-bottom":""},Q=g=>{var p,O;return((O=(p=g.closable)!=null?p:g.dismissible)!=null?O:g.closeButton)!==!1},le=()=>{var ee,me,ye,be,M,D,G,Ce;const g=F(),f={close:j,dismiss:j,open:T,toggle:ce,update:ne,isOpen:q,entry:()=>c,props:g},p=g.icon!=null?typeof g.icon=="string"?he.Icon({name:g.icon,size:g.iconSize||"md"}):JSswift.ui.slot(g.icon,{as:"icon"}):null,O=P(s,"eyebrow",f,b(g.eyebrow,f)),W=P(s,"title",f,b((me=(ee=g.title)!=null?ee:g.heading)!=null?me:g.header,f)),u=P(s,"subtitle",f,b((ye=g.subtitle)!=null?ye:g.description,f)),x=P(s,"icon",f,p),h=P(s,"header",f,b((be=g.headerContent)!=null?be:g.head,f)),z=Q(g)?P(s,"close",f,he.Btn({class:"cms-dialog-close",size:"sm",outline:!0,"aria-label":g.closeLabel||"Chiudi dialog","data-dialog-close":!0},he.Icon({name:g.closeIcon||"close",size:"sm"}))):[],B=(G=(D=(M=g.content)!=null?M:g.body)!=null?D:g.message)!=null?G:n&&n.length?n:null;let U=P(s,"content",f,b(B,f));U.length||(U=P(s,"body",f,b(B,f))),U.length||(U=P(s,"default",f,b(B,f)));const de=b((Ce=g.footer)!=null?Ce:g.actions,f);let L=P(s,"footer",f,de);L.length||(L=P(s,"actions",f,de));let m=null;h.length?m=_.div({class:"cms-dialog-head cms-dialog-head-custom"},...h):(O.length||W.length||u.length||x.length||z.length)&&(m=_.div({class:"cms-dialog-head"},x.length?_.div({class:"cms-dialog-icon"},...x):null,_.div({class:"cms-dialog-head-main"},O.length?_.div({class:"cms-dialog-eyebrow"},...O):null,W.length?_.div({class:"cms-dialog-title"},...W):null,u.length?_.div({class:"cms-dialog-subtitle"},...u):null),z.length?_.div({class:"cms-dialog-close-wrap"},...z):null));const N=_.div({class:ie(["cms-dialog-body",g.bodyClass])},...U),A=L.length?_.div({class:ie(["cms-dialog-actions",`is-${H(g)}`,ge(g.stackActions,"is-stacked"),g.actionsClass,g.footerClass])},...L):null;return _.div({class:ie(["cms-dialog-shell",ge(!!m,"has-head"),ge(!!A,"has-footer"),ge(g.divider!==!1,"with-divider")])},...[m,N,A].filter(Boolean))},re=g=>{var W;if(!(g!=null&&g.panel))return;const f=F(),p=K(f),O=oe(f);k(g.panel,"_dialogClassTokens",["cms-dialog","cms-singularity","cms-clear-set",O?`cms-dialog-${O}`:"",p,p?`cms-state-${p}`:"",l(f.fullscreen)?"fullscreen":"",l(f.scrollable)?"scrollable":"",l(f.stickyHeader)?"sticky-head":"",l(f.stickyActions)?"sticky-actions":"",l(f.borderless)?"borderless":"",...E(f.class),...E(f.panelClass)]),k(g.overlay,"_dialogOverlayClassTokens",[Y(f),l(f.backdropBlur)?"cms-dialog-overlay-blur":"",...E(f.overlayClass)]),S(g.panel,"--cms-dialog-width",l(f.width),Be),S(g.panel,"--cms-dialog-min-width",l(f.minWidth),Be),S(g.panel,"--cms-dialog-max-width",l(f.maxWidth),Be),S(g.panel,"--cms-dialog-max-height",l(f.maxHeight),Be),S(g.panel,"--cms-dialog-body-max-height",l((W=f.bodyMaxHeight)!=null?W:f.contentMaxHeight),Be),f.style&&Object.assign(g.panel.style,f.style),Ye(g.panel,f),ae(g,l(f.fullscreen)),g.panel.setAttribute("role",f.role||"dialog"),g.panel.setAttribute("aria-modal",f.modal===!1?"false":"true"),f.ariaLabel?g.panel.setAttribute("aria-label",f.ariaLabel):g.panel.removeAttribute("aria-label")},Z=()=>{c!=null&&c.panel&&c.panel.replaceChildren(le())},ne=(g={})=>(g&&typeof g=="object"&&(v={...v,...g}),c&&(re(c),Z()),J),T=(g=null)=>{var W,u,x,h,z;if(g&&typeof g=="object"&&(v={...v,...g}),c)return re(c),Z(),c;a=document.activeElement;const f=F(),p=f.persistent===!0;c=JSswift.overlay.open(()=>le(),{type:"dialog",backdrop:f.backdrop!==!1,lockScroll:f.lockScroll!==!1,trapFocus:f.trapFocus!==!1,autoFocus:f.autoFocus!==!1,closeOnOutside:(W=f.closeOnOutside)!=null?W:!p,closeOnBackdrop:(u=f.closeOnBackdrop)!=null?u:!p,closeOnEsc:(x=f.closeOnEsc)!=null?x:!p,className:Dt(["cms-dialog"]),onClose:()=>{var B,U,de,L;(B=c==null?void 0:c._dialogViewportCleanup)==null||B.call(c),(U=c==null?void 0:c.panel)==null||U.removeEventListener("click",O),c=null,(L=(de=F()).onClose)==null||L.call(de),a&&typeof a.focus=="function"&&setTimeout(()=>a.focus(),0)}});const O=B=>{const U=B.target;U&&U.closest&&U.closest("[data-dialog-close]")&&j()};return c.panel.addEventListener("click",O),re(c),pn(c),(z=(h=F()).onOpen)==null||z.call(h,c),c},j=()=>{if(!c)return;const g=c;bn(g,()=>JSswift.overlay.close(g.id))},q=()=>!!c,ce=(g=null)=>q()?(j(),null):T(g),J={open:T,close:j,toggle:ce,update:ne,isOpen:q,entry:()=>c,props:()=>({...v})};return J},he.TabPanel=(...t)=>{var ke,fe,ve,pe,ze,Me,Pe,Ae,y,X,xe,R,d;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Array.isArray(e.tabs)?e.tabs:Array.isArray(e.items)?e.items:[],r=Nt(e.model,"UI.TabPanel:model"),v=e.id||"cms-tabpanel-"+Math.random().toString(36).slice(2,9),c=i=>String(l(i)||"vertical").toLowerCase()==="horizontal"?"horizontal":"vertical",a=i=>String(l(i)||"before").toLowerCase()==="after"?"after":"before",b=i=>{const C=String(l(i)||"").toLowerCase();return C==="pills"||C==="pill"?"pills":C==="soft"||C==="card"?"soft":"line"},E=i=>{const C=l(i);return C==null||C===""?null:JSswift.uiColors.includes(C)?`var(--cms-${C})`:String(C)},k=c(e.orientation||e.orient||e.direction),S=a(e.navPosition||e.barPosition||e.position),I=b(e.variant||(e.pills?"pills":e.soft?"soft":"line")),V=!!e.wrap,$=!!e.swipeable,ae=!!e.infinite,F=!!e.animated,K=!!((fe=(ke=e.navFill)!=null?ke:e.fill)!=null?fe:e.stretch),oe=!!e.disabled,H=l((ve=e.transitionDuration)!=null?ve:e["transition-duration"]),Y=(()=>{if(H==null)return 220;if(typeof H=="number")return H;const i=parseFloat(H);return Number.isFinite(i)?i:220})(),Q=l((pe=e.transitionEasing)!=null?pe:e["transition-easing"])||"ease",le=(Me=(ze=e.transitionPrev)!=null?ze:e["transition-prev"])!=null?Me:null,re=(Ae=(Pe=e.transitionNext)!=null?Pe:e["transition-next"])!=null?Ae:null,Z=E((y=e.color)!=null?y:e.state),ne=o.map((i,C)=>{var Je,He,Ge,qe,Ze,et,We,st,De,ot,ct,dt,tt,ft,St,Ct;if(i==null)return null;if(typeof i!="object")return{name:i,labelFallback:i,panelFallback:null,noteFallback:null,iconFallback:null,badgeFallback:null,hidden:!1,raw:i,index:C};const se=(et=(Ze=(qe=(Ge=(He=(Je=i.name)!=null?Je:i.value)!=null?He:i.id)!=null?Ge:i.key)!=null?qe:i.label)!=null?Ze:i.title)!=null?et:`tab-${C}`,_e=i.label!=null||i.title!=null,Ne=_e?(We=i.label)!=null?We:i.title:i.children!=null&&i.content==null&&i.panel==null?i.children:(De=(st=i.name)!=null?st:i.value)!=null?De:`Tab ${C+1}`,ue=(dt=(ct=(ot=i.content)!=null?ot:i.panel)!=null?ct:i.body)!=null?dt:_e?i.children:null,Se=(St=(ft=(tt=i.note)!=null?tt:i.subtitle)!=null?ft:i.description)!=null?St:null,Fe=(Ct=i.icon)!=null?Ct:null,Ee=Object.prototype.hasOwnProperty.call(i,"badge")?i.badge:Object.prototype.hasOwnProperty.call(i,"counter")?i.counter:null;return{...i,name:se,labelFallback:Ne,panelFallback:ue,noteFallback:Se,iconFallback:Fe,badgeFallback:Ee,index:C}}).filter(Boolean).filter(i=>i.hidden!==!0&&i.visible!==!1),T=ie(["cms-clear-set","cms-tabpanel","cms-singularity",k,`variant-${I}`,ge(V,"wrap"),ge(F,"animated"),ge(K,"nav-fill"),ge(oe,"disabled"),ge(S==="after","nav-after"),e.class]),j=JSswift.omit(e,["tabs","items","value","default","defaultValue","model","orientation","orient","direction","navPosition","barPosition","position","variant","pills","soft","navFill","fill","stretch","wrap","swipeable","infinite","animated","transitionDuration","transition-duration","transitionEasing","transition-easing","transitionPrev","transition-prev","transitionNext","transition-next","slots","empty","tabClass","tabStyle","panelClass","panelStyle","navClass","panelsClass","class","style"]);j.class=T,j.style=e.style;const q=_.div(j);F&&(q.style.setProperty("--cms-tabpanel-duration",`${Y}ms`),q.style.setProperty("--cms-tabpanel-easing",Q)),Z&&q.style.setProperty("--cms-tabpanel-accent",Z);const ce=_.div({class:ie(["cms-tabpanel-nav",e.navClass]),role:"tablist","aria-orientation":k}),J=_.div({class:ie(["cms-tabpanel-panels",e.panelsClass])}),g=[],f=[];let p=-1;const O=()=>k==="horizontal",W=(i,C,se)=>({tab:i,name:i.name,index:C,active:se,value:i.name,select:()=>ye(C),next:()=>M(),prev:()=>D()}),u=(i,C,se=!1)=>{var Ne;if(!ne.length)return-1;let _e=i;for(let ue=0;ue<ne.length;ue+=1){if(_e+=C,_e>=ne.length){if(!se)return-1;_e=0}else if(_e<0){if(!se)return-1;_e=ne.length-1}if(!((Ne=ne[_e])!=null&&Ne.disabled))return _e}return-1},x=i=>{var se;const C=(se=g[i])==null?void 0:se.btn;!C||typeof C.focus!="function"||requestAnimationFrame(()=>C.focus())},h=(i,C,se)=>{const _e=W(i,C,se),Ne=JSswift.ui.renderSlot(s,"label",_e,i.labelFallback);return P(null,"default",{},Ne)},z=(i,C)=>{var st,De,ot,ct,dt;const se=C===p,_e=`${v}-tab-${C}`,Ne=`${v}-panel-${C}`,ue=W(i,C,se),Se=h(i,C,se),Fe=i.iconFallback!=null?typeof i.iconFallback=="string"?he.Icon({name:i.iconFallback,size:(ot=(De=(st=i.iconSize)!=null?st:i.size)!=null?De:e.size)!=null?ot:null}):i.iconFallback:null,Ee=P(s,"icon",ue,Fe),Je=P(s,"note",ue,i.noteFallback),He=P(s,"badge",ue,i.badgeFallback),Ge=_.span({class:"cms-tabpanel-tab-inner"},Ee.length?_.span({class:"cms-tabpanel-tab-icon"},...Ee):null,_.span({class:"cms-tabpanel-tab-copy"},_.span({class:"cms-tabpanel-tab-label"},...Se.length?Se:[""]),Je.length?_.span({class:"cms-tabpanel-tab-note"},...Je):null),He.length?_.span({class:"cms-tabpanel-tab-badge"},...He):null),qe=P(s,"tab",{...ue,label:Se,icon:Ee,note:Je,badge:He,tabId:_e,panelId:Ne},Ge),Ze=tt=>{if(oe||i.disabled)return;const ft=tt.key;if(ft==="Enter"||ft===" "){tt.preventDefault(),ye(C);return}if(ft==="Home"){tt.preventDefault();const mt=ne.findIndex(At=>!At.disabled);mt>=0&&(ye(mt),x(mt));return}if(ft==="End"){tt.preventDefault();const mt=(()=>{var At;for(let ht=ne.length-1;ht>=0;ht-=1)if(!((At=ne[ht])!=null&&At.disabled))return ht;return-1})();mt>=0&&(ye(mt),x(mt));return}const St=O()?["ArrowLeft"]:["ArrowUp"],Ct=O()?["ArrowRight"]:["ArrowDown"];if(St.includes(ft)){tt.preventDefault();const mt=u(C,-1,ae);mt>=0&&(ye(mt,{dir:"prev"}),x(mt));return}if(Ct.includes(ft)){tt.preventDefault();const mt=u(C,1,ae);mt>=0&&(ye(mt,{dir:"next"}),x(mt))}},et=he.Btn({class:ie(["cms-tabpanel-tab",ge(se,"active"),ge(i.disabled||oe,"disabled"),e.tabClass,i.tabClass||i.class]),type:"button",id:_e,role:"tab",disabled:!!(i.disabled||oe),"aria-selected":se?"true":"false","aria-controls":Ne,tabindex:se?"0":"-1",outline:I==="pills"&&!se,color:I==="pills"&&se?i.color||e.color||e.state||"primary":null,size:(dt=(ct=i.size)!=null?ct:e.size)!=null?dt:null,style:{...e.tabStyle||{},...i.tabStyle||{}},onClick:()=>{i.disabled||oe||ye(C)},onKeydown:Ze},...qe),We=_.div({class:ie(["cms-tabpanel-nav-btn",ge(se,"active"),i.navClass]),"data-name":i.name},et,_.span({class:"tab-indicator"}));return g[C]={btn:et,wrap:We,index:C},We},B=(i,C)=>{const se=C===p,_e=`${v}-tab-${C}`,Ne=`${v}-panel-${C}`,ue=W(i,C,se),Se=JSswift.ui.renderSlot(s,"panel",ue,i.panelFallback),Fe=_.div({class:ie(["cms-tabpanel-panel",ge(se,"active"),e.panelClass,i.panelClass]),style:{...e.panelStyle||{},...i.panelStyle||{}},"data-name":i.name,role:"tabpanel",id:Ne,tabindex:0,"aria-labelledby":_e,"aria-hidden":se?"false":"true"},...P(null,"default",{},Se));return f[C]=Fe,Fe},U=ne.map((i,C)=>z(i,C)),de=JSswift.ui.renderSlot(s,"nav",{tabs:ne,active:()=>{var i;return p>=0?(i=ne[p])==null?void 0:i.name:null},activeIndex:()=>p,activeTab:()=>p>=0?ne[p]:null,select:i=>{typeof i=="number"?ye(i):be(i)},next:()=>M(),prev:()=>D(),nodes:U,orientation:k,position:S,variant:I},U);P(null,"default",{},de).forEach(i=>ce.appendChild(i)),ne.length?ne.forEach((i,C)=>J.appendChild(B(i,C))):P(s,"empty",{tabs:ne},(X=e.empty)!=null?X:_.div({class:"cms-tabpanel-empty"},"Nessun contenuto disponibile.")).forEach(C=>J.appendChild(C));const L=i=>{if(!F)return;const C=i==="next"?"18px":"-18px",se=i==="next"?"-18px":"18px";q.style.setProperty("--cms-tabpanel-enter",C),q.style.setProperty("--cms-tabpanel-leave",se)},m=()=>{const i=[];le&&i.push(...String(le).split(/\s+/)),re&&i.push(...String(re).split(/\s+/)),i.length&&J.classList.remove(...i.filter(Boolean))},N=i=>{m();const C=i==="prev"?le:re;if(!C)return;const se=String(C).split(/\s+/).filter(Boolean);se.length&&(J.classList.add(...se),setTimeout(()=>J.classList.remove(...se),Y+40))},A=i=>{var _e;const C=g.find(({btn:Ne})=>Ne.classList.contains("active")),se=(_e=C==null?void 0:C.btn.parentNode)==null?void 0:_e.getBoundingClientRect();g.forEach(({btn:Ne,index:ue})=>{const Se=ue===i,Fe=Ne.parentNode;if(!Fe)return;const Ee=Fe.getBoundingClientRect();Fe.isConnected&&se&&(Fe.style.setProperty("--nav-pos-x",se.left-Ee.left+"px"),Fe.style.setProperty("--nav-pos-y",se.top-Ee.top+"px")),Fe.classList.toggle("active",Se),Ne.classList.toggle("active",Se),Ne.setAttribute("aria-selected",Se?"true":"false"),Ne.setAttribute("tabindex",Se?"0":"-1")})},ee=(i,C,se)=>{L(se),f.forEach((_e,Ne)=>{if(!_e)return;const ue=Ne===C,Se=Ne===i;ue?(_e.classList.add("active"),_e.classList.remove("leaving"),_e.setAttribute("aria-hidden","false")):(_e.classList.remove("active"),_e.setAttribute("aria-hidden","true"),F&&Se?(_e.classList.add("leaving"),setTimeout(()=>_e.classList.remove("leaving"),Y+40)):_e.classList.remove("leaving"))})},me=(i,C)=>i<0||i===C||ae&&i===ne.length-1&&C===0?"next":ae&&i===0&&C===ne.length-1?"prev":C>i?"next":"prev",ye=(i,C={})=>{var ue,Se;if(i==null||i<0||i>=ne.length||(ue=ne[i])!=null&&ue.disabled)return;const se=p;if(se===i)return;p=i;const _e=ne[i],Ne=C.dir||me(se,i);r&&!C.fromModel&&r.set(_e.name),A(i),ee(se,i,Ne),N(Ne),q.dataset.active=String(_e.name),(Se=e.onChange)==null||Se.call(e,_e.name,_e,i)},be=(i,C={})=>{if(!ne.length)return;const se=ne.findIndex(_e=>_e.name==i);se!==-1&&ye(se,C)},M=()=>{if(!ne.length)return;const i=p<0?ne.findIndex(C=>!C.disabled):u(p,1,ae);i<0||ye(i,{dir:"next"})},D=()=>{if(!ne.length)return;const i=p<0?(()=>{var C;for(let se=ne.length-1;se>=0;se-=1)if(!((C=ne[se])!=null&&C.disabled))return se;return-1})():u(p,-1,ae);i<0||ye(i,{dir:"prev"})};if($){let i=0,C=0,se=!1;const _e=42;J.addEventListener("pointerdown",Ne=>{Ne.button!=null&&Ne.button!==0||(se=!0,i=Ne.clientX,C=Ne.clientY)}),J.addEventListener("pointerup",Ne=>{if(!se)return;se=!1;const ue=Ne.clientX-i,Se=Ne.clientY-C;Math.abs(ue)<_e||Math.abs(ue)<Math.abs(Se)||(ue<0?M():D())}),J.addEventListener("pointercancel",()=>{se=!1}),J.addEventListener("pointerleave",()=>{se=!1})}const G=r?r.get():(d=(R=(xe=e.value)!=null?xe:e.defaultValue)!=null?R:e.default)!=null?d:null;if(ne.length){const i=ne.findIndex(C=>C.name==G);if(i>=0)ye(i,{fromModel:!0});else{const C=ne.findIndex(se=>!se.disabled);C>=0&&(ye(C,{fromModel:!0}),r&&r.set(ne[C].name))}}return r&&r.watch(i=>be(i,{fromModel:!0}),"UI.TabPanel:watch"),S==="after"?(q.appendChild(J),q.appendChild(ce)):(q.appendChild(ce),q.appendChild(J)),P(s,"default",{},n).forEach(i=>q.appendChild(i)),Ye(q,e),q._tabs=()=>ne.slice(),q._active=()=>p>=0?ne[p]:null,q._getValue=()=>{var i;return p>=0?(i=ne[p])==null?void 0:i.name:null},q._setValue=i=>be(i),q._select=i=>{typeof i=="number"?ye(i):be(i)},q._next=M,q._prev=D,q};function qo(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function vs({title:t,message:e,contentNode:n,okText:s,cancelText:o,showCancel:r,onOk:v,onCancel:c,persistent:a}){bl();const b=_.div({class:"cms-dialog-backdrop",onClick:$=>{$.target===b&&a!==!0&&(c==null||c())}}),E=P(null,"default",{},t),k=P(null,"default",{},e),S=P(null,"default",{},n),I=_.div({class:"cms-dialog cms-panel"},E.length?_.h3(...E):null,k.length?_.p(...k):null,...S,_.div({class:"cms-dialog-actions"},r?JSswift.ui.Btn({onClick:c},o||"Annulla"):null,JSswift.ui.Btn({color:"primary",onClick:v},s||"OK")));b.appendChild(I),bl().appendChild(b);const V=$=>{$.key==="Escape"&&(c==null||c())};return document.addEventListener("keydown",V,{once:!0}),{backdrop:b,close:()=>qo(b)}}je.dialog.alert=function(t,e={}){return new Promise(n=>{const{backdrop:s,close:o}=vs({title:e.title||"Info",message:t,okText:e.okText||"OK",showCancel:!1,persistent:e.persistent,onOk:()=>{o(),n(!0)},onCancel:()=>{o(),n(!0)}})})},je.dialog.confirm=function(t={}){return new Promise(e=>{const{close:n}=vs({title:t.title||"Conferma",message:t.message||"",okText:t.okText||"Conferma",cancelText:t.cancelText||"Annulla",showCancel:!0,persistent:t.persistent,onOk:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)}})})},je.dialog.prompt=function(t={}){return new Promise(e=>{const n=JSswift.ui.Input({class:"cms-dialog-input",type:t.type||"text",placeholder:t.placeholder||""});t.value!=null&&(n.value=String(t.value));const{close:s}=vs({title:t.title||"Inserisci valore",message:t.message||"",okText:t.okText||"OK",cancelText:t.cancelText||"Annulla",showCancel:!0,contentNode:_.div(n),persistent:t.persistent,onOk:()=>{const o=n.value;s(),e(o)},onCancel:()=>{s(),e(null)}});setTimeout(()=>n.focus(),0)})},je.services=je.services||{},je.services.loading=je.services.loading||{},je.loading=je.services.loading;let _t=null,In=0;function yl(){if(_t)return _t;_t=document.createElement("div"),_t.className="cms-loading-backdrop",_t.style.cssText=`
1
+ (function(Ue){var Ps;Ue.ui=Ue.ui||{},Ue.services=Ue.services||{},Ue.services.notify=Ue.services.notify||{};const ns=Symbol("jss.ui.rodPathRaw"),On=Symbol("jss.ui.rodPathEnhanced"),Js=Symbol("jss.ui.rodPathPatchedH"),Mn=Symbol("jss.ui.rodPathWrappedUI"),kn=new WeakMap,Es=new WeakMap,Rs=new WeakMap,Ut=[],Ts=e=>{if(typeof e=="number")return Number.isInteger(e)&&e>=0;if(typeof e!="string"||e===""||e[0]==="-"||e.includes("."))return!1;const t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===e},ss=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},un=e=>{if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};let ls=!1;const Dl=()=>{ls||(ls=!0,queueMicrotask(()=>{ls=!1,Ut.length=0}))},$l=e=>{Ut.push(e),Ut.length>128&&Ut.splice(0,Ut.length-128),Dl()},Os=()=>{if(!Ut.length)return null;const e=Ut.slice();return Ut.length=0,{items:e,index:0}},Ms=(e,t)=>{if(!e)return null;const s=e.items[e.index];return!s||!Object.is(s.value,t)?null:(e.index+=1,s)},os=e=>e&&typeof e=="object"&&e[ns]?e[ns]:e,is=(e,t)=>{const s=kn.get(e);if(!s)return;let l=s.rawGet();for(const n of t){if(l==null)return;l=l[n]}return l},Vl=(e,t,s)=>{const l=kn.get(e);if(!l)return;const n=os(s);if(!t.length){if(Object.is(l.rawGet(),n))return;l.rawSet(n);return}let i=l.rawGet();(!i||typeof i!="object")&&(i=Ts(t[0])?[]:{});let c=i;for(let r=0;r<t.length-1;r++){const v=t[r];let a=c[v];if(!a||typeof a!="object"){const z=t[r+1];a=Ts(z)?[]:{},c[v]=a}c=a}Object.is(c[t[t.length-1]],n)||(c[t[t.length-1]]=n,l.rawSet(i))},Fs=(e,t)=>[()=>is(e,t),s=>Vl(e,t,s)],Ds=(e,t,s=[])=>{if(!t||typeof t!="object")return t;let l=Es.get(e);l||(l=new WeakMap,Es.set(e,l));const n=l.get(t);if(n)return n;const i=new Proxy(t,{get(c,r,v){if(r===ns)return c;const a=Reflect.get(c,r,v);if(typeof r=="symbol")return a;const z=s.concat(r);return a&&typeof a=="object"?Ds(e,a,z):typeof a=="function"?a.bind(v):(ss(a)&&$l({rod:e,path:z,value:a}),a)},set(c,r,v,a){const z=os(v),u=Reflect.get(c,r,a);if(Object.is(u,z))return!0;const x=Reflect.set(c,r,z,a);if(x){const k=kn.get(e);k==null||k.rawSet(k.rawGet())}return x},deleteProperty(c,r){const v=Reflect.has(c,r),a=Reflect.deleteProperty(c,r);if(a&&v){const z=kn.get(e);z==null||z.rawSet(z.rawGet())}return a}});return l.set(t,i),i},$s=e=>{if(!e||typeof e!="object"||e.type!=="rod"||e[On])return e;const t=Object.getOwnPropertyDescriptor(e,"value");if(!t||typeof t.get!="function"||typeof t.set!="function")return e;const s=()=>t.get.call(e),l=n=>t.set.call(e,os(n));return kn.set(e,{rawGet:s,rawSet:l}),Object.defineProperty(e,"value",{get(){const n=s();return!n||typeof n!="object"?n:Ds(e,n,[])},set(n){l(n)},configurable:!0}),Object.defineProperty(e,On,{value:!0,configurable:!1}),e},Bl=()=>{if(typeof window._.rod!="function"||window._.rod[On])return;const e=window._.rod,t=function(...l){return $s(e(...l))};Object.defineProperty(t,On,{value:!0,configurable:!1}),window._.rod=t};Ue.ui.withoutRodPathCapture=e=>{const t=Ut.length;try{return e()}finally{Ut.length=t}};const as=(e,t,s="")=>{if(Array.isArray(e)){let i=!1;const c=e.map(r=>{const v=as(r,t,"");return v!==r&&(i=!0),v});return i?c:e}if(ss(e)){const i=Ms(t,e);return i?s==="model"?Fs(i.rod,i.path):()=>is(i.rod,i.path):e}if(!un(e))return e;let l=!1;const n={};for(const i of Object.keys(e)){const c=as(e[i],t,i);n[i]=c,c!==e[i]&&(l=!0)}return l?n:e},rs=(e,t,s="")=>{if(Array.isArray(e)){let i=!1;const c=e.map(r=>{const v=rs(r,t,"");return v!==r&&(i=!0),v});return i?c:e}if(ss(e)){const i=Ms(t,e);return i?s==="model"?Fs(i.rod,i.path):()=>is(i.rod,i.path):e}if(!un(e))return e;let l=!1;const n={};for(const i of Object.keys(e)){const r=i==="model"||i==="children"?rs(e[i],t,i):e[i];n[i]=r,r!==e[i]&&(l=!0)}return l?n:e},Vs=e=>{if(typeof e!="function"||e[Mn])return e;const t=Rs.get(e);if(t)return t;const s=function(...n){const i=Os();if(!i)return e.apply(this,n);let c=!1;const r=n.map(v=>{const a=rs(v,i,"");return a!==v&&(c=!0),a});return e.apply(this,c?r:n)};return Object.defineProperty(s,Mn,{value:!0,configurable:!1}),Rs.set(e,s),s},Hl=()=>{const e=Ue.ui;if(!(!e||e[Mn])){Object.defineProperty(e,Mn,{value:!0,configurable:!1});for(const t of Object.keys(e))typeof e[t]=="function"&&(e[t]=Vs(e[t]));Ue.ui=new Proxy(e,{get(t,s,l){return Reflect.get(t,s,l)},set(t,s,l,n){const i=typeof l=="function"?Vs(l):l;return Reflect.set(t,s,i,n)}})}},Wl=()=>{if(!window._||window._[Js])return;Object.defineProperty(window._,Js,{value:!0,configurable:!1});const e=new Set(["rod","rodBind","rodFromSignal"]);for(const t of Object.keys(window._)){if(e.has(t))continue;const s=window._[t];typeof s=="function"&&(window._[t]=function(...n){const i=Os();if(!i)return s.apply(this,n);let c=!1;const r=n.map(v=>{const a=as(v,i,"");return a!==v&&(c=!0),a});return s.apply(this,c?r:n)})}};Bl(),((Ps=JSswift.rod)==null?void 0:Ps._all)instanceof Set&&JSswift.rod._all.forEach(e=>$s(e)),Wl(),Hl();const Bs={error:"danger",danger:"danger",warn:"warning",warning:"warning",success:"success",info:"info",primary:"primary",secondary:"secondary",light:"light",dark:"dark"},fi=new Set(Object.values(Bs)),Ul=new Set(["none","xxs","xs","sm","md","lg","xl","xxl","xxxl","full"]),Gl=new Set(["none","sm","md","lg"]),Nn={xxs:{font:"9px",pad:"2px 5px"},xs:{font:"10px",pad:"2px 6px"},sm:{font:"11px",pad:"2px 7px"},md:{font:"12px",pad:"2px 8px"},lg:{font:"13px",pad:"3px 10px"},xl:{font:"14px",pad:"4px 12px"},xxl:{font:"15px",pad:"5px 14px"},xxxl:{font:"16px",pad:"6px 16px"}},on=e=>{if(e.indexOf("-")>-1)return!0},bt=e=>{if(!e)return"";const t=String(e).toLowerCase();return Bs[t]||""},Kl=e=>{if(e==null)return null;const t=String(e).toLowerCase();return t==="full"?"xxxl":Ul.has(t)?t:null},Fn=e=>{if(e===!0)return"sm";if(e==null||e===!1)return null;const t=String(e).toLowerCase();return Gl.has(t)?t:null},An=e=>e&&typeof e=="object"&&!e.nodeType&&!Array.isArray(e)&&!(e instanceof Function),cs=e=>e&&e.nodeType===1&&String(e.tagName||"").toLowerCase()==="li",an=e=>e==null||e===!1||e===""?[]:Array.isArray(e)?e:[e];JSswift.isUIPlainObject=An,JSswift.isListItemNode=cs,JSswift.asNodeArray=an;const mn=[{key:"mobile",aliases:["mobile","mobil"],prefix:"jss-"},{key:"tablet",aliases:["tablet"],prefix:"jss-tablet-"},{key:"pc",aliases:["pc","desktop"],prefix:"jss-pc-"}],us=mn.flatMap(e=>e.aliases),Dn=(e,t)=>Object.prototype.hasOwnProperty.call(e||{},t),Ln=(e={},t)=>{if(!t)return null;for(const s of t.aliases){if(!Dn(e,s))continue;const l=o(e[s]);if(An(l))return l}return null},Hs=(e={},t)=>{const s=Array.isArray(t)?t:[t];return mn.some(l=>{const n=Ln(e,l);return!!n&&s.some(i=>Dn(n,i))})},Yl=e=>String(e).trim().toLowerCase().replace(/\s+/g,"-"),ql=(e={},t=[])=>{const s=[];for(const l of mn){const n=Ln(e,l);if(n)for(const i of t){const c=Array.isArray(i.prop)?i.prop:[i.prop];let r=!1,v,a="";for(const x of c)if(Dn(n,x)){v=o(n[x]),a=x,r=!0;break}if(!r||v==null||v===""||v===!1&&!i.allowFalse)continue;const z=typeof i.map=="function"?i.map(v,{propName:a,props:n,device:l,rule:i}):`${i.class}-${Yl(v)}`,u=Array.isArray(z)?z:[z];for(const x of u)x&&s.push(String(x).startsWith("jss-")?x:`${l.prefix}${x}`)}}return s},Xl=(e={})=>mn.some(t=>!!Ln(e,t)),Ql=(e={},t=[])=>{for(const s of t){if(!Dn(e,s))continue;const l=o(e[s]);if(!(l==null||l===""))return l}},Zl=(e,t={})=>{var s;return e==null||e===""||e===!1&&!t.allowFalse?"":typeof t.mapValue=="function"?t.mapValue(e,t):typeof e=="number"?t.number==="raw"?String(e):`${e}px`:t.token&&typeof e=="string"&&((s=JSswift.uiSizes)!=null&&s.includes(e))?`var(--jss-${t.token}-${e})`:String(e)},eo=(e,t,s)=>{!e||s==null||s===""||(typeof e.setProperty=="function"?e.setProperty(t,s):e[t]=s)},to=(e,t)=>e==="mobile"?`jss-rsp-${t}`:`jss-rsp-${e}-${t}`,Ws=(e,t)=>{var s;if(!(!e||!t)){if((s=e.classList)!=null&&s.add){e.classList.add(t);return}e.class=oe([e.class,t])}},Us=(e,t={},s=[])=>{if(!e||!t)return e;const l=[];for(const c of mn){const r=Ln(t,c);r&&l.push([c.key,r])}if(!l.length)return e;const n=e.style||{};let i=!1;for(const c of s){const r=Array.isArray(c.prop)?c.prop:[c.prop],v=(a,z)=>{const u=Ql(z,r),x=Zl(u,c);if(!x)return;const k=c.var||c.css,f=a==="mobile"?"--jss-rsp-":`--jss-rsp-${a}-`;eo(n,`${f}${k}`,x),Ws(e,to(a,k)),i=!0};v("mobile",t);for(const[a,z]of l)v(a,z)}return i&&(e.nodeType||(e.style=n),Ws(e,"jss-rsp")),e};JSswift.uiResponsiveDevices=mn,JSswift.uiResponsiveOmitProps=us,JSswift.uiResponsivePropsFor=Ln,JSswift.uiResponsiveHasConfig=Xl,JSswift.uiResponsiveHasProp=Hs,JSswift.uiResponsiveClasses=ql,JSswift.uiApplyResponsiveProps=Us;const no=JSswift.omit;JSswift.omit=(e,t=[])=>{const s=Array.isArray(t)?t.concat(us):us;return no(e,s)};const Qt=(e={})=>{var t;const s=[],l={};if(s.push(pe(e.clickable,"jss-clickable"),pe(e.dense,"jss-dense"),pe(e.flat,"jss-flat"),pe(e.border,"jss-border"),pe(e.glossy,"jss-glossy"),pe(e.glow,"jss-glow"),pe(e.glass,"jss-glass"),pe(e.shadow,"jss-shadow"),pe(e.outline,"jss-outline"),pe(e.rounded,"jss-rounded"),pe(e.gradient,"jss-gradient"),pe(e.textGradient,"jss-text-gradient"),pe(e.lightShadow,"jss-light-shadow")),rt(e.color))s.push(()=>{const n=o(e.color),i=bt(n);return i?`jss-state-${i}`:""}),l.backgroundColor=()=>{const n=o(e.color);return bt(n)?"":n&&on(String(n))?`var(--jss-${n})`:n||""};else{const n=bt(e.color);n?s.push(`jss-state-${n}`):e.color&&on(e.color)?l.backgroundColor=`var(--jss-${e.color})`:e.color&&(l.backgroundColor=e.color)}if(rt(e.textColor)?l.color=()=>{const n=o(e.textColor);return n&&on(String(n))?`var(--jss-${n})`:n||""}:e.textColor&&on(e.textColor)?l.color=`var(--jss-${e.textColor})`:e.textColor&&(l.color=e.textColor),rt(e.size))s.push(()=>{var n;const i=o(e.size);return typeof i=="string"&&((n=JSswift.uiSizes)!=null&&n.includes(i))?`jss-size-${i}`:""});else{const n=e.size;typeof n=="string"&&((t=JSswift.uiSizes)!=null&&t.includes(n))&&s.push(`jss-size-${n}`)}if(rt(e.shadow))s.push(()=>{const n=o(e.shadow),i=Fn(n);return i?`jss-shadow-${i}`:""}),l.boxShadow=()=>{const n=o(e.shadow);return Fn(n)||n==null||n===!1?"":typeof n=="string"?n:""};else{const n=Fn(e.shadow);n?s.push(`jss-shadow-${n}`):e.shadow&&typeof e.shadow=="string"&&(l.boxShadow=e.shadow)}s.length&&(e.class=oe([e.class,...s])),Object.keys(l).length&&(e.style={...l,...e.style||{}})},so=JSswift.uiNormalizeArgs;JSswift.uiNormalizeArgs=function(e){const t=so(e),s=t.props||{};if(s&&Object.prototype.hasOwnProperty.call(s,"children")){const l=s.children;(!t.children||t.children.length===0)&&(t.children=Array.isArray(l)?l:[l]),delete s.children}return Qt(s),t};const he=window._;function dn(e){if(!e)return null;if(!Array.isArray(e))return e;const t=[],s=e.slice();for(;s.length;){const l=s.shift();l&&(Array.isArray(l)?s.unshift(...l):t.push(l))}return t.length?t:null}const Gs={padding:"p",paddingTop:"p",paddingRight:"p",paddingBottom:"p",paddingLeft:"p",paddingInline:"p",paddingInlineStart:"p",paddingInlineEnd:"p",paddingBlock:"p",paddingBlockStart:"p",paddingBlockEnd:"p",margin:"m",marginTop:"m",marginRight:"m",marginBottom:"m",marginLeft:"m",marginInline:"m",marginInlineStart:"m",marginInlineEnd:"m",marginBlock:"m",marginBlockStart:"m",marginBlockEnd:"m",width:"w",minWidth:"w",maxWidth:"w",height:"h",minHeight:"h",maxHeight:"h"},lo=e=>e===!0?"wrap":e===!1?"nowrap":String(e),Ks=e=>typeof e=="number"?`repeat(${Math.max(1,Math.round(e))}, minmax(0, 1fr))`:String(e),Ys=[{prop:"display",css:"display",var:"display"},{prop:"direction",css:"flex-direction",var:"flex-direction"},{prop:"wrap",css:"flex-wrap",var:"flex-wrap",allowFalse:!0,mapValue:lo},{prop:"align",css:"align-items",var:"align-items"},{prop:"justify",css:"justify-content",var:"justify-content"},{prop:"self",css:"align-self",var:"align-self"},{prop:"justifySelf",css:"justify-self",var:"justify-self"},{prop:"place",css:"place-items",var:"place-items"},{prop:"placeSelf",css:"place-self",var:"place-self"},{prop:["cols","columns"],css:"grid-template-columns",var:"grid-template-columns",mapValue:Ks},{prop:"rows",css:"grid-template-rows",var:"grid-template-rows",mapValue:Ks},{prop:"flow",css:"grid-auto-flow",var:"grid-auto-flow",mapValue:e=>String(e).trim().toLowerCase().replace("-"," ")},{prop:"autoRows",css:"grid-auto-rows",var:"grid-auto-rows"},{prop:["span","gridColumn"],css:"grid-column",var:"grid-column",number:"raw"},{prop:["row","rowSpan"],css:"grid-row",var:"grid-row",number:"raw"},{prop:"area",css:"grid-area",var:"grid-area"},{prop:"gap",css:"gap",var:"gap",token:"gap"},{prop:"rowGap",css:"row-gap",var:"row-gap",token:"gap"},{prop:["columnGap","colGap"],css:"column-gap",var:"column-gap",token:"gap"},{prop:"width",css:"width",var:"width",token:"w"},{prop:"minWidth",css:"min-width",var:"min-width",token:"min-w"},{prop:"maxWidth",css:"max-width",var:"max-width",token:"max-w"},{prop:"height",css:"height",var:"height",token:"h"},{prop:"minHeight",css:"min-height",var:"min-height",token:"min-h"},{prop:"maxHeight",css:"max-height",var:"max-height",token:"max-h"},{prop:"padding",css:"padding",var:"padding",token:"p"},{prop:"paddingLeft",css:"padding-left",var:"padding-left",token:"p"},{prop:"paddingRight",css:"padding-right",var:"padding-right",token:"p"},{prop:"paddingTop",css:"padding-top",var:"padding-top",token:"p"},{prop:"paddingBottom",css:"padding-bottom",var:"padding-bottom",token:"p"},{prop:"margin",css:"margin",var:"margin",token:"m"},{prop:"marginLeft",css:"margin-left",var:"margin-left",token:"m"},{prop:"marginRight",css:"margin-right",var:"margin-right",token:"m"},{prop:"marginTop",css:"margin-top",var:"margin-top",token:"m"},{prop:"marginBottom",css:"margin-bottom",var:"margin-bottom",token:"m"},{prop:"fontSize",css:"font-size",var:"font-size",token:"f"},{prop:"fontWeight",css:"font-weight",var:"font-weight",token:"fw",number:"raw"},{prop:"lineHeight",css:"line-height",var:"line-height",token:"lh",number:"raw"},{prop:"letterSpacing",css:"letter-spacing",var:"letter-spacing",token:"ls"},{prop:["borderRadius","radius"],css:"border-radius",var:"border-radius",token:"r"},{prop:"overflow",css:"overflow",var:"overflow"},{prop:"order",css:"order",var:"order",number:"raw"}],qs=Ys.filter(e=>{const t=Array.isArray(e.prop)?e.prop:[e.prop];return t.some(s=>Object.prototype.hasOwnProperty.call(Gs,s))||t.includes("fontSize")||t.includes("fontWeight")||t.includes("lineHeight")||t.includes("letterSpacing")||t.includes("borderRadius")||t.includes("radius")});JSswift.uiResponsiveStyleRules=Ys,JSswift.uiResponsiveCommonStyleRules=qs;const oo=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),io=(e,t,s,l)=>{t==null||t===!1||t===""||e.style.setProperty(oo(s),gs(t,l))};function Qe(e,t){t.size&&(typeof t.size=="number"?e.style.setProperty("--jss-font-size",`${t.size}px`):JSswift.uiSizes.includes(t.size)&&e.style.setProperty("--jss-font-size",`var(--jss-font-size-${t.size})`)),Object.entries(Gs).forEach(([s,l])=>{Hs(t,s)||io(e,t[s],s,l)}),Us(e,t,qs),t.gradient&&typeof t.gradient=="number"&&e.style.setProperty("--set-gradient-deg",`${t.gradient}deg`),t.radius&&(typeof t.radius=="number"?e.style.setProperty("--set-border-radius",`${t.radius}px`):JSswift.uiSizes.includes(t.radius)?e.style.setProperty("--set-border-radius",`var(--jss-r-${t.radius})`):e.style.setProperty("--set-border-radius",`${t.radius}`))}function ds(e={},...t){const s=document.createElement("option");e&&typeof e=="object"&&(e.value!=null&&(s.value=String(e.value)),e.label!=null&&(s.label=String(e.label)),e.disabled!=null&&(s.disabled=!!e.disabled),e.selected!=null&&(s.selected=!!e.selected),e.class!=null&&(s.className=String(e.class)));const l=t.flat?t.flat(1/0):t;return l.length?l.forEach(n=>{n==null||n===!1||(n instanceof Node?s.appendChild(n):s.appendChild(document.createTextNode(String(n))))}):e&&e.text!=null&&(s.textContent=String(e.text)),s}JSswift.ui.getSlot=(e,t)=>e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:null,JSswift.ui.renderSlot=(e,t,s,l)=>{const n=JSswift.ui.getSlot(e,t),c=n!=null?typeof n=="function"?n(s||{}):n:l;return c==null?null:dn(JSswift.ui.slot(c))};const F=(e,t,s,l)=>{const n=JSswift.ui.renderSlot(e,t,s,l);return n?Array.isArray(n)?n:[n]:[]},bn=new Set;let $n=!1;const ao=new Set(["ctrl","alt","shift","meta"]),ro={control:"ctrl",ctl:"ctrl",option:"alt",opt:"alt",command:"meta",cmd:"meta","\u2318":"meta","\u2303":"ctrl","\u2325":"alt","\u21E7":"shift",esc:"escape",return:"enter",plus:"+",spacebar:"space",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete"},co={ctrl:"Ctrl",alt:"Alt",shift:"Shift",meta:"Meta",escape:"Esc",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",delete:"Del",arrowup:"Up",arrowdown:"Down",arrowleft:"Left",arrowright:"Right",pageup:"PgUp",pagedown:"PgDn"},Xs=()=>{if(typeof navigator=="undefined")return!1;const e=String(navigator.platform||navigator.userAgent||"");return/(mac|iphone|ipad|ipod)/i.test(e)},fs=e=>{if(e==null)return"";const t=String(e).trim().toLowerCase();return t?ro[t]||t:""},Qs=e=>{if(e==null||e===!1)return null;const t=String(e).trim();if(!t)return null;const s=t.split("+").map(fs).filter(Boolean);if(!s.length)return null;const l={raw:t,key:"",ctrl:!1,alt:!1,shift:!1,meta:!1};return s.forEach(n=>{if(n==="mod"){Xs()?l.meta=!0:l.ctrl=!0;return}if(ao.has(n)){l[n]=!0;return}l.key=n}),l.key?l:null},uo=e=>e==null||e===!1?[]:(Array.isArray(e)?e:[e]).map(s=>{var l,n,i;if(s==null||s===!1)return null;if(typeof s=="object"&&!Array.isArray(s)){const r=Qs((i=(n=(l=s.shortcode)!=null?l:s.shortcut)!=null?n:s.keys)!=null?i:s.key);return r?{...s,...r}:null}const c=Qs(s);return c?{...c}:null}).filter(Boolean),Zs=(e={})=>{var t,s,l;return uo((l=(s=(t=e.shortcode)!=null?t:e.shortcut)!=null?s:e.hotkey)!=null?l:e.keys)},fo=(e={})=>e.showShortcode===!0||e.showShortcut===!0,In=e=>{const t=fs(e);if(!t)return"";const s={...co};return Xs()&&(s.alt="Option",s.meta="Cmd"),s[t]?s[t]:t.length===1?t.toUpperCase():t.replace(/(^|[-_ ])(\w)/g,(l,n,i)=>`${n}${i.toUpperCase()}`)},po=e=>{if(!e)return"";const t=[];return e.ctrl&&t.push(In("ctrl")),e.alt&&t.push(In("alt")),e.shift&&t.push(In("shift")),e.meta&&t.push(In("meta")),t.push(In(e.key)),t.filter(Boolean).join("+")},go=e=>(Array.isArray(e)?e:[]).map(po).filter(Boolean).join(" / "),ps=(e={},t={})=>{const s=Zs(e);if(!fo(e)||!s.length||typeof document=="undefined")return null;const l=document.createElement("span");return l.className=t.className||"jss-shortcode",l.setAttribute("aria-hidden","true"),l.textContent=go(s),l},ho=e=>{const t=(e==null?void 0:e.nodeType)===1?e:e==null?void 0:e.parentElement;if(!t||typeof t.closest!="function")return!1;if(t.isContentEditable)return!0;const s=t.closest("input, textarea, select, [contenteditable], [contenteditable='true'], [contenteditable='plaintext-only']");return!(!s||"disabled"in s&&s.disabled)},mo=(e,t)=>!e||!t||!!e.ctrlKey!=!!t.ctrl||!!e.altKey!=!!t.alt||!!e.shiftKey!=!!t.shift||!!e.metaKey!=!!t.meta?!1:fs(e.key)===t.key,el=()=>{bn.size||!$n||typeof document=="undefined"||(document.removeEventListener("keydown",tl,!0),$n=!1)};function tl(e){var t,s,l,n,i,c;if(!bn.size||!e||e.defaultPrevented||e.isComposing)return;const r=ho(e.target),v=Array.from(bn);for(let a=v.length-1;a>=0;a-=1){const z=v[a],u=z==null?void 0:z.anchor;if(!u||!u.isConnected){bn.delete(z);continue}if(((t=z.isEnabled)==null?void 0:t.call(z))===!1)continue;const x=z.specs.find(y=>{var M,D;const q=(D=(M=y.allowInEditable)!=null?M:z.allowInEditable)!=null?D:!1;return r&&!q?!1:mo(e,y)});if(!x)continue;const k=(l=(s=x.preventDefault)!=null?s:z.preventDefault)!=null?l:!0,f=(i=(n=x.stopPropagation)!=null?n:z.stopPropagation)!=null?i:!0;if(k&&e.preventDefault(),f&&e.stopPropagation(),((c=z.action)==null?void 0:c.call(z,e,x,u))!==!1)break}el()}const fn=(e,t={},s={})=>{var l,n;const i=Zs(t);if(!e||!i.length||typeof document=="undefined")return null;const c={anchor:e,specs:i,action:typeof s.action=="function"?s.action:()=>{var v;return(v=e.click)==null?void 0:v.call(e)},isEnabled:typeof s.isEnabled=="function"?s.isEnabled:null,allowInEditable:!!s.allowInEditable,preventDefault:(l=s.preventDefault)!=null?l:!0,stopPropagation:(n=s.stopPropagation)!=null?n:!0};bn.add(c),$n||(document.addEventListener("keydown",tl,!0),$n=!0);const r=()=>{bn.delete(c),el()};return JSswift._registerCleanup(e,r),r},vn=(e,t={})=>{var s;if(!e||typeof e.focus!="function")return!1;try{e.focus({preventScroll:(s=t.preventScroll)!=null?s:!0})}catch(l){e.focus()}if(t.selectText&&typeof e.select=="function")try{e.select()}catch(l){}return!0},gs=(e,t="size")=>typeof e=="number"?e+"px":JSswift.uiSizes.includes(e)?`var(--jss-${t}-${e})`:e,Bt=(e,t=JSswift.uiSizes)=>s=>{const l=String(s).trim();return t!=null&&t.includes(l)?`${e}-${l}`:""},Gt=e=>t=>`${e}-${String(t).trim().toLowerCase().replace(/\s+/g,"-")}`,bo=e=>{if(e===!0)return"wrap-wrap";if(e===!1)return"wrap-nowrap";const t=String(e).trim().toLowerCase();return t==="false"||t==="no"||t==="none"?"wrap-nowrap":t==="reverse"?"wrap-reverse":`wrap-${t}`},hs=(e,t,s)=>e?t:s,vo=e=>{const t=o(e);if(t==null||t==="")return"";if(t==="auto")return"col-auto";if(t===!0)return"col-24";const s=Number(t);if(Number.isFinite(s)&&s>0)return`col-${Math.max(1,Math.min(24,Math.round(s)))}`;if(typeof t=="string"){const l=t.trim();if(/^\d+$/.test(l))return`col-${Math.max(1,Math.min(24,Number(l)))}`}return""},yo=e=>{const t=Number(e);return Number.isFinite(t)&&t>0?`grid-cols-${Math.max(1,Math.min(24,Math.round(t)))}`:""},Ge=(e,t)=>{const s=Array.isArray(t)?t:[t];return JSswift.uiResponsiveDevices.some(l=>{const n=JSswift.uiResponsivePropsFor(e,l);return!!n&&s.some(i=>Object.prototype.hasOwnProperty.call(n,i))})},yn=e=>JSswift.uiResponsiveDevices.find(t=>t.key===e),pn=[{prop:"gap",class:"gap",map:Bt("gap")},{prop:"rowGap",class:"gap-y",map:Bt("gap-y")},{prop:["columnGap","colGap"],class:"gap-x",map:Bt("gap-x")},{prop:"direction",class:"dir",map:Gt("dir")},{prop:"wrap",class:"wrap",allowFalse:!0,map:bo},{prop:"align",class:"align",map:Gt("align")},{prop:"justify",class:"justify",map:Gt("justify")},{prop:"width",class:"w",map:Bt("w")},{prop:"minWidth",class:"min-w",map:Bt("min-w")},{prop:"maxWidth",class:"max-w",map:Bt("max-w")},{prop:"height",class:"h",map:Bt("h")},{prop:"minHeight",class:"min-h",map:Bt("min-h")},{prop:"maxHeight",class:"max-h",map:Bt("max-h")},{prop:"padding",class:"p",map:Bt("p")},{prop:"margin",class:"m",map:Bt("m")}],wo=pn.filter(e=>{const t=Array.isArray(e.prop)?e.prop:[e.prop];return!t.includes("align")&&!t.includes("justify")}),nl=[{prop:["col","span"],class:"col",map:vo},{prop:"auto",class:"col",map:e=>e?"col-auto":""},{prop:"inline",class:"display",allowFalse:!0,map:e=>hs(e,"display-inline-flex","display-flex")},{prop:"self",class:"self",map:Gt("self")},...pn],sl=[{prop:["cols","columns"],class:"grid-cols",map:yo},{prop:"inline",class:"display",allowFalse:!0,map:e=>hs(e,"display-inline-grid","display-grid")},{prop:"flow",class:"grid-flow",map:e=>`grid-flow-${String(e).trim().toLowerCase().replace(/\s+/g,"-")}`},...pn],ll=[{prop:"inline",class:"display",allowFalse:!0,map:e=>hs(e,"display-inline-flex","display-flex")},{prop:"direction",class:"dir",map:Gt("dir")},{prop:"contentAlign",class:"align",map:Gt("align")},{prop:"contentJustify",class:"justify",map:Gt("justify")},{prop:"align",class:"self",map:Gt("self")},{prop:"justify",class:"justify-self",map:Gt("justify-self")},{prop:"place",class:"place-self",map:Gt("place-self")},...wo],_o=(JSswift.uiResponsiveStyleRules||[]).filter(e=>{const t=Array.isArray(e.prop)?e.prop:[e.prop];return!t.includes("span")&&!t.includes("gridColumn")});he.Row=(...e)=>{var t,s,l,n,i;const{props:c,children:r}=JSswift.uiNormalizeArgs(e),v=c.slots||{},a=(h,b,g={})=>{const J=Array.isArray(h)?h:[h];for(const W of J)if(JSswift.ui.getSlot(v,W)!=null)return F(v,W,g,b);return b==null?[]:F(null,"default",g,b)},z=h=>{var b;return h==null||h===!1||h===""?"":typeof h=="number"?`${h}px`:typeof h=="string"&&((b=JSswift.uiSizes)!=null&&b.includes(h))?`var(--jss-s-${h})`:String(h)},u=h=>{var b;return h==null||h===!1||h===""?"":typeof h=="number"?`${h}px`:typeof h=="string"&&((b=JSswift.uiSizes)!=null&&b.includes(h))?`var(--jss-w-${h})`:String(h)},x=JSswift.omit(c,["slots","start","left","startClass","body","center","bodyClass","centerClass","end","right","endClass","align","justify","wrap","gap","rowGap","columnGap","direction","reverse","inline","full","width","minWidth","maxWidth",...JSswift.uiResponsiveOmitProps]);x.class=oe(["jss-row",JSswift.uiResponsiveClasses({mobile:c},pn),JSswift.uiResponsiveClasses(c,pn),c.class]);const k={...c.style||{}},f=et([c.direction,c.reverse],()=>{const h=o(c.direction);return h!=null&&h!==""?String(h):o(c.reverse)?"row-reverse":""}),B=Pe(c.align),y=Pe(c.justify),M=Pe(c.wrap,h=>typeof h=="boolean"?h?"wrap":"nowrap":String(h)),D=Pe(c.gap,z),q=Pe(c.rowGap,z),L=Pe(c.columnGap,z),ce=Pe(c.inline,h=>h?"inline-flex":"flex"),X=Pe(c.width,u),Z=Pe(c.minWidth,u),ie=Pe(c.maxWidth,u),te=Pe(c.full,h=>h?"100%":"",""),se=et([c.inline,c.full,c.width],()=>{const h=!!o(c.inline),b=!!o(c.full),g=o(c.width)!=null&&o(c.width)!==!1&&o(c.width)!=="";return!h||b||g?"":"max-content"});f!=null&&!Ge(c,"direction")&&(k.flexDirection=f),B!=null&&!Ge(c,"align")&&(k.alignItems=B),y!=null&&!Ge(c,"justify")&&(k.justifyContent=y),M!=null&&!Ge(c,"wrap")&&(k.flexWrap=M),D!=null&&!Ge(c,"gap")&&(k.gap=D),q!=null&&!Ge(c,"rowGap")&&(k.rowGap=q),L!=null&&!Ge(c,"columnGap")&&(k.columnGap=L),ce!=null&&(k.display=ce),se!=null&&(k.width=se),X!=null&&!Ge(c,"width")&&(k.width=X),Z!=null&&!Ge(c,"minWidth")&&(k.minWidth=Z),ie!=null&&!Ge(c,"maxWidth")&&(k.maxWidth=ie),te!=null&&(k.width=te),Object.keys(k).length&&(x.style=k),JSswift.uiApplyResponsiveProps(x,c,JSswift.uiResponsiveStyleRules);const R={props:c},ae=a(["start","left"],(t=c.start)!=null?t:c.left,R),re=a(["body","center","default"],(l=(s=c.body)!=null?s:c.center)!=null?l:r,R),ne=a(["end","right"],(n=c.end)!=null?n:c.right,R);if(!(ae.length||ne.length||c.body!=null||c.center!=null||c.startClass||c.bodyClass||c.centerClass||c.endClass||JSswift.ui.getSlot(v,"start")!=null||JSswift.ui.getSlot(v,"left")!=null||JSswift.ui.getSlot(v,"body")!=null||JSswift.ui.getSlot(v,"center")!=null||JSswift.ui.getSlot(v,"end")!=null||JSswift.ui.getSlot(v,"right")!=null)){const h=F(v,"default",R,r),b=_.div(x,...h);return Qe(b,c),b}const S={display:"flex",alignItems:"inherit",gap:"inherit",flexWrap:"inherit",minWidth:0},I=(i=c.bodyClass)!=null?i:c.centerClass,m=et([c.direction,c.reverse],()=>(o(c.direction)||(o(c.reverse)?"row-reverse":"row"))==="row"?"auto":""),P=[ae.length?_.div({class:oe(["jss-row-start",c.startClass]),style:{...S}},...ae):null,re.length?_.div({class:oe(["jss-row-body",I]),style:{...S,flex:"1 1 auto"}},...re):null,ne.length?_.div({class:oe(["jss-row-end",c.endClass]),style:{...S,justifyContent:"flex-end",marginInlineStart:m}},...ne):null].filter(Boolean),G=_.div(x,...P);return Qe(G,c),G};function It(e){return Array.isArray(e)&&(e.length===2||e.length===3&&typeof e[2]=="function")&&typeof e[0]=="function"&&typeof e[1]=="function"}function Mt(e){return!!e&&e.type==="rod"}function rt(e){return typeof e=="function"||Mt(e)||It(e)}function o(e){return typeof e=="function"?e():Mt(e)?e.value:It(e)?e[0]():e}function So(e){const t=Array.isArray(e)?[...e]:[e];for(;t.length;){const s=t.pop();if(rt(s))return!0;Array.isArray(s)&&t.push(...s)}return!1}function oe(e){const t=So(e),s=()=>{const l=[],n=Array.isArray(e)?[...e]:[e];for(;n.length;){const i=n.shift();if(i==null||i===!1)continue;const c=o(i);if(!(c==null||c===!1||c==="")){if(Array.isArray(c)){n.unshift(...c);continue}l.push(c)}}return l.join(" ")};return t?s:s()}function Ht(e){const t=oe(e);return typeof t=="function"?t():t}function pe(e,t,s=""){return rt(e)?()=>o(e)?t:s:e?t:s}function ol(e,t,s=""){return rt(e)?()=>{const l=o(e);return l==null||l===""?"":`${t}${l}${s}`}:e==null||e===""?"":`${t}${e}${s}`}function et(e,t){return(Array.isArray(e)?e:[e]).some(rt)?()=>t():t()}function Pe(e,t,s=""){return rt(e)?()=>{const l=o(e);return l==null||l===!1?s:t?t(l):l}:e==null||e===!1?null:t?t(e):e}JSswift.uiIsReactive=rt,JSswift.uiUnwrap=o,JSswift.uiClass=oe,JSswift.uiClassStatic=Ht,JSswift.uiWhen=pe,JSswift.uiClassValue=ol,JSswift.uiComputed=et,JSswift.uiStyleValue=Pe,he.Col=(...e)=>{var t,s,l,n,i,c;const{props:r,children:v}=JSswift.uiNormalizeArgs(e),a=r.slots||{},z=A=>Object.prototype.hasOwnProperty.call(r,A),u=(A,T,U={})=>{const ue=Array.isArray(A)?A:[A];for(const xe of ue)if(JSswift.ui.getSlot(a,xe)!=null)return F(a,xe,U,T);return T==null?[]:F(null,"default",U,T)},x=A=>{var T;return A==null||A===!1||A===""?"":typeof A=="number"?`${A}px`:typeof A=="string"&&((T=JSswift.uiSizes)!=null&&T.includes(A))?`var(--jss-s-${A})`:String(A)},k=A=>{var T;return A==null||A===!1||A===""?"":typeof A=="string"&&((T=JSswift.uiSizes)!=null&&T.includes(A))?gs(A,"size"):He(A)},f=(A,T)=>{const U=o(A);if(U==null||U===!1||U==="")return"";if(U==="auto")return T==="jss-col-"?"jss-col-auto":"";if(U===!0)return`${T}24`;const ue=Number(U);if(Number.isFinite(ue)&&ue>0)return`${T}${Math.max(1,Math.min(24,Math.round(ue)))}`;if(typeof U=="string"){const xe=U.trim();if(!xe)return"";if(xe.startsWith(T))return xe;if(/^\d+$/.test(xe))return`${T}${Math.max(1,Math.min(24,Number(xe)))}`}return""},B=()=>{const A=o(r.flex);if(A!=null&&A!==!1&&A!=="")return String(A);if(o(r.fill))return"1 1 auto";const T=z("grow"),U=z("shrink"),ue=z("basis");if(!T&&!U&&!ue)return"";const xe=T?o(r.grow):0,Ne=U?o(r.shrink):1,$=ue?k(o(r.basis)):"auto";return`${xe} ${Ne} ${$||"auto"}`},y=et([r.auto,r.col,r.span],()=>{if(o(r.auto))return"jss-col-auto";const A=z("span")?r.span:r.col;return f(A,"jss-col-")||"jss-col"}),M=JSswift.omit(r,["slots","col","span","sm","md","lg","auto","size","width","minWidth","maxWidth","height","minHeight","maxHeight","gap","rowGap","columnGap","align","justify","inline","center","stack","flex","fill","grow","shrink","basis","self","order","scroll","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass",...JSswift.uiResponsiveOmitProps]),D={...r.style||{}};!Ge(r,"minWidth")&&D.minWidth==null&&(D.minWidth=0);const q=Pe(r.gap,x),L=Pe(r.rowGap,x),ce=Pe(r.columnGap,x),X=Pe(r.align),Z=Pe(r.justify),ie=z("width")?r.width:r.size,te=Pe(ie,k),se=Pe(r.minWidth,k),R=Pe(r.maxWidth,k),ae=Pe(r.height,k),re=Pe(r.minHeight,k),ne=Pe(r.maxHeight,k),K=Pe(r.self),S=Pe(r.order,A=>String(A)),I=Pe(r.scroll,A=>A?"auto":"",""),m=et([r.flex,r.fill,r.grow,r.shrink,r.basis],B),P=et([r.center,r.align,r.justify],()=>!!o(r.center)&&(o(r.align)==null||o(r.align)==="")&&(o(r.justify)==null||o(r.justify)===""));m!=null&&m!==""&&(D.flex=m),K!=null&&!Ge(r,"self")&&(D.alignSelf=K),S!=null&&(D.order=S),I!=null&&I!==""&&(D.overflow=I),te!=null&&te!==""&&!Ge(r,["width","size"])&&(D.width=te,!z("flex")&&!z("fill")&&!z("grow")&&!z("shrink")&&!z("basis")&&(D.flex="0 0 auto")),se!=null&&!Ge(r,"minWidth")&&(D.minWidth=se),R!=null&&!Ge(r,"maxWidth")&&(D.maxWidth=R),ae!=null&&!Ge(r,"height")&&(D.height=ae),re!=null&&!Ge(r,"minHeight")&&(D.minHeight=re),ne!=null&&!Ge(r,"maxHeight")&&(D.maxHeight=ne),Object.keys(D).length&&(M.style=D);const G={props:r},h=u(["start","top","header","before"],(l=(s=(t=r.start)!=null?t:r.top)!=null?s:r.header)!=null?l:r.before,G),b=z("body")?r.body:z("content")?r.content:v,g=u(["body","content","default"],b,G),J=u(["end","bottom","footer","after"],(c=(i=(n=r.end)!=null?n:r.bottom)!=null?i:r.footer)!=null?c:r.after,G),W=h.length||J.length||z("start")||z("top")||z("header")||z("before")||z("body")||z("content")||z("end")||z("bottom")||z("footer")||z("after")||r.startClass||r.bodyClass||r.contentClass||r.endClass||r.topClass||r.headerClass||r.bottomClass||r.footerClass||JSswift.ui.getSlot(a,"start")!=null||JSswift.ui.getSlot(a,"top")!=null||JSswift.ui.getSlot(a,"header")!=null||JSswift.ui.getSlot(a,"before")!=null||JSswift.ui.getSlot(a,"body")!=null||JSswift.ui.getSlot(a,"content")!=null||JSswift.ui.getSlot(a,"end")!=null||JSswift.ui.getSlot(a,"bottom")!=null||JSswift.ui.getSlot(a,"footer")!=null||JSswift.ui.getSlot(a,"after")!=null,H=et([r.stack,r.gap,r.rowGap,r.columnGap,r.align,r.justify,r.center],()=>o(r.stack)||W||[o(r.gap),o(r.rowGap),o(r.columnGap),o(r.align),o(r.justify)].some(T=>T!=null&&T!==!1&&T!=="")?!0:!!o(r.center));if(M.class=oe(["jss-col",y,et(r.sm,()=>f(r.sm,"jss-sm-col-")),et(r.md,()=>f(r.md,"jss-md-col-")),et(r.lg,()=>f(r.lg,"jss-lg-col-")),JSswift.uiResponsiveClasses({mobile:r},nl),JSswift.uiResponsiveClasses(r,nl),pe(H,"jss-col-flex"),pe(r.inline,"jss-col-inline"),r.class]),q!=null&&!Ge(r,"gap")&&(D.gap=q),L!=null&&!Ge(r,"rowGap")&&(D.rowGap=L),ce!=null&&!Ge(r,"columnGap")&&(D.columnGap=ce),X!=null&&!Ge(r,"align")?D.alignItems=X:P!=null&&P!==""&&(D.alignItems=P?"center":""),Z!=null&&!Ge(r,"justify")?D.justifyContent=Z:P!=null&&P!==""&&(D.justifyContent=P?"center":""),Object.keys(D).length&&(M.style=D),JSswift.uiApplyResponsiveProps(M,r,JSswift.uiResponsiveStyleRules),!W){const A=_.div(M,...F(a,"default",G,v));return Qe(A,r),A}const de={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},E=[h.length?_.div({class:oe(["jss-col-start",r.startClass,r.topClass,r.headerClass]),style:{...de}},...h):null,g.length?_.div({class:oe(["jss-col-body",r.bodyClass,r.contentClass]),style:{...de,flex:"1 1 auto"}},...g):null,J.length?_.div({class:oe(["jss-col-end",r.endClass,r.bottomClass,r.footerClass]),style:{...de}},...J):null].filter(Boolean),N=_.div(M,...E);return Qe(N,r),N},he.Spacer=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=JSswift.omit(t,["slots"]);n.class=oe(["jss-spacer",t.class]);const i=F(l,"default",{},s);return _.div(n,...i)},he.Container=(...e)=>{var t,s,l,n;const{props:i,children:c}=JSswift.uiNormalizeArgs(e),r=i.slots||{},v={...i},a=b=>Object.prototype.hasOwnProperty.call(i,b),z={xxs:"360px",xs:"480px",sm:"640px",md:"820px",lg:"1100px",xl:"1280px",xxl:"1440px",narrow:"760px",prose:"760px",wide:"1360px"},u=b=>{if(b==null||b===!1||b==="")return"";if(typeof b=="number")return`${b}px`;const g=String(b).trim().toLowerCase();return g?g==="full"||g==="fluid"?"100%":z[g]||String(b):""},x=b=>{var g;return b==null||b===!1||b===""?"":typeof b=="number"?`${b}px`:typeof b=="string"&&((g=JSswift.uiSizes)!=null&&g.includes(b))?`var(--jss-s-${b})`:String(b)},k=b=>{if(b==null||b===!1||b==="")return"";if(typeof b=="number"&&Number.isFinite(b))return`repeat(${Math.max(1,Math.floor(b))}, minmax(0, 1fr))`;const g=String(b).trim();return g?/^\d+$/.test(g)?`repeat(${Math.max(1,Number(g))}, minmax(0, 1fr))`:g:""},f=b=>b==null||b===""?"":b===!0?"wrap":b===!1?"nowrap":String(b),B={props:i},y=(b,g)=>{if(!(g==null||g===!1)){if(Array.isArray(g)){g.forEach(J=>y(b,J));return}if(g!=null&&g.nodeType){b.appendChild(g);return}b.appendChild(document.createTextNode(String(g)))}},M=(b,g)=>{const J=JSswift.ui.getSlot(r,b);if(J!=null)return F(r,b,B,null);if(typeof g=="function"){const W=_.div({class:`jss-container-slot-${b}`});return JSswift.reactive.effect(()=>{const H=dn(JSswift.ui.slot(g(B)));W.replaceChildren(),Array.isArray(H)?H.forEach(de=>y(W,de)):y(W,H)},`UI.Container:${b}`),[W]}return F(r,b,B,g)},D=a("content")?i.content:c!=null&&c.length?c:null,q=M("before",(t=i.before)!=null?t:i.top),L=M("header",i.header),ce=[...M("left",i.left),...M("start",i.start)],X=M("body",a("body")?i.body:null),Z=(()=>{const b=M("content",a("content")?i.content:null);return b.length?b:M("default",D)})(),ie=[...M("right",i.right),...M("end",i.end)],te=M("footer",i.footer),se=M("after",(s=i.after)!=null?s:i.bottom),R=q.length||L.length||ce.length||ie.length||te.length||se.length||JSswift.ui.getSlot(r,"before")!=null||JSswift.ui.getSlot(r,"header")!=null||JSswift.ui.getSlot(r,"left")!=null||JSswift.ui.getSlot(r,"start")!=null||JSswift.ui.getSlot(r,"right")!=null||JSswift.ui.getSlot(r,"end")!=null||JSswift.ui.getSlot(r,"footer")!=null||JSswift.ui.getSlot(r,"after")!=null,ae=!!R||X.length>0&&(JSswift.ui.getSlot(r,"body")!=null||R),re=()=>{var b;const g=String(o((b=i.layout)!=null?b:i.display)||"").trim().toLowerCase();return["flex","grid","stack"].includes(g)?g:["inline","inline-flex","inlineflex"].includes(g)||o(i.inline)?"inline":o(i.grid)||o(i.cols)!=null?"grid":g==="block"?"block":o(i.direction)!=null||o(i.wrap)!=null||o(i.align)!=null||o(i.justify)!=null||o(i.gap)!=null||ce.length||ie.length?"flex":"block"},ne=et([i.layout,i.display,i.inline,i.grid,i.cols,i.direction,i.wrap,i.align,i.justify,i.gap],()=>{const b=re();return b==="block"?"":`is-${b}`}),K={...v.style||{}},S=(b,g)=>{g!=null&&(K[b]=g)};S("maxWidth",et([i.maxWidth,i.fluid],()=>o(i.fluid)?"none":u(o(i.maxWidth))||"")),S("width",Pe(i.width,u)),S("minWidth",Pe(i.minWidth,u)),S("--jss-container-padding",Pe(i.padding,x)),S("--jss-container-padding-x",Pe((l=i.paddingX)!=null?l:i.gutter,x)),S("--jss-container-padding-y",Pe(i.paddingY,x)),S("--jss-container-gap",Pe(i.gap,x)),S("--jss-container-section-gap",Pe((n=i.sectionGap)!=null?n:i.gap,x)),S("--jss-container-cols",Pe(i.cols,k)),S("--jss-container-align",Pe(i.align,b=>String(b))),S("--jss-container-justify",Pe(i.justify,b=>String(b))),S("--jss-container-direction",Pe(i.direction,b=>String(b))),S("--jss-container-wrap",Pe(i.wrap,f));const I=JSswift.omit(v,["after","afterClass","align","as","before","beforeClass","body","bodyClass","bottom","cols","content","contentClass","direction","display","end","endClass","fluid","footer","footerClass","gap","grid","gutter","header","headerClass","inline","justify","layout","left","mainClass","maxWidth","minWidth","padding","paddingX","paddingY","right","sectionGap","slots","start","startClass","tag","top","width","wrap"]);I.class=oe(["jss-container",pe(i.fluid,"is-fluid"),pe(ae,"has-structure"),ae?"":ne,v.class]),I.style=K,JSswift.uiApplyResponsiveProps(I,i,JSswift.uiResponsiveStyleRules);const m=(b,g,J)=>g.length?_.div({class:oe(["jss-container-section",`jss-container-${b}`,J])},...g):null,P=X.length?_.div({class:oe(["jss-container-body",ae?ne:"",i.bodyClass])},...X):ce.length||Z.length||ie.length?_.div({class:oe(["jss-container-body",ae?ne:"",i.bodyClass])},m("start",ce,i.startClass),Z.length?_.div({class:oe(["jss-container-main",i.mainClass,i.contentClass])},...Z):null,m("end",ie,i.endClass)):null,G=(()=>{var b;const g=String(o((b=i.tag)!=null?b:i.as)||"div").toLowerCase();return typeof _[g]=="function"?_[g]:_.div})(),h=ae?G(I,m("before",q,i.beforeClass),m("header",L,i.headerClass),P,m("footer",te,i.footerClass),m("after",se,i.afterClass)):G(I,...X.length?X:Z);return Qe(h,i),h},he.Card=(...e)=>{var t,s;const{props:l,children:n}=JSswift.uiNormalizeArgs(e),i=l.slots||{},c={...l};Qt(c);const r=(N,A)=>{var T;return!!(N&&N.nodeType===1&&((T=N.classList)!=null&&T.contains(`jss-card-${A}`)))},a=(N=>N==null?null:typeof N=="string"?he.Icon({name:N,size:l.iconSize||l.size||"lg"}):JSswift.ui.slot(N,{as:"icon"}))(l.icon),z=l.image?_.img({src:l.image,alt:l.imageAlt||"",class:oe(["jss-card-cover-media",l.imageClass]),style:l.imageStyle}):l.cover,u={dense:!!o(l.dense),flat:!!o(l.flat),clickable:!!o(l.clickable),to:o(l.to)||null},x=F(i,"default",u,n!=null&&n.length?n:[]),k={identifier:[],cover:[],media:[],header:[],body:[],footer:[],actions:[]},f=[];x.forEach(N=>{r(N,"identifier")?k.identifier.push(N):r(N,"cover")?k.cover.push(N):r(N,"media")?k.media.push(N):r(N,"header")?k.header.push(N):r(N,"body")?k.body.push(N):r(N,"footer")?k.footer.push(N):r(N,"actions")?k.actions.push(N):f.push(N)});const B=F(i,"identifier",u,l.identifier),y=F(i,"cover",u,z),M=F(i,"media",u,l.media),D=F(i,"eyebrow",u,(t=l.eyebrow)!=null?t:l.kicker),q=F(i,"title",u,l.title),L=F(i,"subtitle",u,l.subtitle),ce=F(i,"header",u,l.header),X=F(i,"icon",u,a),Z=F(i,"aside",u,(s=l.aside)!=null?s:l.headerAside),ie=F(i,"body",u,l.body),te=F(i,"footer",u,l.footer),se=F(i,"actions",u,l.actions),R=B.length?_.div({class:oe(["jss-card-identifier",l.identifierClass])},...B):null,ae=y.length?_.div({class:oe(["jss-card-cover",l.coverClass])},...y):null,re=M.length?_.div({class:oe(["jss-card-media",l.mediaClass])},...M):null,K=X.length||D.length||q.length||L.length||ce.length||Z.length?_.div({class:oe(["jss-card-header",l.headerClass])},_.div({class:"jss-card-head"},X.length?_.div({class:"jss-card-icon"},...X):null,_.div({class:"jss-card-head-main"},D.length?_.div({class:oe(["jss-card-eyebrow",l.eyebrowClass])},...D):null,q.length?_.div({class:oe(["jss-card-title",l.titleClass])},...q):null,L.length?_.div({class:oe(["jss-card-subtitle",l.subtitleClass])},...L):null,ce.length?_.div({class:oe(["jss-card-header-content",l.headerContentClass])},...ce):null),Z.length?_.div({class:oe(["jss-card-aside",l.asideClass])},...Z):null)):null,S=[...ie,...f],I=S.length?_.div({class:oe(["jss-card-body",l.bodyClass])},...S):null,m=[...se,...k.actions],P=te.length||m.length?_.div({class:oe(["jss-card-footer",l.footerClass])},...te,m.length?_.div({class:"jss-card-actions"},...m):null):null,G=et([l.clickable,l.to],()=>o(l.clickable)||o(l.to)?"jss-card-clickable":""),h=B.length||k.identifier.length,b=y.length||k.cover.length||M.length||k.media.length,g=JSswift.omit(c,["actions","aside","asideClass","body","bodyClass","clickable","cover","coverClass","coverHeight","dense","eyebrow","eyebrowClass","flat","footer","footerClass","header","headerAside","headerClass","headerContentClass","icon","iconSize","identifier","identifierClass","image","imageAlt","imageClass","imageStyle","kicker","media","mediaClass","slots","subtitle","subtitleClass","title","titleClass","to","display","direction","wrap","align","justify","gap","rowGap","columnGap","cols","columns"]);g.class=oe(["jss-panel","jss-card","jss-clear-set","jss-singularity",pe(l.flat,"jss-card-flat"),pe(l.dense,"jss-card-dense"),pe(h,"jss-card-has-identifier"),pe(b,"jss-card-has-top-visual"),G,c.class]),g.style={...c.style||{}},l.coverHeight!=null&&(g.style["--jss-card-cover-height"]=He(o(l.coverHeight))),JSswift.uiApplyResponsiveProps(g,l,JSswift.uiResponsiveStyleRules);const J=l.onClick,W=l.onKeydown,H=N=>{var A;if(J==null||J(N),N.defaultPrevented)return;const T=o(l.to);T&&((A=JSswift.router)!=null&&A.navigate)&&(N.preventDefault(),JSswift.router.navigate(T))},de=N=>{W==null||W(N),!N.defaultPrevented&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),H(N))};(o(l.clickable)||o(l.to))&&(g.onClick=H,g.onKeydown=de,g.tabIndex==null&&(g.tabIndex=0),g.role==null&&(g.role="button"));const E=_.div(g,R,...k.identifier,ae,...k.cover,re,...k.media,K,...k.header,I,...k.body,P,...k.footer);return Qe(E,l),E},he.Btn=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=et([s.color,s.state],()=>{const R=o(s.color)||o(s.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(R)?R:o(s.state)||""}),c=oe(["jss-clear-set","jss-btn","jss-singularity","jss-clickable",i,pe(s.outline,"outline"),s.class]),r=JSswift.omit(s,["icon","iconRight","label","loading","loadingText","disabled","outline","iconAlign","slots","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);r.class=c;const v=()=>!!o(s.loading),a=()=>!!o(s.disabled)||v(),z=s.icon!=null?typeof s.icon=="string"?he.Icon({name:s.icon}):s.icon:null,u=s.iconRight!=null?typeof s.iconRight=="string"?he.Icon({name:s.iconRight}):s.iconRight:null,x=JSswift.ui.renderSlot(n,"icon",{},z),k=JSswift.ui.renderSlot(n,"iconRight",{},u),f=JSswift.ui.renderSlot(n,"label",{},s.label),B=F(n,"default",{},l),y=[],M=R=>{R&&(Array.isArray(R)?y.push(...R):y.push(R))},D=s.iconAlign;(D==="after"||D==="right")&&!u?(M(f),B.length&&y.push(...B),M(x)):(M(x),M(f),B.length&&y.push(...B)),M(k),M(ps(s,{className:"jss-shortcode jss-btn-shortcode"})),y.length===0&&y.push(_.span("Button"));const L=_.span({class:"jss-btn-loading",hidden:!0}),ce=_.span({class:"jss-btn-content"},...y);let X=!1;const Z=()=>{const R=he.Spinner?he.Spinner({size:s.loadingSize||s.spinnerSize||16,thickness:s.loadingThickness||2,color:s.loadingColor||"currentColor",label:s.loadingText||null,"aria-label":s.loadingText?null:"Loading"}):_.span({class:"jss-muted",style:{marginRight:"8px"}},s.loadingText||"Loading");return F(null,"default",{},JSswift.ui.renderSlot(n,"loading",{},R))},ie=R=>{var ae;if((ae=s.onPointerDown)==null||ae.call(s,R),a()||!(R!=null&&R.currentTarget))return;const re=R.currentTarget,ne=re.getBoundingClientRect(),K=typeof R.clientX=="number"?R.clientX-ne.left:ne.width/2,S=typeof R.clientY=="number"?R.clientY-ne.top:ne.height/2;re.style.setProperty("--jss-burst-x",`${K}px`),re.style.setProperty("--jss-burst-y",`${S}px`),re.classList.remove("jss-btn-burst"),re.offsetWidth,re.classList.add("jss-btn-burst")},te=_.button({...r,disabled:a(),onClick:R=>{var ae,re;return a()?((ae=R==null?void 0:R.preventDefault)==null||ae.call(R),!1):(re=s.onClick)==null?void 0:re.call(s,R)},onPointerDown:ie,"aria-disabled":a()?"true":null,"aria-busy":v()?"true":null},L,ce),se=JSswift.reactive.effect(()=>{const R=v(),ae=a();te.disabled=ae,te.classList.toggle("is-loading",R),te.setAttribute("aria-disabled",ae?"true":"false"),R?te.setAttribute("aria-busy","true"):te.removeAttribute("aria-busy"),L.hidden=!R,R!==X&&(L.replaceChildren(...R?Z():[]),X=R)},"UI.Btn:state");return(t=JSswift._registerCleanup)==null||t.call(JSswift,te,se),Qe(te,s),fn(te,s,{isEnabled:()=>!a(),action:()=>{if(a())return!1;te.click()}}),te},he.Button=he.Btn,JSswift.ui.Btn=he.Btn,JSswift.ui.Button=he.Button;let jo=0;he.FormField=(e={})=>{var t,s,l,n,i,c,r;Qt(e);const v=e.slots||{},a=et([e.color,e.state],()=>{const I=o(e.color)||o(e.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(I)?I:o(e.state)||""}),z=_.div({class:oe(["jss-clear-field-set","jss-field","jss-singularity-field",a,pe(e.fill,"jss-field-fill"),pe(e.outline,"outline"),e.wrapClass,e.class])}),u=F(v,"topLabel",{},e.topLabel);u.length&&z.appendChild(_.div({class:"jss-field-label"},...u));const x=e.multi||e.multiple,k=typeof e.control=="function"?e.control():e.control,f=()=>{if(typeof e.hasValue=="function")return!!e.hasValue();if(e.hasValue!=null)return!!o(e.hasValue);const I=e.getValue?e.getValue():null;return!(I==null||I==="")},B=()=>JSswift.reactive.untracked(f),y=()=>{var I,m;e.disabled||e.readonly||((I=e.onClear)==null||I.call(e),(m=e.onFocus)==null||m.call(e))},M=JSswift.ui.renderSlot(v,"control",{control:k,clear:y,disabled:!!e.disabled,readonly:!!e.readonly,hasValue:B()},null);let D=null,q=null;if(M)D=Array.isArray(M)?_.div({class:"jss-control"},...M):M;else{D=_.div({class:"jss-control"});const I=_.div({class:"jss-addon jss-addon-left"}),m=e.icon!=null?typeof e.icon=="string"?he.Icon({name:e.icon}):e.icon:null,P=JSswift.ui.renderSlot(v,"icon",{},m),G=JSswift.ui.renderSlot(v,"prefix",{},e.prefix);F(null,"default",{},P).forEach(A=>I.appendChild(A)),F(null,"default",{},G).forEach(A=>I.appendChild(A)),I.childNodes.length&&D.appendChild(I);const h=_.div({class:"jss-mid"+(I.childNodes.length>0?" jss-with-left":""),style:{position:"relative",flex:"1",minWidth:"0"}});k&&h.appendChild(k);const b=F(v,"label",{},e.label);if(b.length){const A=_.div({class:oe(["jss-float-label",pe(x,"jss-multiselect")])},...b);h.appendChild(A)}D.appendChild(h);const g=e.clearable?_.div({class:"jss-clear",title:"Clear",onClick:y},he.Icon({name:"close"})):null,J=JSswift.ui.renderSlot(v,"clear",{disabled:!!e.disabled,readonly:!!e.readonly,hasValue:B()},g);J&&(J.onclick=A=>{A.stopPropagation(),y()},F(null,"default",{},J).forEach(A=>D.appendChild(A))),q=g,q&&((t=e.clearable)!=null&&t.action)&&e.clearable.action(A=>A?q.classList.remove("jss-d-none"):q.classList.add("jss-d-none"));const W=_.div({class:"jss-addon jss-addon-right"}),H=e.iconRight!=null?typeof e.iconRight=="string"?he.Icon({name:e.iconRight}):e.iconRight:null,de=JSswift.ui.renderSlot(v,"iconRight",{},H),E=JSswift.ui.renderSlot(v,"suffix",{},e.suffix),N=JSswift.ui.renderSlot(v,"shortcode",{props:e},ps(e,{className:"jss-shortcode jss-field-shortcode"}));F(null,"default",{},E).forEach(A=>W.appendChild(A)),F(null,"default",{},de).forEach(A=>W.appendChild(A)),F(null,"default",{},N).forEach(A=>W.appendChild(A)),W.childNodes.length&&(D.appendChild(W),h.classList.add("jss-with-right"))}const L=I=>I&&(I&&typeof I.action=="function"?I.value:Array.isArray(I)&&typeof I[0]=="function"?I[0]():typeof I=="function"?I():I),ce=I=>I==null||I===!1||I===""?!1:Array.isArray(I)?I.length>0:!0;let X=null;const Z=`jsswift-field-message-${++jo}`,ie=()=>{if(!(k!=null&&k.setAttribute))return;const I=[o(e.ariaDescribedBy),X==null?void 0:X.id].filter(Boolean).join(" ").trim();I?k.setAttribute("aria-describedby",[...new Set(I.split(/\s+/))].join(" ")):k.removeAttribute("aria-describedby")};z._syncDescription=ie;const te=()=>{const I=[{key:"error",value:L(e.error),slot:"errorMessage",className:"jss-error"},{key:"warning",value:L(e.warning),slot:"warning",className:"jss-warning"},{key:"success",value:L(e.success),slot:"success",className:"jss-success"},{key:"note",value:L(e.note),slot:"note",className:"jss-note"},{key:"hint",value:L(e.hint),slot:"hint",className:"jss-hint"}];let m=null;for(const g of I)if(ce(g.value)){m=g;break}const P={error:I[0].value,warning:I[1].value,success:I[2].value,note:I[3].value,hint:I[4].value,props:e},G=m?F(v,m.slot,P,m.value):[],h=G.length?_.div({id:Z,class:m==null?void 0:m.className},...G):null;["error","warning","success","note"].forEach(g=>{var J;return(J=D==null?void 0:D.classList)==null?void 0:J.toggle(g,(m==null?void 0:m.key)===g)}),X?h?X.replaceWith(h):X.remove():h&&z.appendChild(h),X=h,ie()},se=()=>{var I;const m=f();(I=D==null?void 0:D.classList)==null||I.toggle("has-value",m),q&&(q.style.display=m?"":"none")};JSswift.reactive.untracked(se),(s=D==null?void 0:D.classList)==null||s.toggle("disabled",!!e.disabled),z.appendChild(D);const R=JSswift.ui.getSlot(v,"errorMessage"),ae=JSswift.ui.getSlot(v,"warning"),re=JSswift.ui.getSlot(v,"success"),ne=JSswift.ui.getSlot(v,"note"),K=JSswift.ui.getSlot(v,"hint");if(!!((l=e.error)!=null&&l.action||(n=e.warning)!=null&&n.action||(i=e.success)!=null&&i.action||(c=e.note)!=null&&c.action||(r=e.hint)!=null&&r.action)||Array.isArray(e.error)&&typeof e.error[0]=="function"||Array.isArray(e.warning)&&typeof e.warning[0]=="function"||Array.isArray(e.success)&&typeof e.success[0]=="function"||Array.isArray(e.note)&&typeof e.note[0]=="function"||Array.isArray(e.hint)&&typeof e.hint[0]=="function"||typeof e.error=="function"||typeof e.warning=="function"||typeof e.success=="function"||typeof e.note=="function"||typeof e.hint=="function"||typeof R=="function"||typeof ae=="function"||typeof re=="function"||typeof ne=="function"||typeof K=="function"){const I=JSswift.reactive.effect(()=>{te()},"UI.FormField:message");JSswift._registerCleanup(z,I)}else te();return z._refresh=se,z._control=D,z._el=k,z},he.InputRaw=(e={})=>{var t;const s=_.input({class:oe(["jss-input-raw",e.class]),type:e.type||"text",name:e.name,placeholder:e.placeholder,autocomplete:e.autocomplete,value:e.value});let l=!1;const n=new Set,i=(f,B)=>{if(l)return;const y=setTimeout(()=>{n.delete(y),l||f()},B);n.add(y)};let c=(t=s.value)!=null?t:"";const r=()=>{var f;const B=(f=s.value)!=null?f:"";B!==c&&(c=B,s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})))};let v=null,a=!1;const z=()=>{if(l||a)return;a=!0;let f=0;const B=()=>{if(r(),f+=1,f>=10){a=!1;return}i(B,120)};i(B,40)},u=()=>{l||v||(v=setInterval(()=>{if(document.activeElement!==s){clearInterval(v),v=null;return}r()},250))},x=()=>{v&&(clearInterval(v),v=null)};s.addEventListener("input",()=>{var f;c=(f=s.value)!=null?f:""}),s.addEventListener("change",()=>{var f;c=(f=s.value)!=null?f:""}),s.addEventListener("animationstart",f=>{f.animationName==="jss-autofill"&&(r(),u(),z())}),s.addEventListener("focus",()=>{u(),z(),i(r,50)}),s.addEventListener("blur",()=>{x(),i(r,0)}),i(r,0),z(),JSswift._registerCleanup(s,()=>{l=!0,x(),n.forEach(clearTimeout),n.clear()});const k=e.model;if(k){if(typeof k=="object"&&typeof k._bind=="function")JSswift._registerCleanup(s,Ue.rodModel(s,k));else if(Array.isArray(k)&&typeof k[0]=="function"&&typeof k[1]=="function"){const f=JSswift.reactive.untracked(()=>Ue.signalModel(s,k[0],k[1]));JSswift._registerCleanup(s,f)}}return fn(s,e,{isEnabled:()=>!s.disabled,action:()=>vn(s,{selectText:!!e.selectOnShortcode})}),s};function il(e,t,s,l=!1){e.focus=c=>t.focus(c);const n=(c,r)=>{r==null||r===!1?t.removeAttribute(c):t.setAttribute(c,String(r))},i=JSswift.reactive.effect(()=>{var c,r;const v=(c=o(s.ariaLabel))!=null?c:typeof s.label=="string"?s.label:null;n("aria-label",v),n("aria-labelledby",o(s.ariaLabelledBy)),(r=e._syncDescription)==null||r.call(e);const a=s.ariaInvalid==null?!!o(s.error):!!o(s.ariaInvalid);t.setAttribute("aria-invalid",String(a));const z=!!o(s.required);if(t.setAttribute("aria-required",String(z)),l){t.required=z;for(const u of["min","max","step","pattern","minLength","maxLength"])n(u.toLowerCase(),o(s[u]))}},"UI.Field:controlAttributes");JSswift._registerCleanup(e,i)}he.Input=(e={})=>{var t,s,l;const n=e.slots||{},i={...e,label:(t=e.label)!=null?t:e.placeholder},c=_.input({class:oe(["jss-input",e.class]),type:e.type||"text",name:e.name,autocomplete:e.autocomplete,inputmode:e.inputmode,value:(s=e.value)!=null?s:"",disabled:!!e.disabled,readOnly:!!e.readonly});let r=!1;const v=new Set,a=(ce,X)=>{if(r)return;const Z=setTimeout(()=>{v.delete(Z),r||ce()},X);v.add(Z)};let z=(l=c.value)!=null?l:"";const u=()=>{var ce;const X=(ce=c.value)!=null?ce:"";X!==z&&(z=X,c.dispatchEvent(new Event("input",{bubbles:!0})),c.dispatchEvent(new Event("change",{bubbles:!0})))};let x=null,k=!1;const f=()=>{if(r||k)return;k=!0;let ce=0;const X=()=>{if(u(),ce+=1,ce>=10){k=!1;return}a(X,120)};a(X,40)},B=()=>{r||x||(x=setInterval(()=>{if(document.activeElement!==c){clearInterval(x),x=null;return}u()},250))},y=()=>{x&&(clearInterval(x),x=null)};c.addEventListener("input",()=>{var ce,X;z=(ce=c.value)!=null?ce:"",(X=e.onInput)==null||X.call(e,c.value)}),c.addEventListener("change",()=>{var ce,X;z=(ce=c.value)!=null?ce:"",(X=e.onChange)==null||X.call(e,c.value)}),c.addEventListener("focus",ce=>{var X;(X=e.onFocus)==null||X.call(e,ce),B(),f(),a(u,50)}),c.addEventListener("blur",ce=>{var X;(X=e.onBlur)==null||X.call(e,ce),y(),a(u,0)}),c.addEventListener("animationstart",ce=>{ce.animationName==="jss-autofill"&&(u(),B(),f())}),a(u,0),f(),JSswift._registerCleanup(c,()=>{r=!0,y(),v.forEach(clearTimeout),v.clear()});const M=e.model;if(M){const ce=X=>{var Z;let ie=!1;const te=ne=>{const K=ne!=null?ne:"";c.value!==K&&(c.value=K,z=K)},se=ne=>{if(!ie){ie=!0;try{te(ne)}finally{ie=!1}}};X.action(se),JSswift.reactive.untracked(()=>te(X.value));const R=ne=>{if(ie||ne!=null&&ne.isComposing)return;const K=c.value;if(X.value!==K){ie=!0;try{X.value=K}finally{ie=!1}}};c.addEventListener("input",R),c.addEventListener("compositionend",R);let ae=!1;const re=()=>{var ne,K,S,I;if(ae)return;ae=!0,c.removeEventListener("input",R),c.removeEventListener("compositionend",R);const m=(K=(ne=X._actions)==null?void 0:ne.indexOf(se))!=null?K:-1;m>=0&&X._actions.splice(m,1);const P=(I=(S=X._disposeHooks)==null?void 0:S.indexOf(re))!=null?I:-1;P>=0&&!X._disposed&&X._disposeHooks.splice(P,1)};(Z=X.onDispose)==null||Z.call(X,re),JSswift._registerCleanup(c,re)};if(typeof M=="object"&&typeof M._bind=="function")ce(M);else if(Array.isArray(M)&&typeof M[0]=="function"&&typeof M[1]=="function"){const X=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(M[0],M[1]));ce(X),JSswift._registerCleanup(c,()=>X.dispose())}}const D=JSswift.ui.renderSlot(n,"input",{input:c,props:e},c),q=Array.isArray(D)?_.div({style:{display:"contents"}},...D):D,L=he.FormField({...i,control:q,getValue:()=>c.value,onClear:()=>{c.disabled||c.readOnly||(c.value="",c.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>c.focus()});return c.addEventListener("input",()=>{var ce;return(ce=L._refresh)==null?void 0:ce.call(L)}),c.addEventListener("change",()=>{var ce;return(ce=L._refresh)==null?void 0:ce.call(L)}),L._input=c,il(L,c,e,!0),fn(c,e,{isEnabled:()=>!c.disabled,action:()=>vn(c,{selectText:!!e.selectOnShortcode})}),L},he.Textarea=(e={})=>{var t,s,l,n;const i=e.slots||{},c={...e,label:(t=e.label)!=null?t:e.placeholder,wrapClass:oe(["jss-textarea-field",e.wrapClass])},r=_.textarea({class:oe(["jss-input","jss-textarea",e.class]),name:e.name,autocomplete:e.autocomplete,inputmode:e.inputmode,rows:e.rows,cols:e.cols,maxLength:(s=e.maxLength)!=null?s:e.maxlength,minLength:(l=e.minLength)!=null?l:e.minlength,wrap:e.wrap,value:(n=e.value)!=null?n:"",disabled:!!e.disabled,readOnly:!!e.readonly});r.addEventListener("input",()=>{var k;(k=e.onInput)==null||k.call(e,r.value)}),r.addEventListener("change",()=>{var k;(k=e.onChange)==null||k.call(e,r.value)}),r.addEventListener("focus",k=>{var f;(f=e.onFocus)==null||f.call(e,k)}),r.addEventListener("blur",k=>{var f;(f=e.onBlur)==null||f.call(e,k)});const v=e.model;if(v){const k=f=>{var B;let y=!1;const M=X=>{const Z=X!=null?X:"";r.value!==Z&&(r.value=Z)},D=X=>{if(!y){y=!0;try{M(X)}finally{y=!1}}};f.action(D),JSswift.reactive.untracked(()=>M(f.value));const q=X=>{if(y||X!=null&&X.isComposing)return;const Z=r.value;if(f.value!==Z){y=!0;try{f.value=Z}finally{y=!1}}};r.addEventListener("input",q),r.addEventListener("compositionend",q);let L=!1;const ce=()=>{var X,Z,ie,te;if(L)return;L=!0,r.removeEventListener("input",q),r.removeEventListener("compositionend",q);const se=(Z=(X=f._actions)==null?void 0:X.indexOf(D))!=null?Z:-1;se>=0&&f._actions.splice(se,1);const R=(te=(ie=f._disposeHooks)==null?void 0:ie.indexOf(ce))!=null?te:-1;R>=0&&!f._disposed&&f._disposeHooks.splice(R,1)};(B=f.onDispose)==null||B.call(f,ce),JSswift._registerCleanup(r,ce)};if(typeof v=="object"&&typeof v._bind=="function")k(v);else if(Array.isArray(v)&&typeof v[0]=="function"&&typeof v[1]=="function"){const f=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(v[0],v[1]));k(f),JSswift._registerCleanup(r,()=>f.dispose())}}const a=JSswift.ui.getSlot(i,"textarea")!=null?"textarea":"input",z=JSswift.ui.renderSlot(i,a,{textarea:r,input:r,props:e},r),u=Array.isArray(z)?_.div({style:{display:"contents"}},...z):z,x=he.FormField({...c,control:u,getValue:()=>r.value,onClear:()=>{r.disabled||r.readOnly||(r.value="",r.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>r.focus()});return r.addEventListener("input",()=>{var k;return(k=x._refresh)==null?void 0:k.call(x)}),r.addEventListener("change",()=>{var k;return(k=x._refresh)==null?void 0:k.call(x)}),x._input=r,x._textarea=r,fn(r,e,{isEnabled:()=>!r.disabled,action:()=>vn(r,{selectText:!!e.selectOnShortcode})}),x};function al(){const e=[];return{effect:(t,s)=>{const l=JSswift.reactive.effect(t,s);return e.push(l),l},action:(t,s)=>{t.action(s),e.push(()=>{var l,n;const i=(n=(l=t._actions)==null?void 0:l.indexOf(s))!=null?n:-1;i>=0&&t._actions.splice(i,1)})},dispose:()=>e.splice(0).forEach(t=>t())}}he.Search=(e={})=>{var t,s;const l=al();let n=!1;const i=e.slots||{},c=O=>!!O&&(typeof O=="object"&&typeof O._bind=="function"||It(O)),r=c(e.model)?e.model:c(e.value)?e.value:null,v=r?typeof r=="object"&&typeof r._bind=="function"?r.value:r[0]():o(e.value),[a,z]=JSswift.reactive.signal(v==null?"":String(v)),[u,x]=JSswift.reactive.signal(!1),[k,f]=JSswift.reactive.signal(!1),[B,y]=JSswift.reactive.signal(null),[M,D]=JSswift.reactive.signal([]),[q,L]=JSswift.reactive.signal(-1),ce=`jss-search-${Math.random().toString(36).slice(2,10)}`,X=new Map;let Z=null,ie=null,te=null,se=0,R=0,ae=!1,re=-1,ne=[];const K=(O,d)=>{const p=Number(o(O));return Number.isFinite(p)?p:d},S=(O,d=!1)=>{const p=o(O);return p==null?d:!!p},I=()=>S(e.disabled,!1),m=()=>S(e.readonly,!1),P=()=>Math.max(0,K(e.minLength,e.endpoint?1:0)),G=()=>Math.max(0,K(e.debounce,250)),h=O=>{var d,p,C,ee,Se;const Ce=e.getLabel||e.labelOf;return typeof Ce=="function"?Ce(O):O==null?"":typeof O=="string"||typeof O=="number"?String(O):(Se=(ee=(C=(p=(d=O.label)!=null?d:O.title)!=null?p:O.name)!=null?C:O.text)!=null?ee:O.value)!=null?Se:""},b=O=>{var d,p,C;const ee=e.getValue||e.valueOf;return typeof ee=="function"?ee(O):O==null?"":typeof O=="string"||typeof O=="number"?O:(C=(p=(d=O.value)!=null?d:O.id)!=null?p:O.key)!=null?C:h(O)},g=O=>Array.isArray(O)?O:!O||typeof O!="object"?[]:Array.isArray(O.items)?O.items:Array.isArray(O.results)?O.results:Array.isArray(O.data)?O.data:[],J=async(O,d)=>{const p=typeof O=="function"?O(d,{props:e}):o(O);return p&&typeof p.then=="function"?await p:p},W=(O,d)=>{const p=typeof O=="function"?O(d,{props:e}):o(O);if(!p)return"";const C=String(p),ee=new URL(C,window.location.href),Se=o(e.queryParam)||"q";Se&&ee.searchParams.set(Se,d);const Ce=typeof e.params=="function"?e.params(d,{props:e}):o(e.params);return Ce&&typeof Ce=="object"&&Object.keys(Ce).forEach(Ae=>{const Le=o(Ce[Ae]);Le==null||Le===!1||ee.searchParams.set(Ae,String(Le))}),ee.toString()},H=(O,d={})=>{var p,C;const ee=O==null?"":String(O);a()!==ee&&z(ee),Ie.value!==ee&&(Ie.value=ee),Z&&!d.fromModel&&Z(ee),d.fromModel||(p=e.onInput)==null||p.call(e,ee,d.event),(C=fe==null?void 0:fe._refresh)==null||C.call(fe)},de=()=>{x(!1),L(-1)},E=()=>k()||B()||M().length?!0:a().trim().length>=P()?!!(e.emptyText||JSswift.ui.getSlot(i,"empty")!=null):!!(e.startText||JSswift.ui.getSlot(i,"empty")!=null),N=()=>{I()||E()&&(x(!0),Y())},A=()=>{D([]),y(null),L(-1)},T=async(O,d={})=>{var p,C,ee,Se,Ce,Ae;if(n)return;const Le=O==null?"":String(O).trim(),ke=++se,Ee=o((p=e.endpoint)!=null?p:e.url),Re=(ee=(C=e.items)!=null?C:e.options)!=null?ee:e.suggestions;if(te&&(te.abort(),te=null),Le.length<P()){f(!1),A(),d.open&&E()?N():E()||de();return}const Me=e.cache!==!1,$e=`${Ee||"local"}::${Le}`;if(Me&&X.has($e)){D(X.get($e)),y(null),f(!1),L(X.get($e).length?0:-1),d.open!==!1&&N();return}f(!0),y(null),d.open!==!1&&N(),(Se=e.onSearch)==null||Se.call(e,Le);try{let Ye;if(Ee){te=new AbortController;const Xe=W(Ee,Le),ze=await fetch(Xe,{method:"GET",headers:e.headers,credentials:e.credentials,signal:te.signal});if(!ze.ok)throw new Error(`Search request failed (${ze.status})`);Ye=await(e.parseResponse||(Ke=>Ke.json()))(ze)}else if(Re!=null){const Xe=g(await J(Re,Le)),ze=e.filter||((Ve,Ke)=>String(h(Ve)).toLowerCase().includes(Ke.toLowerCase()));Ye=Xe.filter(Ve=>ze(Ve,Le))}else Ye=[];if(n||ke!==se)return;const qe=typeof e.mapResponse=="function"?e.mapResponse(Ye,Le):g(Ye),lt=g(qe);Me&&X.set($e,lt),D(lt),L(lt.length?0:-1),(Ce=e.onResults)==null||Ce.call(e,lt,Le)}catch(Ye){if((Ye==null?void 0:Ye.name)==="AbortError"||n||ke!==se)return;y(Ye),D([]),L(-1),(Ae=e.onError)==null||Ae.call(e,Ye,Le)}finally{!n&&ke===se&&(f(!1),te=null,Y())}},U=(O,d={})=>{if(n)return;ie&&clearTimeout(ie);const p=d.immediate?0:G();ie=setTimeout(()=>{ie=null,T(O,d)},p)},ue=O=>{var d;const p=a();(d=e.onSubmit)==null||d.call(e,p,O),e.submitOnEnter!==!1&&U(p,{immediate:!0,open:!0})},xe=(O,d)=>{var p;if(!O)return;const C=b(O),ee=h(O);e.commitValue==="value"?H(C,{event:d}):e.commitValue!==!1&&H(ee,{event:d}),(p=e.onSelect)==null||p.call(e,O,{value:C,label:ee,query:a(),event:d}),e.closeOnSelect!==!1&&de()},Ne=O=>{const d=M();if(!d.length)return;const p=q(),C=p<0?O>0?0:d.length-1:Math.max(0,Math.min(d.length-1,p+O));L(C)},$=O=>{const d=O==null?"":String(O),p=a().trim();if(!p||e.highlight===!1)return[document.createTextNode(d)];const C=d.toLowerCase().indexOf(p.toLowerCase());return C<0?[document.createTextNode(d)]:[document.createTextNode(d.slice(0,C)),_.mark({class:"jss-search-highlight"},d.slice(C,C+p.length)),document.createTextNode(d.slice(C+p.length))]},V=O=>{var d,p;const C=h(O),ee=O&&typeof O=="object"?(p=(d=O.description)!=null?d:O.subtitle)!=null?p:O.note:null;return _.div({class:"jss-search-result-content"},_.div({class:"jss-search-result-label"},...$(C)),ee?_.div({class:"jss-search-result-description"},String(ee)):null)},Y=()=>{!u()||we.parentNode!==document.body||R||(R=requestAnimationFrame(()=>{if(R=0,!u()||!j.isConnected||we.parentNode!==document.body)return;const O=j.getBoundingClientRect(),d=6,p=8,C=Math.max(180,window.innerWidth-p*2),ee=Math.min(Math.max(O.width,K(e.minMenuWidth,260)),C),Se=Math.max(p,Math.min(O.left,window.innerWidth-ee-p));we.style.width=`${ee}px`,we.style.left=`${Se}px`,we.style.right="auto";const Ce=we.getBoundingClientRect().height||0,Ae=window.innerHeight-O.bottom-d-p,Le=O.top-d-p;let Ee=Ae<180&&Le>Ae?O.top-d-Ce:O.bottom+d;Ee=Math.max(p,Math.min(Ee,window.innerHeight-Ce-p)),we.style.top=`${Ee}px`}))},ge=()=>{ae||(ae=!0,window.addEventListener("resize",Y),window.addEventListener("scroll",Y,!0))},ye=()=>{ae&&(ae=!1,window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y,!0))},Q=()=>{we.parentNode!==document.body&&(R&&(cancelAnimationFrame(R),R=0),we.classList.add("portal"),we.style.display="block",document.body.appendChild(we),ge(),Y())},ve=()=>{R&&(cancelAnimationFrame(R),R=0),ye(),we.parentNode!==j&&j.appendChild(we),we.classList.remove("portal"),we.style.display="",we.style.position="",we.style.top="",we.style.left="",we.style.right="",we.style.width=""},be=e.label!=null||JSswift.ui.getSlot(i,"label")!=null,me=()=>{if(!be){Ie.placeholder=o(e.placeholder)||"";return}Ie.placeholder=document.activeElement===Ie&&o(e.placeholder)||""},Ie=_.input({id:e.id,class:oe(["jss-input","jss-search-input",e.inputClass]),type:"search",name:e.name,placeholder:be?"":e.placeholder,autocomplete:e.autocomplete||"off",inputmode:e.inputmode,value:a(),disabled:I(),readOnly:m(),role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-controls":`${ce}-list`}),Oe=_.div({id:`${ce}-list`,class:"jss-search-results",role:"listbox"}),we=_.div({class:oe(["jss-search-menu","jss-singularity-menu-select",e.menuClass,pe(e.fill,"jss-select-menu-fill")]),"data-jss-overlay-portal":"true",onClick:O=>O.stopPropagation()},Oe),j=_.div({class:oe(["jss-search",e.class]),role:"presentation"},Ie,we);let fe=null;if(r){if(typeof r=="object"&&typeof r._bind=="function")l.action(r,O=>H(O,{fromModel:!0})),Z=O=>{r.value!==O&&(r.value=O)};else if(Array.isArray(r)&&typeof r[0]=="function"&&typeof r[1]=="function"){const O=r[0],d=r[1];l.effect(()=>{H(O(),{fromModel:!0})},"UI.Search:model"),Z=p=>d(p)}}else rt(e.value)&&l.effect(()=>{H(o(e.value),{fromModel:!0})},"UI.Search:value");Ie.addEventListener("input",O=>{H(Ie.value,{event:O}),e.searchOnInput!==!1&&U(Ie.value,{open:!0})}),Ie.addEventListener("change",O=>{var d;return(d=e.onChange)==null?void 0:d.call(e,Ie.value,O)}),Ie.addEventListener("focus",O=>{var d;me(),(d=e.onFocus)==null||d.call(e,O),e.openOnFocus!==!1&&(e.searchOnFocus&&!M().length?U(Ie.value,{immediate:!0,open:!0}):N())}),Ie.addEventListener("blur",O=>{var d;me(),(d=e.onBlur)==null||d.call(e,O)}),Ie.addEventListener("keydown",O=>{if(I()||m())return;const d=u(),p=M(),C=q();if(O.key==="Escape"){d&&(O.preventDefault(),de());return}if(O.key==="ArrowDown"){O.preventDefault(),d?Ne(1):(N(),p.length||U(Ie.value,{immediate:!0,open:!0}));return}if(O.key==="ArrowUp"){O.preventDefault(),d?Ne(-1):N();return}if(O.key==="Home"&&d&&p.length&&(O.metaKey||O.ctrlKey)){O.preventDefault(),L(0);return}if(O.key==="End"&&d&&p.length&&(O.metaKey||O.ctrlKey)){O.preventDefault(),L(p.length-1);return}O.key==="Enter"&&(d&&C>=0&&p[C]?(O.preventDefault(),xe(p[C],O)):ue(O))});const je=O=>{if(!j.isConnected)return;const d=O.target;j.contains(d)||we.contains(d)||de()};return document.addEventListener("click",je,!0),l.effect(()=>{const O=u();j.classList.toggle("open",O),Ie.setAttribute("aria-expanded",O?"true":"false"),O?Q():ve()},"UI.Search:open"),l.effect(()=>{const O=I(),d=m();j.classList.toggle("disabled",O),j.classList.toggle("readonly",d),Ie.disabled=O,Ie.readOnly=d},"UI.Search:disabled"),l.effect(()=>{const O=k(),d=B(),p=M(),C=a();if(Oe.innerHTML="",ne=[],re=-1,O){const ee=JSswift.ui.renderSlot(i,"loading",{query:C},e.loadingText||"Caricamento...");Oe.appendChild(_.div({class:"jss-search-empty is-loading"},...F(null,"default",{},ee)))}else if(d){const ee=JSswift.ui.renderSlot(i,"error",{error:d,query:C},e.errorText||"Errore ricerca");Oe.appendChild(_.div({class:"jss-search-empty is-error"},...F(null,"default",{},ee)))}else if(p.length)p.forEach((ee,Se)=>{const Ae=h(ee),Le=b(ee),ke=Me=>xe(ee,Me),Ee=JSswift.ui.renderSlot(i,"result",{item:ee,index:Se,active:!1,label:Ae,value:Le,query:C,select:ke},V(ee)),Re=_.div({id:`${ce}-result-${Se}`,class:oe(["jss-search-result",""]),role:"option","aria-selected":"false",onMouseEnter:()=>L(Se),onMouseDown:Me=>Me.preventDefault(),onClick:ke},...F(null,"default",{},Ee));Oe.appendChild(Re),ne[Se]=Re});else{const Se=C.trim().length>=P()?e.emptyText||"Nessun risultato":e.startText||"",Ce=JSswift.ui.renderSlot(i,"empty",{query:C},Se);(Se||JSswift.ui.getSlot(i,"empty")!=null)&&Oe.appendChild(_.div({class:"jss-search-empty"},...F(null,"default",{},Ce)))}E()||de(),Y()},"UI.Search:render"),l.effect(()=>{const O=q();O!==re&&(ne[re]&&(ne[re].classList.remove("active"),ne[re].setAttribute("aria-selected","false")),ne[O]?(ne[O].classList.add("active"),ne[O].setAttribute("aria-selected","true"),ne[O].scrollIntoView({block:"nearest"}),Ie.setAttribute("aria-activedescendant",`${ce}-result-${O}`)):Ie.removeAttribute("aria-activedescendant"),re=O)},"UI.Search:active"),fe=he.FormField({...e,icon:(t=e.icon)!=null?t:"search",wrapClass:oe(["jss-search-field",e.wrapClass]),control:j,getValue:()=>a(),onClear:()=>{var O;I()||m()||(H("",{}),A(),(O=e.onClear)==null||O.call(e))},onFocus:()=>Ie.focus()}),Ie.addEventListener("input",()=>{var O;return(O=fe._refresh)==null?void 0:O.call(fe)}),Ie.addEventListener("change",()=>{var O;return(O=fe._refresh)==null?void 0:O.call(fe)}),fe._input=Ie,fe._search=j,fe._open=N,fe._close=de,fe._searchNow=()=>T(a(),{immediate:!0,open:!0}),fe._getResults=M,fe._setValue=O=>H(O,{}),fe._dispose=()=>{n||(n=!0,l.dispose(),se++,X.clear(),document.removeEventListener("click",je,!0),ie&&clearTimeout(ie),te&&te.abort(),ve())},(s=JSswift._registerCleanup)==null||s.call(JSswift,fe,fe._dispose),fn(Ie,e,{isEnabled:()=>!Ie.disabled,action:()=>vn(Ie,{selectText:!!e.selectOnShortcode})}),(e.autoSearch||e.searchOnMount)&&U(a(),{immediate:!0,open:!1}),fe},he.Select=(e={})=>{var t,s;const l=al();let n=!1;const i={...e,label:(t=e.label)!=null?t:e.placeholder},c=e.filterable,r=!!e.multiple||!!e.multi,v=!!e.allowCustom||!!e.allowCustomValue,a=e.slots||{},z=d=>!!d&&(typeof d=="object"&&typeof d._bind=="function"||It(d)),u=z(e.model)?e.model:z(e.value)?e.value:null,x=d=>Array.isArray(d)?d.slice():d==null||d===""?[]:[d],k=d=>r?x(d):d,f=u?JSswift.reactive.untracked(()=>typeof u=="object"&&typeof u._bind=="function"?u.value:u[0]()):e.value,[B,y]=JSswift.reactive.signal(!1),[M,D]=JSswift.reactive.signal(""),[q,L]=JSswift.reactive.signal(r?x(f):f!=null?f:""),[ce,X]=JSswift.reactive.signal(!1),[Z,ie]=JSswift.reactive.signal([]),[te,se]=JSswift.reactive.signal([]),[R,ae]=JSswift.reactive.signal(-1);let re=null;if(u){if(typeof u=="object"&&typeof u._bind=="function")JSswift.reactive.untracked(()=>L(k(u.value))),l.action(u,d=>L(k(d))),re=d=>{const p=k(d);u.value!==p&&(u.value=p)};else if(Array.isArray(u)&&typeof u[0]=="function"&&typeof u[1]=="function"){const d=u[0],p=u[1];JSswift.reactive.untracked(()=>{l.effect(()=>{L(k(d()))},"UI.Select:model")}),re=C=>p(k(C))}}function ne(){var d;return typeof e.disabled=="function"?e.disabled():typeof e.disabled=="boolean"?e.disabled:(d=e==null?void 0:e.disabled)!=null&&d.action?e.disabled.value:!1}function K(d){var p,C,ee,Se;if(d==null)return null;if(typeof d=="string"||typeof d=="number")return{type:"option",label:String(d),value:d,disabled:!1};if(typeof d=="object"){if(Array.isArray(d.options))return{type:"group",label:String((p=d.label)!=null?p:""),options:d.options};const Ce=(C=d.label)!=null?C:d.value!=null?String(d.value):"";return{type:"option",label:String(Ce),value:(Se=(ee=d.value)!=null?ee:d.label)!=null?Se:"",disabled:!!d.disabled}}return{type:"option",label:String(d),value:d,disabled:!1}}function S(d){const C=(Array.isArray(d)?d:[]).map(K).filter(Boolean),ee=[],Se=[];for(const Ce of C)if(Ce.type==="group"){ee.push({type:"group",label:Ce.label});const Ae=(Ce.options||[]).map(K).filter(Boolean).filter(Le=>Le.type==="option");for(const Le of Ae)ee.push(Le),Se.push(Le)}else ee.push(Ce),Se.push(Ce);ie(ee),se(Se)}async function I(){if(n)return;const d=e.options;let p;try{const C=typeof d=="function"?JSswift.ui.withoutRodPathCapture(()=>d()):d;C&&typeof C.then=="function"?(X(!0),p=await C):p=C,n||S(p)}catch(C){if(n)return;console.error("[UI.Select] options load error:",C),S([])}finally{n||X(!1)}}function m(d){var p;const C=k(d);L(C),re&&re(C),(p=e.onChange)==null||p.call(e,C)}function P(d){const p=x(q()),ee=p.some(Se=>Se==d)?p.filter(Se=>Se!=d):[...p,d];m(ee)}function G(d,p=!1){r?(P(d),p&&h()):(m(d),b())}function h(){D(""),T&&(T.value="")}function b(){y(!1),h(),ae(-1)}async function g(){if(n||ne()||(y(!0),await I(),n))return;const d=q(),p=te();let C=-1;if(r){const ee=x(d);for(const Se of ee)if(C=p.findIndex(Ce=>Ce.value==Se&&!Ce.disabled),C>=0)break}else C=p.findIndex(ee=>ee.value==d&&!ee.disabled);C<0&&(C=p.findIndex(ee=>!ee.disabled)),ae(C),T&&setTimeout(()=>T.focus(),0)}function J(){B()?b():g()}const W=_.div({class:oe(["jss-select",r?"multiple":"",e.class]),tabIndex:ne()?-1:0,role:"combobox","aria-expanded":"false","aria-disabled":ne()?"true":"false"}),H=_.div({class:oe(["jss-select-value",r?"jss-select-value-multi":""])});l.effect(()=>{const d=te();if(H.innerHTML="",r){const p=x(q());for(const C of p){const ee=d.find(Le=>Le.value==C),Se=ee?ee.label:C==null?"":String(C);let Ce=!1;const Ae=he.Chip({label:Se,dense:!0,color:e.chipColor||e.color,icon:e.chipIcon||null,iconRight:e.chipIconRight||null,glossy:e.glossy,glow:e.glow,glass:e.chipGlass||e.glass,class:e.chipClass,flat:e.flat,rounded:e.rounded,outline:e.outline,shadow:e.chipShadow,lightShadow:e.lightShadow,gloss:e.gloss,border:e.border,size:e.chipSize,removable:!0,onRemove:Le=>{var ke,Ee,Re;(ke=Le==null?void 0:Le.preventDefault)==null||ke.call(Le),(Ee=Le==null?void 0:Le.stopPropagation)==null||Ee.call(Le),(Re=Le==null?void 0:Le.stopImmediatePropagation)==null||Re.call(Le),!Ce&&(Ce=!0,P(C))}});H.appendChild(Ae)}}else{const p=q(),C=d.find(ee=>ee.value==p);H.textContent=C?C.label:p==null||p===""?"":String(p)}},"UI.Select:value");const de=_.div({class:"jss-select-arrow"});l.effect(()=>{const d=JSswift.ui.renderSlot(a,"arrow",{open:B()},he.Icon("#chevron-down"));de.innerHTML="",F(null,"default",{},d).forEach(p=>de.appendChild(p))},"UI.Select:arrow");const E=_.div({class:"jss-select-control",onClick:J},H,de),N=_.div({class:"jss-select-options",role:"listbox","aria-multiselectable":r?"true":"false"}),A=_.div({class:"jss-select-filter jss-d-none"});let T=null;const U=_.input({class:"jss-input",type:"text",placeholder:e.filterPlaceholder||"Cerca...",onInput:d=>D(d.target.value||"")}),ue=()=>{const d=JSswift.ui.renderSlot(a,"filter",{value:M(),setValue:C=>{const ee=C==null?"":String(C);D(ee),T&&"value"in T&&(T.value=ee)},close:b},U);A.innerHTML="";const p=F(null,"default",{},d);p.forEach(C=>A.appendChild(C)),T=p.length===1&&p[0]&&p[0].tagName==="INPUT"?p[0]:null,T&&(T.value=M()||"")};JSswift.reactive.untracked(ue),l.effect(()=>{const d=M()||"";T&&"value"in T&&T.value!==d&&(T.value=d)},"UI.Select:filterValue"),typeof c=="boolean"?c?A.classList.remove("jss-d-none"):A.classList.add("jss-d-none"):c!=null&&c.action&&(l.action(c,d=>{d?A.classList.remove("jss-d-none"):A.classList.add("jss-d-none")}),c.value?A.classList.remove("jss-d-none"):A.classList.add("jss-d-none"));const xe={...e};Qt(xe);const Ne=et([xe.color,xe.state],()=>{const d=o(xe.color)||o(xe.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(d)?d:o(xe.state)||""}),$=_.div({class:oe(["jss-select-menu","jss-singularity-menu-select",Ne,xe.class,pe(e.fill,"jss-select-menu-fill")]),"data-jss-overlay-portal":"true",onClick:d=>d.stopPropagation()},A,N);let V=0,Y=!1;const ge=()=>{!B()||$.parentNode!==document.body||V||(V=requestAnimationFrame(()=>{if(V=0,!B()||!W.isConnected||$.parentNode!==document.body)return;const d=W.getBoundingClientRect(),p=6,C=8,ee=Math.max(160,window.innerWidth-C*2),Se=Math.min(Math.max(d.width,180),ee),Ce=Math.max(C,Math.min(d.left,window.innerWidth-Se-C));$.style.width=`${Se}px`,$.style.left=`${Ce}px`,$.style.right="auto",$.style.marginTop="0";const Ae=$.getBoundingClientRect().height||0,Le=window.innerHeight-d.bottom-p-C,ke=d.top-p-C;let Re=Le<180&&ke>Le?d.top-p-Ae:d.bottom+p;Re=Math.max(C,Math.min(Re,window.innerHeight-Ae-C)),$.style.top=`${Re}px`}))},ye=()=>{Y||(Y=!0,window.addEventListener("resize",ge),window.addEventListener("scroll",ge,!0))},Q=()=>{Y&&(Y=!1,window.removeEventListener("resize",ge),window.removeEventListener("scroll",ge,!0))},ve=()=>{$.parentNode!==document.body&&(V&&(cancelAnimationFrame(V),V=0),$.classList.add("portal"),$.style.display="block",document.body.appendChild($),ye(),ge())},be=()=>{V&&(cancelAnimationFrame(V),V=0),Q(),$.parentNode!==W&&W.appendChild($),$.classList.remove("portal"),$.style.display="",$.style.position="",$.style.top="",$.style.left="",$.style.right="",$.style.width="",$.style.marginTop=""};W.appendChild(E),W.appendChild($),l.effect(()=>{const d=B();W.classList.toggle("open",d),W.setAttribute("aria-expanded",d?"true":"false"),d?ve():be()},"UI.Select:open"),l.effect(()=>{const d=ne();W.classList.toggle("disabled",d),W.tabIndex=d?-1:0,W.setAttribute("aria-disabled",d?"true":"false")},"UI.Select:disabled");let me=[],Ie=-1,Oe=-1;function we(){var d;const p=R();Oe=p,p!==Ie&&(me[Ie]&&me[Ie].classList.remove("active"),me[p]&&me[p].classList.add("active"),Ie=p,p>=0&&((d=me[p])==null||d.scrollIntoView({block:"nearest"})))}l.effect(()=>{const d=Z(),p=te(),C=(M()||"").toLowerCase().trim(),ee=q(),Se=r?x(ee):[ee],Ce=ce(),Ae=Oe;N.innerHTML="",me=[],Ie=-1;const Le=[];let ke=0;const Ee=Re=>{const Me=Se.some(Ve=>Ve==Re.value),$e=!!Re.disabled,Ye=["jss-select-option",Me?"selected":"",$e?"disabled":""].filter(Boolean).join(" "),qe=()=>{r?P(Re.value):(m(Re.value),b())},lt=JSswift.ui.renderSlot(a,"option",{opt:Re,selected:Me,active:ke===Ae,disabled:$e,select:qe},Re.label),Xe=F(null,"default",{},lt),ze=_.div({class:Ye,"data-flat-index":String(ke),onClick:$e?null:qe},...Xe);Le.push(ze),me[ke]=ze,ke++};if(C){const Re=p.filter(Me=>Me.label.toLowerCase().includes(C));if(Re.length===0){const Me=JSswift.ui.renderSlot(a,"empty",{filter:C},e.emptyText||"Nessuna opzione");N.appendChild(_.div({class:"jss-select-empty"},...F(null,"default",{},Me))),B()&&ge();return}for(const Me of Re)Ee(Me)}else{let Re=!1;for(const Me of d)if(Me.type==="group"){const $e=JSswift.ui.renderSlot(a,"group",{label:Me.label},Me.label);Le.push(_.div({class:"jss-select-group"},...F(null,"default",{},$e)))}else Re=!0,Ee(Me);if(!Re){const Me=JSswift.ui.renderSlot(a,"empty",{filter:C},e.emptyText||"Nessuna opzione");N.appendChild(_.div({class:"jss-select-empty"},...F(null,"default",{},Me))),B()&&ge();return}}if(Ce){const Re=JSswift.ui.renderSlot(a,"loading",{},"Caricamento...");N.appendChild(_.div({class:"jss-select-empty"},...F(null,"default",{},Re))),B()&&ge();return}for(const Re of Le)N.appendChild(Re);we(),B()&&ge()},"UI.Select:render"),l.effect(()=>{we()},"UI.Select:paintActive");const j=d=>{if(!W.isConnected)return;const p=d.target;W.contains(p)||$.contains(p)||b()};document.addEventListener("click",j,!0);const fe=d=>{if(ne())return;const p=B(),C=te(),ee=R(),Se=T&&d.target===T,Ce=(Le,ke)=>{let Ee=Le;for(;Ee>=0&&Ee<C.length;){if(!C[Ee].disabled)return Ee;Ee+=ke}return-1},Ae=Le=>{if(!Le)return null;const ke=Le.toLowerCase();let Ee=C.find(Re=>String(Re.label).toLowerCase()===ke||String(Re.value).toLowerCase()===ke);return Ee||(Ee=C.find(Re=>String(Re.label).toLowerCase().includes(ke))),Ee&&!Ee.disabled?Ee:null};if(d.key==="Escape"){p&&(d.preventDefault(),b());return}if(Se&&(d.key==="Enter"||d.key===" ")){const Le=(M()||"").trim();if(Le){const ke=Ae(Le);if(ke){d.preventDefault(),G(ke.value,!0);return}if(v&&d.key==="Enter"){d.preventDefault(),G(Le,!0);return}if(d.key==="Enter"){d.preventDefault();return}}if(d.key===" ")return}if(d.key==="Enter"||d.key===" "){if(d.preventDefault(),!p){g();return}ee>=0&&C[ee]&&!C[ee].disabled&&(r?P(C[ee].value):(m(C[ee].value),b()));return}if(d.key==="ArrowDown"){if(d.preventDefault(),!p){g();return}const Le=Ce(ee<0?0:ee+1,1);Le>=0&&ae(Le);return}if(d.key==="ArrowUp"){if(d.preventDefault(),!p){g();return}const Le=Ce(ee<0?C.length-1:ee-1,-1);Le>=0&&ae(Le);return}if(d.key==="Home"){if(!p)return;d.preventDefault();const Le=Ce(0,1);Le>=0&&ae(Le);return}if(d.key==="End"){if(!p)return;d.preventDefault();const Le=Ce(C.length-1,-1);Le>=0&&ae(Le);return}};W.addEventListener("keydown",fe),A.addEventListener("keydown",fe),W._dispose=()=>{n||(n=!0,l.dispose(),document.removeEventListener("click",j,!0),W.removeEventListener("keydown",fe),A.removeEventListener("keydown",fe),be())};const je=()=>{const d=q();return r?Array.isArray(d)&&d.length>0:d==null?!1:d!==""?!0:te().some(p=>p.value==="")},O=he.FormField({...i,control:W,clearable:e.clearable,disabled:ne(),readonly:!1,hasValue:je,getValue:()=>{const d=q();return r?Array.isArray(d)&&d.length?d:"":d},onClear:()=>{ne()||(m(r?[]:null),b())},onFocus:()=>{g()}});return l.effect(()=>{var d;(d=O._refresh)==null||d.call(O)},"UI.Select:fieldRefresh"),il(O,W,e),O._select=W,O._dispose=W._dispose,(s=JSswift._registerCleanup)==null||s.call(JSswift,O,O._dispose),fn(O,e,{isEnabled:()=>!ne(),action:()=>{if(ne())return!1;vn(W),g()}}),I(),O},he.Upload=(e={})=>{var t;Qt(e);const s=e.slots||{},[l,n]=JSswift.reactive.signal([]),[i,c]=JSswift.reactive.signal(!1),[r,v]=JSswift.reactive.signal(!1),[a,z]=JSswift.reactive.signal(null);let u=0,x=!1;const k=()=>!!o(e.disabled)||!!o(e.readonly),f=()=>e.multiple!==!1&&e.single!==!0,B=()=>{var j,fe;return["form","native","submit","external"].includes(String(o((fe=(j=e.submitMode)!=null?j:e.modeSubmit)!=null?fe:e.uploadMode)||"").toLowerCase())},y=()=>{var j;return o((j=e.showBrowse)!=null?j:e.browseButton)!==!1},M=()=>{var j;return!B()&&o((j=e.showUpload)!=null?j:e.uploadButton)!==!1},D=()=>{var j;return o((j=e.showClear)!=null?j:e.clearButton)!==!1},q=()=>{var j;return o((j=e.showFiles)!=null?j:e.files)!==!1},L=()=>{const j=bt(o(e.state)||o(e.status));return j?`jss-state-${j}`:""},ce=()=>e.fieldName||e.paramName||e.name||"file",X=()=>{var j;return Math.max(1,Number(o((j=e.parallelUploads)!=null?j:e.parallel)||1))},Z=()=>{var j,fe,je,O;const d=o(e.retry);return d===!0?{attempts:2,delay:350,factor:2}:d?{attempts:Math.max(0,Number((fe=(j=d.attempts)!=null?j:d.retries)!=null?fe:0)),delay:Math.max(0,Number((je=d.delay)!=null?je:350)),factor:Math.max(1,Number((O=d.factor)!=null?O:2))}:{attempts:0,delay:350,factor:2}},ie=j=>j?Array.isArray(j)?j:Array.from(j):[],te=j=>{const fe=Number(j||0);return fe<1024?`${fe} B`:fe<1024*1024?`${(fe/1024).toFixed(1)} KB`:fe<1024*1024*1024?`${(fe/1024/1024).toFixed(1)} MB`:`${(fe/1024/1024/1024).toFixed(1)} GB`},se=()=>{var j;return String(o((j=e.acceptedFiles)!=null?j:e.accept)||"").trim()},R=j=>{const fe=se();if(!fe)return!0;const je=String(j.name||"").toLowerCase(),O=String(j.type||"").toLowerCase();return fe.split(",").map(d=>d.trim().toLowerCase()).filter(Boolean).some(d=>d.startsWith(".")?je.endsWith(d):d.endsWith("/*")?O.startsWith(d.slice(0,-1)):O===d)},ae=()=>l().filter(j=>j.status!=="rejected"&&j.status!=="removed"),re=(j=0)=>ae().reduce((fe,je)=>fe+Number(je.size||0),j),ne=()=>{var j;n(l().slice()),Y.classList.toggle("is-busy",l().some(fe=>fe.status==="uploading")),Y.classList.toggle("has-files",l().some(fe=>fe.status!=="removed")),(j=e.onChange)==null||j.call(e,l().slice(),ge)},K=(j,fe,je=null)=>{var O;const d={id:`upload_${Date.now()}_${++u}`,file:j,name:(j==null?void 0:j.name)||"file",size:Number((j==null?void 0:j.size)||0),type:(j==null?void 0:j.type)||"",status:"rejected",progress:0,error:fe,detail:je,attempts:0,response:null,xhr:null};return l().push(d),(O=e.onRejected)==null||O.call(e,d,{reason:fe,detail:je,api:ge}),d},S=async(j,fe)=>{const je=e.maxFiles==null?null:Number(o(e.maxFiles)),O=e.maxFileSize==null?null:Number(o(e.maxFileSize)),d=e.minFileSize==null?null:Number(o(e.minFileSize)),p=e.maxTotalSize==null?null:Number(o(e.maxTotalSize));if(je!=null&&fe>je)return"max-files";if(O!=null&&Number(j.size||0)>O)return"max-file-size";if(d!=null&&Number(j.size||0)<d)return"min-file-size";if(p!=null&&re(Number(j.size||0))>p)return"max-total-size";if(!R(j))return"accept";const C=e.filter||e.acceptFile||e.validate;if(typeof C=="function"){const ee=await C(j,{files:l().slice(),api:ge});if(ee===!1)return"filter";if(typeof ee=="string")return ee}return null},I=async()=>{for(const j of l()){if(j.status!=="rejected"||j.error!=="max-files")continue;const fe=await S(j.file,ae().length+1);if(fe){j.error=fe;continue}j.status="queued",j.progress=0,j.error=null,j.detail=null}},m=j=>({id:`upload_${Date.now()}_${++u}`,file:j,name:(j==null?void 0:j.name)||"file",size:Number((j==null?void 0:j.size)||0),type:(j==null?void 0:j.type)||"",status:"queued",progress:0,bytesUploaded:0,error:null,detail:null,attempts:0,response:null,xhr:null}),P=async(j,fe={})=>{var je;if(k())return[];z(null);const O=ie(j),d=[];!f()&&O.length&&G({silent:!0});for(const p of O){const C=await S(p,ae().length+1);if(C){K(p,C);continue}const ee=m(p);if(l().push(ee),d.push(ee),(je=e.onAdded)==null||je.call(e,ee,{file:p,meta:fe,api:ge}),!f())break}return ne(),d.length&&e.autoUpload&&!B()&&A(),d},G=(j={})=>{var fe;for(const je of l())je.status==="uploading"&&b(je),je.status="removed";n([]),z(null),ne(),j.silent||(fe=e.onClear)==null||fe.call(e,ge)},h=async j=>{var fe;const je=typeof j=="string"?l().find(d=>d.id===j):j;if(!je)return;je.status==="uploading"&&b(je);const O=l().filter(d=>d!==je);n(O),await I(),ne(),(fe=e.onRemove)==null||fe.call(e,je,{api:ge})},b=j=>{var fe,je,O;const d=typeof j=="string"?l().find(p=>p.id===j):j;!d||d.status!=="uploading"||(d.status="canceled",d.error="canceled",(je=(fe=d.xhr)==null?void 0:fe.abort)==null||je.call(fe),(O=e.onCancel)==null||O.call(e,d,{api:ge}),ne())},g=()=>l().filter(j=>j.status==="uploading").forEach(b),J=async j=>{var fe,je;const O={url:o(e.url),method:o(e.method||"POST"),headers:e.headers,formFields:e.formFields||e.fields,fieldName:ce(),withCredentials:!!o((fe=e.withCredentials)!=null?fe:e.credentials),sendRaw:!!o(e.sendRaw)};if(typeof e.factory=="function")try{const d=await e.factory(j.file,{item:j,files:l().slice(),api:ge});if(d&&typeof d=="object")Object.assign(O,d);else if(d!=null)throw new Error("factory must return an object")}catch(d){throw(je=e.onFactoryFailed)==null||je.call(e,d,{item:j,api:ge}),d}return O},W=(j,fe,je)=>{const O=typeof fe=="function"?fe(je.file,{item:je,api:ge}):fe;O&&(O instanceof Headers?O.forEach((d,p)=>j.setRequestHeader(p,d)):Array.isArray(O)?O.forEach(d=>{Array.isArray(d)?j.setRequestHeader(d[0],d[1]):d!=null&&d.name&&j.setRequestHeader(d.name,d.value)}):typeof O=="object"&&Object.keys(O).forEach(d=>j.setRequestHeader(d,O[d])))},H=(j,fe,je)=>{const O=typeof fe=="function"?fe(je.file,{item:je,api:ge}):fe;O&&(Array.isArray(O)?O.forEach(d=>{Array.isArray(d)?j.append(d[0],d[1]):d!=null&&d.name&&j.append(d.name,d.value)}):typeof O=="object"&&Object.keys(O).forEach(d=>j.append(d,O[d])))},de=(j,fe)=>new Promise((je,O)=>{if(!fe.url){O(new Error("UI.Upload: url is required"));return}if(typeof XMLHttpRequest!="function"){O(new Error("UI.Upload: XMLHttpRequest is not available"));return}const d=new XMLHttpRequest;j.xhr=d,d.open(String(fe.method||"POST").toUpperCase(),fe.url,!0),d.withCredentials=!!fe.withCredentials,W(d,fe.headers,j),d.upload.onprogress=C=>{var ee;C.lengthComputable&&(j.bytesUploaded=C.loaded,j.progress=Math.max(0,Math.min(100,Math.round(C.loaded/C.total*100))),(ee=e.onProgress)==null||ee.call(e,j,{event:C,api:ge}),ne())},d.onload=()=>{const C=d.status>=200&&d.status<300,ee={status:d.status,text:d.responseText,xhr:d};C?je(ee):O(Object.assign(new Error(`HTTP error ${d.status}`),{response:ee}))},d.onerror=()=>O(new Error("network-error")),d.onabort=()=>O(new Error("canceled"));const p=fe.sendRaw?j.file:(()=>{const C=new FormData;return H(C,fe.formFields,j),C.append(fe.fieldName||"file",j.file,j.name),C})();d.send(p)}),E=async j=>{var fe,je,O,d,p,C;const ee=Z();let Se=ee.delay;j.status="uploading",j.error=null,j.progress=Math.max(0,j.progress||0),(fe=e.onStart)==null||fe.call(e,j,{api:ge}),ne();for(let Ce=0;Ce<=ee.attempts;Ce++){j.attempts=Ce+1;try{const Ae=await J(j),Le=typeof e.upload=="function"||typeof e.uploader=="function"?await(e.upload||e.uploader)(j.file,{item:j,options:Ae,progress:ke=>{var Ee;j.progress=Math.max(0,Math.min(100,Number(ke)||0)),(Ee=e.onProgress)==null||Ee.call(e,j,{api:ge}),ne()},api:ge}):await de(j,Ae);return j.status="done",j.progress=100,j.response=Le,j.xhr=null,(je=e.onSuccess)==null||je.call(e,j,{response:Le,api:ge}),(O=e.onComplete)==null||O.call(e,j,{response:Le,api:ge}),ne(),j}catch(Ae){if(String((Ae==null?void 0:Ae.message)||Ae)==="canceled"||j.status==="canceled")return j.status="canceled",j.error="canceled",j.xhr=null,(d=e.onComplete)==null||d.call(e,j,{error:Ae,api:ge}),ne(),j;if(Ce<ee.attempts){await new Promise(Le=>setTimeout(Le,Se)),Se=Math.round(Se*ee.factor);continue}return j.status="error",j.error=Ae,j.xhr=null,z(Ae),(p=e.onError)==null||p.call(e,j,{error:Ae,api:ge}),(C=e.onComplete)==null||C.call(e,j,{error:Ae,api:ge}),ne(),j}}return j},N=()=>{var j;if(x||k())return;const fe=l().filter(d=>d.status==="uploading").length,je=Math.max(0,X()-fe),O=l().filter(d=>d.status==="queued").slice(0,je);if(!O.length){const d=l().some(p=>p.status==="uploading");v(d),d||(j=e.onFinish)==null||j.call(e,l().slice(),{api:ge});return}v(!0),O.forEach(d=>{E(d).finally(()=>N())})},A=(j=null)=>{(j?ie(j):l().filter(je=>["queued","error","canceled"].includes(je.status))).forEach(je=>{const O=typeof je=="string"?l().find(d=>d.id===je):je;O&&O.status!=="uploading"&&O.status!=="done"&&O.status!=="rejected"&&(O.status="queued",O.progress=0,O.error=null)}),ne(),N()},T=j=>A([j]),U=()=>{k()||ue.click()},ue=_.input({type:"file",class:"jss-upload-input",name:ce(),accept:se()||null,multiple:f(),capture:e.capture||null,disabled:k(),onChange:j=>{P(j.target.files,{event:j,source:"browse"}),j.target.value=""}}),xe=_.div({class:"jss-upload-list"}),Ne=_.div({class:"jss-upload-summary"}),$=_.div({class:"jss-upload-actions"});let V=L();const Y=_.div({class:oe(["jss-upload","jss-singularity",V,pe(e.box||e.variant==="box","jss-upload-box"),pe(e.compact,"is-compact"),pe(B(),"is-form-mode"),pe(!q(),"is-files-hidden"),e.class]),tabindex:k()?"-1":"0",role:"group","aria-disabled":k()?"true":"false"}),ge={addFiles:P,browse:U,upload:A,retry:T,retryAll:()=>A(l().filter(j=>j.status==="error"||j.status==="canceled")),remove:h,clear:G,abort:b,abortAll:g,files:()=>l().slice(),state:()=>({files:l().slice(),busy:r(),dragging:i(),error:a()}),reset:G},ye=()=>{const j={api:ge,files:l().slice(),busy:r(),disabled:k(),submitMode:B()?"form":"upload"},fe=[];return y()&&fe.push(JSswift.ui.renderSlot(s,"browse",j,he.Btn({size:"sm",icon:"folder_open",label:e.browseText||"Browse",onClick:U}))),M()&&fe.push(JSswift.ui.renderSlot(s,"upload",j,he.Btn({size:"sm",color:"primary",icon:"upload",label:e.uploadText||"Upload",loading:r(),disabled:k()||!l().some(je=>["queued","error","canceled"].includes(je.status)),onClick:()=>A()}))),D()&&fe.push(JSswift.ui.renderSlot(s,"clear",j,he.Btn({size:"sm",color:"secondary",outline:!0,icon:"delete",label:e.clearText||"Clear",disabled:k()||!l().length,onClick:()=>G()}))),F(s,"actions",j,fe)},Q=(j,fe)=>{var je;const O={item:j,file:j.file,index:fe,api:ge,remove:()=>h(j),retry:()=>T(j),abort:()=>b(j)},d=_.div({class:oe(["jss-upload-file",`is-${j.status}`])},_.div({class:"jss-upload-file-icon"},he.Icon({name:j.status==="done"?"check_circle":j.status==="error"||j.status==="rejected"?"error":"description"})),_.div({class:"jss-upload-file-main"},_.div({class:"jss-upload-file-name"},...F(s,"fileName",O,j.name)),_.div({class:"jss-upload-file-meta"},...F(s,"fileMeta",O,j.error?String(((je=j.error)==null?void 0:je.message)||j.error):j.status==="queued"?"Queued":j.status)),_.div({class:"jss-upload-progress",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":String(j.progress||0)},_.div({class:"jss-upload-progress-bar",style:{width:`${j.progress||0}%`}}))),_.div({class:"jss-upload-file-trailing"},_.div({class:"jss-upload-file-size"},te(j.size)),_.div({class:"jss-upload-file-actions"},...F(s,"fileActions",O,[j.status==="uploading"?he.Btn({size:"sm",outline:!0,icon:"close","aria-label":"Cancel",onClick:()=>b(j)}):null,j.status==="error"||j.status==="canceled"?he.Btn({size:"sm",outline:!0,icon:"refresh","aria-label":"Retry",onClick:()=>T(j)}):null,he.Btn({size:"sm",dense:!0,outline:!0,icon:"delete","aria-label":"Remove",onClick:()=>h(j)})])))),p=JSswift.ui.renderSlot(s,"file",O,d);return _.div({class:"jss-upload-file-wrap","data-status":j.status,"data-id":j.id},...F(null,"default",{},p))},ve=()=>{const j=l();if($.replaceChildren(...ye()),xe.replaceChildren(),Ne.hidden=!q(),xe.hidden=!q(),j.length)j.forEach((je,O)=>xe.appendChild(Q(je,O)));else{const je=JSswift.ui.renderSlot(s,"empty",{api:ge},e.emptyText||"No files selected");xe.appendChild(_.div({class:"jss-upload-empty"},...F(null,"default",{},je)))}const fe=j.filter(je=>je.status!=="rejected"&&je.status!=="removed");Ne.textContent=`${fe.length} file \u2022 ${te(fe.reduce((je,O)=>je+Number(O.size||0),0))}`},be=JSswift.ui.renderSlot(s,"icon",{api:ge},he.Icon({name:e.icon||"cloud_upload"})),me=JSswift.ui.renderSlot(s,"title",{api:ge},e.title||"Upload files"),Ie=JSswift.ui.renderSlot(s,"subtitle",{api:ge},e.subtitle||(se()?`Accepted: ${se()}`:"Drag files here or browse from your device")),Oe=_.div({class:"jss-upload-dropzone",onClick:j=>{var fe,je;(je=(fe=j.target)==null?void 0:fe.closest)!=null&&je.call(fe,".jss-upload-actions, .jss-upload-list")||e.clickable!==!1&&U()},onDragenter:j=>{e.drag===!1||k()||(j.preventDefault(),c(!0),Y.classList.add("is-dragging"))},onDragover:j=>{e.drag===!1||k()||j.preventDefault()},onDragleave:j=>{j.currentTarget===j.target&&(c(!1),Y.classList.remove("is-dragging"))},onDrop:j=>{var fe,je;e.drag===!1||k()||(j.preventDefault(),c(!1),Y.classList.remove("is-dragging"),(fe=e.onDrop)==null||fe.call(e,j,{api:ge}),P(((je=j.dataTransfer)==null?void 0:je.files)||[],{event:j,source:"drop"}))}},_.div({class:"jss-upload-head"},_.div({class:"jss-upload-icon"},...F(null,"default",{},be)),_.div({class:"jss-upload-copy"},_.div({class:"jss-upload-title"},...F(null,"default",{},me)),_.div({class:"jss-upload-subtitle"},...F(null,"default",{},Ie))),$),Ne,xe),we=JSswift.ui.renderSlot(s,"header",{api:ge},null);return F(null,"default",{},we).forEach(j=>Y.appendChild(j)),Y.appendChild(ue),F(s,"default",{api:ge,dropzone:Oe},Oe).forEach(j=>Y.appendChild(j)),JSswift.reactive.effect(()=>{ve()},"UI.Upload:render"),JSswift.reactive.effect(()=>{Y.classList.toggle("is-disabled",k()),Y.classList.toggle("is-form-mode",B()),Y.classList.toggle("is-files-hidden",!q());const j=L();j!==V&&(V&&Y.classList.remove(V),j&&Y.classList.add(j),V=j),Y.setAttribute("aria-disabled",k()?"true":"false"),ue.disabled=k(),ue.multiple=f(),ue.name=ce()},"UI.Upload:disabled"),Y._upload=ge,Y._addFiles=P,Y._browse=U,Y._uploadFiles=A,Y._input=ue,Y._dispose=()=>{x||(x=!0,g())},(t=JSswift._registerCleanup)==null||t.call(JSswift,Y,Y._dispose),Y},he.BoxUpload=(e={})=>he.Upload({...e,box:!0}),he.boxUpload=(e={})=>he.BoxUpload(e),JSswift.ui.Upload=he.Upload,JSswift.ui.BoxUpload=he.BoxUpload,JSswift.ui.boxUpload=he.boxUpload;function At(e,t){if(!e)return null;if(typeof e=="object"&&typeof e._bind=="function")return{get:()=>e.value,set:s=>{e.value!==s&&(e.value=s)},watch:s=>{var l;return(l=e.action)==null||l.call(e,s),()=>{var n,i;const c=(i=(n=e._actions)==null?void 0:n.indexOf(s))!=null?i:-1;c>=0&&e._actions.splice(c,1)}}};if(Array.isArray(e)&&typeof e[0]=="function"&&typeof e[1]=="function"){const s=e[0],l=e[1];return{get:s,set:l,watch:n=>Ue.reactive.effect(()=>{n(s())},t||"UI:model")}}return null}const rl={classic:{side:"left",nav:"top",rows:["header","nav","body","footer"]},classicright:{side:"right",nav:"top",rows:["header","nav","body","footer"]},sidebarfullleft:{side:"left",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},sidebarfullright:{side:"right",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},appshell:{side:"left",nav:"top",rows:["header","nav","body","footer"]},dashboard:{side:"left",nav:"top",rows:["header","nav","body","footer"]},website:{side:null,nav:"top",rows:["header","nav","body","footer"]},documentation:{side:"right",nav:"left",rows:["header","body","footer"]},landing:{side:null,nav:null,rows:["header","body","footer"]}},Co=e=>{const t=o(e);return t==null||t===!1||t===""?"":String(t).trim().toLowerCase().replace(/[\s_-]+/g,"")},xo=(e,t)=>{if(!e||!t.main)return null;const s=e.side||(t.aside?"left":null),l=e.nav||(t.nav?"top":null),n=!!t.aside&&!!s,i=!!t.nav&&!!l,v=[i&&l==="left"?"nav":n&&s==="left"?"aside":".","main",i&&l==="right"?"nav":n&&s==="right"?"aside":"."],a=[],z=[...e.rows||[]];if(i&&l==="top"&&!z.includes("nav")){const u=z.indexOf("body");z.splice(u>=0?u:z.length,0,"nav")}for(const u of z)u==="header"&&t.header?a.push(e.fullSide&&n&&s==="left"?["aside","header","header"]:e.fullSide&&n&&s==="right"?["header","header","aside"]:["header","header","header"]):u==="nav"&&i&&l==="top"?a.push(e.fullSide&&n&&s==="left"?["aside","nav","nav"]:e.fullSide&&n&&s==="right"?["nav","nav","aside"]:["nav","nav","nav"]):u==="body"?a.push(v):u==="footer"&&t.footer&&a.push(e.fullSide&&n&&s==="left"?["aside","footer","footer"]:e.fullSide&&n&&s==="right"?["footer","footer","aside"]:["footer","footer","footer"]);return a.length?a.map(u=>`"${u.join(" ")}"`).join(" "):null};he.Layout=(...e)=>{var t,s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(e),c=n.slots||{},r=(Je,Be)=>!!Je&&Object.prototype.hasOwnProperty.call(Je,Be),v=()=>typeof window=="undefined"?1024:window.innerWidth,a=()=>{const Je=v(),Be=JSswift.uiResponsivePropsFor(n,yn("mobile"))||{},nt=Je>=768?JSswift.uiResponsivePropsFor(n,yn("tablet"))||{}:{},st=Je>=1024?JSswift.uiResponsivePropsFor(n,yn("pc"))||{}:{};return{...Be,...nt,...st}},z=(...Je)=>{for(const Be of Je)if(r(n,Be))return n[Be]},u=(...Je)=>{const Be=a();for(const nt of Je)if(r(Be,nt))return Be[nt];return z(...Je)},x=(...Je)=>{const Be=JSswift.uiResponsivePropsFor(n,yn(Q()))||{};for(const nt of Je)if(r(Be,nt))return Be[nt];return z(...Je)},k=()=>Co(x("disposition","layoutDisposition","layout")),f=()=>{const Je=o(u("mode","layoutMode"));if(Je==null||Je===!1||Je==="")return"";const Be=String(Je).trim().toLowerCase();return Be==="global"||Be==="local"?Be:""},B=(Je,Be=null)=>Je==null||Je===!1||Je===""?Be:typeof Je=="number"?`${Je}px`:String(Je),y=(Je,Be=null)=>{if(Je==null||Je===!1||Je==="")return Be;if(typeof Je=="number"&&Number.isFinite(Je))return Je;const nt=Number.parseFloat(String(Je));return Number.isFinite(nt)?nt:Be},M=Je=>{const Be=o(Je);return Be==null||Be===!1||Be===""?null:Array.isArray(Be)?Be.map(nt=>`"${Array.isArray(nt)?nt.join(" "):String(nt)}"`).join(" "):String(Be)},D=(Je,Be=null,nt=null)=>{let st=Number.isFinite(Je)?Je:0;return Number.isFinite(Be)&&(st=Math.max(Be,st)),Number.isFinite(nt)&&(st=Math.min(nt,st)),st},q=z("header","headerContent"),L=z("aside","drawer"),ce=z("nav","asideRight","drawerRight"),X=z("page","main","content","body"),Z=z("footer","footerContent"),ie=()=>o(u("drawerEnabled","asideEnabled")),te=()=>o(u("navEnabled","asideRightEnabled","rightAsideEnabled")),se=()=>ie()!==!1,R=()=>te()===!0||o(u("noNav"))===!1,ae=()=>o(u("noDrawer"))===!0||ie()===!1||L===!1,re=()=>o(u("noNav"))===!0||te()===!1||ce===!1,ne=()=>o(u("drawerFloating"))===!0,K=()=>o(u("navFloating"))===!0,S=()=>o(u("drawerResizable"))===!0,I=()=>o(u("navResizable"))===!0,m=()=>y(o(u("drawerMinWidth")),180),P=()=>y(o(u("drawerMaxWidth")),null),G=()=>y(o(u("navMinWidth")),180),h=()=>y(o(u("navMaxWidth")),null),b=y(o(u("drawerWidth")),280),g=y((t=o(u("navWidth")))!=null?t:o(u("asideRightWidth")),280),[J,W]=JSswift.reactive.signal(D(b,m(),P())),[H,de]=JSswift.reactive.signal(D(g,G(),h())),E=At(n.drawerOpen,"UI.Layout:drawerOpen"),N=E?!!E.get():typeof n.drawerOpen=="boolean"?!!n.drawerOpen:!0,[A,T]=JSswift.reactive.signal(N),U=Je=>{const Be=!!Je;A()!==Be&&T(Be),E==null||E.set(Be)},ue=(s=E==null?void 0:E.watch)==null?void 0:s.call(E,()=>{const Je=!!E.get();A()!==Je&&T(Je)}),xe=At(n.navOpen,"UI.Layout:navOpen"),Ne=xe?!!xe.get():typeof n.navOpen=="boolean"?!!n.navOpen:!0,[$,V]=JSswift.reactive.signal(Ne),Y=Je=>{const Be=!!Je;$()!==Be&&V(Be),xe==null||xe.set(Be)},ge=(l=xe==null?void 0:xe.watch)==null?void 0:l.call(xe,()=>{const Je=!!xe.get();$()!==Je&&V(Je)}),ye=()=>{var Je,Be,nt;const st=Number((Je=o(u("layoutBreakpoint")))!=null?Je:0),mt=Number((Be=o(u("drawerBreakpoint")))!=null?Be:st||1024),pt=Number((nt=o(u("navBreakpoint")))!=null?nt:st||mt);return Math.max(mt,pt,0)},Q=()=>{const Je=v();return Je>=1024?"pc":Je>=768?"tablet":"mobile"},[ve,be]=JSswift.reactive.signal(!1),[me,Ie]=JSswift.reactive.signal(Q()),Oe=()=>{typeof window!="undefined"&&(Ie(Q()),be(window.innerWidth<ye()))};typeof window!="undefined"&&(Oe(),window.addEventListener("resize",Oe));const we=()=>({props:n,openAside:()=>U(!0),closeAside:()=>U(!1),toggleAside:()=>U(!A()),openNav:()=>Y(!0),closeNav:()=>Y(!1),toggleNav:()=>Y(!$()),isDrawerOpen:()=>!!A(),isNavOpen:()=>!!$(),isMobile:()=>!!ve(),isDrawerFloating:()=>ne(),isNavFloating:()=>K()}),j=(Je,Be)=>{const nt=we();for(const mt of Je){if(!r(c,mt))continue;const pt=typeof c[mt]=="function"?c[mt](nt):c[mt];return F(null,"default",nt,pt)}const st=typeof Be=="function"?Be(nt):Be;return F(null,"default",nt,st)},fe=X!==void 0?X:i,je=oe(["jss-app","jss-layout",JSswift.uiResponsiveClasses({mobile:n},pn),JSswift.uiResponsiveClasses(n,pn),n.class]),O=JSswift.omit(n,["header","headerContent","aside","drawer","nav","asideRight","drawerRight","page","main","content","body","footer","footerContent","noDrawer","drawerEnabled","asideEnabled","noNav","navEnabled","asideRightEnabled","rightAsideEnabled","drawerOpen","navOpen","layoutBreakpoint","drawerBreakpoint","navBreakpoint","drawerWidth","navWidth","asideRightWidth","drawerResizable","drawerMinWidth","drawerMaxWidth","navResizable","navMinWidth","navMaxWidth","drawerPeek","navPeek","asideRightPeek","drawerFloating","navFloating","overlayClose","escClose","stickyHeader","stickyFooter","stickyAside","stickyNav","tagPage","mode","layoutMode","disposition","layoutDisposition","layout","shellClass","headerClass","asideClass","navClass","pageClass","footerClass","overlayClass","gap","headerOffset","minHeight","areas","gridTemplateAreas","templateAreas","slots"]);O.class=je,O.style={...n.style||{}},JSswift.uiApplyResponsiveProps(O,n,JSswift.uiResponsiveStyleRules);const d=_.div(O);ue&&JSswift._registerCleanup(d,ue),ge&&JSswift._registerCleanup(d,ge);const C=o(u("tagPage"))===!0?{header:"header",aside:"aside",nav:"nav",page:"main",footer:"footer"}:{header:"div",aside:"div",nav:"div",page:"div",footer:"div"},ee=_.div({class:oe(["jss-layout-shell-grid",n.shellClass])}),Se=_[C.header]({class:oe(["jss-layout-section","jss-layout-header","header",pe(n.stickyHeader,"sticky"),n.headerClass])}),Ce=_[C.aside]({class:oe(["jss-layout-section","jss-layout-aside","aside",pe(n.stickyAside!==!1,"sticky"),n.asideClass]),role:"navigation","aria-hidden":"true"}),Ae=_.div({class:"jss-layout-panel-body jss-layout-aside-body"}),Le=_.div({class:"jss-layout-resize-handle jss-layout-resize-handle-drawer","aria-hidden":"true"});Ce.appendChild(Ae),Ce.appendChild(Le);const ke=_[C.nav]({class:oe(["jss-layout-section","jss-layout-nav","nav",pe(n.stickyNav,"sticky"),n.navClass]),role:C.nav==="nav"?null:"complementary","aria-hidden":"true"}),Ee=_.div({class:"jss-layout-panel-body jss-layout-nav-body"}),Re=_.div({class:"jss-layout-resize-handle jss-layout-resize-handle-nav","aria-hidden":"true"});ke.appendChild(Ee),ke.appendChild(Re);const Me=_[C.page]({class:oe(["jss-layout-section","jss-layout-main","main",n.pageClass]),role:C.page==="main"?null:"main"}),$e=_[C.footer]({class:oe(["jss-layout-section","jss-layout-footer","footer",pe(n.stickyFooter,"sticky"),n.footerClass])});ee.appendChild(Se),ee.appendChild(Ce),ee.appendChild(Me),ee.appendChild(ke),ee.appendChild($e),d.appendChild(ee);const Ye=_.div({class:oe(["jss-aside-overlay",n.overlayClass]),onClick:()=>{o(u("overlayClose"))!==!1&&(A()&&U(!1),$()&&Y(!1))}});d.appendChild(Ye);let qe=!1,lt=!1,Xe=!1,ze=!1,Ve=!1,Ke=null,gt=null;const yt=Je=>{!Je||typeof Je!="object"||(typeof Je._dispose=="function"&&Je._dispose(),!(!Je.childNodes||!Je.childNodes.length)&&Array.from(Je.childNodes).forEach(yt))},ut=Je=>{Je&&Array.from(Je.childNodes).forEach(Be=>{yt(Be),Be.remove()})},dt=Je=>{const Be=we(),nt=typeof Je=="function"?Je(Be):Je;return F(null,"default",Be,nt)},_t=()=>{const Je=qe?Se.getBoundingClientRect().height:0;d.style.setProperty("--layout-header-height",`${Je}px`)},ft=(Je,Be)=>(ut(Je),Be.forEach(nt=>Je.appendChild(nt)),Be.length>0),at=()=>{var Je,Be,nt,st,mt,pt;d.style.setProperty("--jss-layout-drawer-width",B((Je=o(u("drawerWidth")))!=null?Je:280,"280px")),d.style.setProperty("--jss-layout-nav-width",B((nt=(Be=o(u("navWidth")))!=null?Be:o(u("asideRightWidth")))!=null?nt:280,"280px")),d.style.setProperty("--jss-layout-drawer-peek",B((st=o(u("drawerPeek")))!=null?st:20,"20px")),d.style.setProperty("--jss-layout-nav-peek",B((pt=(mt=o(u("navPeek")))!=null?mt:o(u("asideRightPeek")))!=null?pt:20,"20px"));const w=B(o(u("gap")),null);w!=null?d.style.setProperty("--jss-layout-gap",w):d.style.removeProperty("--jss-layout-gap");const le=B(o(u("headerOffset")),null);le!=null&&d.style.setProperty("--layout-header-height",le);const _e=B(o(u("minHeight")),null);_e!=null?d.style.setProperty("--jss-layout-min-height",_e):d.style.removeProperty("--jss-layout-min-height")},ht=()=>{if(S()){const Je=D(J(),m(),P());Je!==J()&&W(Je),d.style.setProperty("--jss-layout-drawer-width",`${Je}px`)}if(I()){const Je=D(H(),G(),h());Je!==H()&&de(Je),d.style.setProperty("--jss-layout-nav-width",`${Je}px`)}},vt=(Je,Be)=>{if(Be.button!==0)return;const nt=Je==="drawer"?Ce:ke;if(nt.hidden)return;const st=Je==="drawer"?J:H,mt=Je==="drawer"?W:de,pt=Je==="drawer"?m:G,w=Je==="drawer"?P:h,le=nt.getBoundingClientRect(),_e=le.width||st(),Fe=Te=>{const We=Je==="drawer"?Te.clientX-le.left:le.right-Te.clientX;mt(D(We||_e,pt(),w())),ht(),kt()},De=()=>{d.classList.remove("is-resizing-layout"),document.removeEventListener("pointermove",Fe,!0),document.removeEventListener("pointerup",De,!0),gt=null};d.classList.add("is-resizing-layout"),document.addEventListener("pointermove",Fe,!0),document.addEventListener("pointerup",De,!0),gt=De,Be.preventDefault()},tn=Je=>vt("drawer",Je),Lt=Je=>vt("nav",Je);Le.addEventListener("pointerdown",tn),Re.addEventListener("pointerdown",Lt);const kt=()=>{const Je=!!ve(),Be=!!A(),nt=!!$(),st=!ae()&&se()&&lt,mt=!re()&&R()&&Xe,pt=st&&(Je||ne()),w=mt&&(Je||K()),le=st&&Be,_e=mt&&nt,Fe=le&&!pt,De=_e&&!w,Te=Fe&&S(),We=De&&I(),tt=le&&pt||_e&&w;at(),ht(),d.classList.toggle("is-mobile",Je),d.classList.toggle("drawer-open",le),d.classList.toggle("nav-open",_e),d.classList.toggle("no-drawer",!st),d.classList.toggle("no-nav",!mt),d.classList.toggle("has-header",qe),d.classList.toggle("has-drawer",st),d.classList.toggle("has-nav",mt),d.classList.toggle("has-footer",Ve),d.classList.toggle("drawer-floating",pt),d.classList.toggle("nav-floating",w);const ct=k(),St=ct?f():"";d.dataset.disposition=ct||"",d.dataset.layoutMode=St||"",d.classList.toggle("has-disposition",!!ct),d.classList.toggle("mode-local",St==="local"),d.classList.toggle("mode-global",St==="global"),Se.classList.toggle("sticky",o(u("stickyHeader"))===!0),$e.classList.toggle("sticky",o(u("stickyFooter"))===!0),Ce.classList.toggle("sticky",o(u("stickyAside"))!==!1),ke.classList.toggle("sticky",o(u("stickyNav"))===!0),Se.hidden=!qe,$e.hidden=!Ve,Me.hidden=!ze,Ye.hidden=!(pt||w),Ye.classList.toggle("show",tt),Ce.hidden=!st||!le&&!pt,Ce.classList.toggle("open",le),Ce.classList.toggle("is-floating",pt),Ce.classList.toggle("is-resizable",Te),Ce.setAttribute("aria-hidden",le?"false":"true"),Le.hidden=!Te,ke.hidden=!mt||!_e&&!w,ke.classList.toggle("open",_e),ke.classList.toggle("is-floating",w),ke.classList.toggle("is-resizable",We),ke.setAttribute("aria-hidden",_e?"false":"true"),Re.hidden=!We;const wt=rl[ct]||null,Jt=(wt==null?void 0:wt.side)||(Fe&&wt?"left":null),Pt=(wt==null?void 0:wt.nav)||(De&&wt?"top":null),jt=Fe?wt?Jt:"left":"",Et=De?wt?Pt==="left"||Pt==="right"?Pt:"":"right":"";d.classList.toggle("drawer-left",st&&Jt==="left"),d.classList.toggle("drawer-right",st&&Jt==="right"),d.classList.toggle("nav-top",De&&Pt==="top"),d.classList.toggle("nav-side",De&&(Et==="left"||Et==="right")),ee.style.gridTemplateColumns=[jt==="left"?"minmax(0, var(--jss-layout-drawer-width))":Et==="left"?"minmax(0, var(--jss-layout-nav-width))":"0px","minmax(0, 1fr)",jt==="right"?"minmax(0, var(--jss-layout-drawer-width))":Et==="right"?"minmax(0, var(--jss-layout-nav-width))":"0px"].join(" ");const sn=['"header header header"',`"${Fe?"aside":"."} main ${De?"nav":"."}"`,'"footer footer footer"'].join(" "),ln=xo(rl[ct],{header:qe,aside:Fe,nav:De,main:ze,footer:Ve});ee.style.gridTemplateAreas=M(x("areas","gridTemplateAreas","templateAreas"))||ln||sn},gn=(Je,Be)=>(qe=ft(Se,dt(Je)),_t(),kt(),Be&&JSswift.router.setURLOnly(Be),Se),Nt=(Je,Be)=>(lt=ft(Ae,dt(Je)),lt||U(!1),kt(),Be&&JSswift.router.setURLOnly(Be),Ce),zt=(Je,Be)=>(Xe=ft(Ee,dt(Je)),Xe||Y(!1),kt(),Be&&JSswift.router.setURLOnly(Be),ke),nn=(Je,Be)=>(ze=ft(Me,dt(Je)),kt(),Be&&JSswift.router.setURLOnly(Be),Me),cn=(Je,Be)=>(Ve=ft($e,dt(Je)),kt(),Be&&JSswift.router.setURLOnly(Be),$e);qe=ft(Se,j(["header"],q)),lt=ft(Ae,L===!1?[]:j(["aside","drawer"],L)),Xe=ft(Ee,ce===!1?[]:j(["nav","asideRight","drawerRight"],ce)),ze=ft(Me,j(["page","main","default"],fe)),Ve=ft($e,j(["footer"],Z)),typeof ResizeObserver!="undefined"&&(Ke=new ResizeObserver(()=>_t()),Ke.observe(Se)),_t(),JSswift.reactive.effect(()=>{me(),ve(),A(),$(),kt()},"UI.Layout:state");const jn=Je=>{o(u("escClose"))!==!1&&(!ve()&&!ne()&&!K()||!A()&&!$()||Je.key==="Escape"&&(Je.preventDefault(),A()&&U(!1),$()&&Y(!1)))};return typeof document!="undefined"&&document.addEventListener("keydown",jn,!0),d.openAside=()=>U(!0),d.closeAside=()=>U(!1),d.toggleAside=()=>U(!A()),d.openNav=()=>Y(!0),d.closeNav=()=>Y(!1),d.toggleNav=()=>Y(!$()),d.isDrawerOpen=()=>!!A(),d.isNavOpen=()=>!!$(),d.isMobile=()=>!!ve(),d.header=()=>Se,d.aside=()=>Ce,d.drawer=()=>Ce,d.nav=()=>ke,d.page=()=>Me,d.main=()=>Me,d.footer=()=>$e,d.headerUpdate=gn,d.asideUpdate=Nt,d.drawerUpdate=Nt,d.navUpdate=zt,d.pageUpdate=nn,d.mainUpdate=nn,d.footerUpdate=cn,d.reflow=kt,d._dispose=()=>{var Je;typeof window!="undefined"&&window.removeEventListener("resize",Oe),typeof document!="undefined"&&document.removeEventListener("keydown",jn,!0),Le.removeEventListener("pointerdown",tn),Re.removeEventListener("pointerdown",Lt),gt==null||gt(),(Je=Ke==null?void 0:Ke.disconnect)==null||Je.call(Ke)},Qe(d,n),kt(),d},he.Footer=(...e)=>{var t,s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(e),c=n.slots||{},r=I=>Object.prototype.hasOwnProperty.call(n,I),v={props:n},a=(I,m)=>{if(!(m==null||m===!1)){if(Array.isArray(m)){m.forEach(P=>a(I,P));return}if(m!=null&&m.nodeType){I.appendChild(m);return}I.appendChild(document.createTextNode(String(m)))}},z=(I,m,P=G=>G)=>{const G=JSswift.ui.getSlot(c,I);if(G!=null)return F(c,I,v,null);if(typeof m=="function"){const h=new Set(["eyebrow","title","subtitle"]),b=_[h.has(I)?"span":"div"]({class:`jss-footer-slot-${I}`});return JSswift.reactive.effect(()=>{const g=P(m(v)),J=dn(JSswift.ui.slot(g));b.replaceChildren(),Array.isArray(J)?J.forEach(W=>a(b,W)):a(b,J)},`UI.Footer:${I}`),[b]}return F(c,I,v,P(m))},u=(I,m="icon",P=n.iconSize||n.size||"md")=>I==null||I===!1?null:typeof I=="string"?he.Icon({name:I,size:P}):JSswift.ui.slot(I,{as:m}),x=r("left")?n.left:n.start,k=r("right")?n.right:n.end,f=r("title")?n.title:n.label,B=(s=(t=n.subtitle)!=null?t:n.description)!=null?s:n.note,y=r("content")?n.content:r("body")?n.body:i!=null&&i.length?i:null,M=[...z("left",x),...z("start",null)],D=z("icon",n.icon,u),q=z("eyebrow",(l=n.eyebrow)!=null?l:n.kicker),L=z("title",f),ce=z("subtitle",B),X=z("meta",n.meta),Z=(()=>{const I=z("content",null);return I.length?I:z("default",y)})(),ie=[...z("center",null),...z("body",null)],te=[...z("right",k),...z("end",null)],se=z("actions",n.actions),R=_.div({class:oe(["jss-footer-body",n.bodyClass,n.centerClass])},_.div({class:"jss-footer-heading"},D.length?_.div({class:"jss-footer-icon"},...D):null,_.div({class:"jss-footer-copy"},q.length?_.div({class:oe(["jss-footer-eyebrow",n.eyebrowClass])},...q):null,L.length?_.div({class:oe(["jss-footer-title",n.titleClass])},...L):null,ce.length?_.div({class:oe(["jss-footer-subtitle",n.subtitleClass])},...ce):null,Z.length?_.div({class:oe(["jss-footer-content",n.contentClass])},...Z):null),X.length?_.div({class:oe(["jss-footer-meta",n.metaClass])},...X):null)),ae=[];ie.length?ae.push(_.div({class:oe(["jss-footer-body",n.bodyClass,n.centerClass])},...ie)):(D.length||q.length||L.length||ce.length||Z.length||X.length)&&ae.push(R),(te.length||se.length)&&ae.push(_.div({class:oe(["jss-footer-end",n.endClass])},...te,...se.length?[_.div({class:oe(["jss-footer-actions",n.actionsClass])},...se)]:[]));const re=JSswift.omit(n,["actions","actionsClass","align","body","bodyClass","center","centerClass","content","contentClass","dense","description","divider","elevated","end","endClass","eyebrow","eyebrowClass","gap","icon","iconSize","kicker","label","left","meta","metaClass","minHeight","note","right","slots","stack","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap","justify"]);re.class=oe(["jss-panel","jss-footer","jss-singularity",pe(n.sticky,"sticky"),pe(n.dense,"dense"),pe(n.elevated,"elevated"),pe(n.divider!==!1,"divider"),pe(n.stack,"stack"),ol(n.align,"align-"),n.class]),re.style={...n.style||{}};const ne=Pe(n.justify);ne!=null&&(re.style.justifyContent=ne);const K=Pe(n.wrap,I=>I?"wrap":"nowrap");K!=null&&(re.style.flexWrap=K),n.gap!=null&&(re.style["--jss-footer-gap"]=He(o(n.gap))),n.minHeight!=null&&(re.style.minHeight=He(o(n.minHeight))),JSswift.uiApplyResponsiveProps(re,n,JSswift.uiResponsiveStyleRules);const S=_.footer(re,...M.length?[_.div({class:oe(["jss-footer-start",n.startClass])},...M)]:[],...ae.length?[_.div({class:"jss-footer-main"},...ae)]:[]);return Qe(S,n),S};const gi=e=>{const t=[];for(const s of e||[]){const l=dn(JSswift.ui.slot(s));l&&(Array.isArray(l)?t.push(...l):t.push(l))}return t},zn=(e,t)=>{const s=dn(JSswift.ui.slot(e,t));return s?Array.isArray(s)?s:[s]:[]},He=e=>{var t;return typeof e=="number"?`${e}px`:typeof e=="string"&&((t=JSswift.uiSizes)!=null&&t.includes(e))?`var(--jss-size-${e})`:String(e)};he.Toolbar=(...e)=>{var t,s,l,n,i,c,r,v;const{props:a,children:z}=JSswift.uiNormalizeArgs(e),u=a.slots||{},x=(H,de,E={})=>{const N=Array.isArray(H)?H:[H];for(const A of N)if(JSswift.ui.getSlot(u,A)!=null)return F(u,A,E,de);return de==null?[]:F(null,"default",E,de)},k=H=>(Array.isArray(H)?H:[H]).some(E=>JSswift.ui.getSlot(u,E)!=null),f={props:a},B=x(["before"],a.before,f),y=x(["start","left"],(t=a.start)!=null?t:a.left,f),M=x(["center","body","content","default"],(n=(l=(s=a.center)!=null?s:a.body)!=null?l:a.content)!=null?n:z,f),D=x(["end","right","actions"],(c=(i=a.end)!=null?i:a.right)!=null?c:a.actions,f),q=x(["after"],a.after,f),L=x(["title"],a.title,f),ce=x(["subtitle"],a.subtitle,f),X=x(["meta"],a.meta,f),Z=!!(B.length||y.length||D.length||q.length||L.length||ce.length||X.length||a.before!=null||a.start!=null||a.left!=null||a.end!=null||a.right!=null||a.actions!=null||a.after!=null||a.title!=null||a.subtitle!=null||a.meta!=null||a.body!=null||a.center!=null||a.content!=null||a.beforeClass||a.startClass||a.bodyClass||a.centerClass||a.contentClass||a.endClass||a.afterClass||a.titleClass||a.subtitleClass||a.metaClass||a.copyClass||k(["before","start","left","center","body","content","end","right","actions","after","title","subtitle","meta"])),ie=oe(["jss-toolbar",pe(Z,"structured"),pe(a.dense,"dense"),pe(a.divider,"divider"),pe(a.elevated,"elevated"),pe(a.sticky,"sticky"),a.class]),te=JSswift.omit(a,["actions","after","afterClass","align","before","beforeClass","body","bodyClass","center","centerClass","content","contentClass","copyClass","dense","divider","elevated","end","endClass","gap","justify","left","meta","metaClass","right","size","slots","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap"]);te.class=ie;const se={...a.style||{}};se.display=se.display||"flex";const R=Pe(a.align),ae=Pe(a.justify),re=Pe(a.wrap,H=>typeof H=="boolean"?H?"wrap":"nowrap":String(H),"wrap"),ne=Pe(a.gap,He,"var(--jss-s-md)"),K=Ge(a,"gap");se["--jss-toolbar-gap"]=ne!=null?ne:"var(--jss-s-md)",K||(se.gap=se.gap||"var(--jss-toolbar-gap)");const S={xxs:"4px 6px",xs:"6px 8px",sm:"6px 10px",md:"10px 12px",lg:"12px 16px",xl:"14px 18px",xxl:"16px 20px"},I=Pe(a.size,H=>S[H]||"");if(I!=null&&(se.padding=I),Z?(se.flexDirection=se.flexDirection||"column",se.alignItems=se.alignItems||"stretch"):(R!=null&&(se.alignItems=R),ae!=null&&(se.justifyContent=ae),re!=null&&(se.flexWrap=re)),Object.keys(se).length&&(te.style=se),JSswift.uiApplyResponsiveProps(te,a,JSswift.uiResponsiveStyleRules),!Z){const H=F(u,"default",f,z),de=_.div(te,...H);return Qe(de,a),de}const m=(v=(r=a.bodyClass)!=null?r:a.centerClass)!=null?v:a.contentClass,P=et([a.justify],()=>{const H=o(a.justify);return!H||H==="flex-start"?"auto":""}),G={display:"flex",alignItems:"inherit",gap:"var(--jss-toolbar-gap)",flexWrap:"inherit",minWidth:0},h={};R!=null&&(h.alignItems=R),ae!=null&&(h.justifyContent=ae),re!=null&&(h.flexWrap=re);const b=X.length||L.length||ce.length?_.div({class:oe(["jss-toolbar-copy",a.copyClass])},X.length?_.div({class:oe(["jss-toolbar-meta",a.metaClass])},...X):null,L.length?_.div({class:oe(["jss-toolbar-title",a.titleClass])},...L):null,ce.length?_.div({class:oe(["jss-toolbar-subtitle",a.subtitleClass])},...ce):null):null,g=!!(y.length||b||M.length||D.length),J=[B.length?_.div({class:oe(["jss-toolbar-before",a.beforeClass]),style:{...G}},...B):null,g?_.div({class:"jss-toolbar-main",style:h},y.length?_.div({class:oe(["jss-toolbar-start",a.startClass]),style:{...G}},...y):null,b||M.length?_.div({class:oe(["jss-toolbar-center",m]),style:{...G,flex:"1 1 240px"}},b,...M):null,D.length?_.div({class:oe(["jss-toolbar-end",a.endClass]),style:{...G,justifyContent:"flex-end",marginInlineStart:P}},...D):null):null,q.length?_.div({class:oe(["jss-toolbar-after",a.afterClass]),style:{...G}},...q):null].filter(Boolean),W=_.div(te,...J);return Qe(W,a),W};const ko=e=>{var t;return e&&e.nodeType===1&&((t=e.classList)==null?void 0:t.contains("jss-grid-col"))};he.Grid=(...e)=>{var t,s,l,n;const{props:i,children:c}=JSswift.uiNormalizeArgs(e),r=i.slots||{},v=o(i.items),a=Array.isArray(v)?v:v==null?[]:[v],z=(h={})=>{const b=i.itemProps||{},g={...b,...h};return g.class=oe([b.class,i.itemClass,h.class]),g.style={...b.style||{},...i.itemStyle||{},...h.style||{}},g},u=(h,b={})=>{if(h==null||h===!1)return[];if(ko(h))return[h];if(An(h)){const g=h.children!=null?an(h.children):h.content!=null?an(h.content):h.node!=null?an(h.node):h.label!=null?an(h.label):[];return[he.GridCol(z(h),...g)]}return Array.isArray(h)?[he.GridCol(z(b),...h)]:[he.GridCol(z(b),h)]},x=(h,b,g,J=!0)=>{if(h==null||h===!1)return[];const W=An(h)?h:{};if(J){const H={item:h,index:b,count:g,first:b===0,last:b===g-1},de=F(r,"item",H,null);if(de.length)return de.flatMap(E=>u(E,W))}return u(h,W)},k=[];a.forEach((h,b)=>{k.push(...x(h,b,a.length))}),F(r,"default",{items:a,count:a.length},c).forEach(h=>{k.push(...u(h))}),k.length||F(r,"empty",{items:a,count:0},i.empty).forEach(b=>{const g=u(b,{style:{gridColumn:"1 / -1"}});k.push(...g)});const B=oe(["jss-grid",JSswift.uiResponsiveClasses({mobile:i},sl),JSswift.uiResponsiveClasses(i,sl),pe(i.dense,"dense"),pe(i.inline,"jss-grid-inline"),pe(i.debug,"jss-grid-debug"),i.class]),y=JSswift.omit(i,["gap","rowGap","columnGap","colGap","cols","columns","rows","areas","align","justify","alignItems","justifyItems","placeItems","placeContent","dense","flow","inline","debug","autoFit","autoFill","min","max","autoRows","items","itemClass","itemStyle","itemProps","empty","slots","full","width","minWidth","maxWidth","padding",...JSswift.uiResponsiveOmitProps]);y.class=B;const M={...i.style||{}};(t=JSswift.uiResponsiveHasConfig)!=null&&t.call(JSswift,i)&&i.display==null&&!Ge(i,"display")&&M.display==null&&(M.display=i.inline?"inline-grid":"grid");const D=Pe(i.gap,He);D!=null&&!Ge(i,"gap")&&(M["--jss-grid-gap"]=D,M.gap=D);const q=Pe(i.rowGap,He);q!=null&&!Ge(i,"rowGap")&&(M.rowGap=q);const L=Pe((s=i.columnGap)!=null?s:i.colGap,He);L!=null&&!Ge(i,["columnGap","colGap"])&&(M.columnGap=L);const ce=Pe(i.max,He,"1fr"),X=Pe(i.min,He);if(X!=null){const h=o(i.autoFill)?"auto-fill":"auto-fit";M.gridTemplateColumns=`repeat(${h}, minmax(${X}, ${ce||"1fr"}))`}else{const h=Pe((l=i.columns)!=null?l:i.cols,b=>typeof b=="number"?`repeat(${b}, minmax(0, 1fr))`:String(b));h!=null&&!Ge(i,["cols","columns"])&&(M.gridTemplateColumns=h)}const Z=Pe(i.rows,h=>typeof h=="number"?`repeat(${h}, minmax(0, auto))`:String(h));Z!=null&&(M.gridTemplateRows=Z);const ie=Pe(i.autoRows,He);ie!=null&&(M.gridAutoRows=ie);const te=Pe(i.flow,h=>{const b=String(h);return i.dense&&!b.includes("dense")?`${b} dense`:b});te!=null&&!Ge(i,"flow")&&(M.gridAutoFlow=te);const se=Pe(i.areas,h=>Array.isArray(h)?h.map(b=>`"${Array.isArray(b)?b.join(" "):String(b)}"`).join(" "):String(h));se!=null&&(M.gridTemplateAreas=se);const R=Pe((n=i.align)!=null?n:i.alignItems);R!=null&&!Ge(i,["align","alignItems"])&&(M.alignItems=R);const ae=Pe(i.justify);ae!=null&&!Ge(i,"justify")&&(M.justifyContent=ae);const re=Pe(i.justifyItems);re!=null&&(M.justifyItems=re);const ne=Pe(i.placeItems);ne!=null&&(M.placeItems=ne);const K=Pe(i.placeContent);K!=null&&(M.placeContent=K);const S=Pe(i.width,He);S!=null&&!Ge(i,"width")&&(M.width=S),o(i.full)===!0&&(M.width="100%");const I=Pe(i.minWidth,He);I!=null&&!Ge(i,"minWidth")&&(M.minWidth=I);const m=Pe(i.maxWidth,He);m!=null&&!Ge(i,"maxWidth")&&(M.maxWidth=m);const P=Pe(i.padding,He);P!=null&&!Ge(i,"padding")&&(M.padding=P),Object.keys(M).length&&(y.style=M),JSswift.uiApplyResponsiveProps(y,i,JSswift.uiResponsiveStyleRules);const G=_.div(y,...k);return Qe(G,i),G},he.GridCol=(...e)=>{var t,s,l,n,i,c,r,v;const{props:a,children:z}=JSswift.uiNormalizeArgs(e),u=a.slots||{},x=d=>Object.prototype.hasOwnProperty.call(a,d),k=(d,p,C={})=>{const ee=Array.isArray(d)?d:[d];for(const Se of ee)if(JSswift.ui.getSlot(u,Se)!=null)return F(u,Se,C,p);return p==null?[]:F(null,"default",C,p)},f=d=>{var p;return d==null||d===!1||d===""?"":typeof d=="string"&&((p=JSswift.uiSizes)!=null&&p.includes(d))?`var(--jss-s-${d})`:He(d)},B=d=>{var p;return d==null||d===!1||d===""?"":typeof d=="string"&&((p=JSswift.uiSizes)!=null&&p.includes(d))?gs(d,"size"):He(d)},y={...a.style||{}},M=d=>{if(d==null||d==="")return null;if(d==="auto")return"auto";if(d==="full"||d===!0)return"1 / -1";const p=Number(d);if(Number.isFinite(p)&&p>0){const C=Math.max(1,Math.round(p));return`span ${C} / span ${C}`}return String(d)},D=d=>{if(d==null||d==="")return null;if(d==="full"||d===!0)return"1 / -1";const p=Number(d);if(Number.isFinite(p)&&p>0){const C=Math.max(1,Math.round(p));return`span ${C} / span ${C}`}return String(d)},q=x("span")?a.span:a.col,L=Pe(q,M),ce=Pe(a.sm,M),X=Pe(a.md,M),Z=Pe(a.lg,M),ie=JSswift.uiResponsivePropsFor(a,yn("tablet"))||{},te=JSswift.uiResponsivePropsFor(a,yn("pc"))||{},se=(t=ie.span)!=null?t:ie.col,R=(s=te.span)!=null?s:te.col,ae=Pe(se,M),re=Pe(R,M),ne=Pe(a.rowSpan,D),K=Pe(a.row,D),S=Pe(a.area),I=Pe(a.align),m=Pe(a.justify),P=Pe(a.place),G=Pe(a.gap,f),h=Pe(a.rowGap,f),b=Pe(a.columnGap,f),g=Pe(a.padding,f),J=Pe(a.width,B),W=Pe(a.minHeight,B),H=Pe(a.height,B),de=Pe(a.maxHeight,B),E=Pe(a.contentAlign),N=Pe(a.contentJustify),A=Pe(a.direction),T=Pe(a.scroll,d=>d===!0?"auto":String(d),""),U=Pe(a.fullHeight,d=>d?"100%":"",""),ue=et([a.center,a.contentAlign,a.contentJustify],()=>!!o(a.center)&&(o(a.contentAlign)==null||o(a.contentAlign)==="")&&(o(a.contentJustify)==null||o(a.contentJustify)==="")),xe={props:a},Ne=k(["start","top","header","before"],(i=(n=(l=a.start)!=null?l:a.top)!=null?n:a.header)!=null?i:a.before,xe),$=x("body")?a.body:x("content")?a.content:z,V=k(["body","content","default"],$,xe),Y=k(["end","bottom","footer","after"],(v=(r=(c=a.end)!=null?c:a.bottom)!=null?r:a.footer)!=null?v:a.after,xe),ge=Ne.length||Y.length||x("start")||x("top")||x("header")||x("before")||x("body")||x("content")||x("end")||x("bottom")||x("footer")||x("after")||a.startClass||a.bodyClass||a.contentClass||a.endClass||a.topClass||a.headerClass||a.bottomClass||a.footerClass||JSswift.ui.getSlot(u,"start")!=null||JSswift.ui.getSlot(u,"top")!=null||JSswift.ui.getSlot(u,"header")!=null||JSswift.ui.getSlot(u,"before")!=null||JSswift.ui.getSlot(u,"body")!=null||JSswift.ui.getSlot(u,"content")!=null||JSswift.ui.getSlot(u,"end")!=null||JSswift.ui.getSlot(u,"bottom")!=null||JSswift.ui.getSlot(u,"footer")!=null||JSswift.ui.getSlot(u,"after")!=null,ye=et([a.stack,a.gap,a.rowGap,a.columnGap,a.contentAlign,a.contentJustify,a.direction,a.center],()=>ge||o(a.stack)||[o(a.gap),o(a.rowGap),o(a.columnGap),o(a.contentAlign),o(a.contentJustify),o(a.direction)].some(p=>p!=null&&p!==!1&&p!=="")?!0:!!o(a.center)),Q=et([a.panel,a.color,a.clickable,a.border,a.glossy,a.glow,a.glass,a.shadow,a.outline,a.gradient,a.textGradient,a.lightShadow,a.radius],()=>!!(o(a.panel)||o(a.color)||o(a.clickable)||o(a.border)||o(a.glossy)||o(a.glow)||o(a.glass)||o(a.shadow)||o(a.outline)||o(a.gradient)||o(a.textGradient)||o(a.lightShadow)||o(a.radius))?["jss-clear-set","jss-singularity","jss-grid-col-surface"]:[]),ve=oe(["jss-grid-col",Q,JSswift.uiResponsiveClasses({mobile:a},ll),JSswift.uiResponsiveClasses(a,ll),pe(a.panel,"jss-grid-col-panel"),pe(a.auto,"is-auto"),pe(ye,"jss-grid-col-stack"),pe(a.inline,"jss-grid-col-inline"),pe(ue,"jss-grid-col-center"),a.class]),be=JSswift.omit(a,["span","col","sm","md","lg","auto","row","rowSpan","area","align","justify","place","gap","rowGap","columnGap","padding","width","height","minHeight","maxHeight","fullHeight","stack","inline","direction","contentAlign","contentJustify","center","scroll","panel","to","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass","slots","style","clickable","dense","flat","border","glossy","glow","glass","shadow","outline","rounded","gradient","textGradient","lightShadow","color","textColor","size","radius",...JSswift.uiResponsiveOmitProps]);be.class=ve,y["--jss-grid-col-base"]==null&&(y["--jss-grid-col-base"]="auto"),y["--jss-grid-col-tablet"]==null&&(y["--jss-grid-col-tablet"]="var(--jss-grid-col-base, auto)"),y["--jss-grid-col-pc"]==null&&(y["--jss-grid-col-pc"]="var(--jss-grid-col-tablet, var(--jss-grid-col-base, auto))"),o(a.auto)===!0?y["--jss-grid-col-base"]="auto":L!=null&&(y["--jss-grid-col-base"]=L),ce!=null&&(y["--jss-grid-col-sm"]=ce),X!=null&&(y["--jss-grid-col-md"]=X),Z!=null&&(y["--jss-grid-col-lg"]=Z),ae!=null&&(y["--jss-grid-col-tablet"]=ae),re!=null&&(y["--jss-grid-col-pc"]=re),ne!=null?y.gridRow=ne:K!=null&&(y.gridRow=K),S!=null&&(y.gridArea=S),I!=null&&!Ge(a,"align")&&(y.alignSelf=I),m!=null&&!Ge(a,"justify")&&(y.justifySelf=m),P!=null&&!Ge(a,"place")&&(y.placeSelf=P),G!=null&&!Ge(a,"gap")&&(y.gap=G),h!=null&&!Ge(a,"rowGap")&&(y.rowGap=h),b!=null&&!Ge(a,"columnGap")&&(y.columnGap=b),g!=null&&!Ge(a,"padding")&&(y.padding=g),J!=null&&!Ge(a,"width")&&(y.width=J),U!=null&&U!==""?y.height=U:H!=null&&!Ge(a,"height")&&(y.height=H),W!=null&&!Ge(a,"minHeight")&&(y.minHeight=W),de!=null&&!Ge(a,"maxHeight")&&(y.maxHeight=de),A!=null&&!Ge(a,"direction")&&(y.flexDirection=A),E!=null&&!Ge(a,"contentAlign")?y.alignItems=E:ue!=null&&ue!==""&&(y.alignItems=ue?"center":""),N!=null&&!Ge(a,"contentJustify")?y.justifyContent=N:ue!=null&&ue!==""&&(y.justifyContent=ue?"center":""),T!=null&&T!==""&&(y.overflow=T),Object.keys(y).length&&(be.style=y),JSswift.uiApplyResponsiveProps(be,a,_o);const me=a.onClick,Ie=a.onKeydown,Oe=!!(o(a.clickable)||o(a.to)),we=d=>{var p;if(me==null||me(d),d.defaultPrevented)return;const C=o(a.to);C&&((p=JSswift.router)!=null&&p.navigate)&&(d.preventDefault(),JSswift.router.navigate(C))},j=d=>{Ie==null||Ie(d),!d.defaultPrevented&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),we(d))};if(Oe&&(be.onClick=we,be.onKeydown=j,be.tabIndex==null&&(be.tabIndex=0),be.role==null&&(be.role="button")),!ge){const d=_.div(be,...F(u,"default",xe,z));return Qe(d,a),d}const fe={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},je=[Ne.length?_.div({class:oe(["jss-grid-col-start",a.startClass,a.topClass,a.headerClass]),style:{...fe}},...Ne):null,V.length?_.div({class:oe(["jss-grid-col-body",a.bodyClass,a.contentClass]),style:{...fe,flex:"1 1 auto"}},...V):null,Y.length?_.div({class:oe(["jss-grid-col-end",a.endClass,a.bottomClass,a.footerClass]),style:{...fe}},...Y):null].filter(Boolean),O=_.div(be,...je);return Qe(O,a),O},he.Icon=(...e)=>{var t,s;let l={},n=[],i="home",c=!1;const r=e[0],v=e[1],a=te=>te&&typeof te=="object"&&!te.nodeType&&!Array.isArray(te)&&!(te instanceof Function);typeof r=="string"?(i=r,c=!0,a(v)?(l=v,e.length>2&&(n=e.slice(2))):e.length>1&&(n=e.slice(1))):a(r)?(l=r,r.name!=null&&(i=r.name,c=!0),e.length>1&&(n=e.slice(1))):e.length&&(n=e),!c&&n.length&&(i=n.length===1?n[0]:n),Qt(l);const z=l.slots||{},u=o(l.size),x=o(l.color),k=String(i).endsWith("-fill"),f={...l.style||{}},B=et(l.size,()=>{const te=o(l.size);return typeof te=="string"&&Nn[te]?te:""}),y=!!(l.color||l.clickable||l.border||l.glossy||l.glow||l.glass||l.shadow||l.outline||l.gradient||l.textGradient||l.lightShadow||l.radius),M={"chevron-down":{viewBox:"0 0 24 24",paths:[{d:"M6 9l6 6l6 -6",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}]}},D=te=>{const se=M[te];return se?_.svg({width:"100%",height:"100%",viewBox:se.viewBox,fill:"none","aria-hidden":"true",focusable:"false"},...se.paths.map(R=>_.path(R))):null},q=te=>{const se=o(l.tooltip);if(se==null||se===!1||!he.Tooltip)return te;const R=a(se)?{...se}:{text:se};return a(l.tooltipProps)&&Object.assign(R,l.tooltipProps),he.Tooltip({...R,target:te})},L=oe(["jss-icon","material-icons",...y?["jss-clear-set","jss-singularity"]:[],B,l.class]),ce=JSswift.omit(l,["name","size","class","style","label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots","spriteUrl","tooltip","tooltipProps"]);if(ce.class=L,Object.keys(f).length&&(ce.style=f),typeof i=="function"||i&&typeof i=="object"){const te=JSswift.ui.renderSlot(z,"default",{},i),se=F(null,"default",{},te),R=_.span({...ce,"data-icon":"custom"},...se);return Qe(R,l),q(R)}const X=String(i),Z=X.includes("#")?X:"";let ie=null;if(Z){const te=l.spriteUrl||((t=JSswift.config)==null?void 0:t.iconSpriteUrl)||(typeof globalThis!="undefined"?(s=globalThis.JSswift_setting)==null?void 0:s.iconSpriteUrl:null),se=Z.slice(Z.indexOf("#")+1),R=te?_.svg({width:"100%",height:"100%"},_.use({href:te+Z})):D(se)||_.svg({width:"100%",height:"100%"},_.use({href:Z}));k&&(R.style.fill="currentColor"),ie=_.span({...ce,"data-icon":X},R,...n)}else ie=_.span({...ce,"data-icon":X},X,...n);if(u!=null){let te=u;JSswift.uiSizes.includes(u)&&(te=`var(--jss-icon-size-${u})`),te=typeof te=="number"?te+"px":String(te),ie.style.setProperty("--set-icon-size",te)}return Qe(ie,l),q(ie)},he.Badge=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=et(t.size,()=>{const B=o(t.size);return typeof B=="string"&&Nn[B]?`jss-size-${B}`:""}),i=oe(["jss-clear-set","jss-badge","jss-singularity",n,pe(t.outline,"outline"),t.class]),c=JSswift.omit(t,["label","color","outline","size","slots","notification","iconSize","topLeft","topRight","bottomLeft","bottomRight","left","right"]);c.class=i;const r={...t.style||{}};if(t.size){const B=o(t.size);typeof B=="string"&&Nn[B]||(r.fontSize=He(t.size))}c.style=r;const v=(B,y,M)=>{const D=Array.isArray(B)?B:[B];for(const q of D)if(JSswift.ui.getSlot(l,q)!=null)return F(l,q,y,M);return M==null||M===!1||M===""?[]:F(null,"default",y,M)},a=()=>{var B;const y=o((B=t.iconSize)!=null?B:t.size);return typeof y=="number"?Math.max(10,Math.round(y*.85)):typeof y=="string"&&{xxs:10,xs:11,sm:12,md:13,lg:14,xl:16,xxl:18,xxxl:20}[y]||14},z=(B,y)=>{const M=o(B);return M==null||M===!1||M===""?null:typeof M=="string"?he.Icon({name:M,size:a()}):JSswift.ui.slot(M,{as:y})},u=(B,y,M)=>_.dynamic(()=>{const D=z(t[y],M),q=v(B,{position:M},D);return q.length?_.span({class:`jss-badge-anchor jss-badge-anchor-${M}`,"data-badge-slot":M},...q):null}),x=_.dynamic(()=>{const B=o(t.label);let y=v(["label"],{},B);return y.length||(y=v(["default"],{},s)),_.span({class:"jss-badge-content"},_.span({class:"jss-badge-label"},...y.length?y:[""]))}),k=_.dynamic(()=>{const B=o(t.notification),y=B==null||B===!1||B===""?null:B,M=v(["notification"],{notification:B},y);return M.length?_.span({class:"jss-badge-notification","data-badge-slot":"notification","aria-label":typeof B=="number"?`${B} notifications`:null},...M):null}),f=_.span(u(["left"],"left","left"),u(["centerLeft","center-left"],"centerLeft","center-left"),c,x,u(["topLeft","top-left"],"topLeft","top-left"),u(["topRight","top-right"],"topRight","top-right"),u(["bottomLeft","bottom-left"],"bottomLeft","bottom-left"),u(["bottomRight","bottom-right"],"bottomRight","bottom-right"),u(["centerRight","center-right"],"centerRight","center-right"),u(["right"],"right","right"),k);return(t.topLeft||t.centerLeft||t.bottomLeft)&&f.style.setProperty("padding-left","15px"),(t.topRight||t.centerRight||t.bottomRight)&&f.style.setProperty("padding-right","15px"),Qe(f,t),f};const No=e=>{if(e==null||e===!1)return"";const t=String(e).replace(/[._-]+/g," ").replace(/\s+/g," ").trim();if(!t)return"";const s=t.split(" ").filter(Boolean);return s.length?s.length===1?s[0].replace(/[^a-z0-9]/gi,"").slice(0,2).toUpperCase():s.slice(0,2).map(l=>l.charAt(0).toUpperCase()).join(""):""},cl=(e,t)=>{const s=e==null||e===!0?t:e;if(s==null||s===!1)return bt(t);const l=String(s).toLowerCase();return l==="online"||l==="available"||l==="active"?"success":l==="away"||l==="pending"?"warning":l==="busy"||l==="dnd"||l==="blocked"?"danger":l==="offline"||l==="idle"?"secondary":bt(l)||bt(t)},ul=(e,t="jss-avatar-badge")=>e==null||e===!1?null:e instanceof Node||Array.isArray(e)||typeof e=="function"?e:e===!0?_.span({class:t}):_.span({class:t},String(e)),Ao=(e,t)=>{if(e==null||e===!1){if(!t)return null;const l=cl(null,t);return _.span({class:oe(["jss-avatar-status",l?`jss-state-${l}`:""])})}if(e instanceof Node||Array.isArray(e)||typeof e=="function")return e;const s=cl(e,t);return e===!0||s?_.span({class:oe(["jss-avatar-status",s?`jss-state-${s}`:""])}):ul(e,"jss-avatar-badge")},Vn=(e,t)=>!t||!t.length?null:_.span({class:oe(["jss-avatar-anchor",e])},...t);he.Avatar=(...e)=>{var t,s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(e),c=n.slots||{},r=et(n.size,()=>{var h;const b=o(n.size);return typeof b=="string"&&((h=JSswift.uiSizes)!=null&&h.includes(b))?`jss-size-${b}`:""}),v=et([n.color,n.state],()=>{const h=o(n.color)||o(n.state)||"",b=bt(h);return b?`jss-state-${b}`:""}),a=oe(["jss-clear-set","jss-avatar","jss-singularity",r,v,pe(n.square,"jss-avatar-square"),pe(n.elevated,"elevated"),n.class]),z=JSswift.omit(n,["src","srcset","srcSet","sizes","alt","label","name","initials","text","size","fontSize","textSize","radius","rounded","square","elevated","icon","iconSize","media","fit","badge","notification","status","statusColor","presence","topLeft","topRight","bottomLeft","bottomRight","slots"]);z.class=a;const u={...n.style||{}},x=Pe(n.size,h=>{var b;return typeof h=="string"&&((b=JSswift.uiSizes)!=null&&b.includes(h))?"":He(h)},"");x!=null&&(u.width=x,u.height=x);const k=(t=n.fontSize)!=null?t:n.textSize,f=k!=null?Pe(k,He):Pe(n.size,h=>{var b;return typeof h=="string"&&((b=JSswift.uiSizes)!=null&&b.includes(h))?"":`clamp(11px, calc(${He(h)} * 0.34), 28px)`},"");f!=null&&(u.fontSize=f);const B=Pe(n.radius,h=>{const b=Kl(h);return b==="xxxl"?"999px":b?`var(--jss-r-${b})`:typeof h=="number"?`${h}px`:String(h)});B!=null&&(u["--set-border-radius"]=B),z.style=u;const y={props:n},M=et([n.alt,n.label,n.name,n.text],()=>{const h=o(n.alt)||o(n.label)||o(n.name)||o(n.text)||"avatar";return String(h)}),D=n.icon!=null?typeof n.icon=="string"?he.Icon({name:n.icon,size:n.iconSize||n.size||"sm"}):JSswift.ui.slot(n.icon,{as:"icon"}):null,q=et([n.initials,n.text,n.label,n.name],()=>{var h,b;const g=(h=o(n.initials))!=null?h:o(n.text);if(g!=null)return g;const J=(b=o(n.label))!=null?b:o(n.name);return typeof J=="string"?No(J):J}),L=ul(o((s=n.badge)!=null?s:n.notification)),ce=Ao(o((l=n.status)!=null?l:n.presence),o(n.statusColor));let X=F(c,"media",y,n.media);if(!X.length&&n.src){const h={class:"jss-avatar-img",src:n.src,alt:M,sizes:n.sizes,style:{}};n.srcset!=null&&(h.srcset=n.srcset),n.srcSet!=null&&(h.srcset=n.srcSet);const b=Pe(n.fit);b!=null&&(h.style.objectFit=b),X=[_.img(h)]}const Z=F(c,"default",y,i),ie=F(c,"fallback",y,null),te=F(c,"label",y,q),se=F(c,"icon",y,D),R=X.length?X:Z.length?Z:ie.length?ie:te.length?te:se.length?se:["?"],ae=X.length?"jss-avatar-media":"jss-avatar-fallback",re=_.span({class:"jss-avatar-body"},_.span({class:ae},...R));let ne=F(c,"topLeft",y,n.topLeft),K=F(c,"topRight",y,n.topRight),S=F(c,"bottomLeft",y,n.bottomLeft),I=F(c,"bottomRight",y,n.bottomRight);const m=F(c,"badge",y,L),P=F(c,"status",y,ce);!K.length&&m.length&&(K=m),!I.length&&P.length&&(I=P);const G=_.div(z,re,Vn("jss-avatar-anchor-top-left",ne),Vn("jss-avatar-anchor-top-right",K),Vn("jss-avatar-anchor-bottom-left",S),Vn("jss-avatar-anchor-bottom-right",I));return Qe(G,n),G},he.Chip=(...e)=>{var t,s,l,n;const{props:i,children:c}=JSswift.uiNormalizeArgs(e),r=i.slots||{},v=et(i.size,()=>{const L=o(i.size);return typeof L=="string"&&Nn[L]?L:""}),a=oe(["jss-clear-set","jss-chip","jss-singularity",v,i.class]),z=JSswift.omit(i,["label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots"]);z.class=a,z.style={...i.style||{}};const u=i.icon?typeof i.icon=="string"?he.Icon({name:i.icon,size:(t=i==null?void 0:i.size)!=null?t:null}):JSswift.ui.slot(i.icon,{as:"icon"}):null,x=i.iconRight?typeof i.iconRight=="string"?he.Icon({name:i.iconRight,size:(s=i==null?void 0:i.size)!=null?s:null}):JSswift.ui.slot(i.iconRight,{as:"iconRight"}):null,k=JSswift.ui.renderSlot(r,"icon",{},u),f=JSswift.ui.renderSlot(r,"iconRight",{},x),B=F(r,"label",{},i.label),y=B.length?B:F(r,"default",{},c),M=F(null,"default",{},k),D=F(null,"default",{},f),q=_.span(z,...M,...y.length?y:[""],...D);if(i.removable){const L=he.Btn({class:"jss-chip-remove",onClick:i.onRemove,size:(l=i==null?void 0:i.size)!=null?l:null},he.Icon({size:(n=i==null?void 0:i.size)!=null?n:null,name:"close"}));q.appendChild(L),L.onclick=()=>{i.onRemove&&i.onRemove(),q.remove()}}return Qe(q,i),q},he.Stat=(...e)=>{var t,s;const{props:l,children:n}=JSswift.uiNormalizeArgs(e),i=l.slots||{},c=()=>bt(o(l.state)||o(l.color)||""),r=et([l.state,l.color],()=>{const te=c();return te?`jss-state-${te}`:""}),v=et(l.trend,()=>{const te=String(o(l.trend)||"").toLowerCase();return["up","positive","success","gain","increase"].includes(te)?"is-positive":["down","negative","danger","loss","decrease"].includes(te)?"is-negative":["flat","neutral","steady","stable"].includes(te)?"is-neutral":""}),a={...l},z=JSswift.omit(a,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","meta","note","slots","state","subtitle","title","trend","value"]);z.class=oe(["jss-clear-set","jss-stat","jss-singularity",r,v,a.class]),z.style={...a.style||{}};const u=(te,se,R={})=>F(i,te,R,se),x=l.icon==null?null:typeof l.icon=="string"?he.Icon({name:l.icon,size:l.iconSize||"md"}):JSswift.ui.slot(l.icon,{as:"icon"}),k=u("eyebrow",l.eyebrow),f=u("label",(t=l.label)!=null?t:l.title),B=u("value",l.value),y=u("note",(s=l.note)!=null?s:l.subtitle),M=u("meta",l.meta),D=u("delta",l.delta,{trend:l.trend}),q=u("icon",x),L=u("aside",l.aside),ce=u("footer",l.footer),X=u("actions",l.actions),Z=u("default",n),ie=_.article(z,_.div({class:"jss-stat-head"},_.div({class:"jss-stat-lead"},q.length?_.div({class:"jss-stat-icon"},...q):null,_.div({class:"jss-stat-copy"},k.length?_.div({class:"jss-stat-eyebrow"},...k):null,f.length?_.div({class:"jss-stat-label"},...f):null)),L.length?_.div({class:"jss-stat-aside"},...L):null),_.div({class:"jss-stat-body"},B.length?_.div({class:"jss-stat-value"},...B):null,D.length?_.div({class:"jss-stat-delta"},...D):null,y.length?_.div({class:"jss-stat-note"},...y):null,M.length?_.div({class:"jss-stat-meta"},...M):null,Z.length?_.div({class:"jss-stat-extra"},...Z):null),ce.length||X.length?_.div({class:"jss-stat-footer"},ce.length?_.div({class:"jss-stat-footer-copy"},...ce):null,X.length?_.div({class:"jss-stat-actions"},...X):null):null);return Qe(ie,l),ie},he.Kpi=(...e)=>{var t,s;const{props:l,children:n}=JSswift.uiNormalizeArgs(e),i=l.slots||{},c=()=>bt(o(l.state)||o(l.color)||""),r=et([l.state,l.color],()=>{const te=c();return te?`jss-state-${te}`:""}),v={...l},a=JSswift.omit(v,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","media","meta","note","slots","state","subtitle","title","trend","value"]);a.class=oe(["jss-clear-set","jss-kpi","jss-singularity",r,v.class]),a.style={...v.style||{}};const z=(te,se,R={})=>F(i,te,R,se),u=l.icon==null?null:typeof l.icon=="string"?he.Icon({name:l.icon,size:l.iconSize||"lg"}):JSswift.ui.slot(l.icon,{as:"icon"}),x=z("eyebrow",l.eyebrow),k=z("title",(t=l.title)!=null?t:l.label),f=z("value",l.value),B=z("delta",l.delta,{trend:l.trend}),y=z("note",(s=l.note)!=null?s:l.subtitle),M=z("meta",l.meta),D=z("icon",u),q=z("aside",l.aside),L=z("media",l.media),ce=z("footer",l.footer),X=z("actions",l.actions),Z=z("default",n),ie=_.section(a,_.div({class:"jss-kpi-head"},_.div({class:"jss-kpi-title-wrap"},D.length?_.div({class:"jss-kpi-icon"},...D):null,_.div({class:"jss-kpi-copy"},x.length?_.div({class:"jss-kpi-eyebrow"},...x):null,k.length?_.div({class:"jss-kpi-title"},...k):null)),q.length?_.div({class:"jss-kpi-aside"},...q):null),_.div({class:"jss-kpi-core"},_.div({class:"jss-kpi-value-wrap"},f.length?_.div({class:"jss-kpi-value"},...f):null,B.length?_.div({class:"jss-kpi-delta"},...B):null),y.length?_.div({class:"jss-kpi-note"},...y):null,M.length?_.div({class:"jss-kpi-meta"},...M):null,L.length?_.div({class:"jss-kpi-media"},...L):null,Z.length?_.div({class:"jss-kpi-extra"},...Z):null),ce.length||X.length?_.div({class:"jss-kpi-footer"},ce.length?_.div({class:"jss-kpi-footer-copy"},...ce):null,X.length?_.div({class:"jss-kpi-actions"},...X):null):null);return Qe(ie,l),ie};const Lo=(e,t=180)=>{const s=getComputedStyle(e).transitionDuration;if(!s)return t;const l=s.split(",")[0].trim();if(!l)return t;const n=l.includes("ms")?parseFloat(l):parseFloat(l)*1e3;return Number.isFinite(n)?n:t},wn=e=>{!(e!=null&&e.overlay)||!(e!=null&&e.panel)||(e.overlay.classList.add("enter"),e.panel.classList.add("enter"),requestAnimationFrame(()=>{!(e!=null&&e.overlay)||!(e!=null&&e.panel)||(e.overlay.classList.add("entered"),e.panel.classList.add("entered"),e.overlay.classList.remove("enter"),e.panel.classList.remove("enter"))}))},_n=(e,t)=>{if(!(e!=null&&e.overlay)||!(e!=null&&e.panel)){t==null||t();return}if(e._closing)return;e._closing=!0,e.overlay.classList.add("leave"),e.panel.classList.add("leave");const s=()=>{e._closed||(e._closed=!0,t==null||t())},l=i=>{i.target===e.panel&&(e.panel.removeEventListener("transitionend",l),s())};e.panel.addEventListener("transitionend",l);const n=Lo(e.panel,180);setTimeout(s,n+40)};he.List=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=!!o((t=s.number)!=null?t:s.ordered),c=o(s.marker),r=o(s.items),v=Array.isArray(r)?r:r==null?[]:[r],a=(D={})=>{const q=s.itemProps||{},L={...q,...D};return s.divider!=null&&L.divider==null&&(L.divider=s.divider),L.class=oe([q.class,s.itemClass,D.class]),L.style={...q.style||{},...s.itemStyle||{},...D.style||{}},L},z=D=>{if(D==null||D===!1)return[];if(cs(D))return[D];if(An(D)){const q=D.children!=null?an(D.children):D.content!=null?an(D.content):an(D.node);return[he.Item(a(D),...q)]}return Array.isArray(D)?[he.Item(a(),...D)]:D!=null&&D.nodeType?[he.Item(a(),D)]:[he.Item(a(),D)]},u=(D,q,L,ce=!0)=>{if(D==null||D===!1)return[];if(ce){const X={item:D,index:q,count:L,first:q===0,last:q===L-1},Z=F(n,"item",X,null);if(Z.length)return Z.flatMap(ie=>z(ie))}return z(D)},x=[];v.forEach((D,q)=>{x.push(...u(D,q,v.length))});const k=F(n,"default",{items:v,count:v.length},l);if(k.forEach((D,q)=>{x.push(...u(D,v.length+q,v.length+k.length,!1))}),!x.length){const D=F(n,"empty",{items:v,count:0},s.empty);D.length&&(D.length===1&&cs(D[0])?x.push(D[0]):x.push(he.Item({class:"jss-item-empty",flat:!0},...D)))}const f=oe(["jss-list",pe(s.dense,"dense"),pe(s.divider,"divider"),pe(c===!1||c==="none","jss-list-no-marker"),s.class]),B=JSswift.omit(s,["dense","divider","slots","number","ordered","items","itemClass","itemStyle","itemProps","empty","marker","gap"]);B.class=f,B.style={...s.style||{}};const y=Pe(s.gap,He);return y!=null&&(B.style["--jss-list-gap"]=y),c!=null&&c!==!1&&c!==!0&&c!=="none"&&(B.style.listStyleType=String(c)),_[i?"ol":"ul"](B,...x)},he.Item=(...e)=>{var t,s,l,n,i,c,r,v;const{props:a,children:z}=JSswift.uiNormalizeArgs(e);a.state!=null&&a.color==null&&(a.color=a.state),Qt(a);const u=a.slots||{},x=et([a.clickable,a.to],()=>!!(o(a.clickable)||o(a.to))),k=et([a.active,a.selected],()=>!!(o(a.active)||o(a.selected))),f=!!(a.color!=null||a.outline||a.border||a.glossy||a.glow||a.glass||a.shadow||a.gradient||a.textGradient||a.lightShadow||a.radius||a.rounded||a.flat),B=(g,J,W)=>{const H=o(g);return H==null||H===!1||H===""?null:typeof H=="string"?he.Icon({name:H,size:J||"sm"}):JSswift.ui.slot(H,{as:W})},y=F(u,"icon",{},B(a.icon,a.iconSize||a.size,"icon")),M=F(u,"title",{},(t=a.title)!=null?t:a.label),D=F(u,"subtitle",{},(l=(s=a.subtitle)!=null?s:a.caption)!=null?l:a.description),q=F(u,"meta",{},(n=a.meta)!=null?n:a.eyebrow),L=F(u,"body",{},(i=a.body)!=null?i:a.content),ce=F(u,"default",{},z),X=F(u,"actions",{},(c=a.actions)!=null?c:a.footer),Z=(v=(r=a.aside)!=null?r:a.trailing)!=null?v:B(a.iconRight,a.iconSize||a.size,"iconRight"),ie=F(u,"aside",{},Z),te=[...L,...ce],se=!(f||a.clickable||a.to||y.length||M.length||D.length||q.length||X.length||ie.length||L.length),R=oe(["jss-item",pe(a.divider,"divider"),pe(f,"jss-clear-set"),pe(f,"jss-singularity"),pe(f,"jss-item-surface"),pe(se,"jss-item-inline"),pe(x,"jss-item-clickable"),pe(k,"is-active"),pe(a.disabled,"is-disabled"),a.class]),ae=JSswift.omit(a,["divider","slots","label","title","subtitle","caption","description","meta","eyebrow","body","content","children","node","icon","iconRight","iconSize","aside","trailing","actions","footer","clickable","to","active","selected","disabled","state","color","size","outline","flat","border","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","dense"]);ae.class=R,ae.style={...a.style||{}};const re=a.onClick,ne=a.onKeydown,K=g=>{var J;if(re==null||re(g),g.defaultPrevented||o(a.disabled))return;const W=o(a.to);W&&((J=JSswift.router)!=null&&J.navigate)&&(g.preventDefault(),JSswift.router.navigate(W))},S=g=>{ne==null||ne(g),!(g.defaultPrevented||o(a.disabled))&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),K(g))};o(a.disabled)&&(ae["aria-disabled"]="true"),(o(a.clickable)||o(a.to))&&(ae.onClick=K,ae.onKeydown=S,ae.tabIndex==null&&(ae.tabIndex=o(a.disabled)?-1:0),ae.role==null&&(ae.role="button"));const I=M.length?_.div({class:"jss-item-title"},...M):null,m=D.length?_.div({class:"jss-item-subtitle"},...D):null,P=q.length?_.div({class:"jss-item-meta"},...q):null,G=te.length?_.div({class:oe(["jss-item-body",pe(!(M.length||D.length||q.length),"is-standalone")])},...te):null,h=X.length?_.div({class:"jss-item-actions"},...X):null,b=_.li(ae,_.div({class:"jss-item-row"},y.length?_.div({class:"jss-item-icon"},...y):null,_.div({class:"jss-item-main"},P,I,m,G,h),ie.length?_.div({class:"jss-item-aside"},...ie):null));return Qe(b,a),b},he.Separator=(...e)=>{const{props:t}=JSswift.uiNormalizeArgs(e),s=oe(["jss-separator",pe(t.vertical,"vertical"),t.class]),l=JSswift.omit(t,["vertical","size","slots"]);l.class=s;const n={borderColor:"var(--jss-border)",...t.style||{}},i=o(t.size),c=o(t.vertical);if(i!=null){const r=He(i);c?n.width=r:n.height=r}return l.style=n,_.hr(l)},he.Banner=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=()=>bt(o(s.type)||o(s.state)||""),c={state:i,dismissible:()=>!!o(s.dismissible)},r=et([s.type,s.state],()=>i()),v=et(s.variant,()=>{const K=String(o(s.variant)||"").toLowerCase();return["solid","outline","ghost"].includes(K)?`jss-banner-${K}`:""}),a=et([s.actionsPlacement,s.stack],()=>String(o(s.actionsPlacement)||"").toLowerCase()==="bottom"||o(s.stack)?"jss-banner-actions-bottom":""),z=et(s.stack,()=>o(s.stack)?"jss-banner-stack":""),u={...s},x=JSswift.omit(u,["actions","actionsPlacement","accent","aside","body","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","stack","state","subtitle","title","type","variant"]);x.class=oe(["jss-clear-set","jss-banner","jss-singularity",r,v,a,z,u.class]),x.style={...u.style||{}};const k=K=>{if(K==null||K==="")return"";const S=o(K);if(S==null||S==="")return"";const I=String(S);return on(I)?`var(--jss-${I})`:I};(s.accent!=null||rt(s.accent))&&(x.style["--jss-banner-accent"]=()=>k(s.accent),x.style["--jss-banner-border"]=()=>{const K=k(s.accent);return K?`color-mix(in srgb, ${K} 38%, var(--jss-border-color))`:""},x.style["--jss-banner-bg"]=()=>{const K=k(s.accent);return K?`color-mix(in srgb, ${K} 14%, var(--jss-panel))`:""},x.style["--jss-banner-color"]=()=>{const K=k(s.accent);return K?`color-mix(in srgb, ${K} 78%, white)`:""});const f={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},B=(()=>{if(s.icon===!1||s.icon===null)return null;if(s.icon!=null)return typeof s.icon=="string"?he.Icon({name:s.icon,size:s.iconSize||s.size||"md"}):JSswift.ui.slot(s.icon,{as:"icon"});const K=i(),S=K?f[K]:null;return S?he.Icon({name:S,size:s.iconSize||s.size||"md"}):null})(),y=F(n,"title",c,s.title),M=F(n,"message",c,s.message!=null?s.message:l),D=F(n,"description",c,(t=s.description)!=null?t:s.subtitle),q=F(n,"meta",c,s.meta),L=F(n,"default",c,s.body!=null?[s.body,...l||[]]:s.message!=null?l:null),ce=F(n,"icon",c,B),X=F(n,"aside",c,s.aside),Z=F(n,"actions",c,s.actions),ie=F(n,"dismiss",c,s.dismiss),te=String(o(s.actionsPlacement)||"").toLowerCase()==="bottom"||!!o(s.stack),se=!!o(s.dismissible)||!!s.onDismiss;let R=null;const ae=se?he.Btn({class:"jss-banner-close",outline:!0,size:s.size||"sm","aria-label":s.closeLabel||"Chiudi banner",onClick:K=>{var S;(S=s.onDismiss)==null||S.call(s,K),!K.defaultPrevented&&(R==null||R.remove())}},he.Icon({name:"close",size:s.size||"sm"})):null,re=[...X,...te?[]:Z,...ie.length?ie:ae?[ae]:[]];R=_.div(x,ce.length?_.div({class:"jss-banner-icon"},...ce):null,_.div({class:"jss-banner-body"},_.div({class:"jss-banner-copy"},y.length?_.div({class:"jss-banner-title"},...y):null,M.length?_.div({class:"jss-banner-message"},...M):null,D.length?_.div({class:"jss-banner-description"},...D):null,L.length?_.div({class:"jss-banner-extra"},...L):null,q.length?_.div({class:"jss-banner-meta"},...q):null),te&&Z.length?_.div({class:"jss-banner-actions"},...Z):null),re.length?_.div({class:"jss-banner-side"},...re):null);const ne=x.role||(()=>{const K=i();return K==="danger"||K==="warning"?"alert":"status"})();return R.setAttribute("role",ne),Qe(R,s),R},he.Alert=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=()=>bt(o(s.type)||o(s.state)||o(s.color)||"warning"),c=et([s.type,s.state,s.color],()=>{const ce=i();return ce?`jss-state-${ce}`:""}),r={...s},v=JSswift.omit(r,["actions","aside","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","state","subtitle","title","type","variant"]);v.class=oe(["jss-clear-set","jss-alert","jss-singularity",c,pe(s.dismissible,"is-dismissible"),r.class]),v.style={...r.style||{}};const a={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},z=(()=>{if(s.icon===!1||s.icon===null)return null;if(s.icon!=null)return typeof s.icon=="string"?he.Icon({name:s.icon,size:s.iconSize||"sm"}):JSswift.ui.slot(s.icon,{as:"icon"});const ce=a[i()]||a.warning;return he.Icon({name:ce,size:s.iconSize||"sm"})})(),u=F(n,"title",{},s.title),x=F(n,"message",{},s.message!=null?s.message:l),k=F(n,"description",{},(t=s.description)!=null?t:s.subtitle),f=F(n,"meta",{},s.meta),B=F(n,"actions",{},s.actions),y=F(n,"aside",{},s.aside),M=F(n,"icon",{},z),D=F(n,"dismiss",{},s.dismiss);let q=null;const L=s.dismissible||s.onDismiss?he.Btn({class:"jss-alert-close",outline:!0,size:"sm","aria-label":s.closeLabel||"Chiudi alert",onClick:ce=>{var X;(X=s.onDismiss)==null||X.call(s,ce),!ce.defaultPrevented&&(q==null||q.remove())}},he.Icon({name:"close",size:"sm"})):null;return q=_.div(v,M.length?_.div({class:"jss-alert-icon"},...M):null,_.div({class:"jss-alert-body"},u.length?_.div({class:"jss-alert-title"},...u):null,x.length?_.div({class:"jss-alert-message"},...x):null,k.length?_.div({class:"jss-alert-description"},...k):null,f.length?_.div({class:"jss-alert-meta"},...f):null,B.length?_.div({class:"jss-alert-actions"},...B):null),y.length||D.length||L?_.div({class:"jss-alert-side"},...y,...D.length?D:L?[L]:[]):null),q.setAttribute("role",i()==="danger"||i()==="warning"?"alert":"status"),Qe(q,s),q},he.EmptyState=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=()=>bt(o(s.state)||o(s.color)||""),c=et([s.state,s.color],()=>{const L=i();return L?`jss-state-${L}`:""}),r={...s},v=JSswift.omit(r,["actions","description","eyebrow","icon","iconSize","illustration","media","message","meta","slots","state","title"]);v.class=oe(["jss-clear-set","jss-empty-state","jss-singularity",c,pe(s.compact,"compact"),pe(s.inline,"inline"),r.class]),v.style={...r.style||{}};const a=s.icon===!1?null:s.icon!=null?typeof s.icon=="string"?he.Icon({name:s.icon,size:s.iconSize||"xl"}):JSswift.ui.slot(s.icon,{as:"icon"}):he.Icon({name:"inbox",size:s.iconSize||"xl"}),z=F(n,"illustration",{},(t=s.illustration)!=null?t:s.media),u=F(n,"icon",{},a),x=F(n,"eyebrow",{},s.eyebrow),k=F(n,"title",{},s.title),f=F(n,"message",{},s.message!=null?s.message:l),B=F(n,"description",{},s.description),y=F(n,"meta",{},s.meta),M=F(n,"actions",{},s.actions),D=F(n,"default",{},s.message!=null?l:null),q=_.section(v,z.length?_.div({class:"jss-empty-state-illustration"},...z):null,u.length?_.div({class:"jss-empty-state-icon"},...u):null,x.length?_.div({class:"jss-empty-state-eyebrow"},...x):null,k.length?_.div({class:"jss-empty-state-title"},...k):null,f.length?_.div({class:"jss-empty-state-message"},...f):null,B.length?_.div({class:"jss-empty-state-description"},...B):null,y.length?_.div({class:"jss-empty-state-meta"},...y):null,D.length?_.div({class:"jss-empty-state-extra"},...D):null,M.length?_.div({class:"jss-empty-state-actions"},...M):null);return Qe(q,s),q};let Zt="jsswift:drawer-open";const dl=new Set,ms=new Map,rn=(e=Zt)=>{const t=JSswift==null?void 0:JSswift.store;if(t!=null&&t.get){const s=t.get(e,void 0);if(typeof s=="boolean")return s}try{return localStorage.getItem(e)==="1"}catch(s){return!1}},Io=(e,t=Zt)=>{const s=JSswift==null?void 0:JSswift.store;if(s!=null&&s.set){s.set(t,!!e);return}try{localStorage.setItem(t,e?"1":"0")}catch(l){}};let Ft=rn();const Kt=(e,t=Zt)=>{Ft=!!e;const s=ms.get(t);if(s&&s.size)s.forEach(l=>l==null?void 0:l.classList.toggle("open",Ft));else{const l=document.querySelector(".jss-drawer");l&&l.classList.toggle("open",Ft)}return dl.forEach(l=>{if(!l)return;if(typeof l.update=="function"){l.update(Ft);return}const{el:n,openIcon:i,closeIcon:c}=l;n&&(n.textContent=Ft?i:c)}),Io(Ft,t),Ft};he.Tooltip=(...e)=>{var t,s;const{props:l,children:n}=JSswift.uiNormalizeArgs(e),i=l.slots||{};let c=null,r=null,v=null,a=null;const z=K=>Object.prototype.hasOwnProperty.call(l,K),u=z("target")||z("anchorEl")||z("triggerEl"),x=l.target||l.anchorEl||l.triggerEl||(n&&n.length?n[0]:null),k=(K,S)=>{const I=o(K);if(I==null||I==="")return S;const m=Number(I);return Number.isFinite(m)?m:S},f=()=>{clearTimeout(r),clearTimeout(v),r=null,v=null},B=()=>k(l.delay,350),y=()=>k(l.hideDelay,o(l.interactive)?120:0),M=()=>{if(f(),!c)return;const K=c;c=null,_n(K,()=>JSswift.overlay.close(K.id))},q=(K=>{if(K==null||K===!0)return new Set(["hover","focus"]);if(K===!1)return new Set(["manual"]);const S=Array.isArray(K)?K:String(K).split(/[\s,|/]+/),I=new Set;return S.forEach(m=>{const P=String(m||"").trim().toLowerCase();P&&(P==="mouseenter"||P==="mouseover"?I.add("hover"):P==="blur"||P==="focusin"?I.add("focus"):P==="tap"?I.add("click"):I.add(P))}),I.size?I:new Set(["manual"])})((s=(t=l.trigger)!=null?t:l.triggers)!=null?s:z("open")?"manual":null),L=q.has("hover"),ce=q.has("focus"),X=q.has("click"),Z=q.has("manual")||!L&&!ce&&!X,ie=()=>{var K,S,I,m,P,G;const h={anchorEl:a||x||null,close:()=>M(),hide:()=>M(),isOpen:()=>!!c},b=l.icon?typeof l.icon=="string"?he.Icon({name:l.icon,size:l.iconSize||l.size||"sm"}):JSswift.ui.slot(l.icon,{as:"icon"}):null,g=F(i,"title",h,(K=l.title)!=null?K:l.heading),J=F(i,"icon",h,b),W=F(i,"footer",h,(S=l.footer)!=null?S:l.actions);let H=(G=(P=(m=(I=l.content)!=null?I:l.text)!=null?m:l.body)!=null?P:l.description)!=null?G:l.label;H==null&&(u?H=n:x&&n&&n.length>1?H=n.slice(1):x||(H=n));let de=F(i,"content",h,H);de.length||(de=F(i,"default",h,H));const E=de.length?_.div({class:"jss-tooltip-body"},...de):null,N=J.length||g.length?_.div({class:"jss-tooltip-head"},J.length?_.div({class:"jss-tooltip-icon"},...J):null,_.div({class:"jss-tooltip-head-main"},g.length?_.div({class:"jss-tooltip-title"},...g):null,E)):E,A=W.length?_.div({class:"jss-tooltip-footer"},...W):null;return _.div({class:"jss-tooltip-content"},...[N,A].filter(Boolean))},te=K=>{var S,I,m,P,G,h;const b=K||a;if(!b||o(l.disabled))return null;if(c&&c._anchorEl===b)return c;c&&M();const g=(S=l.closeOnOutside)!=null?S:X||o(l.interactive),J=(I=l.closeOnEsc)!=null?I:X||o(l.interactive);let W=null;if(c=JSswift.overlay.open(()=>ie(),{type:"tooltip",anchorEl:b,placement:l.placement||"top",offsetX:(m=l.offsetX)!=null?m:0,offsetY:(G=(P=l.offsetY)!=null?P:l.offset)!=null?G:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:g,closeOnBackdrop:!1,closeOnEsc:J,autoFocus:!1,className:Ht(["jss-tooltip",pe(l.interactive,"interactive"),l.class,l.panelClass]),onClose:()=>{var de,E;(de=W==null?void 0:W._tooltipCleanup)==null||de.call(W),c===W&&(c=null),(E=l.onClose)==null||E.call(l)}}),!(c!=null&&c.panel))return c;const H=c;if(W=H,H._anchorEl=b,H.panel.dataset.placement=String(o(l.placement||"top")),l.maxWidth!=null&&(H.panel.style.maxWidth=He(o(l.maxWidth))),l.minWidth!=null&&(H.panel.style.minWidth=He(o(l.minWidth))),l.width!=null&&(H.panel.style.width=He(o(l.width))),l.style&&Object.assign(H.panel.style,l.style),Qe(H.panel,l),o(l.interactive)){const de=()=>{clearTimeout(v),v=null},E=()=>R(),N=A=>{const T=A.target;T&&T.closest&&T.closest("[data-tooltip-close]")&&M()};H.panel.addEventListener("mouseenter",de),H.panel.addEventListener("mouseleave",E),H.panel.addEventListener("focusin",de),H.panel.addEventListener("focusout",E),H.panel.addEventListener("click",N),H._tooltipCleanup=()=>{var A,T,U,ue,xe;(A=H.panel)==null||A.removeEventListener("mouseenter",de),(T=H.panel)==null||T.removeEventListener("mouseleave",E),(U=H.panel)==null||U.removeEventListener("focusin",de),(ue=H.panel)==null||ue.removeEventListener("focusout",E),(xe=H.panel)==null||xe.removeEventListener("click",N)}}return wn(H),(h=l.onOpen)==null||h.call(l,H),H},se=K=>{clearTimeout(v),v=null,clearTimeout(r),r=setTimeout(()=>te(K),B())},R=(K=!1)=>{if(clearTimeout(r),r=null,!!c){if(clearTimeout(v),K){M();return}v=setTimeout(()=>M(),y())}},ae=K=>{c?R(!0):te(K)},re=()=>!!c,ne=K=>{if(!K)return()=>{};a=K;const S=[],I=()=>{f(),S.forEach(m=>m())};if(z("open"))return rt(l.open)?JSswift.reactive.effect(()=>{a&&(o(l.open)?te(a):R(!0))},"UI.Tooltip:open"):l.open===!0?te(K):l.open===!1&&R(!0),I;if(Z||o(l.disabled))return I;if(L){const m=()=>se(K),P=()=>R();K.addEventListener("mouseenter",m),K.addEventListener("mouseleave",P),S.push(()=>{K.removeEventListener("mouseenter",m),K.removeEventListener("mouseleave",P)})}if(ce){const m=()=>se(K),P=()=>R();K.addEventListener("focus",m),K.addEventListener("blur",P),S.push(()=>{K.removeEventListener("focus",m),K.removeEventListener("blur",P)})}if(X){const m=P=>{var G;(G=l.onTriggerClick)==null||G.call(l,P),!P.defaultPrevented&&ae(K)};K.addEventListener("click",m),S.push(()=>K.removeEventListener("click",m))}return I};if(x){const K=oe(["jss-tooltip-wrap",l.wrapClass,l.targetClass]),S=JSswift.omit(l,["actions","anchorEl","body","closeOnEsc","closeOnOutside","content","delay","description","disabled","footer","heading","hideDelay","icon","iconSize","interactive","label","maxWidth","minWidth","offset","offsetX","offsetY","onClose","onOpen","onTriggerClick","open","panelClass","placement","slots","style","target","targetClass","targetStyle","text","title","trigger","triggerEl","triggers","width","wrapClass","wrapStyle"]);S.class=K,S.style={display:"inline-flex",alignItems:"center",...l.wrapStyle||l.targetStyle||{}};const I=JSswift.ui.renderSlot(i,"target",{open:()=>te(a),show:()=>se(a),hide:()=>R(!0),toggle:()=>ae(a),isOpen:re},x),m=_.span(S,...F(null,"default",{},I));return ne(m),m._tooltip={bind:ne,open:te,show:se,hide:R,close:M,toggle:ae,isOpen:re},m}return{bind:ne,open:te,show:se,hide:R,close:M,toggle:ae,isOpen:re}};const bs=(e,t,s={})=>{var l;const{props:n,children:i}=JSswift.uiNormalizeArgs(t),c=n.slots||{},r=e==="radio",v=s.appearance==="toggle",a=!r,z=n.id||`jss-${e}-`+Math.random().toString(36).slice(2),u=At(n.model,s.modelName||(r?"UI.Radio:model":"UI.Checkbox:model")),x=JSswift.omit(n,["model","label","checked","class","style","dense","onChange","onInput","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","inputClass","iconSize","color","size","outline","behavior","mode","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);x.type=e,x.id=z,r&&n.name!=null&&(x.name=n.name),x.class=oe([`jss-${e}`,"jss-choice-input",n.inputClass]);const k=_.input(x),f=F(c,"label",{},n.label),B=f.length?f:F(c,"default",{},i),y=ps(n,{className:"jss-shortcode jss-choice-shortcode"}),M=y?[...B,y]:B,D=JSswift.omit(n,["model","label","checked","onChange","onInput","value","name","id","type","dense","inputClass","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","iconSize","color","size","behavior","mode","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);D.class=oe(["jss-clear-set","jss-singularity-check","jss-choice-wrap",`jss-${e}-wrap`,pe(v,"jss-toggle-wrap"),pe(v&&r,"jss-toggle-radio-wrap"),pe(v&&!r,"jss-toggle-checkbox-wrap"),pe(n.dense,"dense"),n.class]),D.style={...n.style||{}};const q=o(n.size);q!=null&&!(typeof q=="string"&&((l=JSswift.uiSizes)!=null&&l.includes(q)))&&(D.style["--jss-choice-size"]=He(q));const L=_.span({class:oe(["jss-choice-mark",r?"jss-choice-radio-mark":"jss-choice-checkbox-mark",pe(v,"jss-toggle-mark")])}),ce=v?_.span({class:"jss-toggle-thumb"}):L;v&&L.appendChild(ce);const X=M.length?_.span({class:"jss-choice-label"},...M):null,Z=_.label(D,k,L,X);Qe(Z,n);const ie=n.iconSize?n.iconSize:n.size,te=v?null:r?"radio_button_checked":"check",se=v?null:r?"radio_button_unchecked":null,R=v||r?null:"indeterminate_check_box",ae=S=>{if(r)return k.checked=S==n.value,k.checked;const I=S==null?null:!!S;return k.checked=I===!0,k.indeterminate=a&&I==null,I},re=()=>!r&&a&&k.indeterminate?null:!!k.checked,ne=S=>S===!0?n.checkedIcon!=null?n.checkedIcon:n.icon!=null?n.icon:te:S===!1?n.uncheckedIcon!=null?n.uncheckedIcon:se:n.indeterminateIcon!=null?n.indeterminateIcon:n.standbyIcon!=null?n.standbyIcon:n.iconStandby!=null?n.iconStandby:R,K=()=>{const S=re(),I=S===!0;for(;ce.firstChild;)ce.removeChild(ce.firstChild);Z.classList.toggle("is-checked",I),Z.classList.toggle("is-indeterminate",S==null),Z.classList.toggle("is-disabled",!!k.disabled),I&&(n.checkedIcon||n.icon)?Z.classList.toggle("toggle-default",!1):I&&!n.checkedIcon||S==null&&!n.standbyIcon?Z.classList.toggle("toggle-default",!0):S==null&&n.standbyIcon?Z.classList.toggle("toggle-default",!1):k.disabled===!1&&!n.uncheckedIcon?Z.classList.toggle("toggle-default",!0):Z.classList.toggle("toggle-default",!1),v&&(S==null?ce.style.transform="translateX(calc((var(--jss-toggle-width) - var(--jss-toggle-thumb-size) - 1px) / 2))":ce.style.removeProperty("transform"));const m={checked:I,state:S,indeterminate:S==null,value:n.value,id:z,type:e};let P=null;if(S===!0?(P=JSswift.ui.renderSlot(c,"checkedIcon",m,null),P==null&&(P=JSswift.ui.renderSlot(c,"iconOn",m,null))):S===!1?(P=JSswift.ui.renderSlot(c,"uncheckedIcon",m,null),P==null&&(P=JSswift.ui.renderSlot(c,"iconOff",m,null))):(P=JSswift.ui.renderSlot(c,"indeterminateIcon",m,null),P==null&&(P=JSswift.ui.renderSlot(c,"standbyIcon",m,null)),P==null&&(P=JSswift.ui.renderSlot(c,"iconStandby",m,null))),P==null&&(P=JSswift.ui.renderSlot(c,"icon",m,null)),P==null){const G=ne(S);typeof G=="string"?P=he.Icon({name:G,size:ie,...v?{textColor:n.color,outline:!0}:{}}):G!=null&&(P=JSswift.ui.slot(G,{checked:I,state:S,indeterminate:S==null,as:S===!0?"checkedIcon":S===!1?"uncheckedIcon":"indeterminateIcon"}))}F(null,"default",{},P).forEach(G=>ce.appendChild(G))};return u?(ae(u.get()),u.watch(S=>{ae(S),K()},r?"UI.Radio:watch":"UI.Checkbox:watch"),k.addEventListener("change",S=>{var I,m;if(r)k.checked&&(u.set(n.value),(I=n.onChange)==null||I.call(n,n.value,S));else{const P=re();u.set(P),(m=n.onChange)==null||m.call(n,P,S)}K()})):(ae(r?n.checked===!0?n.value:void 0:n.checked),k.addEventListener("change",S=>{var I,m;r?(I=n.onChange)==null||I.call(n,n.value,S):(m=n.onChange)==null||m.call(n,re(),S),K()})),n.onInput&&k.addEventListener("input",S=>{var I,m;r?(I=n.onInput)==null||I.call(n,n.value,S):(m=n.onInput)==null||m.call(n,re(),S)}),K(),fn(Z,n,{isEnabled:()=>!k.disabled,action:()=>{if(k.disabled)return!1;vn(k),k.click()}}),Z};he.Checkbox=(...e)=>bs("checkbox",e),he.Radio=(...e)=>bs("radio",e),he.Toggle=(...e)=>{var t,s,l;const{props:n}=JSswift.uiNormalizeArgs(e),i=String((l=(s=(t=n.behavior)!=null?t:n.mode)!=null?s:n.type)!=null?l:"checkbox").toLowerCase()==="radio"?"radio":"checkbox";return bs(i,e,{appearance:"toggle",modelName:"UI.Toggle:model"})},he.Slider=(...e)=>{var t,s,l,n,i;const{props:c,children:r}=JSswift.uiNormalizeArgs(e),v=c.slots||{},a=c.model||(It(c.value)||Mt(c.value)?c.value:null),z=At(a,"UI.Slider:model"),u=JSswift.omit(c,["model","value","class","style","onChange","onInput","slots","label","icon","iconRight","thumbIcon","iconThumb","pointIcon","markers","markerLabels","labelMarks","leftLabel","rightLabel","startLabel","endLabel","minLabel","maxLabel","withQItem","qitem","item","itemClass","itemStyle","showValue","thumbLabel","labelValue","selectionColor","trackColor","thumbColor","inputClass","readonly","size"]);u.type="range",u.class=oe(["jss-slider-input",c.inputClass]);const x=_.input(u),k={...c.style||{}},f=o(c.size);if(f!=null){const V=typeof f=="string"&&((t=JSswift.uiSizes)!=null&&t.includes(f))?`var(--jss-size-${f})`:He(f);k["--jss-slider-size"]=V,k["--jss-slider-track-size"]=`max(4px, calc(${V} / 4))`,k["--jss-slider-box-height"]=`calc(${V} * 1.5)`,k["--jss-slider-marker-size"]=`max(6px, calc(${V} / 3))`}const B=_.label({class:oe(["jss-clear-set","jss-singularity-check","jss-slider-wrap",pe(c.dense,"dense"),c.class]),style:k});Qe(B,c);const y=_.div({class:"jss-slider-header"}),M=_.span({class:"jss-slider-label"}),D=_.span({class:"jss-slider-value"});y.append(M,D);const q=_.div({class:"jss-slider-body"}),L=_.span({class:"jss-slider-icon jss-slider-icon-left"}),ce=_.span({class:"jss-slider-edge-label jss-slider-edge-label-left"}),X=_.div({class:"jss-slider-main"}),Z=_.div({class:"jss-slider-box",style:{minHeight:"var(--jss-slider-box-height, 36px)"}}),ie=_.span({class:"jss-slider-rail",style:{height:"var(--jss-slider-track-size, 6px)"}}),te=_.span({class:"jss-slider-selection",style:{height:"var(--jss-slider-track-size, 6px)"}}),se=_.span({class:"jss-slider-thumb",style:{width:"var(--jss-slider-size, 24px)",height:"var(--jss-slider-size, 24px)"}}),R=_.span({class:"jss-slider-thumb-icon"}),ae=_.span({class:"jss-slider-thumb-label"});se.append(ae,R);const re=_.div({class:"jss-slider-markers"}),ne=_.span({class:"jss-slider-edge-label jss-slider-edge-label-right"}),K=_.span({class:"jss-slider-icon jss-slider-icon-right"});Z.append(ie,te,se,x),X.append(Z,re),q.append(L,ce,X,ne,K),B.append(y,q);const S=V=>{for(;V.firstChild;)V.removeChild(V.firstChild)},I=(V,Y,ge="")=>{S(V),(Y||[]).forEach(ye=>V.appendChild(ye)),V.style.display=V.childNodes.length?ge:"none"},m=V=>It(V)||Mt(V)?o(V):V,P=(V,Y={})=>zn(m(V),Y),G=(V,Y,ge={})=>{var ye,Q;const ve=m(V);return ve==null?[]:typeof ve=="string"?[he.Icon({name:ve,size:(Q=(ye=c.iconSize)!=null?ye:c.size)!=null?Q:16})]:P(ve,{...ge,as:Y})},h=(V,Y)=>{const ge=Number(V);return Number.isFinite(ge)?ge:Y},b=()=>h(o(c.min),0),g=()=>{const V=b(),Y=h(o(c.max),100);return Y<V?V:Y},J=()=>{const V=o(c.step);if(V==="any")return"any";const Y=h(V,1);return Y>0?Y:1},W=V=>{if(V==="any")return 0;const Y=String(V);if(Y.includes("e-"))return Number(Y.split("e-")[1]||0);const ge=Y.indexOf(".");return ge===-1?0:Y.length-ge-1},H=V=>{const Y=b(),ge=g(),ye=J();let Q=h(V,Y);if(ye!=="any"){Q=Y+Math.round((Q-Y)/ye)*ye;const ve=W(ye);ve>0&&(Q=Number(Q.toFixed(ve)))}return Math.min(ge,Math.max(Y,Q))},de=V=>{const Y=b(),ye=g()-Y;if(!ye)return 0;const Q=(H(V)-Y)/ye,ve=o(c.reverse)?1-Q:Q;return Math.max(0,Math.min(1,ve))},[E,N]=JSswift.reactive.signal(H(z?z.get():(l=(s=o(c.value))!=null?s:o(c.min))!=null?l:0)),A=(V,Y={})=>{const ge=H(V);return E()!==ge&&N(ge),String(x.value)!==String(ge)&&(x.value=String(ge)),z&&Y.fromModel!==!0&&z.set(ge),ge},T=()=>{var V;const Y=o(c.markers),ge=!!o((V=c.markerLabels)!=null?V:c.labelMarks);if(!Y)return[];const ye=b(),Q=g(),ve=(be,me)=>{var Ie,Oe,we,j,fe,je,O,d;if(be==null)return null;if(typeof be=="object"&&!Array.isArray(be)){const C=H((we=(Oe=(Ie=be.value)!=null?Ie:be.position)!=null?Oe:be.at)!=null?we:ye);return{key:(j=be.key)!=null?j:`marker-${me}-${C}`,value:C,label:(fe=be.label)!=null?fe:ge?String(C):null,icon:(je=be.icon)!=null?je:null,className:(d=(O=be.class)!=null?O:be.className)!=null?d:""}}const p=H(be);return{key:`marker-${me}-${p}`,value:p,label:ge?String(be):null,icon:null,className:""}};if(Array.isArray(Y))return Y.map((be,me)=>ve(be,me)).filter(Boolean);if(typeof Y=="number"&&Y>1){const be=Math.floor(Y),me=be>1?(Q-ye)/(be-1):0;return Array.from({length:be},(Ie,Oe)=>ve(ye+me*Oe,Oe)).filter(Boolean)}if(Y===!0){const be=J();if(be==="any")return[ve(ye,0),ve(Q,1)].filter(Boolean);const me=Math.floor((Q-ye)/be)+1;return me>24?[ve(ye,0),ve((ye+Q)/2,1),ve(Q,2)].filter(Boolean):Array.from({length:me},(Ie,Oe)=>ve(ye+be*Oe,Oe)).filter(Boolean)}return typeof Y=="object"?Object.keys(Y).map((be,me)=>ve({value:Number(be),label:Y[be]},me)).filter(Boolean):[]},U=()=>{S(re);const V=T();re.style.display=V.length?"block":"none",re.style.minHeight=V.some(Y=>Y.label!=null&&Y.label!=="")?"30px":"10px",V.forEach(Y=>{const ge=de(Y.value),ye=o(c.reverse)?E()<=Y.value:E()>=Y.value,Q=_.button({type:"button",class:oe(["jss-slider-marker",Y.className,pe(()=>ye,"active")]),style:{left:`${ge*100}%`,color:ye?o(c.color)||"var(--jss-primary)":"var(--jss-muted)",cursor:o(c.disabled)||o(c.readonly)?"default":"pointer"},disabled:!!o(c.disabled)||!!o(c.readonly),onClick:()=>{var we,j;if(o(c.disabled)||o(c.readonly))return;const fe=A(Y.value);(we=c.onInput)==null||we.call(c,fe),(j=c.onChange)==null||j.call(c,fe)}}),ve={marker:Y,active:ye,value:Y.value,current:E(),input:x};let be=JSswift.ui.renderSlot(v,"marker",ve,null);be==null&&Y.icon!=null&&(be=typeof Y.icon=="string"?he.Icon({name:Y.icon,size:12}):JSswift.ui.slot(Y.icon,{...ve,as:"marker"}));const me=_.span({class:"jss-slider-marker-tick",style:{width:"var(--jss-slider-marker-size, 8px)",height:"var(--jss-slider-marker-size, 8px)",background:ye?o(c.color)||"var(--jss-primary)":"var(--jss-border-color)"}}),Ie=be==null?[me]:F(null,"default",ve,be),Oe=Y.label==null?F(v,"markerLabel",ve,null):F(v,"markerLabel",ve,Y.label);Ie.forEach(we=>Q.appendChild(we)),Oe.length&&Q.appendChild(_.span({class:"jss-slider-marker-label"},...Oe)),re.appendChild(Q)})},ue=()=>{var V;const Y={value:E(),input:x,props:c};let ge=F(v,"label",Y,m(c.label));ge.length||(ge=F(v,"default",Y,r)),I(M,ge,"inline-flex");const ye=o(c.showValue),Q=ye===!1?null:(V=m(c.labelValue))!=null?V:E(),ve=ye||m(c.labelValue)!=null?F(v,"value",Y,Q):[];I(D,ve,"inline-flex"),y.style.display=M.childNodes.length||D.childNodes.length?"flex":"none"},xe=()=>{var V,Y,ge,ye;const Q={value:E(),input:x,props:c},ve=F(v,"icon",Q,null),be=ve.length?ve:G(c.icon,"icon",Q);I(L,be,"inline-flex");const me=F(v,"iconRight",Q,null),Ie=me.length?me:G(c.iconRight,"iconRight",Q);I(K,Ie,"inline-flex");const Oe=m((Y=(V=c.startLabel)!=null?V:c.leftLabel)!=null?Y:c.minLabel),we=m((ye=(ge=c.endLabel)!=null?ge:c.rightLabel)!=null?ye:c.maxLabel);I(ce,F(v,"startLabel",Q,Oe),"inline-flex"),I(ne,F(v,"endLabel",Q,we),"inline-flex")},Ne=()=>{var V,Y,ge,ye;const Q={value:E(),input:x,props:c},ve=F(v,"thumbIcon",Q,null),be=(Y=(V=c.thumbIcon)!=null?V:c.iconThumb)!=null?Y:c.pointIcon;I(R,ve.length?ve:G(be,"thumbIcon",Q),"inline-flex");const me=(ye=(ge=m(c.thumbLabel))!=null?ge:m(c.labelValue))!=null?ye:o(c.showValue)?String(E()):null,Ie=F(v,"thumbLabel",Q,me);I(ae,Ie,"inline-flex")},$=()=>{const V=H(E()),Y=b(),ge=g(),ye=J(),ve=`${de(V)*100}%`,be=o(c.color)||o(c.selectionColor)||"var(--jss-primary)",me=o(c.trackColor)||"var(--jss-border-color)",Ie=o(c.thumbColor)||be,Oe=!!o(c.readonly),we=!!o(c.disabled);x.min=String(Y),x.max=String(ge),x.step=ye==="any"?"any":String(ye),x.disabled=we,x.value=String(V),ie.style.background=me,te.style.background=be,te.style.width=ve,se.style.left=ve,se.style.borderColor=Ie,se.style.color=Ie,ae.style.background=be,B.classList.toggle("is-disabled",we),B.classList.toggle("is-readonly",Oe),B.classList.toggle("has-markers",re.childNodes.length>0)};if(z?(A(z.get(),{fromModel:!0}),z.watch(V=>{A(V,{fromModel:!0})},"UI.Slider:watch")):rt(c.value)?JSswift.reactive.effect(()=>{A(o(c.value),{fromModel:!0})},"UI.Slider:value"):A((i=(n=c.value)!=null?n:c.min)!=null?i:0,{fromModel:!0}),x.addEventListener("input",V=>{var Y;if(o(c.disabled)||o(c.readonly)){x.value=String(E());return}const ge=A(x.value);(Y=c.onInput)==null||Y.call(c,ge,V)}),x.addEventListener("change",V=>{var Y;if(o(c.disabled)||o(c.readonly)){x.value=String(E());return}const ge=A(x.value);(Y=c.onChange)==null||Y.call(c,ge,V)}),JSswift.reactive.effect(()=>{ue(),xe(),Ne(),U(),$()},"UI.Slider:render"),B._input=x,B._getValue=E,B._setValue=V=>A(V),c.withQItem||c.qitem||c.item===!0){const V=he.Item({class:oe(["jss-slider-item",c.itemClass]),style:c.itemStyle},B);return V._input=x,V._slider=B,V._getValue=E,V._setValue=B._setValue,V}return B},he.Rating=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=s.model||(It(s.value)||Mt(s.value)?s.value:null),c=At(i,"UI.Rating:model"),r=s.id||"jss-rating-"+Math.random().toString(36).slice(2),v=JSswift.omit(s,["model","value","max","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);v.type="hidden",v.id=r,s.name!=null&&(v.name=s.name),v.class=oe(["jss-rating-input","jss-choice-input",s.inputClass]);const a=_.input(v),z=JSswift.omit(s,["model","value","max","id","name","type","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);z.class=oe(["jss-clear-set","jss-singularity-check","jss-choice-wrap","jss-rating","jss-rating-wrap",pe(s.dense,"dense"),s.class]),z.style={...s.style||{}};const u=o(s.size);u!=null&&!(typeof u=="string"&&((t=JSswift.uiSizes)!=null&&t.includes(u)))&&(z.style["--jss-rating-size"]=He(u));const x=o(s.gap);x!=null&&(z.style["--jss-rating-gap"]=He(x));const k=_.span({class:"jss-rating-control",onMouseleave:J=>{var W;ne!=null&&(ne=null,b(),(W=s.onHover)==null||W.call(s,R(),J))},onKeydown:J=>{if(!se())return;const W=X()?.5:1,H=R();let de=H;switch(J.key){case"ArrowRight":case"ArrowUp":de=H+W;break;case"ArrowLeft":case"ArrowDown":de=H-W;break;case"Home":de=o(s.clearable)?0:W;break;case"End":de=ce();break;case"Delete":case"Backspace":case"0":if(!o(s.clearable))return;de=0;break;case" ":case"Enter":de=H||(o(s.clearable)?W:Math.max(W,1));break;default:return}J.preventDefault(),g(de,J,{emit:!0})}}),f=_.span({class:"jss-choice-label jss-rating-label"}),B=_.label(z,a,k,f);Qe(B,s);const y=J=>{for(;J.firstChild;)J.removeChild(J.firstChild)},M=(J,W,H="")=>{y(J),(W||[]).forEach(de=>J.appendChild(de)),J.style.display=J.childNodes.length?H:"none"},D=J=>It(J)||Mt(J)?o(J):J,q=(J,W={})=>zn(D(J),W),L=(J,W,H={})=>{var de,E;const N=D(J);return N==null?[]:typeof N=="string"?[he.Icon({name:N,color:s.color,size:(E=(de=s.iconSize)!=null?de:s.size)!=null?E:16})]:q(N,{...H,as:W})},ce=()=>{var J;const W=Number((J=o(s.max))!=null?J:5);return Number.isFinite(W)&&W>0?Math.max(1,Math.round(W)):5},X=()=>{var J;return!!o((J=s.half)!=null?J:s.allowHalf)},Z=(J,W=ce())=>{let H=Number(o(J));Number.isFinite(H)||(H=0),H=Math.min(W,Math.max(0,H));const de=X()?.5:1;return Math.round(H/de)*de},ie=()=>!!o(s.disabled),te=()=>!!o(s.readonly),se=()=>!ie()&&!te(),R=()=>Z(c?c.get():re),ae=J=>{const W=J>0?String(J):"";a.value=W,a.setAttribute("value",W),a.disabled=ie()};let re=Z(c?c.get():o(s.value)),ne=null,K=0,S=[];const I=(J,W)=>{if(!X())return Z(J);const H=W.currentTarget.getBoundingClientRect(),de=W.clientX-H.left<=H.width/2;return Z(de?J-.5:J)},m=(J,W)=>J>=W?"full":X()&&J>=W-.5?"half":"empty",P=(J,W)=>{var H,de,E,N,A,T,U,ue,xe,Ne,$,V,Y,ge,ye;const Q=o((E=(de=(H=s.colorSelected)!=null?H:s.activeColor)!=null?de:s.color)!=null?E:s.textColor)||"var(--jss-warning, #f0b429)",ve=o((ue=(U=(T=(A=(N=s.colorHalf)!=null?N:s.halfColor)!=null?A:s.colorSelected)!=null?T:s.activeColor)!=null?U:s.color)!=null?ue:s.textColor)||Q,be=o((Y=(V=($=(Ne=(xe=s.colorHovered)!=null?xe:s.hoverColor)!=null?Ne:s.colorSelected)!=null?$:s.activeColor)!=null?V:s.color)!=null?Y:s.textColor)||Q,me=o((ye=(ge=s.colorInactive)!=null?ge:s.colorOff)!=null?ye:s.color)||"var(--jss-muted)";return W?be:J==="full"?Q:J==="half"?ve:me},G=J=>{var W,H,de,E,N,A,T,U,ue,xe,Ne,$,V,Y,ge;const ye=[];J.hovered&&J.state!=="empty"&&ye.push("hoveredIcon","iconHovered"),J.state==="full"?ye.push("checkedIcon","selectedIcon","iconSelected","iconOn"):J.state==="half"?ye.push("halfIcon","iconHalf"):ye.push("uncheckedIcon","iconOff"),ye.push("icon","item","star");for(const be of ye){const me=F(n,be,J,null);if(me.length)return me}let Q=null,ve="icon";return J.hovered&&J.state!=="empty"&&(Q=(W=s.hoveredIcon)!=null?W:s.iconHovered,ve="hoveredIcon"),Q==null&&J.state==="full"?(Q=(N=(E=(de=(H=s.checkedIcon)!=null?H:s.iconSelected)!=null?de:s.iconOn)!=null?E:s.icon)!=null?N:"star",ve="checkedIcon"):Q==null&&J.state==="half"?(Q=(xe=(ue=(U=(T=(A=s.halfIcon)!=null?A:s.iconHalf)!=null?T:s.checkedIcon)!=null?U:s.iconSelected)!=null?ue:s.icon)!=null?xe:"star_half",ve="halfIcon"):Q==null&&(Q=(ge=(Ne=s.uncheckedIcon)!=null?Ne:s.iconOff)!=null?ge:o(s.noDimming)?(Y=(V=($=s.icon)!=null?$:s.checkedIcon)!=null?V:s.iconSelected)!=null?Y:"star":"star_border",ve="uncheckedIcon"),L(Q,ve,J)},h=()=>{const J=ce();if(K!==J){K=J,S=[],y(k);for(let W=1;W<=J;W++){const H=_.span({class:"jss-rating-item-icon"}),de=_.span({class:"jss-rating-item",role:"radio",tabIndex:-1,onMousemove:E=>{var N;if(!se())return;const A=I(W,E);ne!==A&&(ne=A,b(),(N=s.onHover)==null||N.call(s,A,E))},onClick:E=>{if(!se())return;let N=I(W,E);o(s.clearable)&&N===R()&&(N=0),g(N,E,{emit:!0})}},H);S.push({item:de,iconHost:H,index:W}),k.appendChild(de)}}},b=()=>{var J,W;h();const H=ce(),de=R(),E=ne==null?de:Z(ne,H),N=ie(),A=te(),T=!!o(s.clearable),U=!!o(s.noDimming);B.classList.toggle("is-disabled",N),B.classList.toggle("is-readonly",A),B.classList.toggle("is-hovering",ne!=null),B.classList.toggle("is-clearable",T),B.classList.toggle("is-half",X()),B.classList.toggle("no-dimming",U);const ue=Number((W=o((J=s.tabindex)!=null?J:s.tabIndex))!=null?W:0);k.tabIndex=N?-1:ue,k.setAttribute("role","slider"),k.setAttribute("aria-valuemin","0"),k.setAttribute("aria-valuemax",String(H)),k.setAttribute("aria-valuenow",String(de)),k.setAttribute("aria-disabled",N?"true":"false"),k.setAttribute("aria-readonly",A?"true":"false"),ae(de);const xe=F(n,"label",{value:de,max:H,disabled:N,readonly:A,clearable:T},s.label!=null?D(s.label):l);M(f,xe,"inline-flex"),S.forEach(({item:Ne,iconHost:$,index:V})=>{const Y=m(E,V),ge=ne!=null&&Y!=="empty",ye={index:V,max:H,value:de,displayValue:E,state:Y,active:Y!=="empty",checked:Y==="full",half:Y==="half",hovered:ge,disabled:N,readonly:A,clearable:T,setValue:Q=>g(Q,null,{emit:!1})};Ne.className=Ht(["jss-rating-item",`is-${Y}`,pe(ge,"is-hovered")]),Ne.style.color=P(Y,ge),Ne.style.opacity=Y==="empty"&&!U?"0.48":"1",Ne.setAttribute("aria-checked",String(de===V)),M($,G(ye),"inline-flex")})},g=(J,W,H={})=>{var de,E;const N=Z(J),A=R();return re=N,ne=null,c&&H.fromModel!==!0&&c.set(N),ae(N),b(),H.emit!==!1&&N!==A&&((de=s.onInput)==null||de.call(s,N,W),(E=s.onChange)==null||E.call(s,N,W)),N};return B._input=a,B._rating=k,B._getValue=R,B._setValue=J=>g(J,null,{emit:!1}),c&&c.watch(J=>{const W=Z(J);serializeValue(W)!==serializeValue(re)&&(re=W,ne=null,ae(re),b())},"UI.Rating:watch"),JSswift.reactive.effect(()=>{!c&&s.value!=null&&(re=Z(o(s.value))),b()},"UI.Rating:render"),B};const it=e=>e?{hour:Number(e.hour)||0,minute:Number(e.minute)||0,second:Number(e.second)||0}:null,Yt=e=>String(Math.max(0,Number(e)||0)).padStart(2,"0"),Wt=(e,t={})=>{var s,l,n,i,c,r,v,a,z,u,x,k,f,B,y;if(e==null||e==="")return null;let M=null,D=null,q=0,L=null;if(e instanceof Date&&!Number.isNaN(e.getTime()))M=e.getHours(),D=e.getMinutes(),q=e.getSeconds();else if(typeof e=="number"&&Number.isFinite(e)){const X=Math.max(0,Math.floor(e));M=Math.floor(X/3600)%24,D=Math.floor(X/60)%60,q=X%60}else if(typeof e=="object"){if(e.time!=null||e.value!=null)return Wt((s=e.time)!=null?s:e.value,t);M=Number((i=(n=(l=e.hour)!=null?l:e.hours)!=null?n:e.h)!=null?i:e.hh),D=Number((a=(v=(r=(c=e.minute)!=null?c:e.minutes)!=null?r:e.min)!=null?v:e.mm)!=null?a:0),q=Number((k=(x=(u=(z=e.second)!=null?z:e.seconds)!=null?u:e.sec)!=null?x:e.ss)!=null?k:0),L=(y=(B=(f=e.meridiem)!=null?f:e.ampm)!=null?B:e.period)!=null?y:null}else if(typeof e=="string"){const X=e.trim();if(!X)return null;const Z=X.match(/^(\d{1,2})(\d{2})(\d{2})?$/),ie=X.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?\s*([ap]m)?/i);if(ie)M=Number(ie[1]),D=Number(ie[2]),q=ie[3]!=null?Number(ie[3]):0,L=ie[4]||null;else if(Z)M=Number(Z[1]),D=Number(Z[2]),q=Z[3]!=null?Number(Z[3]):0;else return null}else return null;if(!Number.isFinite(M)||!Number.isFinite(D)||!Number.isFinite(q))return null;if(L){const X=String(L).toLowerCase();X==="pm"&&M<12&&(M+=12),X==="am"&&M===12&&(M=0)}if(M<0||M>23||D<0||D>59||q<0||q>59)return null;const ce={hour:Math.floor(M),minute:Math.floor(D),second:Math.floor(q)};return fl(ce,t)},en=(e,t={})=>{const s=e&&typeof e=="object"&&e.hour!=null?it(e):Wt(e,t);if(!s)return"";const l=t.withSeconds===!0||Number(s.second||0)>0;return`${Yt(s.hour)}:${Yt(s.minute)}${l?`:${Yt(s.second)}`:""}`},Bn=(e,t)=>{const s=en(e,{withSeconds:!0}),l=en(t,{withSeconds:!0});return!s&&!l?0:s?l?s<l?-1:s>l?1:0:1:-1};function fl(e,t={}){if(!e)return null;const s=it(e),l=t.min!=null?Wt(t.min,{withSeconds:!0}):null,n=t.max!=null?Wt(t.max,{withSeconds:!0}):null;return l&&Bn(s,l)<0?it(l):n&&Bn(s,n)>0?it(n):s}const Dt=(e,t={})=>e==null||e===""?null:e instanceof Date?Wt(e,t):typeof e=="object"?Wt(e.time!=null?e.time:e,t):typeof e=="string"||typeof e=="number"?Wt(e,t):null,Hn=(e,t={})=>{var s;const l=Wt(e,t);if(!l)return"";const n=t.withSeconds===!0||Number(l.second||0)>0;if(!!!o((s=t.use12h)!=null?s:t.ampm))return`${Yt(l.hour)}:${Yt(l.minute)}${n?`:${Yt(l.second)}`:""}`;const c=l.hour>=12?"PM":"AM",r=l.hour%12||12;return`${Yt(r)}:${Yt(l.minute)}${n?`:${Yt(l.second)}`:""} ${c}`},zo=(e,t,s={})=>{if(!e)return"";const l=en(t,s);return l?`${e}T${l}`:e},vs=(e,t)=>{const s=Math.max(1,Math.min(t+1,Math.round(Number(e)||1))),l=[];for(let n=0;n<=t;n+=s)l.push(n);return l},pl=(e={})=>{const{props:t={},slots:s={},value:l=null,withSeconds:n=!1,minuteStep:i=5,secondStep:c=5,disabled:r=!1,readonly:v=!1,embedded:a=!1,className:z="",slotPrefix:u="",shortcuts:x=null,onSelect:k=null}=e,f=Wt(l,{withSeconds:n,min:t.min,max:t.max}),B=f||Wt(new Date,{withSeconds:n,min:t.min,max:t.max})||{hour:0,minute:0,second:0},y=f?it(f):null,M=te=>u?`${u}${te[0].toUpperCase()}${te.slice(1)}`:null,D=(te,se,R)=>{const ae=[M(te),te].filter(Boolean);for(const re of ae){if(JSswift.ui.getSlot(s,re)==null)continue;const K=JSswift.ui.renderSlot(s,re,se,R);if(K!=null)return K}return JSswift.ui.slot(R,se)},q=te=>{let se=D("point",te,null);return se==null&&e.pointIcon!=null&&te.selected&&(se=typeof e.pointIcon=="string"?he.Icon({name:e.pointIcon,size:a?10:12}):JSswift.ui.slot(e.pointIcon,te)),F(null,"default",te,se)},L=(te,se)=>{const R={hour:B.hour,minute:B.minute,second:n?B.second:0};return R[te]=se,R},ce=_.div({class:oe(["jss-time-section",pe(a,"is-embedded"),pe(n,"has-seconds"),z])}),X=o(x)||[];if(Array.isArray(X)&&X.length){const te=_.div({class:"jss-time-shortcuts"});X.forEach((se,R)=>{var ae,re,ne;if(!se)return;const K=typeof se.value=="function"?se.value({now:en(new Date,{withSeconds:n})}):se.value,S=Wt(K,{withSeconds:n,min:t.min,max:t.max});if(!S)return;const I={item:se,index:R,value:en(S,{withSeconds:n}),displayValue:Hn(S,{withSeconds:n,use12h:(ae=t.use12h)!=null?ae:t.ampm})},m=D("shortcut",I,(ne=(re=se.label)!=null?re:se.text)!=null?ne:I.displayValue);te.appendChild(_.button({type:"button",class:oe(["jss-time-shortcut",pe(!!y&&Bn(S,y)===0,"is-selected")]),disabled:r||v,onClick:()=>k==null?void 0:k(S,{shortcut:se,index:R})},...F(null,"default",I,m)))}),te.childNodes.length&&ce.appendChild(te)}const Z=_.div({class:"jss-time-columns"}),ie=(te,se,R)=>{const ae=_.div({class:"jss-time-column","data-time-part":se}),re=_.div({class:"jss-time-options"});return R.forEach(ne=>{var K;const S=L(se,ne),I=fl(S,{withSeconds:n,min:t.min,max:t.max}),m=r||v||Bn(I,S)!==0,P=!!y&&y[se]===ne,G={part:se,selected:P,disabled:m,value:ne,label:Yt(ne),timeValue:en(I,{withSeconds:n}),displayValue:Hn(I,{withSeconds:n,use12h:(K=t.use12h)!=null?K:t.ampm})},h=D("option",G,G.label),b=P?q(G):[];re.appendChild(_.button({type:"button",class:oe(["jss-time-option",pe(P,"is-selected"),pe(m,"is-disabled")]),disabled:m,onClick:()=>k==null?void 0:k(I,{part:se,optionValue:ne})},_.span({class:"jss-time-option-label"},...F(null,"default",G,h)),b.length?_.span({class:"jss-time-option-point"},...b):null))}),ae.appendChild(re),ae};return Z.appendChild(ie(o(t.hoursLabel)||"Ore","hour",vs(1,23))),Z.appendChild(ie(o(t.minutesLabel)||"Min","minute",vs(i,59))),n&&Z.appendChild(ie(o(t.secondsLabel)||"Sec","second",vs(c,59))),ce.appendChild(Z),ce},Wn=e=>{if(!e)return null;const t={};return e.querySelectorAll(".jss-time-column").forEach((s,l)=>{const n=s.getAttribute("data-time-part")||String(l);t[n]=s.scrollTop}),t},gl=(e,t={})=>{var s;if(!e)return;const l=t.scrollState||null,n=(s=t.behavior)!=null?s:"smooth";e.querySelectorAll(".jss-time-column").forEach((i,c)=>{const r=i.getAttribute("data-time-part")||String(c),v=l&&Number.isFinite(l[r])?l[r]:null;v!=null&&(i.scrollTop=v);const a=i.querySelector(".jss-time-option.is-selected");if(!a)return;const z=Math.max(0,i.scrollHeight-i.clientHeight),u=a.offsetTop-(i.clientHeight-a.offsetHeight)/2,x=Math.max(0,Math.min(z,u));if(Math.abs(i.scrollTop-x)<1){i.scrollTop=x;return}if(n&&typeof i.scrollTo=="function"){i.scrollTo({top:x,behavior:n});return}i.scrollTop=x})},hl=(e,t={})=>{var s,l,n,i,c,r,v,a,z,u,x,k;const{props:f,children:B}=JSswift.uiNormalizeArgs(e),y=t.calendar===!0,M=f.slots||{},D=et(f.size,()=>{const w=String(o(f.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(w)?`jss-size-${w}`:""}),q=String(o((i=(n=f.mode)!=null?n:o((l=(s=f.rangeMultiple)!=null?s:f.multipleRange)!=null?l:f.multiRange)?"range-multiple":null)!=null?i:f.range&&f.multiple?"range-multiple":f.range?"range":f.multiple?"multiple":"single")).toLowerCase(),L=["range-multiple","multiple-range","rangemultiple","multiplerange","range_multiple","multiple_range","multi-range","multi_range","ranges"].includes(q)?"range-multiple":q==="range"?"range":q==="multiple"?"multiple":"single",ce=f.model||(It(f.value)||Mt(f.value)?f.value:null),X=At(ce,y?"UI.Calendar:model":"UI.Datepicker:model"),Z=X?X.get():o(f.value),ie=o((c=f.rangeAs)!=null?c:f.rangeModel)==="array"||Array.isArray(Z),te=o((r=f.rangeMultipleAs)!=null?r:f.multipleRangeAs)==="array"||Array.isArray(Z)&&Array.isArray(Z[0]),se=()=>{var w,le,_e;return L==="single"&&!!o((_e=(le=(w=f.withTime)!=null?w:f.time)!=null?le:f.timePicker)!=null?_e:f.enableTime)},R=()=>{var w,le,_e,Fe,De,Te,We,tt;const ct=en(Dt((le=(w=o(f.timeValue))!=null?w:X?X.get():o(f.value))!=null?le:Z,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!o((Fe=(_e=f.timeWithSeconds)!=null?_e:f.withSeconds)!=null?Fe:f.showSeconds)||/:\d{2}:\d{2}$/.test(ct)||/:\d{2}:\d{2}$/.test(o(f.timeFormat)||""),min:o((De=f.timeMin)!=null?De:f.minTime),max:o((Te=f.timeMax)!=null?Te:f.maxTime),use12h:o((tt=(We=f.time12h)!=null?We:f.use12h)!=null?tt:f.ampm)}},ae=()=>{var w,le;const _e=Number(o((le=(w=f.timeMinuteStep)!=null?w:f.minuteStep)!=null?le:5));return Math.max(1,Math.min(30,Number.isFinite(_e)?_e:5))},re=()=>{var w,le;const _e=Number(o((le=(w=f.timeSecondStep)!=null?w:f.secondStep)!=null?le:5));return Math.max(1,Math.min(30,Number.isFinite(_e)?_e:5))},ne=w=>String(w).padStart(2,"0"),K=(w,le,_e)=>{const Fe=new Date(w,le,_e);return Fe.getFullYear()!==w||Fe.getMonth()!==le||Fe.getDate()!==_e?null:Fe},S=w=>!(w instanceof Date)||Number.isNaN(w.getTime())?null:`${w.getFullYear()}-${ne(w.getMonth()+1)}-${ne(w.getDate())}`,I=w=>{if(typeof w!="string")return null;const le=w.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!le)return null;const _e=Number(le[1]),Fe=Number(le[2])-1,De=Number(le[3]),Te=new Date(_e,Fe,De);return Te.getFullYear()!==_e||Te.getMonth()!==Fe||Te.getDate()!==De?null:Te},m=(w,le)=>{const _e=I(w);return _e?(_e.setDate(_e.getDate()+le),S(_e)):null},P=(w,le)=>new Date(w.getFullYear(),w.getMonth()+le,1),G=w=>{if(w instanceof Date&&!Number.isNaN(w.getTime()))return new Date(w.getFullYear(),w.getMonth(),1);const le=ue(w),_e=I(le);return _e?new Date(_e.getFullYear(),_e.getMonth(),1):new Date},h=()=>S(new Date),b=(w,le)=>!!w&&!!le&&w===le,g=(w,le)=>w==null&&le==null?0:w==null?-1:le==null?1:w<le?-1:w>le?1:0,J=(w,le)=>{const _e=I(w),Fe=I(le);return!_e||!Fe?0:Math.round((Fe.getTime()-_e.getTime())/864e5)},W=w=>Array.isArray(w)?w.slice():w==null||w===""?[]:[w],H=w=>({from:(w==null?void 0:w.from)||null,to:(w==null?void 0:w.to)||null}),de=w=>Array.isArray(w)?w.map(H):[],E=w=>{const le=H(w);return ie?[le.from,le.to]:le},N=w=>de(w).map(le=>te?[le.from,le.to]:le),A=w=>L==="multiple"?Array.isArray(w)?w.slice():[]:L==="range"?H(w):L==="range-multiple"?de(w):w||null,T=w=>L==="multiple"?Array.isArray(w)?w.slice():[]:L==="range"?E(w):L==="range-multiple"?N(w):w||"",U=w=>JSON.stringify(T(w)),ue=w=>{if(w==null||w==="")return null;if(w instanceof Date)return S(w);if(typeof w=="number")return S(new Date(w));if(typeof w!="string")return typeof w=="object"&&w.date!=null?ue(w.date):null;const le=w.trim();if(!le)return null;const _e=le.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:$|[T\s])/);if(_e){const We=K(Number(_e[1]),Number(_e[2])-1,Number(_e[3]));return S(We)}const Fe=le.match(/^(\d{1,2})[\/.\-](\d{1,2})[\/.\-](\d{2,4})$/);if(Fe){const We=Fe[3].length===2?2e3+Number(Fe[3]):Number(Fe[3]),tt=K(We,Number(Fe[2])-1,Number(Fe[1]));return S(tt)}if(/^\d{1,4}$/.test(le))return null;const De=new Date(le);if(Number.isNaN(De.getTime()))return null;const Te=le.match(/(?:^|[^\d])(\d{4})(?!\d)/);return Te&&De.getFullYear()!==Number(Te[1])?null:S(De)},xe=w=>{var le,_e,Fe,De,Te,We;if(w==null||w==="")return{from:null,to:null};let tt=null,ct=null;if(Array.isArray(w))tt=ue(w[0]),ct=ue(w[1]);else if(typeof w=="object")tt=ue((Fe=(_e=(le=w.from)!=null?le:w.start)!=null?_e:w.dateFrom)!=null?Fe:w.departure),ct=ue((We=(Te=(De=w.to)!=null?De:w.end)!=null?Te:w.dateTo)!=null?We:w.return);else{const St=String(w).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[];tt=ue(St[0]),ct=ue(St[1])}return tt&&ct&&tt>ct&&([tt,ct]=[ct,tt]),{from:tt,to:ct}},Ne=w=>{const le=[],_e=new Set,Fe=De=>{const Te=xe(De);if(!Te.from)return;const We=`${Te.from||""}|${Te.to||""}`;_e.has(We)||(_e.add(We),le.push(Te))};if(w==null||w==="")return le;if(Array.isArray(w))if(w.every(Te=>Te==null||typeof Te=="string"||typeof Te=="number"||Te instanceof Date)){const Te=w.map(ue).filter(Boolean);for(let We=0;We<Te.length;We+=2)Fe({from:Te[We],to:Te[We+1]||null})}else w.forEach(Te=>Fe(Te));else if(typeof w=="object"&&Array.isArray(w.ranges))w.ranges.forEach(De=>Fe(De));else if(typeof w=="object")Fe(w);else{const Te=(String(w).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(ue).filter(Boolean);for(let We=0;We<Te.length;We+=2)Fe({from:Te[We],to:Te[We+1]||null})}return le.sort((De,Te)=>g(De.from,Te.from)||g(De.to,Te.to))},$=w=>{const le=[];return W(w).forEach(_e=>{const Fe=ue(_e);Fe&&!le.includes(Fe)&&le.push(Fe)}),le.sort()},V=w=>L==="range"?xe(w):L==="range-multiple"?Ne(w):L==="multiple"?$(w):ue(w),Y=()=>{var w;return ue(o((w=f.min)!=null?w:f.minDate))},ge=()=>{var w;return ue(o((w=f.max)!=null?w:f.maxDate))},ye=()=>o(f.locale)||void 0,Q=()=>{var w,le;const _e=Number(o((le=(w=f.firstDayOfWeek)!=null?w:f.weekStart)!=null?le:1));return Number.isFinite(_e)?(_e%7+7)%7:1},ve=()=>{var w;const le=L==="range"||L==="range-multiple"?2:1,_e=Number((w=o(f.monthsToShow))!=null?w:le);return Math.max(1,Math.min(4,Number.isFinite(_e)?_e:le))},be=()=>{const w=Y(),le=ge();let _e=ue(o(f.defaultMonth))||h();return w&&_e<w&&(_e=w),le&&_e>le&&(_e=le),_e||w||le||h()},me=()=>o(f.confirm)?Le:Ae,Ie=w=>{const le=I(w);return le?{date:w,value:w,year:le.getFullYear(),month:le.getMonth()+1,day:le.getDate(),weekday:le.getDay(),today:b(w,h())}:{date:w,value:w}},Oe=(w,le)=>w==null?!1:Array.isArray(w)?w.some(_e=>ue(_e)===le):w instanceof Set?w.has(le):typeof w=="function"?!!w(le,Ie(le)):typeof w=="string"||w instanceof Date||typeof w=="number"?ue(w)===le:!1,we=w=>{var le,_e,Fe,De,Te,We,tt,ct,St,wt,Jt,Pt,jt;if(!w)return!1;const Et=Y(),sn=ge();if(Et&&w<Et||sn&&w>sn)return!1;const ln=o((_e=(le=f.options)!=null?le:f.enableDates)!=null?_e:f.allowedDates);if(ln!=null&&!Oe(ln,w))return!1;const hn=o((De=(Fe=f.disableDates)!=null?Fe:f.disabledDates)!=null?De:f.notAllowedDates);if(hn!=null&&Oe(hn,w))return!1;const Xt=(Te=I(w))==null?void 0:Te.getDay();if(Array.isArray(o((We=f.allowedWeekdays)!=null?We:f.weekdays))&&Xt!=null&&!o((tt=f.allowedWeekdays)!=null?tt:f.weekdays).map(Cn=>Number(Cn)).includes(Xt)||o(f.weekdaysOnly)&&(Xt===0||Xt===6)||o(f.weekendsOnly)&&Xt!=null&&Xt!==0&&Xt!==6)return!1;const Ct=me(),Jn=L==="range"?Ct!=null&&Ct.from&&!(Ct!=null&&Ct.to)?Ct:null:L==="range-multiple"&&Array.isArray(Ct)&&Ct.length&&(ct=Ct[Ct.length-1])!=null&&ct.from&&!((St=Ct[Ct.length-1])!=null&&St.to)?Ct[Ct.length-1]:null;if(Jn!=null&&Jn.from){const En=Math.abs(J(Jn.from,w)),Cn=Number(o((Jt=(wt=f.minRange)!=null?wt:f.minDays)!=null?Jt:f.minNights)),Rt=Number(o((jt=(Pt=f.maxRange)!=null?Pt:f.maxDays)!=null?jt:f.maxNights));if(Number.isFinite(Cn)&&En<Cn||Number.isFinite(Rt)&&En>Rt)return!1}return!0},j=w=>{var le,_e;if(!w)return"";const Fe=I(w);return!Fe||String(o((_e=(le=f.displayMask)!=null?le:f.mask)!=null?_e:"")||"").toLowerCase()==="iso"||o(f.isoDisplay)===!0?w:new Intl.DateTimeFormat(ye(),{year:"numeric",month:"short",day:"2-digit"}).format(Fe)},fe=(w,le=ke)=>{if(L==="range-multiple")return!Array.isArray(w)||!w.length?"":w.length>2&&o(f.compactMultiple)!==!1?`${w.length} ${o(f.multipleRangeLabel)||"intervalli selezionati"}`:w.map(De=>{const Te=De!=null&&De.from?j(De.from):"",We=De!=null&&De.to?j(De.to):"";return Te&&We?`${Te} -> ${We}`:Te||We||""}).filter(Boolean).join("; ");if(L==="multiple")return!Array.isArray(w)||!w.length?"":w.length>3&&o(f.compactMultiple)!==!1?`${w.length} ${o(f.multipleLabel)||"date selezionate"}`:w.map(j).join(", ");if(L==="range"){const De=w!=null&&w.from?j(w.from):"",Te=w!=null&&w.to?j(w.to):"";return De&&Te?`${De} -> ${Te}`:De||Te||""}const _e=j(w);if(!se())return _e;const Fe=Ce(le);return[_e,Fe].filter(Boolean).join(" \u2022 ")},je=w=>(String(w||"").match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(ue).filter(Boolean),O=w=>{if(w==null||w==="")return L==="multiple"||L==="range-multiple"?[]:L==="range"?{from:null,to:null}:null;const le=je(w);if(L==="range-multiple"){const _e=[];for(let Fe=0;Fe<le.length;Fe+=2)le[Fe]&&_e.push({from:le[Fe],to:le[Fe+1]||null});return _e}return L==="multiple"?le:L==="range"?{from:le[0]||null,to:le[1]||null}:le[0]||ue(w)},d=()=>L==="multiple"||L==="range-multiple"?[]:L==="range"?{from:null,to:null}:null,p=(w,le=null)=>{var _e;if(!se())return null;const Fe=R(),De=o(f.timeValue),Te=w!=null?w:De,We=Dt(Te,Fe);return it((_e=We!=null?We:le)!=null?_e:null)},C=()=>o(f.confirm)?Ee:ke,ee=(w=Ae,le=ke)=>L==="single"&&se()?zo(w||null,le,R()):T(w),Se=(w=Ae,le=ke)=>JSON.stringify(ee(w,le)),Ce=w=>Hn(w,R());let Ae=V(Z),Le=A(Ae),ke=p(Z,Dt(o(f.timeValue),R())),Ee=it(ke),Re=null,Me=null,$e=G(L==="range"?(Ae==null?void 0:Ae.from)||(Ae==null?void 0:Ae.to)||be():L==="range-multiple"?((v=Ae==null?void 0:Ae[Ae.length-1])==null?void 0:v.from)||((a=Ae==null?void 0:Ae[Ae.length-1])==null?void 0:a.to)||be():L==="multiple"?Ae[0]||be():Ae||be()),Ye=null,qe=null;const lt=w=>{const le=w instanceof Date?w:I(ue(w));if(!le)return-1;const _e=le.getFullYear(),Fe=le.getMonth();for(let De=0;De<ve();De+=1){const Te=P($e,De);if(Te.getFullYear()===_e&&Te.getMonth()===Fe)return De}return-1},Xe={...f,label:(z=f.label)!=null?z:f.placeholder},ze=Xe.label!=null||JSswift.ui.getSlot(M,"label")!=null,Ve=L==="range"?"Seleziona andata e ritorno":L==="range-multiple"?"Seleziona intervalli":L==="multiple"?"Seleziona date":"Seleziona data",Ke=y?null:_.input({class:oe(["jss-input","jss-date-display",D,pe(f.manualInput,"is-manual"),f.inputClass]),type:"text",autocomplete:"off",placeholder:ze?"":(u=f.placeholder)!=null?u:Ve,readOnly:!o(f.manualInput),disabled:!!o(f.disabled),value:fe(Ae,ke)}),gt=_.div({style:{display:"contents"}}),yt=y?null:_.div({class:"jss-date-control",style:{display:"contents"}},Ke,gt),ut=y?null:he.FormField({...Xe,iconRight:(x=f.iconRight)!=null?x:"calendar_month",control:yt,getValue:()=>Ke.value,onClear:()=>{o(f.disabled)||o(f.readonly)||(at(d(),null),Ye&&pt())},onFocus:()=>Ke.focus()}),dt=(w,le={})=>{var _e,Fe;const De=le.focusIso||(L==="range"?(w==null?void 0:w.from)||(w==null?void 0:w.to)||be():L==="range-multiple"?((_e=w==null?void 0:w[w.length-1])==null?void 0:_e.from)||((Fe=w==null?void 0:w[w.length-1])==null?void 0:Fe.to)||be():L==="multiple"?(w==null?void 0:w[0])||be():w||be());let Te=G(De);if(le.preserveMonthOffset){const We=Number.isInteger(le.visibleMonthOffset)?le.visibleMonthOffset:lt(le.anchorIso||le.focusIso||De);We>0&&(Te=P(Te,-We))}$e=Te},_t=()=>{gt.replaceChildren();const w=o(f.name);if(!w)return;const le=(De,Te)=>{gt.appendChild(_.input({type:"hidden",name:De,value:Te!=null?Te:""}))},_e=Ae;if(L==="single"){le(w,ee(_e,ke));return}if(L==="range"){le(o(f.nameFrom)||`${w}_from`,(_e==null?void 0:_e.from)||""),le(o(f.nameTo)||`${w}_to`,(_e==null?void 0:_e.to)||"");return}if(L==="range-multiple"){const De=Array.isArray(_e)?_e:[],Te=/\[\]$/.test(o(f.nameFrom)||"")?o(f.nameFrom):`${o(f.nameFrom)||`${w}_from`}[]`,We=/\[\]$/.test(o(f.nameTo)||"")?o(f.nameTo):`${o(f.nameTo)||`${w}_to`}[]`;De.forEach(tt=>{le(Te,(tt==null?void 0:tt.from)||""),le(We,(tt==null?void 0:tt.to)||"")});return}const Fe=/\[\]$/.test(w)?w:`${w}[]`;(Array.isArray(_e)?_e:[]).forEach(De=>le(Fe,De))},ft=()=>{var w;y||(Ke.readOnly=!o(f.manualInput),Ke.disabled=!!o(f.disabled),Ke.setAttribute("aria-expanded",Ye?"true":"false"),Ke.value=fe(Ae,ke),_t(),(w=ut==null?void 0:ut._refresh)==null||w.call(ut))},at=(w,le,_e={})=>{var Fe,De,Te;const We=V(w),tt=se()?it((Fe=Dt(_e.timeValue!=null?_e.timeValue:_e.preserveTime?C():w,R()))!=null?Fe:_e.preserveTime?C():null):null,ct=Se(Ae,ke);Ae=A(We),Le=A(We),se()&&(ke=it(tt),Ee=it(tt)),Re=null,dt(We,_e),ft(),st(),X&&_e.fromModel!==!0&&X.set(ee(We,tt));const St=Se(We,tt);if(_e.emit!==!1&&St!==ct){const wt=ee(We,tt);(De=f.onInput)==null||De.call(f,wt,le),(Te=f.onChange)==null||Te.call(f,wt,le)}return We},ht=(w,le,_e={})=>{var Fe,De;if(!se())return null;const Te=it(Dt(w,R()));if(o(f.confirm)&&_e.commit!==!0)return Ee=Te,st(),Te;const We=Se(Ae,ke);ke=it(Te),Ee=it(Te),ft(),st(),X&&_e.fromModel!==!0&&X.set(ee(Ae,Te));const tt=Se(Ae,Te);if(_e.emit!==!1&&tt!==We){const ct=ee(Ae,Te);(Fe=f.onInput)==null||Fe.call(f,ct,le),(De=f.onChange)==null||De.call(f,ct,le)}return Te},vt=(w,le,_e={})=>{if(o(f.confirm)){Le=A(V(w)),se()&&(_e.timeValue!=null||_e.preserveTime)&&(Ee=it(Dt(_e.timeValue!=null?_e.timeValue:C(),R()))),Re=null,dt(Le,_e),st();return}at(w,le,_e)},tn=()=>{const w=me();if(L==="range")return!(w!=null&&w.from)||w!=null&&w.to||!Re?w:g(w.from,Re)<=0?{from:w.from,to:Re}:{from:Re,to:w.from};if(L==="range-multiple"){const le=Array.isArray(w)&&w.length?w[w.length-1]:null;return!(le!=null&&le.from)||le!=null&&le.to||!Re?le:g(le.from,Re)<=0?{from:le.from,to:Re}:{from:Re,to:le.from}}return w},Lt=()=>{if(L==="range"){const w=tn();return w!=null&&w.from?[w]:[]}if(L==="range-multiple"){const w=Array.isArray(me())?me():[];if(!w.length)return[];const le=tn();return le!=null&&le.from?[...w.slice(0,-1),le]:w}return[]},kt=w=>{const le=me();return L==="multiple"?le.includes(w):L==="range-multiple"?Array.isArray(le)&&le.some(_e=>b(_e==null?void 0:_e.from,w)||b(_e==null?void 0:_e.to,w)):L==="range"?b(le==null?void 0:le.from,w)||b(le==null?void 0:le.to,w):b(le,w)},gn=w=>L!=="range"&&L!=="range-multiple"?!1:Lt().some(le=>(le==null?void 0:le.from)&&(le==null?void 0:le.to)&&w>=le.from&&w<=le.to),Nt=(w,le={})=>{const _e=me(),Fe=L==="range"?_e:L==="range-multiple"&&Array.isArray(_e)&&_e.length?_e[_e.length-1]:null;!(Fe!=null&&Fe.from)||Fe!=null&&Fe.to||Re===w||(Re=w,le.render!==!1&&st())},zt=()=>y||o(f.confirm)||f.closeOnSelect===!1?!1:L==="multiple"||L==="range-multiple"?!!f.closeOnSelect:!0,nn=(w,le,_e={})=>{var Fe;if(!we(w)||o(f.disabled)||o(f.readonly))return;const De={focusIso:w,anchorIso:w,preserveTime:se(),timeValue:C(),preserveMonthOffset:!!Ye&&ve()>1,visibleMonthOffset:Number.isInteger(_e.visibleMonthOffset)?_e.visibleMonthOffset:null};if(L==="multiple"){const Te=$(me()),We=Te.includes(w)?Te.filter(tt=>tt!==w):[...Te,w];vt(We.sort(),le,De),zt()&&pt();return}if(L==="range"){const Te=A(me());let We;!Te.from||Te.from&&Te.to?We={from:w,to:null}:g(w,Te.from)<0?We={from:w,to:Te.from}:We={from:Te.from,to:w},vt(We,le,De),We.to&&zt()&&pt();return}if(L==="range-multiple"){const Te=Ne(me()),We=Te.length?Te[Te.length-1]:null;let tt;!(We!=null&&We.from)||We!=null&&We.to?tt=[...Te,{from:w,to:null}]:g(w,We.from)<0?tt=[...Te.slice(0,-1),{from:w,to:We.from}]:tt=[...Te.slice(0,-1),{from:We.from,to:w}],vt(tt,le,De),(Fe=tt[tt.length-1])!=null&&Fe.to&&zt()&&pt();return}vt(w,le,De),zt()&&pt()},cn=()=>{Me=null,at(d(),null,{timeValue:null})},jn=()=>{const w=h();if(!we(w)){dt(w),st();return}if(L==="range"){const le=m(w,1),_e=le&&we(le)?{from:w,to:le}:{from:w,to:null};vt(_e,null);return}if(L==="range-multiple"){const le=m(w,1),_e=le&&we(le)?[{from:w,to:le}]:[{from:w,to:null}];vt(_e,null);return}if(L==="multiple"){vt([w],null);return}vt(w,null,{preserveTime:se(),timeValue:C()})},Je=(w={})=>{gl(qe,w)},Be=()=>{if(!se())return;const w=Wn(qe);ht(new Date,null,{commit:!o(f.confirm)}),Je({scrollState:w}),!o(f.confirm)&&f.closeOnSelect===!0&&pt()},nt=()=>{o(f.confirm)&&(at(Le,null,{timeValue:Ee,preserveTime:!0}),f.closeOnSelect!==!1&&pt())},st=()=>{var w,le,_e,Fe,De,Te,We,tt,ct,St,wt,Jt,Pt,jt,Et,sn,ln,hn,Xt;if(!qe)return;const Ct=ye(),Jn=new Intl.DateTimeFormat(Ct,{month:"long",year:"numeric"}),En=new Intl.DateTimeFormat(Ct,{weekday:"short"}),Cn=Array.from({length:7},(Ze,ot)=>{const Tt=(Q()+ot)%7;return En.format(new Date(2024,0,7+Tt))}),Rt=me(),Go=Ze=>{let ot=JSswift.ui.renderSlot(M,"point",Ze,null);return ot==null&&(ot=JSswift.ui.renderSlot(M,"dayPoint",Ze,null)),ot==null&&f.pointIcon!=null&&(Ze.selected||Ze.inRange||Ze.today)&&(ot=typeof f.pointIcon=="string"?he.Icon({name:f.pointIcon,size:10}):JSswift.ui.slot(f.pointIcon,Ze)),F(null,"default",Ze,ot)},Ko=(Ze,ot)=>{const Tt=Ze.getFullYear(),xn=Ze.getMonth(),es=new Date(Tt,xn,1),ks=(es.getDay()-Q()+7)%7,Ns=new Date(Tt,xn,1-ks),ts=_.div({class:"jss-date-month"});ts.appendChild(_.div({class:"jss-date-month-title"},Jn.format(es)));const Jl=_.div({class:"jss-date-weekdays"});Cn.forEach(Tn=>Jl.appendChild(_.div({class:"jss-date-weekday"},Tn))),ts.appendChild(Jl);const El=_.div({class:"jss-date-grid"});for(let Tn=0;Tn<42;Tn+=1){const As=new Date(Ns.getFullYear(),Ns.getMonth(),Ns.getDate()+Tn),Ot=S(As),Rl=As.getMonth()===xn,Tl=kt(Ot),Ol=gn(Ot),Ml=(L==="range"||L==="range-multiple")&&Lt().some(Vt=>b(Vt==null?void 0:Vt.from,Ot)),Fl=(L==="range"||L==="range-multiple")&&Lt().some(Vt=>b(Vt==null?void 0:Vt.to,Ot)),Ls=!we(Ot),Is={...Ie(Ot),selected:Tl,inRange:Ol,rangeStart:Ml,rangeEnd:Fl,disabled:Ls,outside:!Rl,value:Rt,select:()=>nn(Ot,null,{visibleMonthOffset:ot})},zs=Go(Is),ri=JSswift.ui.renderSlot(M,"day",Is,String(As.getDate())),ci=F(null,"default",Is,ri),ui=_.button({type:"button",class:oe(["jss-date-day",pe(!Rl,"is-outside"),pe(Tl,"is-selected"),pe(Ol,"is-in-range"),pe(Ml,"is-range-start"),pe(Fl,"is-range-end"),pe(Ls,"is-disabled"),pe(b(Ot,h()),"is-today"),pe(zs.length,"has-point")]),disabled:Ls,onMouseDown:Vt=>{Vt.button===0&&(Me=Ot,Vt.preventDefault(),nn(Ot,Vt,{visibleMonthOffset:ot}))},onClick:Vt=>{if(Me!=null&&Vt.detail!==0){Me=null;return}Me=null,nn(Ot,Vt,{visibleMonthOffset:ot})},onMouseEnter:()=>Nt(Ot),onFocus:()=>Nt(Ot,{render:!1})},_.span({class:"jss-date-day-label"},...ci),zs.length?_.span({class:"jss-date-day-point"},...zs):null);El.appendChild(ui)}return ts.appendChild(El),ts},Cs=Y(),xs=ge(),Rn=[$e.getFullYear(),(w=I(h()))==null?void 0:w.getFullYear(),(le=I(Cs))==null?void 0:le.getFullYear(),(_e=I(xs))==null?void 0:_e.getFullYear(),(Fe=I(o(f.defaultMonth)))==null?void 0:Fe.getFullYear()];L==="range"?Rn.push((De=I(Rt==null?void 0:Rt.from))==null?void 0:De.getFullYear(),(Te=I(Rt==null?void 0:Rt.to))==null?void 0:Te.getFullYear()):L==="range-multiple"?Rt.forEach(Ze=>{var ot,Tt;Rn.push((ot=I(Ze==null?void 0:Ze.from))==null?void 0:ot.getFullYear(),(Tt=I(Ze==null?void 0:Ze.to))==null?void 0:Tt.getFullYear())}):L==="multiple"?Rt.forEach(Ze=>{var ot;return Rn.push((ot=I(Ze))==null?void 0:ot.getFullYear())}):Rn.push((We=I(Rt))==null?void 0:We.getFullYear());const Zn=Rn.filter(Ze=>Number.isFinite(Ze)),Yo=(Zn.length?Math.min(...Zn):$e.getFullYear())-100,qo=(Zn.length?Math.max(...Zn):$e.getFullYear())+50,Nl=Number(o((St=(ct=f.yearStart)!=null?ct:Cs?(tt=I(Cs))==null?void 0:tt.getFullYear():null)!=null?St:Yo)),Xo=Number(o((Pt=(Jt=f.yearEnd)!=null?Jt:xs?(wt=I(xs))==null?void 0:wt.getFullYear():null)!=null?Pt:qo)),Qo=_.select({class:"jss-date-select",value:String($e.getMonth()),onChange:Ze=>{var ot;$e=new Date($e.getFullYear(),Number(Ze.currentTarget.value),1),(ot=f.onNavigate)==null||ot.call(f,{month:$e.getMonth()+1,year:$e.getFullYear()}),st()}},...Array.from({length:12},(Ze,ot)=>ds({value:String(ot)},new Intl.DateTimeFormat(Ct,{month:"long"}).format(new Date(2024,ot,1))))),Zo=_.select({class:"jss-date-select jss-date-select-year",value:String($e.getFullYear()),onChange:Ze=>{var ot;$e=new Date(Number(Ze.currentTarget.value),$e.getMonth(),1),(ot=f.onNavigate)==null||ot.call(f,{month:$e.getMonth()+1,year:$e.getFullYear()}),st()}},...Array.from({length:Math.max(1,Xo-Nl+1)},(Ze,ot)=>{const Tt=Nl+ot;return ds({value:String(Tt)},String(Tt))})),ei=_.div({class:"jss-date-header"},_.button({type:"button",class:"jss-date-nav",onClick:()=>{var Ze;$e=P($e,-1),(Ze=f.onNavigate)==null||Ze.call(f,{month:$e.getMonth()+1,year:$e.getFullYear()}),st()}},he.Icon({name:"chevron_left",size:16})),_.div({class:"jss-date-header-center"},Qo,Zo),_.button({type:"button",class:"jss-date-nav",onClick:()=>{var Ze;$e=P($e,1),(Ze=f.onNavigate)==null||Ze.call(f,{month:$e.getMonth()+1,year:$e.getFullYear()}),st()}},he.Icon({name:"chevron_right",size:16}))),Al=_.div({class:"jss-date-shortcuts"}),Ll=o((jt=f.shortcuts)!=null?jt:f.presets)||[];Ll.forEach((Ze,ot)=>{var Tt,xn;if(!Ze)return;const es=typeof Ze.value=="function"?Ze.value({today:h()}):Ze.value,ks=(xn=(Tt=Ze.label)!=null?Tt:Ze.text)!=null?xn:`Preset ${ot+1}`;Al.appendChild(_.button({type:"button",class:"jss-date-shortcut",onClick:()=>vt(es,null,{preserveTime:se(),timeValue:C()})},ks))});const Il=_.div({class:"jss-date-months"});for(let Ze=0;Ze<ve();Ze+=1)Il.appendChild(Ko(P($e,Ze),Ze));const zl=fe(Rt,C()),ti=_.div({class:"jss-date-value"},...F(M,"value",{value:Rt,displayValue:zl,mode:L,timeValue:C()},zl||F(M,"default",{},B))),Pl=_.div({class:"jss-time-header"}),ni=_.div({class:"jss-time-columns-2"},_.div({class:"jss-time-column-title"},o(f.hoursLabel)||"Ore"),_.div({class:"jss-time-column-title"},o(f.minutesLabel)||"Min"));Pl.appendChild(ni);const si=se()?pl({props:{min:o((Et=f.timeMin)!=null?Et:f.minTime),max:o((sn=f.timeMax)!=null?sn:f.maxTime),use12h:o((hn=(ln=f.time12h)!=null?ln:f.use12h)!=null?hn:f.ampm),hoursLabel:o(f.timeHoursLabel)||"Ore",minutesLabel:o(f.timeMinutesLabel)||"Min",secondsLabel:o(f.timeSecondsLabel)||"Sec"},slots:M,slotPrefix:"time",value:C(),withSeconds:!1,minuteStep:1,secondStep:re(),disabled:!!o(f.disabled),readonly:!!o(f.readonly),embedded:!0,pointIcon:o(f.timePointIcon),shortcuts:o((Xt=f.timeShortcuts)!=null?Xt:f.timePresets),onSelect:Ze=>{const ot=Wn(qe);ht(Ze,null),Je({scrollState:ot})}}):null,li=_.div({class:"jss-date-footer-info"},ti),oi=_.div({class:oe(["jss-date-footer",pe(se(),"has-time")])},li,_.div({class:"jss-date-actions"},_.button({type:"button",class:"jss-date-action",onClick:jn},o(f.todayLabel)||"Oggi"),o(f.clearable)!==!1?_.button({type:"button",class:"jss-date-action",onClick:cn},o(f.clearLabel)||"Reset"):null,o(f.confirm)?_.button({type:"button",class:"jss-date-action is-primary",onClick:nt},o(f.applyLabel)||"Applica"):null)),ii=_.div(_.button({type:"button",class:"jss-date-action jss-w-lg",onClick:Be},o(f.nowLabel)||"Ora")),ai=se()?_.div({class:"jss-date-time"},Pl,si,ii):null;qe.replaceChildren(_.div({class:"jss-date-panel-root",onKeydown:Ze=>{var ot;Ze.key==="Escape"&&(Ze.preventDefault(),y?(ot=f.onEscape)==null||ot.call(f,Ze):pt())}},ei,Ll.length?Al:null,_.div({class:"jss-data-time"},Il,ai),oi))};function mt(){var w,le,_e,Fe;return Ye||o(f.disabled)||o(f.readonly)||(Le=A(Ae),Ee=it(ke),Re=null,Me=null,dt(Le),Ye=JSswift.overlay.open(({close:De})=>{var Te;const We=L==="range"||L==="range-multiple"?2:1,tt=Number((Te=o(f.monthsToShow))!=null?Te:We);return qe=_.div({class:Ht(["jss-date-panel",o(D),pe(tt>1,"multi-month"),f.panelClass])}),st(),qe},{type:"date",anchorEl:ut._control||Ke,placement:f.placement||"bottom-start",offsetX:(w=f.offsetX)!=null?w:0,offsetY:(_e=(le=f.offsetY)!=null?le:f.offset)!=null?_e:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:f.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Ht(["jss-date-overlay",f.panelClass,pe(se(),"has-time")]),onClose:()=>{var De;Ye=null,qe=null,Re=null,ft(),(De=f.onClose)==null||De.call(f)}}),f.panelStyle&&Object.assign(Ye.panel.style,f.panelStyle),wn(Ye),ft(),(Fe=f.onOpen)==null||Fe.call(f)),Ye}function pt(){if(!Ye)return;Me=null;const w=Ye;_n(w,()=>JSswift.overlay.close(w.id))}if(y){const w=L==="range"||L==="range-multiple"?2:1,le=Number((k=o(f.monthsToShow))!=null?k:w);qe=_.div({class:Ht(["jss-date-panel","jss-date-calendar",o(D),pe(le>1,"multi-month"),f.panelClass,f.class]),style:f.style})}return y||Ke.addEventListener("focus",w=>{var le;(le=f.onFocus)==null||le.call(f,w),f.openOnFocus!==!1&&mt()}),y||Ke.addEventListener("click",w=>{var le;(le=f.onClick)==null||le.call(f,w),mt()}),y||Ke.addEventListener("keydown",w=>{if(w.key==="Escape"){Ye&&(w.preventDefault(),pt());return}(w.key==="ArrowDown"||w.key==="Enter"||w.key===" ")&&(w.preventDefault(),mt()),(w.key==="Backspace"||w.key==="Delete")&&!o(f.manualInput)&&o(f.clearable)!==!1&&(w.preventDefault(),cn())}),!y&&o(f.manualInput)?(Ke.addEventListener("input",w=>{var le;(le=f.onTyping)==null||le.call(f,Ke.value,w)}),Ke.addEventListener("change",w=>{const le=O(Ke.value);at(le,w,{timeValue:Dt(Ke.value,R()),preserveTime:!Dt(Ke.value,R())})}),Ke.addEventListener("blur",w=>{var le;(le=f.onBlur)==null||le.call(f,w);const _e=O(Ke.value);Ke.value===""?cn():at(_e,w,{timeValue:Dt(Ke.value,R()),preserveTime:!Dt(Ke.value,R())})})):y||Ke.addEventListener("blur",w=>{var le;return(le=f.onBlur)==null?void 0:le.call(f,w)}),X&&X.watch(w=>{const le=V(w),_e=p(w);Se(le,_e)!==Se(Ae,ke)&&(Ae=le,Le=A(Ae),ke=it(_e),Ee=it(_e),Re=null,dt(Ae),ft(),st())},y?"UI.Calendar:watch":"UI.Datepicker:watch"),JSswift.reactive.effect(()=>{!X&&f.value!=null?(Ae=V(o(f.value)),Le=A(Ae),ke=p(o(f.value)),Ee=it(ke)):se()&&f.timeValue!=null&&(ke=p(o(f.timeValue)),Ee=it(ke)),ft(),st(),Ye&&o(f.disabled)&&pt()},y?"UI.Calendar:render":"UI.Datepicker:render"),y?(qe._calendar=qe,qe._date=qe,qe._getValue=()=>ee(Ae,ke),qe._setValue=w=>at(w,null,{emit:!1,timeValue:p(w)}),qe._clear=cn,qe._select=w=>{const le=ue(w);le&&nn(le,null)},qe._time=()=>it(ke),qe):(ut._input=Ke,ut._date=Ke,ut._open=mt,ut._close=pt,ut._getValue=()=>ee(Ae,ke),ut._setValue=w=>at(w,null,{emit:!1,timeValue:p(w)}),ut._time=()=>it(ke),ut._panel=()=>(Ye==null?void 0:Ye.panel)||null,ut)};he.Datepicker=(...e)=>hl(e),he.Calendar=(...e)=>hl(e,{calendar:!0}),he.Date=he.Datepicker,JSswift.ui.Datepicker=he.Datepicker,JSswift.ui.Calendar=he.Calendar,JSswift.ui.Date=he.Date,he.Time=(...e)=>{var t,s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(e),c=n.slots||{},r=et(n.size,()=>{const g=String(o(n.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(g)?`jss-size-${g}`:""}),v=()=>{var g,J,W,H,de;const E=en(Dt(x?x.get():(g=o(n.value))!=null?g:k,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!o((J=n.withSeconds)!=null?J:n.showSeconds)||/:\d{2}:\d{2}$/.test(E),min:o((W=n.min)!=null?W:n.minTime),max:o((H=n.max)!=null?H:n.maxTime),use12h:o((de=n.use12h)!=null?de:n.ampm)}},a=()=>{var g;const J=Number(o((g=n.minuteStep)!=null?g:1));return Math.max(1,Math.min(30,Number.isFinite(J)?J:5))},z=()=>{var g;const J=Number(o((g=n.secondStep)!=null?g:1));return Math.max(1,Math.min(30,Number.isFinite(J)?J:5))},u=n.model||(It(n.value)||Mt(n.value)?n.value:null),x=At(u,"UI.Time:model"),k=x?x.get():o(n.value),f=g=>Dt(g,v()),B=g=>Hn(g,v()),y=g=>en(g,v()),M=g=>JSON.stringify(y(g));let D=it(f(k)),q=it(D),L=null,ce=null;const X={...n,label:(t=n.label)!=null?t:n.placeholder},Z=X.label!=null||JSswift.ui.getSlot(c,"label")!=null,ie=_.input({class:oe(["jss-input","jss-time-display",r,pe(n.manualInput,"is-manual"),n.inputClass]),type:"text",autocomplete:"off",placeholder:Z?"":(s=n.placeholder)!=null?s:"Seleziona orario",readOnly:!o(n.manualInput),disabled:!!o(n.disabled),value:B(D)});ie.setAttribute("aria-haspopup","dialog");const te=_.div({style:{display:"contents"}}),se=_.div({class:"jss-time-control",style:{display:"contents"}},ie,te),R=he.FormField({...X,iconRight:(l=n.iconRight)!=null?l:"schedule",control:se,getValue:()=>ie.value,onClear:()=>{o(n.disabled)||o(n.readonly)||(K(null,null,{commit:!0}),L&&b())},onFocus:()=>ie.focus()}),ae=()=>o(n.confirm)?q:D,re=()=>{te.replaceChildren();const g=o(n.name);g&&te.appendChild(_.input({type:"hidden",name:g,value:y(D)}))},ne=()=>{var g;ie.readOnly=!o(n.manualInput),ie.disabled=!!o(n.disabled),ie.setAttribute("aria-expanded",L?"true":"false"),ie.value=B(D),re(),(g=R._refresh)==null||g.call(R)},K=(g,J,W={})=>{var H,de;const E=it(f(g));if(o(n.confirm)&&W.commit!==!0)return q=it(E),G(),E;const N=M(D);D=it(E),q=it(E),ne(),G(),x&&W.fromModel!==!0&&x.set(y(E));const A=M(E);if(W.emit!==!1&&A!==N){const T=y(E);(H=n.onInput)==null||H.call(n,T,J),(de=n.onChange)==null||de.call(n,T,J)}return E},S=g=>o(n.confirm)||n.closeOnSelect!==!0?!1:v().withSeconds?(g==null?void 0:g.part)==="second":(g==null?void 0:g.part)==="minute",I=(g={})=>{gl(ce,g)},m=()=>{const g=Wn(ce);K(new Date,null,{commit:!o(n.confirm)}),I({scrollState:g}),!o(n.confirm)&&n.closeOnSelect===!0&&b()},P=()=>{o(n.confirm)&&(K(q,null,{commit:!0}),n.closeOnSelect!==!1&&b())},G=()=>{var g,J,W,H;if(!ce)return;const de=ae(),E=B(de),N=_.div({class:"jss-time-header"}),A=_.div({class:"jss-time-columns"},_.div({class:"jss-time-column-title"},o(n.hoursLabel)||"Ore"),_.div({class:"jss-time-column-title"},o(n.minutesLabel)||"Min")),T=v().withSeconds;T&&A.appendChild(_.div({class:"jss-time-column-title"},o(n.secondsLabel)||"Sec")),N.appendChild(A);const U=pl({props:{min:o((g=n.min)!=null?g:n.minTime),max:o((J=n.max)!=null?J:n.maxTime),use12h:o((W=n.use12h)!=null?W:n.ampm),hoursLabel:o(n.hoursLabel)||"Ore",minutesLabel:o(n.minutesLabel)||"Min",secondsLabel:o(n.secondsLabel)||"Sec"},slots:c,value:de,withSeconds:T,minuteStep:a(),secondStep:z(),disabled:!!o(n.disabled),readonly:!!o(n.readonly),pointIcon:o(n.pointIcon),shortcuts:o((H=n.shortcuts)!=null?H:n.presets),onSelect:(xe,Ne)=>{const $=Wn(ce);K(xe,null),I({scrollState:$}),S(Ne)&&b()}}),ue=_.div({class:"jss-time-footer"},_.div({class:"jss-time-value"},...F(c,"value",{value:de,displayValue:E},E||F(c,"default",{},i))),_.div({class:"jss-time-actions"},_.button({type:"button",class:"jss-time-action",onClick:m},o(n.nowLabel)||"Ora"),o(n.clearable)!==!1?_.button({type:"button",class:"jss-time-action",onClick:()=>K(null,null,{commit:!o(n.confirm)})},o(n.clearLabel)||"Reset"):null,o(n.confirm)?_.button({type:"button",class:"jss-time-action is-primary",onClick:P},o(n.applyLabel)||"Applica"):null));ce.replaceChildren(_.div({class:"jss-time-panel-root",onKeydown:xe=>{xe.key==="Escape"&&(xe.preventDefault(),b())}},N,U,ue))};function h(){var g,J,W,H;return L||o(n.disabled)||o(n.readonly)||(q=it(D),L=JSswift.overlay.open(()=>(ce=_.div({class:Ht(["jss-time-panel",o(r),n.panelClass])}),G(),ce),{type:"time",anchorEl:R._control||ie,placement:n.placement||"bottom-start",offsetX:(g=n.offsetX)!=null?g:0,offsetY:(W=(J=n.offsetY)!=null?J:n.offset)!=null?W:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:n.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Ht(["jss-time-overlay",n.panelClass]),onClose:()=>{var de;L=null,ce=null,ne(),(de=n.onClose)==null||de.call(n)}}),n.panelStyle&&Object.assign(L.panel.style,n.panelStyle),wn(L),I(),ne(),(H=n.onOpen)==null||H.call(n)),L}function b(){if(!L)return;const g=L;_n(g,()=>JSswift.overlay.close(g.id))}return ie.addEventListener("focus",g=>{var J;(J=n.onFocus)==null||J.call(n,g),n.openOnFocus!==!1&&h()}),ie.addEventListener("click",g=>{var J;(J=n.onClick)==null||J.call(n,g),h()}),ie.addEventListener("keydown",g=>{if(g.key==="Escape"){L&&(g.preventDefault(),b());return}(g.key==="ArrowDown"||g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h()),(g.key==="Backspace"||g.key==="Delete")&&!o(n.manualInput)&&o(n.clearable)!==!1&&(g.preventDefault(),K(null,g,{commit:!0}))}),o(n.manualInput)?(ie.addEventListener("input",g=>{var J;return(J=n.onTyping)==null?void 0:J.call(n,ie.value,g)}),ie.addEventListener("change",g=>K(ie.value,g)),ie.addEventListener("blur",g=>{var J;(J=n.onBlur)==null||J.call(n,g),ie.value===""?K(null,g):K(ie.value,g)})):ie.addEventListener("blur",g=>{var J;return(J=n.onBlur)==null?void 0:J.call(n,g)}),x&&x.watch(g=>{const J=it(f(g));M(J)!==M(D)&&(D=it(J),q=it(J),ne(),G())},"UI.Time:watch"),JSswift.reactive.effect(()=>{!x&&n.value!=null&&(D=it(f(o(n.value))),q=it(D)),ne(),G(),L&&o(n.disabled)&&b()},"UI.Time:render"),R._input=ie,R._time=ie,R._open=h,R._close=b,R._getValue=()=>y(D),R._setValue=g=>K(g,null,{emit:!1,commit:!0}),R._panel=()=>(L==null?void 0:L.panel)||null,R},he.Tabs=(...e)=>{var t,s,l,n,i,c;const{props:r,children:v}=JSswift.uiNormalizeArgs(e),a=r.slots||{},z=($,V)=>!!$&&Object.prototype.hasOwnProperty.call($,V),u=$=>String(o($)||"horizontal").toLowerCase()==="vertical"?"vertical":"horizontal",x=$=>{const V=String(o($)||"").toLowerCase();return V==="pills"||V==="pill"?"pills":V==="soft"||V==="card"?"soft":"line"},k=$=>{var V;const Y=o($);return Y==null||Y===""?null:(V=JSswift.uiColors)!=null&&V.includes(Y)?`var(--jss-${Y})`:String(Y)},f=($,V)=>Object.is($,V)||$!=null&&V!=null&&$==V,B=At(r.model,"UI.Tabs:model"),y=u(r.orientation||r.orient||r.direction),M=x(r.variant||(r.pills?"pills":r.soft?"soft":"line")),D=!!o((s=(t=r.fill)!=null?t:r.navFill)!=null?s:r.stretch),q=!!o(r.wrap),L=!!o(r.disabled),ce=r.id||"jss-tabs-"+Math.random().toString(36).slice(2,9),X=o((l=r.tabs)!=null?l:r.items)||[],Z=(Array.isArray(X)?X:[X]).map(($,V)=>{var Y,ge,ye,Q,ve,be,me,Ie,Oe,we,j,fe,je,O;if($==null)return null;if(typeof $!="object")return{raw:$,index:V,value:$,labelFallback:$,noteFallback:null,iconFallback:null,badgeFallback:null,disabled:!1,hidden:!1};const d=(be=(ve=(Q=(ye=(ge=(Y=$.value)!=null?Y:$.name)!=null?ge:$.id)!=null?ye:$.key)!=null?Q:$.label)!=null?ve:$.title)!=null?be:`tab-${V}`,p=(we=(Oe=(Ie=(me=$.label)!=null?me:$.title)!=null?Ie:$.name)!=null?Oe:$.value)!=null?we:`Tab ${V+1}`,C=z($,"badge")?$.badge:z($,"counter")?$.counter:null;return{...$,raw:$,index:V,value:d,labelFallback:p,noteFallback:(je=(fe=(j=$.note)!=null?j:$.subtitle)!=null?fe:$.description)!=null?je:null,iconFallback:(O=$.icon)!=null?O:null,badgeFallback:C}}).filter(Boolean).filter($=>$.hidden!==!0&&$.visible!==!1),ie=Z.find($=>!$.disabled)||null,te=$=>Z.findIndex(V=>f(V.value,$)),se=($,V)=>{var Y;if(!Z.length)return-1;let ge=$;for(let ye=0;ye<Z.length;ye+=1)if(ge+=V,ge<0?ge=Z.length-1:ge>=Z.length&&(ge=0),!((Y=Z[ge])!=null&&Y.disabled))return ge;return-1},R=($,V=!1)=>{var Y,ge;const ye=te($);return ye>=0&&!((Y=Z[ye])!=null&&Y.disabled)?Z[ye].value:V?(ge=ie==null?void 0:ie.value)!=null?ge:null:$!=null?$:null},ae=R(B?B.get():z(r,"value")?o(r.value):(n=r.defaultValue)!=null?n:r.default,!0),[re,ne]=JSswift.reactive.signal(ae),K=oe(["jss-clear-set","jss-tabs","jss-singularity",y,`variant-${M}`,pe(r.dense,"dense"),pe(D,"fill"),pe(q,"wrap"),pe(L,"disabled"),r.class]),S=JSswift.omit(r,["tabs","items","value","defaultValue","default","model","orientation","orient","direction","variant","pills","soft","fill","navFill","stretch","wrap","dense","disabled","slots","empty","gap","tabGap","align","justify","color","state","navClass","navStyle","barClass","barStyle","tabClass","tabStyle","itemClass","itemStyle","class","style"]);S.class=K,S.style={...r.style||{}},r.gap!=null&&(S.style["--jss-tabs-gap"]=He(r.gap)),r.tabGap!=null&&(S.style["--jss-tabs-tab-gap"]=He(r.tabGap));const I=k((i=r.color)!=null?i:r.state);I&&(S.style["--jss-tabs-accent"]=I);const m=_.div(S),P=_.div({class:oe(["jss-tabs-bar",r.barClass]),style:{alignItems:r.align||(y==="vertical"?"stretch":"center"),justifyContent:r.justify||"flex-start",...r.barStyle||{}}}),G=_.div({class:oe(["jss-tabs-nav",r.navClass]),style:r.navStyle||null,role:"tablist","aria-orientation":y}),h=[],b=()=>te(re()),g=()=>{const $=b();return $>=0?Z[$]:null},J=()=>({tabs:Z,value:re(),active:re(),activeIndex:b(),activeTab:g(),orientation:y,variant:M,select:($,V)=>N($,{event:V,emit:!0}),next:()=>T(),prev:()=>U()}),W=($,V,Y)=>({...J(),tab:$,index:V,active:Y,disabled:!!$.disabled,select:ge=>A(V,{event:ge,emit:!0})}),H=$=>{var V;const Y=(V=h[$])==null?void 0:V.btn;!Y||typeof Y.focus!="function"||requestAnimationFrame(()=>Y.focus())},de=$=>{const V=te($);m.dataset.value=$==null?"":String($),m.dataset.activeIndex=V>=0?String(V):"",h.forEach(({btn:Y,item:ge,tab:ye,index:Q})=>{const ve=Q===V;ge.classList.toggle("active",ve),ge.classList.toggle("disabled",!!(ye.disabled||L)),Y.classList.toggle("active",ve),Y.setAttribute("aria-selected",ve?"true":"false"),Y.setAttribute("tabindex",ve?"0":"-1")})},E=$=>{ne($),de($)},N=($,V={})=>{if(L)return null;const Y=te($);return Y<0?null:A(Y,V)},A=($,V={})=>{var Y,ge;const ye=Z[$];if(!ye||ye.disabled||L)return null;const Q=ye.value,ve=re(),be=!f(ve,Q);return E(Q),B&&!f(B.get(),Q)&&B.set(Q),V.focus&&H($),V.event&&((Y=ye.onClick)==null||Y.call(ye,Q,V.event,ye,$)),be&&V.emit!==!1&&((ge=r.onChange)==null||ge.call(r,Q,ye,V.event||null,$)),ye},T=()=>{const $=se(b()<0?-1:b(),1);$>=0&&A($,{emit:!0,focus:!0})},U=()=>{const $=b()<0?0:b(),V=se($,-1);V>=0&&A(V,{emit:!0,focus:!0})},ue=($,V)=>{var Y,ge,ye,Q,ve,be;const me=V===b(),Ie=W($,V,me),Oe=`${ce}-tab-${V}`,we=$.iconFallback!=null?typeof $.iconFallback=="string"?he.Icon({name:$.iconFallback,size:(ye=(ge=(Y=$.iconSize)!=null?Y:$.size)!=null?ge:r.size)!=null?ye:null}):$.iconFallback:null,j=F(a,"icon",Ie,we),fe=F(null,"default",{},JSswift.ui.renderSlot(a,"label",Ie,$.labelFallback)),je=F(a,"note",Ie,$.noteFallback),O=F(a,"badge",Ie,$.badgeFallback),d=_.span({class:"jss-tabs-tab-inner"},j.length?_.span({class:"jss-tabs-tab-icon"},...j):null,_.span({class:"jss-tabs-tab-copy"},_.span({class:"jss-tabs-tab-label"},...fe.length?fe:[""]),je.length?_.span({class:"jss-tabs-tab-note"},...je):null),O.length?_.span({class:"jss-tabs-tab-badge"},...O):null),p=F(a,"tab",{...Ie,tabId:Oe,label:fe,icon:j,note:je,badge:O},d),C=Ae=>{var Le;if($.disabled||L)return;const ke=Ae.key;if(ke==="Enter"||ke===" "){Ae.preventDefault(),A(V,{event:Ae,emit:!0});return}if(ke==="Home"){Ae.preventDefault();const Me=Z.findIndex($e=>!$e.disabled);Me>=0&&A(Me,{event:Ae,emit:!0,focus:!0});return}if(ke==="End"){Ae.preventDefault();let Me=-1;for(let $e=Z.length-1;$e>=0;$e-=1)if(!((Le=Z[$e])!=null&&Le.disabled)){Me=$e;break}Me>=0&&A(Me,{event:Ae,emit:!0,focus:!0});return}const Ee=y==="vertical"?["ArrowUp"]:["ArrowLeft"],Re=y==="vertical"?["ArrowDown"]:["ArrowRight"];if(Ee.includes(ke)){Ae.preventDefault();const Me=se(V,-1);Me>=0&&A(Me,{event:Ae,emit:!0,focus:!0});return}if(Re.includes(ke)){Ae.preventDefault();const Me=se(V,1);Me>=0&&A(Me,{event:Ae,emit:!0,focus:!0})}},ee=k((Q=$.color)!=null?Q:$.state),Se=_.div({class:oe(["jss-tabs-item",pe(me,"active"),pe($.disabled||L,"disabled"),r.itemClass,$.itemClass]),style:{...ee?{"--jss-tabs-item-accent":ee}:{},...r.itemStyle||{},...$.itemStyle||{}},"data-name":String($.value)}),Ce=he.Btn({class:oe(["jss-tabs-tab",pe(me,"active"),pe($.disabled||L,"disabled"),r.tabClass,$.tabClass||$.class]),type:"button",id:Oe,role:"tab",disabled:!!($.disabled||L),"aria-selected":me?"true":"false",tabindex:me?"0":"-1",size:(be=(ve=$.size)!=null?ve:r.size)!=null?be:null,style:{...r.tabStyle||{},...$.tabStyle||{}},onClick:Ae=>{A(V,{event:Ae,emit:!0})},onKeydown:C},...p);return Se.appendChild(Ce),Se.appendChild(_.span({class:"tab-indicator"})),h[V]={tab:$,index:V,item:Se,btn:Ce},Se};if(Z.length){const $=Z.map((Y,ge)=>ue(Y,ge)),V=JSswift.ui.renderSlot(a,"nav",{...J(),nodes:$},$);F(null,"default",{},V).forEach(Y=>G.appendChild(Y))}else F(a,"empty",J(),(c=r.empty)!=null?c:_.div({class:"jss-tabs-empty"},"Nessuna tab disponibile.")).forEach($=>G.appendChild($));const xe=J(),Ne=[...F(null,"default",{},JSswift.ui.renderSlot(a,"extra",xe,null)),...F(a,"default",xe,v)];return P.appendChild(G),Ne.length&&P.appendChild(_.div({class:"jss-tabs-extra"},...Ne)),m.appendChild(P),E(ae),B?B.watch($=>{E(R($,!0))},"UI.Tabs:watch"):rt(r.value)&&Ue.reactive.effect(()=>{E(R(o(r.value),!0))},"UI.Tabs:value"),m._getValue=()=>re(),m._setValue=$=>N($,{emit:!0}),m._select=$=>N($,{emit:!0}),m._next=()=>T(),m._prev=()=>U(),m._getTabs=()=>Z.slice(),Qe(m,r),m},he.RouteTab=(...e)=>{var t,s,l,n,i,c,r,v,a,z,u,x,k,f,B;const{props:y,children:M}=JSswift.uiNormalizeArgs(e),D=y.slots||{},q=JSswift.router||(Ue==null?void 0:Ue.router)||null,L=Ne=>Object.prototype.hasOwnProperty.call(y,Ne),ce=L("active")||L("selected"),X=Ne=>{const $=String(o(Ne)||"").toLowerCase();return $==="pill"||$==="pills"?"pills":$==="soft"||$==="card"?"soft":"line"},Z=Ne=>{var $;const V=o(Ne);return V==null||V===""?null:($=JSswift.uiColors)!=null&&$.includes(V)?`var(--jss-${V})`:String(V)},ie=Ne=>{if(Ne==null||Ne==="")return"";try{return new URL(String(Ne),window.location.origin).pathname||""}catch($){return String(Ne).split(/[?#]/)[0]||""}},te=Ne=>o(y.external)===!0?!0:Ne?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(Ne)):!1,se=()=>{var Ne;return o((Ne=y.href)!=null?Ne:y.to)||"#"},R=()=>{var Ne;return o((Ne=y.to)!=null?Ne:y.href)||""},ae=()=>{try{if(q!=null&&q.current)return q.current().pathname||window.location.pathname||""}catch(Ne){}return window.location.pathname||""},re=()=>{var Ne,$,V;const Y=R();if(!Y)return!1;const ge=o(($=(Ne=y.match)!=null?Ne:y.activeMatch)!=null?$:y.routeMatch),ye=String(o((V=y.matchMode)!=null?V:y.startsWith?"startsWith":y.exact?"exact":"")||"").toLowerCase(),Q=ae();if(typeof ge=="function")return!!ge({currentPath:Q,to:Y,href:se(),router:q,props:y});if(ge instanceof RegExp)return ge.test(Q);const ve=ie(typeof ge=="string"&&!["exact","startsWith","prefix","section"].includes(ge.toLowerCase())?ge:Y);if(!ve)return!1;const be=ye||(typeof ge=="string"&&["startsWith","prefix","section"].includes(ge.toLowerCase())?"startsWith":"exact");return be==="startswith"||be==="prefix"||be==="section"?Q===ve||Q.startsWith(`${ve}/`):q!=null&&q.isActive?!!q.isActive(Y):Q===ve},ne=()=>!!o(y.disabled);let K=null;const S=()=>{var Ne;return K!=null?!!K:ce?!!o((Ne=y.active)!=null?Ne:y.selected):re()},I=X(y.variant||(y.pills?"pills":y.soft?"soft":"line")),m=!o(y.color)&&o(y.state)?bt(o(y.state)):"",P=m?`jss-state-${m}`:"",G=JSswift.omit(y,["active","selected","label","title","text","to","icon","iconRight","iconSize","note","subtitle","caption","description","badge","counter","count","aside","trailing","slots","state","color","dense","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","variant","pills","soft","block","fill","match","matchMode","activeMatch","routeMatch","exact","startsWith","external","onNavigate"]);G.href=se(),G.class=oe(["jss-route-tab","jss-clear-set","jss-singularity",`variant-${I}`,pe((t=y.block)!=null?t:y.fill,"block"),pe(y.dense,"dense"),P,y.class]),G.style={...y.style||{}};const h=Z((s=y.color)!=null?s:y.state);h&&(G.style["--jss-route-tab-accent"]=h);const b=(n=(l=y.iconSize)!=null?l:y.size)!=null?n:null,g=(Ne,$)=>{const V=o(Ne);return V==null||V===!1||V===""?null:typeof V=="string"?he.Icon({name:V,size:b}):JSswift.ui.slot(V,{as:$})},J=()=>({active:S(),disabled:ne(),href:se(),to:R(),external:te(se()),navigate:Ne=>{var $,V;if(ne())return!1;const Y=R();return!te(se())&&Y&&(q!=null&&q.navigate)?(Ne!=null&&Ne.preventDefault&&Ne.preventDefault(),q.navigate(Y),($=y.onNavigate)==null||$.call(y,Y,Ne||null),!0):((V=y.onNavigate)==null||V.call(y,Y||se(),Ne||null),!1)}}),W=F(D,"icon",J(),g(y.icon,"icon")),H=F(D,"label",J(),(r=(c=(i=y.label)!=null?i:y.title)!=null?c:y.text)!=null?r:M),de=F(D,"note",J(),(z=(a=(v=y.note)!=null?v:y.subtitle)!=null?a:y.caption)!=null?z:y.description),E=F(D,"badge",J(),(x=(u=y.badge)!=null?u:y.counter)!=null?x:y.count),N=F(D,"aside",J(),(f=(k=y.aside)!=null?k:y.trailing)!=null?f:g(y.iconRight,"iconRight")),A=F(D,"default",J(),(B=y.content)!=null?B:y.body),T=_.span({class:"jss-route-tab-inner"},W.length?_.span({class:"jss-route-tab-icon"},...W):null,_.span({class:"jss-route-tab-copy"},_.span({class:"jss-route-tab-label"},...H.length?H:[R()||se()||""]),de.length?_.span({class:"jss-route-tab-note"},...de):null,A.length?_.span({class:"jss-route-tab-extra"},...A):null),E.length?_.span({class:"jss-route-tab-badge"},...E):null,N.length?_.span({class:"jss-route-tab-aside"},...N):null),U=_.a(G,T);Qe(U,y);const ue=()=>{const Ne=S(),$=ne(),V=se(),Y=te(V);U.classList.toggle("active",Ne),U.classList.toggle("is-disabled",$),U.classList.toggle("is-external",Y),Ne?U.setAttribute("aria-current",String(o(y.ariaCurrent)||"page")):U.removeAttribute("aria-current"),U.setAttribute("href",V||"#"),$?(U.setAttribute("aria-disabled","true"),U.tabIndex=-1):(U.removeAttribute("aria-disabled"),!L("tabIndex")&&!L("tabindex")&&U.removeAttribute("tabindex")),R()?U.dataset.to=String(R()):delete U.dataset.to,Y&&U.target==="_blank"&&!U.rel&&(U.rel="noopener noreferrer")},xe=y.onClick;return U.onclick=Ne=>{if(xe==null||xe(Ne),!Ne.defaultPrevented){if(ne()){Ne.preventDefault();return}J().navigate(Ne)}},!ce&&R()&&(q!=null&&q.subscribe)&&q.subscribe(()=>ue()),JSswift.reactive.effect(()=>{ue()},"UI.RouteTab:render"),U._isActive=()=>S(),U._setActive=Ne=>(K=Ne==null?null:!!Ne,ue(),U),U._navigate=Ne=>J().navigate(Ne),U},he.Breadcrumbs=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=JSswift.router||(Ue==null?void 0:Ue.router)||null,i=At(t.model,"UI.Breadcrumbs:model"),c=et(t.size,()=>{var R;const ae=o(t.size);return typeof ae=="string"&&((R=JSswift.uiSizes)!=null&&R.includes(ae))?`jss-size-${ae}`:""}),r=et(t.variant,()=>{const R=String(o(t.variant||(t.pills?"pills":t.soft?"soft":"line"))||"").toLowerCase();return R==="pill"||R==="pills"?"variant-pills":R==="soft"||R==="card"?"variant-soft":"variant-line"}),v=et([t.wrap,t.nowrap],()=>o(t.wrap)===!1||o(t.nowrap)?"no-wrap":""),a=_.nav({class:oe(["jss-breadcrumbs","jss-clear-set",c,r,v,pe(t.dense,"dense"),t.class]),style:{...t.style||{}},role:"navigation","aria-label":t.ariaLabel||"Breadcrumb"}),z=_.div({class:"jss-breadcrumbs-before"}),u=_.ol({class:"jss-breadcrumbs-list"}),x=_.div({class:"jss-breadcrumbs-after"});a.appendChild(z),a.appendChild(u),a.appendChild(x);const k=R=>{var ae;const re=o(R);return re==null||re===""?null:(ae=JSswift.uiColors)!=null&&ae.includes(re)?`var(--jss-${re})`:String(re)},f=R=>{var ae;if(!R)return!1;if(o(R.external)===!0)return!0;const re=o((ae=R.href)!=null?ae:R.to);return re?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(re)):!1},B=R=>R!=null&&R.nodeType&&R.cloneNode?R.cloneNode(!0):R,y=(R,ae)=>{R.innerHTML="",ae.forEach(re=>R.appendChild(re))},M=(R,ae,re,ne,K=null)=>{const S=JSswift.ui.getSlot(R,ae)!=null?F(R,ae,re,ne):[];return S.length?S:K&&JSswift.ui.getSlot(R,K)!=null?F(R,K,re,ne):F(null,"default",re,ne)},D=(R,ae,re)=>{const ne=o(R);return ne==null||ne===!1||ne===""?null:typeof ne=="string"?he.Icon({name:ne,size:ae}):JSswift.ui.slot(ne,{as:re})},q=()=>{var R,ae;const re=i?i.get():o((ae=(R=t.items)!=null?R:t.value)!=null?ae:t.breadcrumbs),ne=[],K=I=>{if(!(I==null||I===!1)){if(Array.isArray(I)){I.forEach(K);return}if(typeof I=="string"||typeof I=="number"){ne.push({label:String(I)});return}if(I!=null&&I.nodeType||typeof I=="function"){ne.push({label:I});return}ne.push(I)}},S=o(t.home);return S&&K(S===!0?{label:"Home",to:"/",icon:"home"}:S),K(re),!ne.length&&(s!=null&&s.length)&&s.forEach(I=>K(I)),ne.filter(I=>!o(I==null?void 0:I.hidden))},L=R=>{const ae=R.findIndex(re=>{var ne,K;return!!o((K=(ne=re==null?void 0:re.current)!=null?ne:re==null?void 0:re.active)!=null?K:re==null?void 0:re.selected)});return ae>-1?ae:o(t.autoCurrent)===!1?-1:R.length?R.length-1:-1},ce=R=>{var ae,re,ne,K,S,I,m;const P=Number(o((ne=(re=(ae=t.max)!=null?ae:t.maxItems)!=null?re:t.collapseAfter)!=null?ne:t.collapse)),G=Number.isFinite(P)?Math.max(0,Math.trunc(P)):0;if(!G||G<3||R.length<=G)return R.map((W,H)=>({type:"item",item:W,index:H,key:`item-${H}`}));let h=Number(o((S=(K=t.leadingCount)!=null?K:t.keepStart)!=null?S:1)),b=Number(o((m=(I=t.trailingCount)!=null?I:t.keepEnd)!=null?m:Math.max(1,G-2)));if(h=Number.isFinite(h)?Math.max(1,Math.trunc(h)):1,b=Number.isFinite(b)?Math.max(1,Math.trunc(b)):Math.max(1,G-2),h+b+1>G&&(b=Math.max(1,G-h-1),h+b+1>G&&(h=Math.max(1,G-b-1))),h+b>=R.length)return R.map((W,H)=>({type:"item",item:W,index:H,key:`item-${H}`}));const g=[];for(let W=0;W<h;W++)g.push({type:"item",item:R[W],index:W,key:`item-${W}`});const J=R.slice(h,R.length-b);g.push({type:"collapsed",key:`collapsed-${h}-${R.length-b}`,items:J,from:h,to:R.length-b-1});for(let W=R.length-b;W<R.length;W++)g.push({type:"item",item:R[W],index:W,key:`item-${W}`});return g},X=(R,ae=null)=>{var re,ne,K,S,I;if(!R)return!1;const m=o((re=R.href)!=null?re:R.to)||"",P=o(R.to)||"";return!f(R)&&P&&(n!=null&&n.navigate)?(ae!=null&&ae.preventDefault&&ae.preventDefault(),n.navigate(P),(ne=R.onNavigate)==null||ne.call(R,P,ae||null),(K=t.onNavigate)==null||K.call(t,P,R,ae||null),!0):((S=R.onNavigate)==null||S.call(R,P||m,ae||null),(I=t.onNavigate)==null||I.call(t,P||m,R,ae||null),!1)},Z=(R,ae,re)=>{var ne,K,S;const I=R,m=re[ae+1]||null,P={index:ae,entry:R,previous:I,next:m},G=B(o((S=(K=(R==null?void 0:R.type)==="item"?(ne=R.item)==null?void 0:ne.separator:null)!=null?K:t.separator)!=null?S:"/")),h=M(l,"separator",P,G);return _.li({class:"jss-breadcrumbs-separator-item","aria-hidden":"true"},_.span({class:"jss-breadcrumbs-separator"},...h))},ie=(R,ae,re)=>{const ne={type:"collapsed",collapsed:!0,items:ae,hiddenItems:R.items,currentIndex:re,from:R.from,to:R.to},K=_.span({class:"jss-breadcrumb jss-breadcrumb-collapsed"},_.span({class:"jss-breadcrumb-inner"},_.span({class:"jss-breadcrumb-copy"},_.span({class:"jss-breadcrumb-label"},String(o(t.collapsedLabel)||"\u2026"))))),S=M(l,"collapsed",ne,K,"item");return _.li({class:"jss-breadcrumbs-entry is-collapsed"},...S)},te=(R,ae,re,ne)=>{var K,S,I,m,P,G,h,b,g,J,W,H,de,E,N,A,T,U,ue,xe,Ne,$,V,Y,ge,ye;const Q=R.item||{},ve=Q.slots?{...l,...Q.slots}:l,be=o((K=Q.href)!=null?K:Q.to)||"",me=!!o(Q.disabled),Ie=R.index===re,Oe=(m=(I=(S=Q.iconSize)!=null?S:t.itemSize)!=null?I:t.size)!=null?m:null,we=k((h=(G=(P=Q.color)!=null?P:Q.state)!=null?G:t.color)!=null?h:t.state),j=!o(Q.color)&&o(Q.state)?bt(o(Q.state)):"",fe=(H=(W=(J=(g=(b=Q.label)!=null?b:Q.title)!=null?g:Q.text)!=null?J:Q.to)!=null?W:Q.href)!=null?H:"",je=(N=(E=(de=Q.note)!=null?de:Q.subtitle)!=null?E:Q.caption)!=null?N:Q.description,O=(T=(A=Q.badge)!=null?A:Q.counter)!=null?T:Q.count,d=(ue=(U=Q.aside)!=null?U:Q.trailing)!=null?ue:D(Q.iconRight,Oe,"iconRight"),p=(xe=Q.content)!=null?xe:Q.body,C={item:Q,index:R.index,visibleIndex:ne,total:ae.length,current:Ie,active:Ie,disabled:me,href:be,to:o(Q.to)||"",external:f(Q),isFirst:R.index===0,isLast:R.index===ae.length-1,navigate:lt=>X(Q,lt)},ee=M(ve,"icon",C,D(Q.icon,Oe,"icon")),Se=M(ve,"label",C,fe),Ce=M(ve,"note",C,je),Ae=M(ve,"badge",C,O),Le=M(ve,"aside",C,d),ke=M(ve,"default",C,p),Ee=_.span({class:"jss-breadcrumb-inner"},ee.length?_.span({class:"jss-breadcrumb-icon"},...ee):null,_.span({class:"jss-breadcrumb-copy"},_.span({class:"jss-breadcrumb-label"},...Se.length?Se:[be||""]),Ce.length?_.span({class:"jss-breadcrumb-note"},...Ce):null,ke.length?_.span({class:"jss-breadcrumb-extra"},...ke):null),Ae.length?_.span({class:"jss-breadcrumb-badge"},...Ae):null,Le.length?_.span({class:"jss-breadcrumb-aside"},...Le):null),Re=!me&&(!Ie||!!o((Ne=Q.linkCurrent)!=null?Ne:t.linkCurrent)),Me={class:oe(["jss-breadcrumb","jss-clear-set","jss-singularity",pe(Ie,"is-current"),pe(Ie,"active"),pe(me,"is-disabled"),j?`jss-state-${j}`:"",Q.class]),style:{...Q.style||{}},"aria-current":Ie?String(o(($=Q.ariaCurrent)!=null?$:t.ariaCurrent)||"page"):null};we&&(Me.style["--jss-breadcrumb-accent"]=we);let $e=null;Re&&be?($e=_.a({...Me,href:be,target:Q.target,rel:Q.rel,onClick:lt=>{var Xe,ze;(Xe=Q.onClick)==null||Xe.call(Q,lt,C),(ze=t.onItemClick)==null||ze.call(t,Q,C,lt),!lt.defaultPrevented&&C.navigate(lt)}},Ee),C.external&&$e.target==="_blank"&&!$e.rel&&($e.rel="noopener noreferrer")):Re&&typeof Q.onClick=="function"?$e=_.button({...Me,type:Q.type||"button",onClick:lt=>{var Xe,ze;(Xe=Q.onClick)==null||Xe.call(Q,lt,C),(ze=t.onItemClick)==null||ze.call(t,Q,C,lt)}},Ee):$e=_.span({...Me,"aria-disabled":me?"true":null},Ee),Qe($e,{size:(Y=(V=Q.size)!=null?V:t.itemSize)!=null?Y:t.size,radius:(ge=Q.radius)!=null?ge:t.radius,gradient:(ye=Q.gradient)!=null?ye:t.gradient});const qe=M(ve,"item",C,$e);return _.li({class:oe(["jss-breadcrumbs-entry",pe(Ie,"is-current"),pe(me,"is-disabled")])},...qe)},se=()=>{var R;const ae=q(),re=L(ae),ne=ce(ae),K=k((R=t.color)!=null?R:t.state);a.classList.toggle("is-empty",ae.length===0),K?a.style.setProperty("--jss-breadcrumb-accent",K):a.style.removeProperty("--jss-breadcrumb-accent");const S={items:ae,visibleItems:ne,currentIndex:re,count:ae.length,collapsed:ne.some(I=>I.type==="collapsed")};if(y(z,M(l,"before",S,t.before)),y(x,M(l,"after",S,t.after)),u.innerHTML="",!ae.length){const I=M(l,"empty",S,t.empty);I.length&&u.appendChild(_.li({class:"jss-breadcrumbs-entry is-empty"},...I));return}ne.forEach((I,m)=>{m>0&&u.appendChild(Z(ne[m-1],m-1,ne)),u.appendChild(I.type==="collapsed"?ie(I,ae,re):te(I,ae,re,m))})};return Ue.reactive.effect(()=>{se()},"UI.Breadcrumbs:render"),a.getItems=()=>q(),a.getVisibleItems=()=>ce(q()),a.refresh=()=>(se(),a),a.setItems=R=>(i?i.set(R):t.items=R,se(),a),Qe(a,t),a},he.Pagination=(...e)=>{const{props:t}=JSswift.uiNormalizeArgs(e),s=t.slots||{},l=At(t.model,"UI.Pagination:model"),n=et(t.size,()=>{const h=o(t.size);return typeof h=="string"&&Nn[h]?`jss-size-${h}`:""}),i=_.nav({class:oe(["jss-pagination","jss-clear-set",n,pe(t.dense,"dense"),pe(t.simple,"is-simple"),pe(t.disabled,"is-disabled"),t.class]),style:{...t.style||{}},role:"navigation","aria-label":t.ariaLabel||"Pagination"}),c=_.div({class:"jss-pagination-controls"}),r=_.div({class:"jss-pagination-start"}),v=_.div({class:"jss-pagination-pages"}),a=_.div({class:"jss-pagination-end"}),z=_.div({class:"jss-pagination-summary"});c.appendChild(r),c.appendChild(v),c.appendChild(a),i.appendChild(c),i.appendChild(z);let u=1,x=1;const k=(h,b=0)=>{const g=o(h);if(g==null||g==="")return b;const J=Number(g);return Number.isFinite(J)?Math.trunc(J):b},f=(h,b=B())=>{const g=Number(h),J=Number.isFinite(g)?Math.trunc(g):1;return Math.min(Math.max(J||1,1),Math.max(1,b||1))},B=()=>{var h,b,g,J,W,H,de;const E=k((g=(b=(h=t.max)!=null?h:t.pages)!=null?b:t.pageCount)!=null?g:t.totalPages,0);if(E>0)return E;const N=k((W=(J=t.total)!=null?J:t.totalItems)!=null?W:t.count,0),A=k((de=(H=t.pageSize)!=null?H:t.perPage)!=null?de:t.limit,0);return N>=0&&A>0?Math.max(1,Math.ceil(N/A)):1},y=()=>{var h,b,g;return k(l?l.get():(g=(b=(h=t.page)!=null?h:t.value)!=null?b:t.current)!=null?g:t.currentPage,1)},M=()=>{var h,b;return Math.max(0,k((b=(h=t.siblings)!=null?h:t.siblingCount)!=null?b:t.window,1))},D=()=>{var h,b;return Math.max(0,k((b=(h=t.boundaryCount)!=null?h:t.boundaries)!=null?b:t.edges,1))},q=()=>!!o(t.disabled),L=()=>{var h;return o((h=t.showSummary)!=null?h:t.showLabel)!==!1},ce=()=>o(t.showPages)!==!1&&!o(t.simple),X=()=>o(t.showPrev)!==!1,Z=()=>o(t.showNext)!==!1,ie=()=>!!o(t.showEdges),te=()=>{const h=o(t.showFirst);return h==null?ie():!!h},se=()=>{const h=o(t.showLast);return h==null?ie():!!h},R=()=>!!o(t.hideOnSinglePage),ae=()=>{var h,b;const g=o((b=(h=t.total)!=null?h:t.totalItems)!=null?b:t.count);if(g==null||g==="")return null;const J=Number(g);return Number.isFinite(J)?Math.max(0,Math.trunc(J)):null},re=()=>{var h,b;const g=o((b=(h=t.pageSize)!=null?h:t.perPage)!=null?b:t.limit);if(g==null||g==="")return null;const J=Number(g);return Number.isFinite(J)&&J>0?Math.trunc(J):null},ne=(h=u,b=x)=>{const g=ae(),J=re(),W=g!=null&&J?g===0?0:(h-1)*J+1:null,H=g!=null&&J?Math.min(g,h*J):null;return{page:h,value:h,current:h,currentPage:h,pages:b,max:b,total:g,pageSize:J,from:W,to:H,disabled:q(),isFirst:h<=1,isLast:h>=b,canPrev:h>1,canNext:h<b,setPage:(de,E)=>G(de,E),prev:de=>G(h-1,de),next:de=>G(h+1,de),first:de=>G(1,de),last:de=>G(b,de)}},K=(h,b)=>{if(b<=0)return[];const g=[],J=new Set,W=D(),H=M();for(let E=1;E<=Math.min(W,b);E++)J.add(E);for(let E=Math.max(1,h-H);E<=Math.min(b,h+H);E++)J.add(E);for(let E=Math.max(1,b-W+1);E<=b;E++)J.add(E);let de=0;for(let E=1;E<=b;E++)J.has(E)&&(de&&E-de>1&&g.push({type:"ellipsis",key:`ellipsis-${de}-${E}`}),g.push({type:"page",page:E,key:`page-${E}`}),de=E);return g.length||g.push({type:"page",page:1,key:"page-1"}),g},S=(h,b,g,J=null)=>{const W=JSswift.ui.getSlot(s,h)!=null?F(s,h,g,b):[];return W.length?W:J&&JSswift.ui.getSlot(s,J)!=null?F(s,J,g,b):F(null,"default",g,b)},I=(h,b)=>{h.innerHTML="",b.forEach(g=>h.appendChild(g))},m=(h,b,g,J={})=>{var W;const H={...ne(),kind:h,active:!!J.active};return he.Btn({class:oe(["jss-pagination-btn",`jss-pagination-${h}`,pe(J.active,"active"),J.class]),size:t.itemSize||t.size||(t.dense?"sm":"md"),color:J.active?t.color||t.state||"primary":J.color||null,outline:J.active?!1:(W=J.outline)!=null?W:!0,disabled:q()||!!J.disabled,"aria-current":J.active?"page":null,onClick:de=>{q()||J.disabled||g==null||g(de)}},...S(h,b,H,h==="summary"?"label":h==="page"?"item":null))},P=(h,b)=>{u=f(h,b),x=Math.max(1,b||1);const g=ne(u,x);i.style.display=R()&&x<=1?"none":"",z.style.display=L()?"":"none",v.style.display=ce()?"":"none",r.innerHTML="",v.innerHTML="",a.innerHTML="";const J=S("start",t.start,g);J.length&&r.appendChild(_.div({class:"jss-pagination-extra jss-pagination-extra-start"},...J)),te()&&r.appendChild(m("first","\xAB",de=>G(1,de),{disabled:u<=1})),X()&&r.appendChild(m("prev","Prev",de=>G(u-1,de),{disabled:u<=1})),ce()&&K(u,x).forEach(de=>{if(de.type==="ellipsis"){const A={...g,kind:"ellipsis"},T=S("ellipsis","\u2026",A);v.appendChild(_.span({class:"jss-pagination-ellipsis","aria-hidden":"true"},...T));return}const E=de.page,N={...g,page:E,value:E,item:de,active:E===u};v.appendChild(he.Btn({class:oe(["jss-pagination-btn","jss-pagination-page-btn",pe(E===u,"active")]),size:t.itemSize||t.size||(t.dense?"sm":"md"),color:E===u?t.color||t.state||"primary":null,outline:E!==u,disabled:q(),"aria-current":E===u?"page":null,onClick:A=>G(E,A)},...S("page",String(E),N,"item")))}),Z()&&a.appendChild(m("next","Next",de=>G(u+1,de),{disabled:u>=x})),se()&&a.appendChild(m("last","\xBB",de=>G(x,de),{disabled:u>=x}));const W=S("end",t.end,g);W.length&&a.appendChild(_.div({class:"jss-pagination-extra jss-pagination-extra-end"},...W));let H=`Pagina ${u} di ${x}`;g.total!=null&&g.pageSize&&(H=g.total===0?"0 risultati":`${g.from}-${g.to} di ${g.total}`),I(z,S("summary",H,g,"label"))},G=(h,b=null)=>{var g,J;const W=B(),H=f(h,W);return H===u&&W===x||(P(H,W),l&&l.get()!==H&&l.set(H),(g=t.onChange)==null||g.call(t,H,ne(H,W),b),(J=t.onPageChange)==null||J.call(t,H,ne(H,W),b)),H};return Ue.reactive.effect(()=>{const h=B(),b=y(),g=f(b,h);P(g,h),l&&b!==g&&l.set(g)},"UI.Pagination:sync"),i.getPage=()=>u,i.getPages=()=>x,i.setPage=h=>G(h),i.prev=()=>G(u-1),i.next=()=>G(u+1),i.first=()=>G(1),i.last=()=>G(x),Qe(i,t),i},he.Spinner=(...e)=>{var t;const{props:s,children:l}=JSswift.uiNormalizeArgs(e),n=s.slots||{},i=(L,ce,X)=>{if(rt(L))return()=>{const ie=o(L);if(ie==null||ie===!1||ie==="")return X;const te=ce?ce(ie):ie;return te==null||te===""?X:te};if(L==null||L===!1||L==="")return X;const Z=ce?ce(L):L;return Z==null||Z===""?X:Z},c=L=>{if(L==null||L===!1||L===""||bt(L))return"";const X=String(L).trim();return X?X.startsWith("#")||X.startsWith("rgb(")||X.startsWith("rgba(")||X.startsWith("hsl(")||X.startsWith("hsla(")||X.startsWith("var(")?X:on(X)?`var(--jss-${X})`:X:""},r=et(s.state,()=>{const L=bt(o(s.state));return L?`jss-state-${L}`:""}),v=oe(["jss-spinner",r,pe(s.vertical,"vertical"),pe(s.reverse,"reverse"),pe(s.center,"center"),pe(s.block,"block"),pe(s.pause||s.paused,"paused"),s.class]),a=JSswift.omit(s,["ariaLabel","block","center","color","indicatorClass","indicatorStyle","label","note","pause","paused","reverse","size","slots","speed","state","thickness","trackColor","vertical"]);a.class=v;const z={...s.style||{}};s.color!=null&&Object.prototype.hasOwnProperty.call(z,"backgroundColor")&&delete z.backgroundColor,a.style=z,a.role==null&&(a.role="status"),a["aria-live"]==null&&(a["aria-live"]="polite"),a["aria-busy"]==null&&(a["aria-busy"]="true");const u={props:s},x=F(n,"label",u,s.label),k=F(n,"default",u,l),f=F(n,"note",u,s.note),B=x.length||k.length||f.length;if(!B){const L=o((t=s.ariaLabel)!=null?t:s["aria-label"]);L?a["aria-label"]=L:a["aria-label"]==null&&(a["aria-label"]="Loading")}const y=_.span({class:oe(["jss-spinner-indicator",s.indicatorClass]),style:{"--jss-spinner-size":i(s.size,He,"18px"),"--jss-spinner-thickness":i(s.thickness,He,"2px"),"--jss-spinner-speed":i(s.speed,L=>typeof L=="number"?`${L}ms`:String(L),"900ms"),"--jss-spinner-color":i(s.color,c,"var(--set-border-color, var(--jss-primary))"),"--jss-spinner-track":i(s.trackColor,c,"color-mix(in srgb, var(--jss-spinner-color) 18%, transparent)"),...s.indicatorStyle||{}},"aria-hidden":"true"}),M=F(n,"indicator",u,y),D=[];M.length&&D.push(...M),B&&D.push(_.div({class:"jss-spinner-content"},x.length?_.div({class:"jss-spinner-label"},...x):null,k.length?_.div({class:"jss-spinner-copy"},...k):null,f.length?_.div({class:"jss-spinner-note"},...f):null));const q=_.div(a,...D);return Qe(q,s),q},he.Progress=(...e)=>{var t,s,l,n,i,c,r,v,a,z;const{props:u,children:x}=JSswift.uiNormalizeArgs(e),k=u.slots||{},f=u.model||(It(u.value)||Mt(u.value)?u.value:null),B=At(f,"UI.Progress:model"),y=et([u.state,u.color],()=>{const Q=bt(o(u.state)||o(u.color));return Q?`jss-state-${Q}`:""}),M=(Q,ve)=>{const be=Number(Q);return Number.isFinite(be)?be:ve},D=()=>M(o(u.min),0),q=()=>{const Q=D(),ve=M(o(u.max),100);return ve<Q?Q:ve},L=()=>{var Q,ve;const be=o((ve=(Q=u.height)!=null?Q:u.thickness)!=null?ve:u.size);return be==null||be===""?"8px":typeof be=="number"?`${be}px`:typeof be=="string"?{xxs:"4px",xs:"6px",sm:"8px",md:"10px",lg:"12px",xl:"14px",xxl:"16px",xxxl:"18px"}[be]||be:"8px"},ce=(Q,ve="")=>{const be=o(Q);if(be==null||be===!1||be==="")return ve;const me=bt(be);return me?`var(--jss-${me})`:typeof be=="string"&&on(be)?`var(--jss-${be})`:String(be)},X=Q=>{const ve=D(),be=q(),me=M(Q,ve);return Math.min(be,Math.max(ve,me))},Z=Q=>{const ve=D(),me=q()-ve;if(!me)return 0;const Ie=(X(Q)-ve)/me,Oe=o(u.reverse)?1-Ie:Ie;return Math.max(0,Math.min(1,Oe))},ie=Q=>{const ve=X(Q);return ve<K()?K():ve},te=(Q,ve,be)=>{const me=u.formatValue;if(typeof me=="function"){const Ie=me(Q,ve,be);if(Ie!=null)return Ie}return`${Math.round(ve)}%`},se=Q=>{for(;Q.firstChild;)Q.removeChild(Q.firstChild)},R=(Q,ve,be="flex")=>{se(Q),(ve||[]).forEach(me=>{if(!(me==null||me===!1)){if(me instanceof Node){Q.appendChild(me);return}Q.appendChild(document.createTextNode(String(me)))}}),Q.style.display=Q.childNodes.length?be:"none"},ae=(Q,ve={})=>zn(o(Q),ve),re=(Q,ve,be={})=>{var me;const Ie=o(Q);return Ie==null||Ie===!1||Ie===""?[]:typeof Ie=="string"?[he.Icon({name:Ie,size:(me=u.iconSize)!=null?me:16})]:ae(Ie,{...be,as:ve})},ne=Q=>Mt(Q)||It(Q)?o(Q):typeof Q=="function"&&Q.length===0?Q():Q,[K,S]=JSswift.reactive.signal(X(B?B.get():(s=(t=o(u.value))!=null?t:o(u.min))!=null?s:0)),[I,m]=JSswift.reactive.signal(ie((i=o(u.buffer))!=null?i:B?B.get():(n=(l=o(u.value))!=null?l:o(u.min))!=null?n:0)),P=(Q,ve={})=>{const be=X(Q);return K()!==be&&S(be),I()<be&&m(be),B&&ve.fromModel!==!0&&B.set(be),be},G=Q=>{const ve=ie(Q);return I()!==ve&&m(ve),ve},h=JSswift.omit(u,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor"]),b={width:o(u.width)||"100%",...u.style||{}},g=o(u.color);(g!=null||rt(u.color))&&!bt(g||"")&&delete b.backgroundColor,h.class=oe(["jss-progress-wrap",pe(u.dense,"dense"),pe(u.reverse,"is-reverse"),pe(u.indeterminate,"is-indeterminate"),y,u.class]),h.style=b;const J=_.div({class:"jss-progress-header"}),W=_.div({class:"jss-progress-heading"}),H=_.div({class:"jss-progress-label"}),de=_.div({class:"jss-progress-note"}),E=_.div({class:"jss-progress-value"});W.append(H,de),J.append(W,E);const N=_.div({class:"jss-progress-body"}),A=_.span({class:"jss-progress-edge-label jss-progress-edge-label-left"}),T=_.div({class:"jss-progress",role:"progressbar"}),U=_.span({class:"jss-progress-buffer"}),ue=_.span({class:oe(["jss-progress-bar","jss-singularity",y,pe(u.outline,"jss-outline"),pe(u.flat,"jss-flat"),pe(u.border,"jss-border"),pe(u.glossy,"jss-glossy"),pe(u.glow,"jss-glow"),pe(u.glass,"jss-glass"),pe(u.shadow,"jss-shadow"),et(u.shadow,()=>{const Q=Fn(o(u.shadow));return Q?`jss-shadow-${Q}`:""}),pe(u.gradient,"jss-gradient"),pe(u.textGradient,"jss-text-gradient"),pe(u.lightShadow,"jss-light-shadow"),pe(u.striped,"is-striped"),pe(u.animated||u.indeterminate,"is-animated")])}),xe=_.span({class:"jss-progress-bar-label"});ue.appendChild(xe),T.append(U,ue);const Ne=_.span({class:"jss-progress-edge-label jss-progress-edge-label-right"});N.append(A,T,Ne);const $=_.div(h,J,N);Qe(ue,u);const V=()=>{const Q=K(),ve=Z(Q)*100,be={value:Q,percent:ve,min:D(),max:q(),buffer:I(),progress:$,track:T,bar:ue,props:u},me=F(k,"icon",be,null),Ie=me.length?[]:re(u.icon,"icon",be),Oe=F(k,"label",be,ne(u.label)),we=Oe.length?Oe:F(k,"default",be,x),j=F(k,"iconRight",be,null),fe=j.length?[]:re(u.iconRight,"iconRight",be),je=F(k,"note",be,ne(u.note)),O=u.valueLabel!=null?ne(u.valueLabel):te(Q,ve,be),d=o(u.showValue),p=d===!0||u.valueLabel!=null||JSswift.ui.getSlot(k,"value")!=null?F(k,"value",be,O):[];R(H,[...Ie,...me,...we,...fe,...j],"inline-flex"),R(de,je,"block"),R(E,d==="inside"?[]:p,"inline-flex"),J.style.display=H.childNodes.length||de.childNodes.length||E.childNodes.length?"flex":"none"},Y=()=>{var Q,ve;const be=K(),me=Z(be)*100,Ie={value:be,percent:me,min:D(),max:q(),buffer:I(),progress:$,track:T,bar:ue,props:u},Oe=ne((Q=u.startLabel)!=null?Q:u.leftLabel),we=ne((ve=u.endLabel)!=null?ve:u.rightLabel);R(A,F(k,"startLabel",Ie,Oe),"inline-flex"),R(Ne,F(k,"endLabel",Ie,we),"inline-flex")},ge=()=>{const Q=K(),ve=Z(Q)*100,be={value:Q,percent:ve,min:D(),max:q(),buffer:I(),progress:$,track:T,bar:ue,props:u},me=o(u.showValue),Ie=u.insideLabel!=null?ne(u.insideLabel):te(Q,ve,be),Oe=me==="inside"||u.insideLabel!=null||JSswift.ui.getSlot(k,"inside")!=null?F(k,"inside",be,Ie):[];R(xe,Oe,"inline-flex")},ye=()=>{const Q=K(),ve=I(),be=D(),me=q(),Ie=Z(Q)*100,Oe=Z(ve)*100,we=ce(u.color,""),j=ce(u.trackColor,we?`color-mix(in srgb, ${we} 14%, transparent)`:"rgba(255,255,255,0.08)"),fe=ce(u.bufferColor,we?`color-mix(in srgb, ${we} 30%, transparent)`:"rgba(255,255,255,0.16)"),je=o(u.ariaLabel),O=o(u.ariaValueText),d=!!o(u.indeterminate),p=o(u.radius);$.style.width=o(u.width)||"100%",$.style.setProperty("--jss-progress-height",L()),p!=null?typeof p=="number"?$.style.setProperty("--jss-progress-radius",`${p}px`):typeof p=="string"&&JSswift.uiSizes.includes(p)?$.style.setProperty("--jss-progress-radius",`var(--jss-r-${p})`):$.style.setProperty("--jss-progress-radius",String(p)):$.style.removeProperty("--jss-progress-radius"),T.style.background=j,U.style.background=fe,U.style.width=`${Oe}%`,we&&!bt(o(u.state)||o(u.color))?(ue.style.setProperty("--set-background-color",we),ue.style.setProperty("--set-border-color",we),ue.style.setProperty("--set-color",o(u.textColor)||"var(--jss-on-primary, #fff)")):bt(o(u.state)||o(u.color))?(ue.style.removeProperty("--set-background-color"),ue.style.removeProperty("--set-border-color"),ue.style.removeProperty("--set-color")):(ue.style.setProperty("--set-background-color","var(--jss-primary)"),ue.style.setProperty("--set-border-color","var(--jss-primary)"),ue.style.setProperty("--set-color",o(u.textColor)||"var(--jss-on-primary, #fff)")),d?(ue.style.width="",T.removeAttribute("aria-valuenow"),T.removeAttribute("aria-valuemin"),T.removeAttribute("aria-valuemax")):(ue.style.width=`${Ie}%`,T.setAttribute("aria-valuemin",String(be)),T.setAttribute("aria-valuemax",String(me)),T.setAttribute("aria-valuenow",String(Q))),je!=null?T.setAttribute("aria-label",String(je)):typeof o(u.label)=="string"?T.setAttribute("aria-label",String(o(u.label))):T.removeAttribute("aria-label"),O!=null?T.setAttribute("aria-valuetext",String(O)):d?T.removeAttribute("aria-valuetext"):T.setAttribute("aria-valuetext",te(Q,Ie,{value:Q,percent:Ie,min:be,max:me,buffer:ve,progress:$,track:T,bar:ue,props:u})),$.classList.toggle("has-start-label",A.childNodes.length>0),$.classList.toggle("has-end-label",Ne.childNodes.length>0),$.classList.toggle("has-inside-label",xe.childNodes.length>0)};return B?(P(B.get(),{fromModel:!0}),B.watch(Q=>{P(Q,{fromModel:!0})},"UI.Progress:watch")):rt(u.value)?JSswift.reactive.effect(()=>{P(o(u.value),{fromModel:!0})},"UI.Progress:value"):P((r=(c=u.value)!=null?c:u.min)!=null?r:0,{fromModel:!0}),rt(u.buffer)?JSswift.reactive.effect(()=>{G(o(u.buffer))},"UI.Progress:buffer"):G((z=(a=(v=u.buffer)!=null?v:u.value)!=null?a:u.min)!=null?z:0),JSswift.reactive.effect(()=>{V(),Y(),ge(),ye()},"UI.Progress:render"),$._track=T,$._bar=ue,$._buffer=U,$._getValue=K,$._getBuffer=I,$._setValue=Q=>P(Q),$._setBuffer=Q=>G(Q),$},he.LoadingBar=function(...t){var s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(t),c=(T,U)=>{const ue=Number(T);return Number.isFinite(ue)?ue:U},r=()=>c(o(n.min),0),v=()=>{const T=r(),U=c(o(n.max),100);return U<T?T:U},a=T=>{const U=r(),ue=v(),xe=c(T,U);return Math.min(ue,Math.max(U,xe))},z=(T,U="")=>T==null||T===!1||T===""?U:typeof T=="number"?`${T}px`:String(T),u=T=>{const U=o(T);return!U||U===document?document.body:typeof U=="string"?document.querySelector(U)||document.body:U&&U.body instanceof HTMLElement?U.body:U instanceof HTMLElement?U:document.body},x=n.model||(It(n.value)||Mt(n.value)?n.value:null),k=At(x,"UI.LoadingBar:model"),f=It(n.buffer)||Mt(n.buffer)?n.buffer:null,B=At(f,"UI.LoadingBar:buffer"),y=k?k.get():(s=o(n.value))!=null?s:r(),M=B?B.get():(l=o(n.buffer))!=null?l:y,[D,q]=JSswift.reactive.signal(a(y)),[L,ce]=JSswift.reactive.signal(Math.max(a(M),a(y))),[X,Z]=JSswift.reactive.signal(n.visible!=null?!!o(n.visible):a(y)>r()||!!o(n.indeterminate));let ie=null,te=null;const se=()=>{ie&&(clearInterval(ie),ie=null)},R=()=>{te&&(clearTimeout(te),te=null)},ae=(T,U={})=>{const ue=!!T;return X()!==ue&&Z(ue),U.fromExternal!==!0&&typeof n.onVisibleChange=="function"&&n.onVisibleChange(ue),ue},re=(T,U={})=>{const ue=a(T);return D()!==ue&&q(ue),L()<ue&&(ce(ue),B&&U.fromExternal!==!0&&B.set(ue)),k&&U.fromExternal!==!0&&k.set(ue),ue},ne=(T,U={})=>{const ue=Math.max(re(D(),{fromExternal:!0}),a(T));return L()!==ue&&ce(ue),B&&U.fromExternal!==!0&&B.set(ue),ue},K=(T=D())=>{n.visible==null&&(o(n.indeterminate)||T>r()?ae(!0):o(n.hideOnZero)!==!1&&ae(!1))},S=()=>{if(se(),o(n.trickle)===!1||o(n.indeterminate))return;const T=c(o(n.trickleInterval),280);T<=0||(ie=setInterval(()=>{var U,ue;const xe=D(),Ne=a((ue=(U=o(n.trickleTo))!=null?U:o(n.trickleMax))!=null?ue:92);if(xe>=Ne)return;const $=c(o(n.trickleStep),xe<45?12:xe<75?7:3);re(Math.min(Ne,xe+$))},T))},I=JSswift.omit(n,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor","target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);I.class=oe(["jss-loading-bar",n.class]),I.style={...n.style||{}};const m=JSswift.omit(n,["target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);m.class=oe(["jss-loading-bar-progress",n.progressClass,m.class]),m.style={...n.progressStyle||{}},m.value=[D,q],m.buffer=[L,ce],m.dense==null&&(m.dense=!0),m.height==null&&m.thickness==null&&m.size==null&&(m.height=3),m.width==null&&(m.width="100%");const P=_.div(I),G=he.Progress(m,...i);P.appendChild(G);const h=T=>{R();const U=re(T);return K(U),P},b=T=>{R();const U=ne(T);return K(U),P},g=(T=(U=>(U=o(n.step))!=null?U:8)())=>{R();const U=D(),ue=re(U+c(T,0));return K(ue),P},J=(T=(U=>(U=o(n.startValue))!=null?U:12)())=>{R();const U=Math.max(D(),a(T));return re(U),ne(Math.max(L(),U)),K(U),S(),P},W=(T=(U=>(U=o(n.resetValue))!=null?U:r())())=>{R(),se();const U=a(T);return ne(U),re(U),K(U),P},H=(T=(U=>(U=o(n.doneValue))!=null?U:v())())=>{var U;R(),se();const ue=a(T);ne(ue),re(ue),K(ue);const xe=Math.max(0,c((U=o(n.hideDelay))!=null?U:o(n.doneDelay),220));return te=setTimeout(()=>{W()},xe),P},de=(...T)=>H(...T),E=()=>(ae(!0),P),N=()=>(R(),se(),ae(!1),P),A=()=>(R(),se(),P.remove(),null);return P.el=P,P._progress=G,P.get=()=>D(),P.getBuffer=()=>L(),P.set=h,P.setBuffer=b,P.inc=g,P.start=J,P.done=H,P.complete=H,P.stop=de,P.reset=W,P.show=E,P.hide=N,P.destroy=A,P._dispose=A,k?k.watch(T=>{re(T,{fromExternal:!0}),K(a(T))},"UI.LoadingBar:watch"):rt(n.value)&&JSswift.reactive.effect(()=>{const T=a(o(n.value));re(T,{fromExternal:!0}),K(T)},"UI.LoadingBar:value"),B?B.watch(T=>{ne(T,{fromExternal:!0})},"UI.LoadingBar:bufferWatch"):rt(n.buffer)&&JSswift.reactive.effect(()=>{ne(o(n.buffer),{fromExternal:!0})},"UI.LoadingBar:buffer"),JSswift.reactive.effect(()=>{const T=r(),U=v(),ue=Math.min(U,Math.max(T,D())),xe=Math.max(ue,Math.min(U,Math.max(T,L())));ue!==D()&&q(ue),xe!==L()&&ce(xe)},"UI.LoadingBar:range"),JSswift.reactive.effect(()=>{n.visible!=null&&ae(o(n.visible),{fromExternal:!0})},"UI.LoadingBar:visible"),JSswift.reactive.effect(()=>{var T;const U=o(n.position)||"fixed",ue=o(n.inset),xe=o(n.top),Ne=o(n.right),$=o(n.bottom),V=o(n.left),Y=o(n.width),ge=n.visible!=null?!!o(n.visible):X(),ye=U==="static"||U==="relative";P.classList.toggle("is-visible",ge),P.classList.toggle("is-inline",ye),P.classList.toggle("has-track",!!o(n.trackColor)),P.style.position=U,P.style.zIndex=String((T=o(n.zIndex))!=null?T:10002),P.style.width=z(Y,ye?"100%":""),ue!=null&&ue!==""?(P.style.inset=z(ue),P.style.removeProperty("top"),P.style.removeProperty("right"),P.style.removeProperty("bottom"),P.style.removeProperty("left")):(P.style.removeProperty("inset"),!ye&&U!=="sticky"?(P.style.top=z(xe,"0px"),P.style.right=z(Ne,Y==null||Y===""?"0px":""),P.style.bottom=z($,""),P.style.left=z(V,"0px")):(P.style.top=z(xe,""),P.style.right=z(Ne,""),P.style.bottom=z($,""),P.style.left=z(V,"")))},"UI.LoadingBar:layout"),Qe(P,n),o(n.mount)!==!1&&u(n.target).appendChild(P),o(n.autoStart)&&J(),P};const ml=new Set(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]),Po=new Set(["soft","solid","outline"]),Jo={success:"Success",warning:"Warning",danger:"Error",info:"Info",primary:"Notice",secondary:"Notice",light:"Notice",dark:"Notice"},Eo={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"notifications",light:"notifications",dark:"shield"},bl=e=>{const t=String(o(e)||"").trim().toLowerCase();return t?ml.has(t)?t:t==="top"?"top-right":t==="bottom"?"bottom-right":t==="left"?"bottom-left":t==="right"?"bottom-right":t==="center"?"bottom-center":"bottom-right":"bottom-right"},Ro=e=>{const t=String(o(e)||"").trim().toLowerCase();return Po.has(t)?t:"soft"},To=(e,t)=>{const s=o(e);if(s===!1||s===null)return 0;if(s===!0||s===""||s===void 0)return t==="danger"?3500:2500;const l=Number(s);return Number.isFinite(l)&&l>=0?l:t==="danger"?3500:2500},qt=(e={},t="")=>{var s,l,n,i,c,r,v,a,z,u,x,k,f,B;const y=un(e)?{...e}:{message:e},M=bt(o(t)||o(y.type)||o(y.state)||o(y.color)||"info")||"info",D=To((l=(s=y.timeout)!=null?s:y.duration)!=null?l:y.delay,M),q=(c=(i=(n=y.closable)!=null?n:y.dismissible)!=null?i:y.dismiss!=null)!=null?c:D===0,L=y.title===void 0?y.label===void 0?Jo[M]:y.label:y.title;return{...y,type:M,state:M,title:L,message:(a=(v=(r=y.message)!=null?r:y.content)!=null?v:y.text)!=null?a:null,description:(x=(u=(z=y.description)!=null?z:y.subtitle)!=null?u:y.note)!=null?x:null,meta:(f=(k=y.meta)!=null?k:y.caption)!=null?f:null,body:(B=y.body)!=null?B:null,timeout:D,closable:!!q,dismissLabel:y.dismissLabel||y.closeLabel||"Chiudi notifica",position:bl(y.position),variant:Ro(y.variant),slots:y.slots||{},role:y.role||(M==="danger"||M==="warning"?"alert":"status")}},vl=(e,t="",s="")=>{if(!e.length)return qt(s?{type:t,title:s}:{type:t});if(un(e[0])){const{props:r,children:v}=JSswift.uiNormalizeArgs(e),a={...r};return!a.type&&!a.state&&!a.color&&t&&(a.type=t),a.title==null&&s&&(a.title=s),v.length&&(a.message==null&&a.description==null&&a.body==null&&v.length===1?a.message=v[0]:a.body==null&&(a.body=v.length===1?v[0]:v)),qt(a,t)}const[l,n,i]=e;let c={};return un(n)?c={...n,message:l}:un(i)?c={...i,message:l,title:n}:c={message:l,title:n},t&&!c.type&&!c.state&&!c.color&&(c.type=t),c.title==null&&s&&(c.title=s),qt(c,t)},$t=(e,t)=>(...s)=>{var l,n;return(n=(l=Ue.services.notify)==null?void 0:l.show)==null?void 0:n.call(l,vl(s,e,t))},Un=(e,t,s)=>{if(e===!1)return!1;if(typeof e=="function"){const l=e();return Un(l,t,s)}return un(e)?e:e!=null?{message:e,title:s}:{message:t,title:s}};he.Notify=(...e)=>{var t,s;return(s=(t=Ue.services.notify)==null?void 0:t.show)==null?void 0:s.call(t,vl(e))},he.Notify.show=he.Notify,he.Notify.success=$t("success","Success"),he.Notify.error=$t("danger","Error"),he.Notify.warning=$t("warning","Warning"),he.Notify.info=$t("info","Info"),he.Notify.primary=$t("primary","Notice"),he.Notify.secondary=$t("secondary","Notice"),he.Notify.remove=e=>{var t,s;return(s=(t=Ue.services.notify)==null?void 0:t.remove)==null?void 0:s.call(t,e)},he.Notify.clear=()=>{var e,t;return(t=(e=Ue.services.notify)==null?void 0:e.clear)==null?void 0:t.call(e)},he.Notify.update=(e,t={})=>{var s,l;return(l=(s=Ue.services.notify)==null?void 0:s.update)==null?void 0:l.call(s,e,t)},he.Notify.promise=async(e,t={})=>{var s,l,n,i,c,r,v,a,z,u,x,k,f,B;const y=t.loading===!1?!1:Un(typeof t.loading=="function"?()=>t.loading():t.loading,"Operazione in corso...","In corso"),M=y===!1?null:(l=(s=Ue.services.notify)==null?void 0:s.show)==null?void 0:l.call(s,qt({type:"info",timeout:0,closable:!1,...y},"info"));try{const q=await(typeof e=="function"?e():e),L=Un(typeof t.success=="function"?()=>t.success(q):t.success,"Operazione completata con successo.","Completato");return L!==!1?M!=null?(i=(n=Ue.services.notify)==null?void 0:n.update)==null||i.call(n,M,qt(L,"success")):(r=(c=Ue.services.notify)==null?void 0:c.show)==null||r.call(c,qt(L,"success")):M!=null&&((a=(v=Ue.services.notify)==null?void 0:v.remove)==null||a.call(v,M)),q}catch(D){const q=Un(typeof t.error=="function"?()=>t.error(D):t.error,(D==null?void 0:D.message)||"Operazione fallita.","Errore");throw q!==!1?M!=null?(u=(z=Ue.services.notify)==null?void 0:z.update)==null||u.call(z,M,qt(q,"danger")):(k=(x=Ue.services.notify)==null?void 0:x.show)==null||k.call(x,qt(q,"danger")):M!=null&&((B=(f=Ue.services.notify)==null?void 0:f.remove)==null||B.call(f,M)),D}},he.Header=(...e)=>{var t,s,l,n,i,c,r;const{props:v,children:a}=JSswift.uiNormalizeArgs(e),z=v.slots||{},u={...v};Qt(u);const x=N=>Object.prototype.hasOwnProperty.call(v,N),k=(t=v.drawerStateKey)!=null?t:Zt;k&&(Zt=k,Ft=rn(k));const f=()=>rn(k),B=()=>Kt(!0,k),y=()=>Kt(!1,k),M=()=>Kt(!f(),k),D={props:v,stateKey:k,isDrawerOpen:f,openDrawer:B,closeDrawer:y,toggleDrawer:M,toggleAside:M},q=(N,A)=>{if(!(A==null||A===!1)){if(Array.isArray(A)){A.forEach(T=>q(N,T));return}if(A!=null&&A.nodeType){N.appendChild(A);return}N.appendChild(document.createTextNode(String(A)))}},L=(N,A,T=U=>U)=>{const U=JSswift.ui.getSlot(z,N);if(U!=null)return F(z,N,D,null);if(typeof A=="function"){const ue=new Set(["eyebrow","title","subtitle"]),xe=_[ue.has(N)?"span":"div"]({class:`jss-header-slot-${N}`});return JSswift.reactive.effect(()=>{const Ne=T(A(D)),$=dn(JSswift.ui.slot(Ne));xe.replaceChildren(),Array.isArray($)?$.forEach(V=>q(xe,V)):q(xe,$)},`UI.Header:${N}`),[xe]}return F(z,N,D,T(A))},ce=(N,A="icon",T=v.iconSize||v.size||"md")=>N==null||N===!1?null:typeof N=="string"?he.Icon({name:N,size:T}):JSswift.ui.slot(N,{as:A}),X=N=>{var A,T;const U=N?(A=v.drawerOpenIcon)!=null?A:"\u2715":(T=v.drawerCloseIcon)!=null?T:"\u2630";return U==null||U===!1?null:typeof U=="string"?U:JSswift.ui.slot(U,{as:N?"drawerOpenIcon":"drawerCloseIcon"})},Z=_.span({class:"jss-header-toggle-icon"}),ie=N=>{const A=F(null,"default",D,X(N));Z.replaceChildren(...A.length?A:[""])};ie(f());const te=he.Btn({class:"jss-header-toggle",outline:!0,size:(l=(s=v.toggleSize)!=null?s:v.size)!=null?l:"sm",onClick:M,"aria-label":v.toggleLabel||"Toggle navigation"},Z);v.left==null&&v.left!==!1&&!JSswift.ui.getSlot(z,"left")&&dl.add({update:ie});const se=v.left===!1?null:v.left!=null?v.left:te,R=x("title")?v.title:(n=v.label)!=null?n:"App",ae=(c=(i=v.subtitle)!=null?i:v.description)!=null?c:"",re=x("right")?v.right:v.end,ne=x("content")?v.content:x("body")?v.body:a!=null&&a.length?a:null,K=[...L("left",se),...L("start",null)],S=L("icon",v.icon,ce),I=L("eyebrow",(r=v.eyebrow)!=null?r:v.kicker),m=L("title",R),P=L("subtitle",ae),G=L("meta",v.meta),h=(()=>{const N=L("content",null);return N.length?N:L("default",ne)})(),b=[...L("center",null),...L("body",null)],g=[...L("right",re),...L("end",null)],J=L("actions",v.actions),W=_.div({class:oe(["jss-header-body",v.bodyClass,v.centerClass])},_.div({class:"jss-header-heading"},S.length?_.div({class:"jss-header-icon"},...S):null,_.div({class:"jss-header-copy"},I.length?_.div({class:oe(["jss-header-eyebrow",v.eyebrowClass])},...I):null,m.length?_.div({class:oe(["jss-header-title",v.titleClass])},...m):null,P.length?_.div({class:oe(["jss-header-subtitle",v.subtitleClass])},...P):null,h.length?_.div({class:oe(["jss-header-content",v.contentClass])},...h):null),G.length?_.div({class:oe(["jss-header-meta",v.metaClass])},...G):null)),H=[...g,...J.length?[_.div({class:oe(["jss-header-actions",v.actionsClass])},...J)]:[]],de=JSswift.omit(u,["actions","actionsClass","body","bodyClass","centerClass","content","contentClass","description","divider","drawerCloseIcon","drawerOpenIcon","drawerStateKey","elevated","end","eyebrow","eyebrowClass","icon","iconSize","kicker","label","left","meta","metaClass","right","slots","stack","sticky","subtitle","subtitleClass","title","titleClass","toggleLabel","toggleSize","gap","minHeight","startClass","endClass"]);de.class=oe(["jss-panel","jss-header","jss-singularity",pe(v.sticky!==!1,"sticky"),pe(v.stack,"stack"),pe(v.elevated,"elevated"),pe(v.divider!==!1,"divider"),u.class]),de.style={...u.style||{}},v.gap!=null&&(de.style["--jss-header-gap"]=He(o(v.gap))),v.minHeight!=null&&(de.style.minHeight=He(o(v.minHeight)));const E=_.div(de,...K.length?[_.div({class:oe(["jss-header-start",v.startClass])},...K)]:[],_.div({class:"jss-header-main"},...b.length?[_.div({class:oe(["jss-header-body",v.bodyClass,v.centerClass])},...b)]:[W],...H.length?[_.div({class:oe(["jss-header-end",v.endClass])},...H)]:[]));return Qe(E,v),E},he.Drawer=(...e)=>{var t,s,l,n,i,c,r,v,a,z;const{props:u,children:x}=JSswift.uiNormalizeArgs(e),k=u.slots||{},f={...u},B=p=>Object.prototype.hasOwnProperty.call(u,p),y=(t=u.stateKey)!=null?t:Zt;y&&(Zt=y,Ft=rn(y));const M=()=>rn(y),D=()=>Kt(!0,y),q=()=>Kt(!1,y),L=()=>Kt(!M(),y),ce={props:u,stateKey:y,isDrawerOpen:M,openDrawer:D,closeDrawer:q,toggleDrawer:L,toggleAside:L},X=JSswift==null?void 0:JSswift.store,Z=!!(X!=null&&X.get&&(X!=null&&X.set)),ie=`${y}:groups`,te=`${y}:active`;let se=Z?X.get(ie,{})||{}:{},R=Z&&(s=X.get(te,null))!=null?s:null;const ae=new Map,re=new Map,ne=p=>{const C=o(p);return C==null||C===!1?[]:Array.isArray(C)?C.flat(1/0):[C]},K=(p,C,ee=ce)=>{const Se=Array.isArray(p)?p:[p];for(const Ce of Se)if(JSswift.ui.getSlot(k,Ce)!=null)return F(k,Ce,ee,C);return C==null?[]:F(null,"default",ee,o(C))},S=p=>(Array.isArray(p)?p:[p]).some(ee=>JSswift.ui.getSlot(k,ee)!=null),I=p=>{if(typeof o(p.external)=="boolean")return!!o(p.external);const C=o(p.href||p.to||p.link||"");return/^(https?:)?\/\//.test(C)},m=(l=u.closeOnSelect)!=null?l:!0,P=p=>!!m&&o(p.keepOpen)!==!0,G=(i=(n=u.itemIconSize)!=null?n:u.size)!=null?i:"md",h=(c=u.groupOpenIcon)!=null?c:"arrow_drop_up",b=(r=u.groupCloseIcon)!=null?r:"arrow_drop_down",g=p=>!!p&&R===p,J=p=>!!p&&!!R&&(R===p||R.startsWith(`${p}::`)),W=()=>{ae.forEach(({el:p,baseActive:C},ee)=>{const Se=!!C||g(ee);p.classList.toggle("active",Se),Se?p.setAttribute("aria-current","page"):p.removeAttribute("aria-current")}),re.forEach(({wrap:p,toggle:C,baseActive:ee},Se)=>{const Ce=!!ee||J(Se);p.classList.toggle("active",Ce),C.classList.toggle("active",Ce)})},H=p=>{R=p||null,Z&&X.set(te,R),W()},de=(p,C)=>{if(o(p.active)!=null)return!!o(p.active);if(o(p.current)!=null)return!!o(p.current);if(!C||I(p))return!1;try{if(C.startsWith("#"))return window.location.hash===C;const ee=`${window.location.pathname}${window.location.search}${window.location.hash}`;return C===ee||C===window.location.pathname}catch(ee){return!1}},E=(p,C,ee)=>de(p,C)||g(ee),N=(p=[],C=0,ee=[])=>ne(p).some((Se,Ce)=>{var Ae,Le,ke,Ee,Re;const Me=o(Se);if(!Me||typeof Me!="object"||Me.nodeType)return!1;const $e=o(Me.href||Me.to||Me.link||""),Ye=(Re=o((Ee=(ke=(Le=(Ae=Me.label)!=null?Ae:Me.title)!=null?Le:Me.text)!=null?ke:$e)!=null?Ee:null))!=null?Re:`item-${C}-${Ce}`,qe=ue(Me,Ye,C,Ce),lt=ee.concat(qe).join("::");if(E(Me,$e,lt))return!0;const Xe=Me.items||Me.children||Me.sub;return N(Xe,C+1,ee.concat(qe))}),A=(p,C={})=>{var ee;const Se=o(p);if(Se==null||Se===!1)return[];const Ce=typeof Se=="string"?he.Icon({name:Se,size:(ee=C.iconSize)!=null?ee:G}):JSswift.ui.slot(Se,{...C,as:"icon"});return F(null,"default",C,Ce)},T=(p,C,ee={})=>{const Se=A(p,ee);return Se.length?[_.span({class:oe(["jss-drawer-item-icon",C])},...Se)]:[]},U=p=>{const C=o(p.iconPosition)||"left",ee=Object.prototype.hasOwnProperty.call(p,"iconLeft")?p.iconLeft:C!=="right"?p.icon:null,Se=Object.prototype.hasOwnProperty.call(p,"iconRight")?p.iconRight:C==="right"?p.icon:null;return{left:ee,right:Se}},ue=(p,C,ee,Se)=>o(p.key||p.id||p.to||p.href||C||`item-${ee}-${Se}`),xe=(p,C)=>Z&&Object.prototype.hasOwnProperty.call(se,p)?!!se[p]:C,Ne=(p,C)=>{Z&&(se={...se,[p]:!!C},X.set(ie,se))},$=()=>{const p={...ce,area:"header"},C=K(["headerIcon","icon"],u.icon,p),ee=K(["eyebrow"],u.eyebrow,p),Se=K(["title"],u.title,p),Ce=K(["subtitle"],u.subtitle,p),Ae=K(["meta"],u.meta,p),Le=K(["content"],u.content,p),ke=K(["actions"],u.actions,p),Ee=B("header")?F(null,"default",p,o(u.header)):[],Re=C.length||ee.length||Se.length||Ce.length||Ae.length||Le.length||ke.length;return!Re&&!Ee.length?[]:Re?[_.div({class:oe(["jss-drawer-header",u.headerClass])},...C.length?[_.div({class:"jss-drawer-header-icon"},...C)]:[],_.div({class:"jss-drawer-header-body"},...ee.length?[_.div({class:"jss-drawer-header-eyebrow"},...ee)]:[],...Se.length?[_.div({class:"jss-drawer-header-title"},...Se)]:[],...Ce.length?[_.div({class:"jss-drawer-header-subtitle"},...Ce)]:[],...Ae.length?[_.div({class:"jss-drawer-header-meta"},...Ae)]:[],...Le.length?[_.div({class:"jss-drawer-header-content"},...Le)]:[],...Ee.length?[_.div({class:"jss-drawer-header-extra"},...Ee)]:[]),...ke.length?[_.div({class:"jss-drawer-header-actions"},...ke)]:[])]:Ee},V=(p,C,ee)=>{var Se,Ce;return!(((Se=p.onClick)==null?void 0:Se.call(p,ee,C))===!1||ee!=null&&ee.defaultPrevented||((Ce=u.onSelect)==null?void 0:Ce.call(u,p,C,ee))===!1||ee!=null&&ee.defaultPrevented)},Y=(p,C,ee={})=>{const Se=C.hasChildren?"group":"item",Ce=F(k,`${Se}Label`,C,C.label),Ae=F(k,`${Se}Note`,C,C.note),Le=F(k,`${Se}Badge`,C,C.badge),ke=F(k,`${Se}Aside`,C,C.aside),Ee=F(k,`${Se}Content`,C,C.content),Re=[];return(Ce.length||Ae.length||Le.length||ke.length)&&Re.push(_.div({class:"jss-drawer-item-top"},_.div({class:"jss-drawer-item-copy"},...Ce.length?[_.div({class:"jss-drawer-item-label"},...Ce)]:[],...Ae.length?[_.div({class:"jss-drawer-item-note"},...Ae)]:[]),...Le.length||ke.length?[_.div({class:"jss-drawer-item-meta"},...Le.length?[_.div({class:"jss-drawer-item-badge"},...Le)]:[],...ke.length?[_.div({class:"jss-drawer-item-aside"},...ke)]:[])]:[])),Ee.length&&Re.push(_.div({class:"jss-drawer-item-content"},...Ee)),[...ee.start||[],...T(C.iconLeft,"left",C),...Re.length?[_.div({class:"jss-drawer-item-main"},...Re)]:[],...T(C.iconRight,"right",C),...ee.end||[]]},ge=(p=[],C=0,ee=[])=>ne(p).map((Se,Ce)=>{var Ae,Le,ke,Ee,Re,Me,$e,Ye,qe,lt,Xe;const ze=o(Se);if(ze==null||ze===!1)return null;if(ze.nodeType||typeof ze!="object"||Array.isArray(ze))return _.div({class:"jss-drawer-custom","data-level":String(C)},...F(null,"default",{...ce,item:ze,level:C,index:Ce,path:ee},ze));if(o(ze.hidden)===!0||o(ze.visible)===!1)return null;const Ve=ne(ze.items||ze.children||ze.sub),Ke=o(ze.href||ze.to||ze.link||null),gt=o((Ee=(ke=(Le=(Ae=ze.label)!=null?Ae:ze.title)!=null?Le:ze.text)!=null?ke:Ke)!=null?Ee:null),yt=gt!=null?gt:`item-${C}-${Ce}`,ut=o(($e=(Me=(Re=ze.note)!=null?Re:ze.subtitle)!=null?Me:ze.description)!=null?$e:null),dt=o((Ye=ze.badge)!=null?Ye:null),_t=o((lt=(qe=ze.aside)!=null?qe:ze.meta)!=null?lt:null),ft=o((Xe=ze.content)!=null?Xe:null),at=ue(ze,yt,C,Ce),ht=ee.concat(at).join("::"),{left:vt,right:tn}=U(ze),Lt=bt(o(ze.state)||o(ze.color)||""),kt=de(ze,Ke),gn=kt||g(ht),Nt=!!o(ze.disabled),zt={...ce,item:ze,index:Ce,level:C,path:ee,label:yt,note:ut,badge:dt,aside:_t,content:ft,itemStateKey:ht,iconLeft:vt,iconRight:tn,iconSize:o(ze.iconSize)||G,active:gn,disabled:Nt,hasChildren:!1},nn=o(ze.divider)===!0||ze.type==="divider"||ze.type==="separator",cn=o(ze.section)===!0||ze.type==="section"||ze.type==="heading"||ze.type==="label",jn=ze.type==="content"||ze.type==="custom"||!Ke&&!Ve.length&&!o(ze.button)&&ze.type!=="button"&&gt==null&&ft!=null;if(nn)return _.div({class:oe(["jss-drawer-separator",ze.class]),"data-level":String(C)});if(cn){const _e=F(k,"sectionLabel",zt,yt||ft);return _.div({class:oe(["jss-drawer-section-label",ze.class]),"data-level":String(C)},..._e)}if(jn){const _e=F(k,"item",zt,ft!=null?ft:yt);return _.div({class:oe(["jss-drawer-custom",Lt?`jss-drawer-tone-${Lt}`:"",ze.class]),style:ze.style,"data-level":String(C)},..._e)}if(Ve.length){const _e=kt||N(Ve,C+1,ee.concat(at)),Fe=_e||J(ht);let De=xe(ht,!!o(ze.expanded)||!!o(ze.open)||Fe);const Te=_.span({class:"jss-drawer-group-icon"}),We={...zt,active:Fe,hasChildren:!0,isOpen:()=>De,setOpen:jt=>Pt(jt),toggle:()=>Pt(!De)},tt=()=>{var jt,Et;const sn=De?(jt=ze.openIcon)!=null?jt:h:(Et=ze.closeIcon)!=null?Et:b,ln=o(De?ze.iconSidePosition||ze.openIconSide||ze.openIconPosition||"right":ze.iconSidePosition||ze.closeIconSide||ze.closeIconPosition||"right")==="left"?"left":"right";Te.innerHTML="",Te.className=`jss-drawer-group-icon ${ln}`,A(sn,{...We,as:"toggleIcon"}).forEach(hn=>Te.appendChild(hn))},ct=_.button({type:"button",class:oe(["jss-drawer-group-toggle","jss-drawer-entry",De?"open":"",Fe?"active":"",Nt?"is-disabled":"",Lt?`jss-drawer-tone-${Lt}`:"",ze.class]),style:ze.style,"data-level":String(C),"aria-expanded":String(De),"aria-disabled":Nt?"true":null,onClick:jt=>{if(Nt){jt.preventDefault();return}H(ht),Pt(!De)}},...Y(ze,We,{start:o(ze.iconSidePosition||ze.openIconSide||ze.closeIconSide||ze.openIconPosition||ze.closeIconPosition||"right")==="left"?[Te]:[],end:o(ze.iconSidePosition||ze.openIconSide||ze.closeIconSide||ze.openIconPosition||ze.closeIconPosition||"right")==="right"?[Te]:[]})),St=F(k,"group",We,null),wt=_.div({class:"jss-drawer-group-items"},...ge(Ve,C+1,ee.concat(at))),Jt=_.div({class:oe(["jss-drawer-group",De?"open":"",Fe?"active":"",Lt?`jss-drawer-tone-${Lt}`:""]),"data-level":String(C)},...St.length?St:[ct],wt),Pt=jt=>{De=!!jt,Jt.classList.toggle("open",De),ct.classList.toggle("open",De),ct.setAttribute("aria-expanded",String(De)),tt(),Ne(ht,De)};return re.set(ht,{wrap:Jt,toggle:ct,baseActive:_e}),tt(),Jt}const Je=F(k,"item",zt,null),Be=o(ze.button)===!0||ze.type==="button"||!Ke&&typeof ze.onClick=="function",nt={class:oe(["jss-drawer-entry",Be?"jss-drawer-btn":"jss-drawer-link",gn?"active":"",Nt?"is-disabled":"",Lt?`jss-drawer-tone-${Lt}`:"",ze.class]),style:ze.style,"data-level":String(C),"aria-current":gn?"page":null,"aria-disabled":Nt?"true":null},st=Je.length?Je:Y(ze,zt);if(Be){const _e=_.button({...nt,type:ze.buttonType||"button",disabled:Nt,onClick:Fe=>{if(Nt){Fe.preventDefault();return}V(ze,zt,Fe)&&(H(ht),P(ze)&&q())}},...st);return ae.set(ht,{el:_e,baseActive:kt}),_e}const mt=I(ze),pt=mt?o(ze.target)||"_blank":o(ze.target),w=mt?o(ze.rel)||"noopener noreferrer":o(ze.rel),le=_.a({...nt,href:Ke||"#",target:pt||null,rel:w||null,tabIndex:Nt?-1:null,onClick:_e=>{var Fe;if(Nt){_e.preventDefault();return}V(ze,zt,_e)&&(!mt&&ze.to&&((Fe=Ue.router)!=null&&Fe.navigate)&&(_e.preventDefault(),Ue.router.navigate(ze.to)),P(ze)&&q())}},...st);return ae.set(ht,{el:le,baseActive:kt}),le}).filter(Boolean),ye=K(["before","beforeItems"],(v=u.before)!=null?v:u.beforeItems),Q=S(["body"])?K(["body"],null):[],ve=ge(u.items||[]),be=K(["default"],x),me=K(["after","afterItems"],(a=u.after)!=null?a:u.afterItems),Ie=Q.length?Q:[...ye,...ve,...be,...me],Oe=B("empty")||B("emptyText")?(z=u.empty)!=null?z:_.div({class:oe(["jss-drawer-empty",u.emptyClass])},u.emptyText||"Nessun contenuto"):_.div({class:oe(["jss-drawer-empty",u.emptyClass])},"Nessun contenuto"),we=K(["header"],$()),j=K(["footer"],u.footer),fe=Ie.length?Ie:K(["empty"],Oe),je=JSswift.omit(f,["items","header","footer","before","beforeItems","after","afterItems","title","subtitle","eyebrow","icon","content","meta","actions","empty","emptyText","closeOnSelect","groupOpenIcon","groupCloseIcon","stateKey","sticky","slots","headerClass","bodyClass","footerClass","emptyClass","itemIconSize","gap","indent","padding","minHeight","maxHeight","width","onSelect"]);je.class=oe(["jss-panel","jss-drawer",Ft?"open":"",pe(u.sticky,"sticky"),f.class]),je.style={...f.style||{}},u.gap!=null&&(je.style["--jss-drawer-gap"]=He(o(u.gap))),u.indent!=null&&(je.style["--jss-drawer-indent"]=He(o(u.indent))),u.padding!=null&&(je.style["--jss-drawer-padding"]=He(o(u.padding))),u.width!=null&&(je.style.width=He(o(u.width))),u.minHeight!=null&&(je.style.minHeight=He(o(u.minHeight))),u.maxHeight!=null&&(je.style.maxHeight=He(o(u.maxHeight)));const O=_.div(je,...we.length?we:[],_.div({class:oe(["jss-drawer-body",u.bodyClass])},...fe),...j.length?[_.div({class:oe(["jss-drawer-footer",u.footerClass])},...j)]:[]),d=ms.get(y)||new Set;return d.add(O),ms.set(y,d),Kt(Ft,y),O.isDrawerOpen=M,O.openDrawer=D,O.closeDrawer=q,O.toggleDrawer=L,O.setActiveItem=H,Qe(O,u),W(),O},he.Page=(...e)=>{var t,s,l,n;const{props:i,children:c}=JSswift.uiNormalizeArgs(e),r=i.slots||{},v={...i},a=(b,g)=>{var J;return!!(b&&b.nodeType===1&&((J=b.classList)!=null&&J.contains(`jss-page-${g}`)))},z=b=>b==null?null:typeof b=="string"?he.Icon({name:b,size:i.iconSize||i.size||"xl"}):JSswift.ui.slot(b,{as:"icon"}),u={dense:!!o(i.dense),flat:!!o(i.flat),centered:!!o(i.centered),narrow:!!o(i.narrow)},x=(b,g)=>{if(!(g==null||g===!1)){if(Array.isArray(g)){g.forEach(J=>x(b,J));return}if(g!=null&&g.nodeType){b.appendChild(g);return}b.appendChild(document.createTextNode(String(g)))}},k=(b,g,J=W=>W)=>{const W=JSswift.ui.getSlot(r,b);if(W!=null)return F(r,b,u,null);if(typeof g=="function"){const H=new Set(["eyebrow","title","subtitle"]),de=_[H.has(b)?"span":"div"]({class:`jss-page-slot-${b}`});return JSswift.reactive.effect(()=>{const E=J(g(u)),N=dn(JSswift.ui.slot(E));de.replaceChildren(),Array.isArray(N)?N.forEach(A=>x(de,A)):x(de,N)},`UI.Page:${b}`),[de]}return F(r,b,u,J(g))},f=F(r,"default",u,c!=null&&c.length?c:[]),B={hero:[],header:[],body:[],footer:[],actions:[]},y=[];f.forEach(b=>{a(b,"hero")?B.hero.push(b):a(b,"header")?B.header.push(b):a(b,"body")?B.body.push(b):a(b,"footer")?B.footer.push(b):a(b,"actions")?B.actions.push(b):y.push(b)});const M=k("icon",i.icon,z),D=k("hero",(t=i.hero)!=null?t:i.banner),q=k("eyebrow",(s=i.eyebrow)!=null?s:i.kicker),L=k("title",i.title),ce=k("subtitle",(l=i.subtitle)!=null?l:i.description),X=k("header",i.header),Z=k("aside",i.aside),ie=k("body",(n=i.body)!=null?n:i.content),te=k("footer",i.footer),se=k("actions",i.actions),R=D.length?_.div({class:oe(["jss-page-hero",i.heroClass])},...D):null,ae=M.length||q.length||L.length||ce.length||X.length||Z.length,re=ae?_.div({class:oe(["jss-page-header",i.headerClass])},_.div({class:"jss-page-head"},M.length?_.div({class:oe(["jss-page-icon",i.iconClass])},...M):null,_.div({class:"jss-page-head-main"},q.length?_.div({class:oe(["jss-page-eyebrow",i.eyebrowClass])},...q):null,L.length?_.div({class:oe(["jss-page-title",i.titleClass])},...L):null,ce.length?_.div({class:oe(["jss-page-subtitle",i.subtitleClass])},...ce):null,X.length?_.div({class:oe(["jss-page-header-content",i.headerContentClass])},...X):null),Z.length?_.div({class:oe(["jss-page-aside",i.asideClass])},...Z):null)):null,ne=[...ie,...y],K=ne.length?_.div({class:oe(["jss-page-body",i.bodyClass])},...ne):null,S=[...se,...B.actions],I=te.length||S.length?_.div({class:oe(["jss-page-footer",i.footerClass])},...te,S.length?_.div({class:"jss-page-actions"},...S):null):null,m=!!(D.length||B.hero.length),P=!!(ae||B.header.length),G=JSswift.omit(v,["actions","aside","asideClass","banner","body","bodyClass","centered","content","dense","description","eyebrow","eyebrowClass","flat","footer","footerClass","gap","header","headerClass","headerContentClass","headerGap","hero","heroClass","heroPadding","icon","iconClass","iconSize","kicker","maxWidth","minHeight","narrow","padding","size","slots","subtitle","subtitleClass","title","titleClass"]);G.class=oe(["jss-panel","jss-page",pe(i.dense,"dense"),pe(i.flat,"jss-page-flat"),pe(i.centered,"jss-page-centered"),pe(i.narrow,"jss-page-narrow"),pe(m,"jss-page-has-hero"),pe(P,"jss-page-has-header"),v.class]),G.style={...v.style||{}},(i.gap!=null||rt(i.gap))&&(G.style["--jss-page-gap"]=Pe(i.gap,He)),(i.padding!=null||rt(i.padding))&&(G.style["--jss-page-padding"]=Pe(i.padding,He)),(i.maxWidth!=null||rt(i.maxWidth))&&(G.style["--jss-page-max-width"]=Pe(i.maxWidth,He)),(i.minHeight!=null||rt(i.minHeight))&&(G.style["--jss-page-min-height"]=Pe(i.minHeight,He)),(i.headerGap!=null||rt(i.headerGap))&&(G.style["--jss-page-header-gap"]=Pe(i.headerGap,He)),(i.heroPadding!=null||rt(i.heroPadding))&&(G.style["--jss-page-hero-padding"]=Pe(i.heroPadding,He));const h=_.div(G,R,...B.hero,re,...B.header,K,...B.body,I,...B.footer);return Qe(h,i),h},he.AppShell=(...e)=>{var t,s;const{props:l,children:n}=JSswift.uiNormalizeArgs(e),i=l.slots||{},c=(J,W)=>!!J&&Object.prototype.hasOwnProperty.call(J,W),r=o(l.noDrawer)===!0||l.drawer===!1,v=o(l.reverse)===!0,a=o(l.stack)===!0,z=(s=(t=l.drawerStateKey)!=null?t:l.stateKey)!=null?s:Zt;z&&(Zt=z,Ft=rn(z));const u={props:l,noDrawer:r,stateKey:z,isDrawerOpen:()=>rn(z),openDrawer:()=>Kt(!0,z),closeDrawer:()=>Kt(!1,z),toggleDrawer:()=>Kt(!rn(z),z)},x=l.headerProps&&typeof l.headerProps=="object"?{...l.headerProps}:{};let k=l.header;!c(l,"header")&&(Object.keys(x).length||c(l,"title")||c(l,"subtitle")||c(l,"left")||c(l,"right"))&&(!c(x,"title")&&c(l,"title")&&(x.title=l.title),!c(x,"subtitle")&&c(l,"subtitle")&&(x.subtitle=l.subtitle),!c(x,"left")&&c(l,"left")&&(x.left=l.left),!c(x,"right")&&c(l,"right")&&(x.right=l.right),c(x,"drawerStateKey")||(x.drawerStateKey=z),r&&!c(x,"left")&&(x.left=!1),k=he.Header(x));const f=l.drawerProps&&typeof l.drawerProps=="object"?{...l.drawerProps}:{},B=c(l,"drawerItems")?l.drawerItems:l.items,y=c(l,"drawerHeader")?l.drawerHeader:void 0;let M=l.drawer;!c(l,"drawer")&&!r&&(Object.keys(f).length||B!=null||y!=null)&&(!c(f,"items")&&B!=null&&(f.items=B),!c(f,"header")&&y!=null&&(f.header=y),c(f,"stateKey")||(f.stateKey=z),M=he.Drawer(f));const D=l.pageProps&&typeof l.pageProps=="object"?{...l.pageProps}:{},q=c(l,"content")?l.content:n,L=F(i,"default",u,q);let ce=l.page;!c(l,"page")&&(Object.keys(D).length||L.length)&&(ce=he.Page(D,...L));const X=l.footerProps&&typeof l.footerProps=="object"?{...l.footerProps}:{},Z=c(l,"footerContent")?l.footerContent:void 0;let ie=l.footer;!c(l,"footer")&&(Object.keys(X).length||Z!=null)&&(ie=he.Footer(X,...F(null,"default",u,Z)));const te=F(i,"header",u,k),se=r?[]:F(i,"drawer",u,M),R=F(i,"page",u,ce),ae=F(i,"footer",u,ie),re=oe(["jss-app","jss-app-shell",pe(r,"no-drawer"),pe(v,"is-reverse"),pe(a,"is-stack"),pe(l.flush,"is-flush"),pe(l.divider,"is-divider"),l.class]),ne=JSswift.omit(l,["header","drawer","page","footer","content","title","subtitle","left","right","items","drawerItems","drawerHeader","headerProps","drawerProps","pageProps","footerProps","footerContent","noDrawer","reverse","stack","flush","divider","drawerStateKey","stateKey","drawerWidth","gap","padding","slots"]);ne.class=re,ne.style={...l.style||{}};const K=Pe(l.drawerWidth,He);K!=null&&(ne.style["--jss-app-shell-drawer-width"]=K);const S=Pe(l.gap,He);S!=null&&(ne.style["--jss-app-shell-gap"]=S);const I=Pe(l.padding,He);I!=null&&(ne.style["--jss-app-shell-padding"]=I);const m=te.length?_.div({class:"jss-app-shell-header-slot"},...te):null,P=se.length?_.div({class:"jss-app-shell-drawer-slot"},...se):null,G=R.length?_.div({class:"jss-app-shell-page-slot"},...R):null,h=ae.length?_.div({class:"jss-app-shell-footer-slot"},...ae):null,b=v?[G,P]:[P,G],g=_.div(ne,...m?[m]:[],_.div({class:"jss-app-shell-body"},...b.filter(Boolean)),...h?[h]:[]);return g.openDrawer=u.openDrawer,g.closeDrawer=u.closeDrawer,g.toggleDrawer=u.toggleDrawer,g.isDrawerOpen=u.isDrawerOpen,g.header=m,g.drawer=P,g.page=G,g.footer=h,Qe(g,l),g},he.Parallax=function(...t){var s,l;const{props:n,children:i}=JSswift.uiNormalizeArgs(t),c=n.slots||{},r={...n};r.color!=null&&r.textColor==null&&(r.textColor=r.color),delete r.color,Qt(r);const v=et(n.state,()=>{const H=bt(o(n.state));return H?`jss-state-${H}`:""}),a=H=>{if(H==null||H===!1||H==="")return"";const de=String(H);return on(de)?`var(--jss-${de})`:de},z=()=>{const H=o(n.background);if(H)return String(H);const de=o(n.image)||o(n.src)||"";if(!de)return"linear-gradient(120deg, #1b2c5a, #2f6d8f, #2a8f5c)";const E=String(de);return/^url\(/i.test(E)||/gradient\(/i.test(E)||/^var\(/i.test(E)?E:`url(${E})`},u=(H,de)=>{const E=Number(o(H));return Number.isFinite(E)?E:de},x={speed:()=>{var H;return(H=o(n.speed))!=null?H:.18},state:()=>o(n.state)||"",disabled:()=>!!o(n.disabled)},k=F(c,"badge",x,n.badge),f=F(c,"background",x,n.backgroundContent),B=F(c,"eyebrow",x,(s=n.eyebrow)!=null?s:n.kicker),y=F(c,"title",x,n.title),M=F(c,"subtitle",x,n.subtitle),D=F(c,"header",x,n.header),q=F(c,"aside",x,n.aside),L=F(c,"media",x,n.media),ce=F(c,"content",x,(l=n.content)!=null?l:n.body),X=F(c,"default",x,i!=null&&i.length?i:[]),Z=F(c,"footer",x,n.footer),ie=F(c,"actions",x,n.actions),te=[...ce,...X],se=k.length?_.div({class:oe(["jss-parallax-badge",n.badgeClass])},...k):null,R=B.length||y.length||M.length||D.length||q.length,ae=R?_.div({class:oe(["jss-parallax-header",n.headerClass])},_.div({class:"jss-parallax-head"},_.div({class:"jss-parallax-head-main"},B.length?_.div({class:oe(["jss-parallax-eyebrow",n.eyebrowClass])},...B):null,y.length?_.div({class:oe(["jss-parallax-title",n.titleClass])},...y):null,M.length?_.div({class:oe(["jss-parallax-subtitle",n.subtitleClass])},...M):null,D.length?_.div({class:oe(["jss-parallax-header-content",n.headerContentClass])},...D):null),q.length?_.div({class:oe(["jss-parallax-aside",n.asideClass])},...q):null)):null,re=L.length?_.div({class:oe(["jss-parallax-media",n.mediaClass])},...L):null,ne=te.length?_.div({class:oe(["jss-parallax-body",n.bodyClass])},...te):null,K=Z.length||ie.length?_.div({class:oe(["jss-parallax-footer",n.footerClass])},Z.length?_.div({class:"jss-parallax-footer-content"},...Z):null,ie.length?_.div({class:"jss-parallax-actions"},...ie):null):null,S=JSswift.omit(r,["actions","align","aside","asideClass","background","backgroundContent","backgroundContentClass","badge","badgeClass","bgClass","bgPosition","bgRepeat","bgSize","body","bodyClass","color","content","contentClass","contentMaxWidth","disabled","eyebrow","eyebrowClass","footer","footerClass","gap","header","headerClass","headerContentClass","height","image","imageAlt","imageClass","innerClass","justify","kicker","maxOffset","media","mediaClass","minHeight","overlay","padding","slots","speed","src","startTop","state","subtitle","subtitleClass","textColor","title","titleClass"]);S.class=oe(["jss-parallax","jss-singularity",v,pe(n.disabled,"jss-parallax-static"),pe(se,"jss-parallax-has-badge"),pe(R,"jss-parallax-has-header"),r.class]),S.style={...r.style||{}},n.height!=null&&(S.style["--jss-parallax-height"]=Pe(n.height,He)),n.minHeight!=null&&(S.style["--jss-parallax-min-height"]=Pe(n.minHeight,He)),n.padding!=null&&(S.style["--jss-parallax-padding"]=Pe(n.padding,He)),n.gap!=null&&(S.style["--jss-parallax-gap"]=Pe(n.gap,He)),n.contentMaxWidth!=null&&(S.style["--jss-parallax-content-max-width"]=Pe(n.contentMaxWidth,He)),n.justify!=null&&(S.style["--jss-parallax-justify"]=Pe(n.justify)),n.align!=null&&(S.style["--jss-parallax-align"]=Pe(n.align)),n.color!=null&&(S.style["--jss-parallax-color"]=Pe(n.color,a)),n.overlay!=null&&(S.style["--jss-parallax-overlay"]=Pe(n.overlay)),n.bgPosition!=null&&(S.style["--jss-parallax-position"]=Pe(n.bgPosition)),n.bgSize!=null&&(S.style["--jss-parallax-size"]=Pe(n.bgSize)),n.bgRepeat!=null&&(S.style["--jss-parallax-repeat"]=Pe(n.bgRepeat)),S.style["--jss-parallax-image"]=rt(n.background)||rt(n.image)||rt(n.src)?()=>z():z();const I=_.div({class:oe(["jss-parallax-bg",n.bgClass])},f.length?_.div({class:oe(["jss-parallax-bg-content",n.backgroundContentClass])},...f):null),m=_.div({class:oe(["jss-parallax-content",n.contentClass,n.innerClass])},se,ae,re,ne,K),P=_.div(S,I,m);let G=!1,h=!1,b=null;const g=()=>{var H;G||(G=!0,typeof window!="undefined"&&(window.removeEventListener("scroll",W),window.removeEventListener("resize",W)),(H=b==null?void 0:b.disconnect)==null||H.call(b),b=null)},J=()=>{if(G)return;if(!P.isConnected){g();return}if(o(n.disabled)){I.style.transform="translate3d(0, 0, 0)",P.style.setProperty("--jss-parallax-offset","0px");return}const H=P.getBoundingClientRect(),de=u(n.speed,.18),E=Math.abs(u(n.maxOffset,96)),N=o(n.startTop),A=N!=null&&N!==""?(H.top-u(n.startTop,0))*de:((typeof window!="undefined"&&(window.innerHeight||document.documentElement.clientHeight)||0)/2-(H.top+H.height/2))*de,U=`${(E>0?Math.max(-E,Math.min(E,A)):A).toFixed(2)}px`;I.style.transform=`translate3d(0, ${U}, 0)`,P.style.setProperty("--jss-parallax-offset",U)};function W(){G||h||(h=!0,requestAnimationFrame(()=>{h=!1,J()}))}return typeof window!="undefined"&&(window.addEventListener("scroll",W,{passive:!0}),window.addEventListener("resize",W),typeof ResizeObserver!="undefined"&&(b=new ResizeObserver(()=>{W()}),b.observe(P)),requestAnimationFrame(()=>{W()}),setTimeout(()=>{W()},90)),P.refresh=()=>(W(),P),P.update=P.refresh,P.destroy=()=>(g(),P.remove(),null),P._dispose=g,Qe(P,n),P};const[Gn,Kn]=Ue.reactive.signal([]),Yn=new Map;function ys(e){const t=Yn.get(e);t&&(clearTimeout(t),Yn.delete(e))}function ws(e){return e?(ys(e),Kn(Gn().filter(t=>t.id!==e)),e):null}function Oo(){for(const e of Yn.keys())ys(e);Kn([])}function yl(e){e!=null&&e.id&&(ys(e.id),e.timeout>0&&Yn.set(e.id,setTimeout(()=>{ws(e.id)},e.timeout)))}function wl(e,t={}){if(!e)return null;let s=null;return Kn(Gn().map(l=>l.id!==e?l:(s=qt({...l,...t,id:l.id},t.type||t.state||t.color||l.type),s))),s&&yl(s),(s==null?void 0:s.id)||null}function Mo(e){const t=()=>ws(e.id),s=(y={})=>wl(e.id,y),l={toast:e,id:e.id,close:t,update:s},n=y=>typeof y=="function"?y(l):y,i=(()=>{if(e.icon===!1||e.icon===null)return null;if(e.icon!=null){const M=n(e.icon);return typeof M=="string"?he.Icon({name:M,size:"sm"}):JSswift.ui.slot(M,{as:"icon"})}const y=Eo[e.type];return y?he.Icon({name:y,size:"sm"}):null})(),c=F(e.slots,"icon",l,i),r=F(e.slots,"title",l,n(e.title)),v=F(e.slots,"message",l,n(e.message)),a=F(e.slots,"description",l,n(e.description)),z=F(e.slots,"meta",l,n(e.meta)),u=F(e.slots,"actions",l,n(e.actions)),x=F(e.slots,"default",l,n(e.body)),k=F(e.slots,"dismiss",l,n(e.dismiss)),f=k.length?k:e.closable?[he.Btn({class:"jss-toast-close",outline:!0,size:"xs","aria-label":e.dismissLabel,onClick:t},he.Icon({name:"close",size:"xs"}))]:[],B=_.div({class:oe(["jss-toast",`jss-toast-${e.type}`,`jss-toast-${e.variant}`,pe(e.closable,"is-closable"),e.class]),style:e.style||{},role:e.role},c.length?_.div({class:"jss-toast-icon"},...c):null,_.div({class:"jss-toast-main"},_.div({class:"jss-toast-copy"},r.length?_.div({class:"jss-toast-title"},...r):null,v.length?_.div({class:"jss-toast-message"},...v):null,a.length?_.div({class:"jss-toast-description"},...a):null,x.length?_.div({class:"jss-toast-body"},...x):null,z.length?_.div({class:"jss-toast-meta"},...z):null),u.length?_.div({class:"jss-toast-actions"},...u):null),f.length?_.div({class:"jss-toast-dismiss"},...f):null);return Qe(B,e),B}function Fo(){let e=document.querySelector(".jss-toast-layer");return e||(e=document.createElement("div"),e.className="jss-toast-layer",document.body.appendChild(e),Ue.reactive.effect(()=>{const t=Gn();e.innerHTML="";const s=new Map;for(const l of t){const n=bl(l.position);s.has(n)||s.set(n,[]),s.get(n).push(l)}for(const l of ml){const n=s.get(l);if(!(n!=null&&n.length))continue;const i=_.div({class:oe(["jss-toast-wrap",`is-${l}`])},...n.map(c=>Mo(c)));e.appendChild(i)}},"JSswiftUI:toasts"),e)}function Do(e={}){Fo();const t=qt(e);return t.id=t.id||Math.random().toString(36).slice(2),Kn([...Gn().filter(s=>s.id!==t.id),t]),yl(t),t.id}Ue.services.notify.show=Do,Ue.services.notify.success=$t("success","Success"),Ue.services.notify.error=$t("danger","Error"),Ue.services.notify.warning=$t("warning","Warning"),Ue.services.notify.info=$t("info","Info"),Ue.services.notify.primary=$t("primary","Notice"),Ue.services.notify.secondary=$t("secondary","Notice"),Ue.services.notify.update=wl,Ue.services.notify.remove=ws,Ue.services.notify.clear=Oo,Ue.services.notify.promise=he.Notify.promise,Ue.notify=Ue.services.notify,JSswift.form=JSswift.form||{},JSswift.form._isPromise=e=>e&&typeof e.then=="function",JSswift.form._normalizeRules=e=>{const t={};for(const s in e||{}){const l=e[s];t[s]=Array.isArray(l)?l:[l]}return t},JSswift.form._runRule=async(e,t,s)=>{let l=e,n=null;e&&typeof e=="object"&&typeof e.rule=="function"&&(l=e.rule,n=e.message||null);const i=l?l(t,s):!0,c=JSswift.form._isPromise(i)?await i:i;return c===!0?null:typeof c=="string"?c:c===!1?n||"Valore non valido":c?null:n||"Valore non valido"},JSswift.useForm=(e={})=>{const t=e.model||{},s=JSswift.form._normalizeRules(e.rules||{}),l=e.validateOn||"submit",n=e.initial||null,i=_.rod({}),c=_.rod({}),r=_.rod(!1),v=_.rod(null),a=()=>t&&typeof t=="object"&&"value"in t?t.value||{}:t,z=Z=>{if(t&&typeof t=="object"&&"value"in t)t.value=Z;else{const ie=t||{};for(const te in ie)delete ie[te];Object.assign(ie,Z)}},u=Z=>{const ie=a();return ie?ie[Z]:void 0},x=(Z,ie)=>{const te={...a()||{}};te[Z]=ie,z(te)},k=(Z,ie)=>{const te={...i.value||{}};ie?te[Z]=ie:delete te[Z],i.value=te},f=Z=>(i.value||{})[Z]||null,B=Z=>{c.value={...c.value||{},[Z]:!0}},y=Z=>!!(c.value||{})[Z],M=async Z=>{const ie=s[Z]||[];if(!ie.length)return k(Z,null),!0;const te=u(Z),se={name:Z,value:te,model:a(),form:X};for(const R of ie){if(!R)continue;const ae=await JSswift.form._runRule(R,te,se);if(ae)return k(Z,ae),!1}return k(Z,null),!0},D=async()=>{v.value=null;const Z=Object.keys(s);let ie=!0;for(const te of Z)await M(te)||(ie=!1);return ie},X={model:t,errors:i,touched:c,submitting:r,submitError:v,getValue:u,setValue:x,getError:f,setError:k,touch:B,isTouched:y,field:(Z,ie={})=>{var te;const se=_.rod("");(te=se.action)==null||te.call(se,G=>{x(Z,G)});const R=()=>l==="submit"||l==="input"||l==="blur"?!0:y(Z);let ae=null,re=!1,ne=!1;const K=async()=>{re||(re=!0,B(Z),(l==="blur"||l==="input")&&await M(Z),setTimeout(()=>{re=!1},0))},S=G=>{ae&&(ae===G.target||ae.contains&&ae.contains(G.target)||(K(),ae=null,ne&&(ne=!1,document.removeEventListener("pointerdown",S,!0))))},I=()=>{ne||(ne=!0,document.addEventListener("pointerdown",S,!0))},m=async()=>{ae=document.activeElement,re=!1,I(),l==="input"&&await M(Z)},P=async()=>{await K(),ae=null,ne&&(ne=!1,document.removeEventListener("pointerdown",S,!0))};return{name:Z,model:se,get value(){return se.value},set value(G){se.value=G},error:()=>R()?f(Z):null,success:ie.success||null,warning:ie.warning||null,note:ie.note||null,touch:()=>B(Z),validate:()=>M(Z),onInput:m,onBlur:P,hint:ie.hint||null}},validateField:M,validate:D,reset:()=>{v.value=null,i.value={},c.value={},n&&z({...n||{}})},submit:async Z=>{r.value=!0,v.value=null;try{return await D()?{ok:!0,result:await(Z==null?void 0:Z(a(),X))}:{ok:!1,reason:"validation"}}catch(ie){return console.error("[useForm] submit error:",ie),v.value=ie&&ie.message?ie.message:String(ie),{ok:!1,reason:"exception",error:ie}}finally{r.value=!1}}};return X},he.Form=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.form,n=t.onSubmit,i=oe(["jss-form",t.class]),c=JSswift.omit(t,["form","onSubmit"]);c.class=i;const r=_.form({...c,onSubmit:async a=>{a.preventDefault(),l&&await l.submit(n||(async()=>{}))}}),v=[];for(const a of s||[]){const z=typeof a=="function"?a(l):a,u=JSswift.ui.slot(z);u&&(Array.isArray(u)?v.push(...u):v.push(u))}return v.forEach(a=>r.appendChild(a)),l&&l.submitting&&JSswift.reactive.effect(()=>{r.classList.toggle("is-submitting",!!l.submitting.value)},"UI.Form:submitting"),r},Ue.services=Ue.services||{},Ue.services.dialog=Ue.services.dialog||{},Ue.dialog=Ue.services.dialog;let Sn=null;function _l(){return Sn||(Sn=document.createElement("div"),Sn.setAttribute("data-jss-modal-root","true"),document.body.appendChild(Sn),Sn)}he.cardHeader=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=oe(["jss-card-header",pe(t.divider,"divider"),t.class]),i=JSswift.omit(t,["divider","align","justify","gap","wrap","direction","slots"]);i.class=n;const c={...t.style||{}},r=Pe(t.align);r!=null&&!Ge(t,"align")&&(c.alignItems=r);const v=Pe(t.justify);v!=null&&!Ge(t,"justify")&&(c.justifyContent=v);const a=Pe(t.wrap,k=>k?"wrap":"nowrap");a!=null&&!Ge(t,"wrap")&&(c.flexWrap=a);const z=Pe(t.direction);z!=null&&!Ge(t,"direction")&&(c.flexDirection=z);const u=Pe(t.gap,He);u!=null&&!Ge(t,"gap")&&(c.gap=u),Object.keys(c).length&&(i.style=c),JSswift.uiApplyResponsiveProps(i,t,JSswift.uiResponsiveStyleRules);const x=_.div(i,...F(l,"default",{},s));return Qe(x,t),x},he.cardBody=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=oe(["jss-card-body",t.class]),i=JSswift.omit(t,["slots","display","direction","wrap","align","justify","gap","rowGap","columnGap","padding","width"]);i.class=n,JSswift.uiApplyResponsiveProps(i,t,JSswift.uiResponsiveStyleRules);const c=_.div(i,...F(l,"default",{},s));return Qe(c,t),c},he.cardFooter=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=oe(["jss-card-footer",pe(t.divider,"divider"),t.class]),i=JSswift.omit(t,["divider","align","justify","gap","wrap","direction","slots"]);i.class=n;const c={...t.style||{}},r=Pe(t.align);r!=null&&!Ge(t,"align")&&(c.alignItems=r);const v=Pe(t.justify);v!=null&&!Ge(t,"justify")&&(c.justifyContent=v);const a=Pe(t.wrap,k=>k?"wrap":"nowrap");a!=null&&!Ge(t,"wrap")&&(c.flexWrap=a);const z=Pe(t.direction);z!=null&&!Ge(t,"direction")&&(c.flexDirection=z);const u=Pe(t.gap,He);u!=null&&!Ge(t,"gap")&&(c.gap=u),Object.keys(c).length&&(i.style=c),JSswift.uiApplyResponsiveProps(i,t,JSswift.uiResponsiveStyleRules);const x=_.div(i,...F(l,"default",{},s));return Qe(x,t),x},he.Dialog=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=["primary","secondary","warning","danger","success","info","light","dark"],i=["xs","sm","md","lg","xl","full"];let c={...t},r=null,v=null;const a=(S,I)=>typeof S=="function"?S(I):S,z=S=>String(S||"").split(/\s+/).filter(Boolean),u=(S,I,m)=>{if(!S)return;const P=S[I]||[];P.length&&S.classList.remove(...P);const G=(m||[]).filter(Boolean);G.length&&S.classList.add(...G),S[I]=G},x=(S,I,m,P=G=>G)=>{if(S){if(m==null||m===""){S.style.removeProperty(I);return}S.style.setProperty(I,P(m))}},k=()=>{var S,I,m,P,G,h;const b=window.visualViewport,g=Math.max(0,Math.round((S=b==null?void 0:b.offsetLeft)!=null?S:0)),J=Math.max(0,Math.round((I=b==null?void 0:b.offsetTop)!=null?I:0)),W=Math.max(0,Math.round((P=(m=b==null?void 0:b.width)!=null?m:window.innerWidth)!=null?P:0)),H=Math.max(0,Math.round((h=(G=b==null?void 0:b.height)!=null?G:window.innerHeight)!=null?h:0));return{left:g,top:J,width:W,height:H}},f=S=>{if(!(S!=null&&S.panel))return;const{left:I,top:m,width:P,height:G}=k();x(S.panel,"position","fixed"),x(S.panel,"inset",0,h=>`${h}px`),x(S.panel,"top",m,h=>`${h}px`),x(S.panel,"left",I,h=>`${h}px`),x(S.panel,"right","auto"),x(S.panel,"bottom","auto"),x(S.panel,"width",P,h=>`${h}px`),x(S.panel,"height",G,h=>`${h}px`),x(S.panel,"min-height",G,h=>`${h}px`),x(S.panel,"max-width",P,h=>`${h}px`),x(S.panel,"max-height",G,h=>`${h}px`),x(S.panel,"min-width",0,h=>`${h}px`),x(S.panel,"margin",0,h=>`${h}px`),x(S.panel,"box-sizing","border-box"),x(S.panel,"border-width",0,h=>`${h}px`),x(S.panel,"border-radius",0,h=>`${h}px`),x(S.panel,"transform","none"),x(S.panel,"overflow","hidden"),x(S.panel,"--jss-dialog-fullscreen-left",I,h=>`${h}px`),x(S.panel,"--jss-dialog-fullscreen-top",m,h=>`${h}px`),x(S.panel,"--jss-dialog-fullscreen-width",P,h=>`${h}px`),x(S.panel,"--jss-dialog-fullscreen-height",G,h=>`${h}px`)},B=S=>{S!=null&&S.panel&&(x(S.panel,"position",null),x(S.panel,"inset",null),x(S.panel,"top",null),x(S.panel,"left",null),x(S.panel,"right",null),x(S.panel,"bottom",null),x(S.panel,"width",null),x(S.panel,"height",null),x(S.panel,"min-height",null),x(S.panel,"max-width",null),x(S.panel,"max-height",null),x(S.panel,"min-width",null),x(S.panel,"margin",null),x(S.panel,"box-sizing",null),x(S.panel,"border-width",null),x(S.panel,"border-radius",null),x(S.panel,"transform",null),x(S.panel,"overflow",null),x(S.panel,"--jss-dialog-fullscreen-left",null),x(S.panel,"--jss-dialog-fullscreen-top",null),x(S.panel,"--jss-dialog-fullscreen-width",null),x(S.panel,"--jss-dialog-fullscreen-height",null))},y=(S,I)=>{var m,P,G,h,b;if(!S)return;if((m=S._dialogViewportCleanup)==null||m.call(S),S._dialogViewportCleanup=null,!I){B(S);return}let g=null;const J=globalThis.requestAnimationFrame||(E=>setTimeout(()=>E(Date.now()),0)),W=globalThis.cancelAnimationFrame||clearTimeout,H=()=>f(S),de=()=>{g!=null&&W(g),g=J(()=>{g=null,H()})};H(),de(),window.addEventListener("resize",H),window.addEventListener("orientationchange",de),(G=(P=window.visualViewport)==null?void 0:P.addEventListener)==null||G.call(P,"resize",H),(b=(h=window.visualViewport)==null?void 0:h.addEventListener)==null||b.call(h,"scroll",de),S._dialogViewportCleanup=()=>{var E,N,A,T;g!=null&&(W(g),g=null),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",de),(N=(E=window.visualViewport)==null?void 0:E.removeEventListener)==null||N.call(E,"resize",H),(T=(A=window.visualViewport)==null?void 0:A.removeEventListener)==null||T.call(A,"scroll",de)}},M=()=>c,D=S=>{var I;const m=o((I=S.state)!=null?I:S.color);return m?n.includes(m)?m:String(m):""},q=S=>{const I=o(S.size);return typeof I=="string"&&i.includes(I)?I:""},L=S=>{var I,m,P;const G=String(o((P=(m=(I=S.actionsAlign)!=null?I:S.footerAlign)!=null?m:S.alignActions)!=null?P:"end")).toLowerCase();return["start","left"].includes(G)?"start":["center","middle"].includes(G)?"center":["between","space-between"].includes(G)?"between":["stretch","full"].includes(G)?"stretch":"end"},ce=S=>{var I,m,P;const G=String(o((P=(m=(I=S.align)!=null?I:S.verticalAlign)!=null?m:S.position)!=null?P:"center")).toLowerCase();return["top","start","flex-start"].includes(G)?"jss-dialog-align-top":["bottom","end","flex-end"].includes(G)?"jss-dialog-align-bottom":""},X=S=>{var I,m;return((m=(I=S.closable)!=null?I:S.dismissible)!=null?m:S.closeButton)!==!1},Z=()=>{var S,I,m,P,G,h,b,g;const J=M(),W={close:ae,dismiss:ae,open:R,toggle:ne,update:se,isOpen:re,entry:()=>r,props:J},H=J.icon!=null?typeof J.icon=="string"?he.Icon({name:J.icon,size:J.iconSize||"md"}):JSswift.ui.slot(J.icon,{as:"icon"}):null,de=F(l,"eyebrow",W,a(J.eyebrow,W)),E=F(l,"title",W,a((I=(S=J.title)!=null?S:J.heading)!=null?I:J.header,W)),N=F(l,"subtitle",W,a((m=J.subtitle)!=null?m:J.description,W)),A=F(l,"icon",W,H),T=F(l,"header",W,a((P=J.headerContent)!=null?P:J.head,W)),U=X(J)?F(l,"close",W,he.Btn({class:"jss-dialog-close",size:"sm",outline:!0,"aria-label":J.closeLabel||"Chiudi dialog","data-dialog-close":!0},he.Icon({name:J.closeIcon||"close",size:"sm"}))):[],ue=(b=(h=(G=J.content)!=null?G:J.body)!=null?h:J.message)!=null?b:s&&s.length?s:null;let xe=F(l,"content",W,a(ue,W));xe.length||(xe=F(l,"body",W,a(ue,W))),xe.length||(xe=F(l,"default",W,a(ue,W)));const Ne=a((g=J.footer)!=null?g:J.actions,W);let $=F(l,"footer",W,Ne);$.length||($=F(l,"actions",W,Ne));let V=null;T.length?V=_.div({class:"jss-dialog-head jss-dialog-head-custom"},...T):(de.length||E.length||N.length||A.length||U.length)&&(V=_.div({class:"jss-dialog-head"},A.length?_.div({class:"jss-dialog-icon"},...A):null,_.div({class:"jss-dialog-head-main"},de.length?_.div({class:"jss-dialog-eyebrow"},...de):null,E.length?_.div({class:"jss-dialog-title"},...E):null,N.length?_.div({class:"jss-dialog-subtitle"},...N):null),U.length?_.div({class:"jss-dialog-close-wrap"},...U):null));const Y=_.div({class:oe(["jss-dialog-body",J.bodyClass])},...xe),ge=$.length?_.div({class:oe(["jss-dialog-actions",`is-${L(J)}`,pe(J.stackActions,"is-stacked"),J.actionsClass,J.footerClass])},...$):null;return _.div({class:oe(["jss-dialog-shell",pe(!!V,"has-head"),pe(!!ge,"has-footer"),pe(J.divider!==!1,"with-divider")])},...[V,Y,ge].filter(Boolean))},ie=S=>{var I;if(!(S!=null&&S.panel))return;const m=M(),P=D(m),G=q(m);u(S.panel,"_dialogClassTokens",["jss-dialog","jss-singularity","jss-clear-set",G?`jss-dialog-${G}`:"",P,P?`jss-state-${P}`:"",o(m.fullscreen)?"fullscreen":"",o(m.scrollable)?"scrollable":"",o(m.stickyHeader)?"sticky-head":"",o(m.stickyActions)?"sticky-actions":"",o(m.borderless)?"borderless":"",...z(m.class),...z(m.panelClass)]),u(S.overlay,"_dialogOverlayClassTokens",[ce(m),o(m.backdropBlur)?"jss-dialog-overlay-blur":"",...z(m.overlayClass)]),x(S.panel,"--jss-dialog-width",o(m.width),He),x(S.panel,"--jss-dialog-min-width",o(m.minWidth),He),x(S.panel,"--jss-dialog-max-width",o(m.maxWidth),He),x(S.panel,"--jss-dialog-max-height",o(m.maxHeight),He),x(S.panel,"--jss-dialog-body-max-height",o((I=m.bodyMaxHeight)!=null?I:m.contentMaxHeight),He),m.style&&Object.assign(S.panel.style,m.style),Qe(S.panel,m),y(S,o(m.fullscreen)),S.panel.setAttribute("role",m.role||"dialog"),S.panel.setAttribute("aria-modal",m.modal===!1?"false":"true"),m.ariaLabel?S.panel.setAttribute("aria-label",m.ariaLabel):S.panel.removeAttribute("aria-label")},te=()=>{r!=null&&r.panel&&r.panel.replaceChildren(Z())},se=(S={})=>(S&&typeof S=="object"&&(c={...c,...S}),r&&(ie(r),te()),K),R=(S=null)=>{var I,m,P,G,h;if(S&&typeof S=="object"&&(c={...c,...S}),r)return ie(r),te(),r;v=document.activeElement;const b=M(),g=b.persistent===!0;r=JSswift.overlay.open(()=>Z(),{type:"dialog",backdrop:b.backdrop!==!1,lockScroll:b.lockScroll!==!1,trapFocus:b.trapFocus!==!1,autoFocus:b.autoFocus!==!1,closeOnOutside:(I=b.closeOnOutside)!=null?I:!g,closeOnBackdrop:(m=b.closeOnBackdrop)!=null?m:!g,closeOnEsc:(P=b.closeOnEsc)!=null?P:!g,className:Ht(["jss-dialog"]),onClose:()=>{var W,H,de,E;(W=r==null?void 0:r._dialogViewportCleanup)==null||W.call(r),(H=r==null?void 0:r.panel)==null||H.removeEventListener("click",J),r=null,(E=(de=M()).onClose)==null||E.call(de),v&&typeof v.focus=="function"&&setTimeout(()=>v.focus(),0)}});const J=W=>{const H=W.target;H&&H.closest&&H.closest("[data-dialog-close]")&&ae()};return r.panel.addEventListener("click",J),ie(r),wn(r),(h=(G=M()).onOpen)==null||h.call(G,r),r},ae=()=>{if(!r)return;const S=r;_n(S,()=>JSswift.overlay.close(S.id))},re=()=>!!r,ne=(S=null)=>re()?(ae(),null):R(S),K={open:R,close:ae,toggle:ne,update:se,isOpen:re,entry:()=>r,props:()=>({...c})};return K},he.TabPanel=(...e)=>{var t,s,l,n,i,c,r,v,a,z,u,x,k;const{props:f,children:B}=JSswift.uiNormalizeArgs(e),y=f.slots||{},M=Array.isArray(f.tabs)?f.tabs:Array.isArray(f.items)?f.items:[],D=At(f.model,"UI.TabPanel:model"),q=f.id||"jss-tabpanel-"+Math.random().toString(36).slice(2,9),L=p=>String(o(p)||"vertical").toLowerCase()==="horizontal"?"horizontal":"vertical",ce=p=>String(o(p)||"before").toLowerCase()==="after"?"after":"before",X=p=>{const C=String(o(p)||"").toLowerCase();return C==="pills"||C==="pill"?"pills":C==="soft"||C==="card"?"soft":"line"},Z=p=>{const C=o(p);return C==null||C===""?null:JSswift.uiColors.includes(C)?`var(--jss-${C})`:String(C)},ie=L(f.orientation||f.orient||f.direction),te=ce(f.navPosition||f.barPosition||f.position),se=X(f.variant||(f.pills?"pills":f.soft?"soft":"line")),R=!!f.wrap,ae=!!f.swipeable,re=!!f.infinite,ne=!!f.animated,K=!!((s=(t=f.navFill)!=null?t:f.fill)!=null?s:f.stretch),S=!!f.disabled,I=o((l=f.transitionDuration)!=null?l:f["transition-duration"]),m=(()=>{if(I==null)return 220;if(typeof I=="number")return I;const p=parseFloat(I);return Number.isFinite(p)?p:220})(),P=o((n=f.transitionEasing)!=null?n:f["transition-easing"])||"ease",G=(c=(i=f.transitionPrev)!=null?i:f["transition-prev"])!=null?c:null,h=(v=(r=f.transitionNext)!=null?r:f["transition-next"])!=null?v:null,b=Z((a=f.color)!=null?a:f.state),g=M.map((p,C)=>{var ee,Se,Ce,Ae,Le,ke,Ee,Re,Me,$e,Ye,qe,lt,Xe,ze,Ve;if(p==null)return null;if(typeof p!="object")return{name:p,labelFallback:p,panelFallback:null,noteFallback:null,iconFallback:null,badgeFallback:null,hidden:!1,raw:p,index:C};const Ke=(ke=(Le=(Ae=(Ce=(Se=(ee=p.name)!=null?ee:p.value)!=null?Se:p.id)!=null?Ce:p.key)!=null?Ae:p.label)!=null?Le:p.title)!=null?ke:`tab-${C}`,gt=p.label!=null||p.title!=null,yt=gt?(Ee=p.label)!=null?Ee:p.title:p.children!=null&&p.content==null&&p.panel==null?p.children:(Me=(Re=p.name)!=null?Re:p.value)!=null?Me:`Tab ${C+1}`,ut=(qe=(Ye=($e=p.content)!=null?$e:p.panel)!=null?Ye:p.body)!=null?qe:gt?p.children:null,dt=(ze=(Xe=(lt=p.note)!=null?lt:p.subtitle)!=null?Xe:p.description)!=null?ze:null,_t=(Ve=p.icon)!=null?Ve:null,ft=Object.prototype.hasOwnProperty.call(p,"badge")?p.badge:Object.prototype.hasOwnProperty.call(p,"counter")?p.counter:null;return{...p,name:Ke,labelFallback:yt,panelFallback:ut,noteFallback:dt,iconFallback:_t,badgeFallback:ft,index:C}}).filter(Boolean).filter(p=>p.hidden!==!0&&p.visible!==!1),J=oe(["jss-clear-set","jss-tabpanel","jss-singularity",ie,`variant-${se}`,pe(R,"wrap"),pe(ne,"animated"),pe(K,"nav-fill"),pe(S,"disabled"),pe(te==="after","nav-after"),f.class]),W=JSswift.omit(f,["tabs","items","value","default","defaultValue","model","orientation","orient","direction","navPosition","barPosition","position","variant","pills","soft","navFill","fill","stretch","wrap","swipeable","infinite","animated","transitionDuration","transition-duration","transitionEasing","transition-easing","transitionPrev","transition-prev","transitionNext","transition-next","slots","empty","tabClass","tabStyle","panelClass","panelStyle","navClass","panelsClass","class","style"]);W.class=J,W.style=f.style;const H=_.div(W);ne&&(H.style.setProperty("--jss-tabpanel-duration",`${m}ms`),H.style.setProperty("--jss-tabpanel-easing",P)),b&&H.style.setProperty("--jss-tabpanel-accent",b);const de=_.div({class:oe(["jss-tabpanel-nav",f.navClass]),role:"tablist","aria-orientation":ie}),E=_.div({class:oe(["jss-tabpanel-panels",f.panelsClass])}),N=[],A=[];let T=-1;const U=()=>ie==="horizontal",ue=(p,C,ee)=>({tab:p,name:p.name,index:C,active:ee,value:p.name,select:()=>we(C),next:()=>fe(),prev:()=>je()}),xe=(p,C,ee=!1)=>{var Se;if(!g.length)return-1;let Ce=p;for(let Ae=0;Ae<g.length;Ae+=1){if(Ce+=C,Ce>=g.length){if(!ee)return-1;Ce=0}else if(Ce<0){if(!ee)return-1;Ce=g.length-1}if(!((Se=g[Ce])!=null&&Se.disabled))return Ce}return-1},Ne=p=>{var C;const ee=(C=N[p])==null?void 0:C.btn;!ee||typeof ee.focus!="function"||requestAnimationFrame(()=>ee.focus())},$=(p,C,ee)=>{const Se=ue(p,C,ee),Ce=JSswift.ui.renderSlot(y,"label",Se,p.labelFallback);return F(null,"default",{},Ce)},V=(p,C)=>{var ee,Se,Ce,Ae,Le;const ke=C===T,Ee=`${q}-tab-${C}`,Re=`${q}-panel-${C}`,Me=ue(p,C,ke),$e=$(p,C,ke),Ye=p.iconFallback!=null?typeof p.iconFallback=="string"?he.Icon({name:p.iconFallback,size:(Ce=(Se=(ee=p.iconSize)!=null?ee:p.size)!=null?Se:f.size)!=null?Ce:null}):p.iconFallback:null,qe=F(y,"icon",Me,Ye),lt=F(y,"note",Me,p.noteFallback),Xe=F(y,"badge",Me,p.badgeFallback),ze=_.span({class:"jss-tabpanel-tab-inner"},qe.length?_.span({class:"jss-tabpanel-tab-icon"},...qe):null,_.span({class:"jss-tabpanel-tab-copy"},_.span({class:"jss-tabpanel-tab-label"},...$e.length?$e:[""]),lt.length?_.span({class:"jss-tabpanel-tab-note"},...lt):null),Xe.length?_.span({class:"jss-tabpanel-tab-badge"},...Xe):null),Ve=F(y,"tab",{...Me,label:$e,icon:qe,note:lt,badge:Xe,tabId:Ee,panelId:Re},ze),Ke=ut=>{if(S||p.disabled)return;const dt=ut.key;if(dt==="Enter"||dt===" "){ut.preventDefault(),we(C);return}if(dt==="Home"){ut.preventDefault();const at=g.findIndex(ht=>!ht.disabled);at>=0&&(we(at),Ne(at));return}if(dt==="End"){ut.preventDefault();const at=(()=>{var ht;for(let vt=g.length-1;vt>=0;vt-=1)if(!((ht=g[vt])!=null&&ht.disabled))return vt;return-1})();at>=0&&(we(at),Ne(at));return}const _t=U()?["ArrowLeft"]:["ArrowUp"],ft=U()?["ArrowRight"]:["ArrowDown"];if(_t.includes(dt)){ut.preventDefault();const at=xe(C,-1,re);at>=0&&(we(at,{dir:"prev"}),Ne(at));return}if(ft.includes(dt)){ut.preventDefault();const at=xe(C,1,re);at>=0&&(we(at,{dir:"next"}),Ne(at))}},gt=he.Btn({class:oe(["jss-tabpanel-tab",pe(ke,"active"),pe(p.disabled||S,"disabled"),f.tabClass,p.tabClass||p.class]),type:"button",id:Ee,role:"tab",disabled:!!(p.disabled||S),"aria-selected":ke?"true":"false","aria-controls":Re,tabindex:ke?"0":"-1",outline:se==="pills"&&!ke,color:se==="pills"&&ke?p.color||f.color||f.state||"primary":null,size:(Le=(Ae=p.size)!=null?Ae:f.size)!=null?Le:null,style:{...f.tabStyle||{},...p.tabStyle||{}},onClick:()=>{p.disabled||S||we(C)},onKeydown:Ke},...Ve),yt=_.div({class:oe(["jss-tabpanel-nav-btn",pe(ke,"active"),p.navClass]),"data-name":p.name},gt,_.span({class:"tab-indicator"}));return N[C]={btn:gt,wrap:yt,index:C},yt},Y=(p,C)=>{const ee=C===T,Se=`${q}-tab-${C}`,Ce=`${q}-panel-${C}`,Ae=ue(p,C,ee),Le=JSswift.ui.renderSlot(y,"panel",Ae,p.panelFallback),ke=_.div({class:oe(["jss-tabpanel-panel",pe(ee,"active"),f.panelClass,p.panelClass]),style:{...f.panelStyle||{},...p.panelStyle||{}},"data-name":p.name,role:"tabpanel",id:Ce,tabindex:0,"aria-labelledby":Se,"aria-hidden":ee?"false":"true"},...F(null,"default",{},Le));return A[C]=ke,ke},ge=g.map((p,C)=>V(p,C)),ye=JSswift.ui.renderSlot(y,"nav",{tabs:g,active:()=>{var p;return T>=0?(p=g[T])==null?void 0:p.name:null},activeIndex:()=>T,activeTab:()=>T>=0?g[T]:null,select:p=>{typeof p=="number"?we(p):j(p)},next:()=>fe(),prev:()=>je(),nodes:ge,orientation:ie,position:te,variant:se},ge);F(null,"default",{},ye).forEach(p=>de.appendChild(p)),g.length?g.forEach((p,C)=>E.appendChild(Y(p,C))):F(y,"empty",{tabs:g},(z=f.empty)!=null?z:_.div({class:"jss-tabpanel-empty"},"Nessun contenuto disponibile.")).forEach(C=>E.appendChild(C));const Q=p=>{if(!ne)return;const C=p==="next"?"18px":"-18px",ee=p==="next"?"-18px":"18px";H.style.setProperty("--jss-tabpanel-enter",C),H.style.setProperty("--jss-tabpanel-leave",ee)},ve=()=>{const p=[];G&&p.push(...String(G).split(/\s+/)),h&&p.push(...String(h).split(/\s+/)),p.length&&E.classList.remove(...p.filter(Boolean))},be=p=>{ve();const C=p==="prev"?G:h;if(!C)return;const ee=String(C).split(/\s+/).filter(Boolean);ee.length&&(E.classList.add(...ee),setTimeout(()=>E.classList.remove(...ee),m+40))},me=p=>{var C;const ee=N.find(({btn:Ce})=>Ce.classList.contains("active")),Se=(C=ee==null?void 0:ee.btn.parentNode)==null?void 0:C.getBoundingClientRect();N.forEach(({btn:Ce,index:Ae})=>{const Le=Ae===p,ke=Ce.parentNode;if(!ke)return;const Ee=ke.getBoundingClientRect();ke.isConnected&&Se&&(ke.style.setProperty("--nav-pos-x",Se.left-Ee.left+"px"),ke.style.setProperty("--nav-pos-y",Se.top-Ee.top+"px")),ke.classList.toggle("active",Le),Ce.classList.toggle("active",Le),Ce.setAttribute("aria-selected",Le?"true":"false"),Ce.setAttribute("tabindex",Le?"0":"-1")})},Ie=(p,C,ee)=>{Q(ee),A.forEach((Se,Ce)=>{if(!Se)return;const Ae=Ce===C,Le=Ce===p;Ae?(Se.classList.add("active"),Se.classList.remove("leaving"),Se.setAttribute("aria-hidden","false")):(Se.classList.remove("active"),Se.setAttribute("aria-hidden","true"),ne&&Le?(Se.classList.add("leaving"),setTimeout(()=>Se.classList.remove("leaving"),m+40)):Se.classList.remove("leaving"))})},Oe=(p,C)=>p<0||p===C||re&&p===g.length-1&&C===0?"next":re&&p===0&&C===g.length-1?"prev":C>p?"next":"prev",we=(p,C={})=>{var ee,Se;if(p==null||p<0||p>=g.length||(ee=g[p])!=null&&ee.disabled)return;const Ce=T;if(Ce===p)return;T=p;const Ae=g[p],Le=C.dir||Oe(Ce,p);D&&!C.fromModel&&D.set(Ae.name),me(p),Ie(Ce,p,Le),be(Le),H.dataset.active=String(Ae.name),(Se=f.onChange)==null||Se.call(f,Ae.name,Ae,p)},j=(p,C={})=>{if(!g.length)return;const ee=g.findIndex(Se=>Se.name==p);ee!==-1&&we(ee,C)},fe=()=>{if(!g.length)return;const p=T<0?g.findIndex(C=>!C.disabled):xe(T,1,re);p<0||we(p,{dir:"next"})},je=()=>{if(!g.length)return;const p=T<0?(()=>{var C;for(let ee=g.length-1;ee>=0;ee-=1)if(!((C=g[ee])!=null&&C.disabled))return ee;return-1})():xe(T,-1,re);p<0||we(p,{dir:"prev"})};if(ae){let p=0,C=0,ee=!1;const Se=42;E.addEventListener("pointerdown",Ce=>{Ce.button!=null&&Ce.button!==0||(ee=!0,p=Ce.clientX,C=Ce.clientY)}),E.addEventListener("pointerup",Ce=>{if(!ee)return;ee=!1;const Ae=Ce.clientX-p,Le=Ce.clientY-C;Math.abs(Ae)<Se||Math.abs(Ae)<Math.abs(Le)||(Ae<0?fe():je())}),E.addEventListener("pointercancel",()=>{ee=!1}),E.addEventListener("pointerleave",()=>{ee=!1})}const O=D?D.get():(k=(x=(u=f.value)!=null?u:f.defaultValue)!=null?x:f.default)!=null?k:null;if(g.length){const p=g.findIndex(C=>C.name==O);if(p>=0)we(p,{fromModel:!0});else{const C=g.findIndex(ee=>!ee.disabled);C>=0&&(we(C,{fromModel:!0}),D&&D.set(g[C].name))}}return D&&D.watch(p=>j(p,{fromModel:!0}),"UI.TabPanel:watch"),te==="after"?(H.appendChild(E),H.appendChild(de)):(H.appendChild(de),H.appendChild(E)),F(y,"default",{},B).forEach(p=>H.appendChild(p)),Qe(H,f),H._tabs=()=>g.slice(),H._active=()=>T>=0?g[T]:null,H._getValue=()=>{var p;return T>=0?(p=g[T])==null?void 0:p.name:null},H._setValue=p=>j(p),H._select=p=>{typeof p=="number"?we(p):j(p)},H._next=fe,H._prev=je,H};function $o(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _s({title:e,message:t,contentNode:s,okText:l,cancelText:n,showCancel:i,onOk:c,onCancel:r,persistent:v}){_l();const a=_.div({class:"jss-dialog-backdrop",onClick:B=>{B.target===a&&v!==!0&&(r==null||r())}}),z=F(null,"default",{},e),u=F(null,"default",{},t),x=F(null,"default",{},s),k=_.div({class:"jss-dialog jss-panel"},z.length?_.h3(...z):null,u.length?_.p(...u):null,...x,_.div({class:"jss-dialog-actions"},i?JSswift.ui.Btn({onClick:r},n||"Annulla"):null,JSswift.ui.Btn({color:"primary",onClick:c},l||"OK")));a.appendChild(k),_l().appendChild(a);const f=B=>{B.key==="Escape"&&(r==null||r())};return document.addEventListener("keydown",f,{once:!0}),{backdrop:a,close:()=>$o(a)}}Ue.dialog.alert=function(e,t={}){return new Promise(s=>{const{backdrop:l,close:n}=_s({title:t.title||"Info",message:e,okText:t.okText||"OK",showCancel:!1,persistent:t.persistent,onOk:()=>{n(),s(!0)},onCancel:()=>{n(),s(!0)}})})},Ue.dialog.confirm=function(e={}){return new Promise(t=>{const{close:s}=_s({title:e.title||"Conferma",message:e.message||"",okText:e.okText||"Conferma",cancelText:e.cancelText||"Annulla",showCancel:!0,persistent:e.persistent,onOk:()=>{s(),t(!0)},onCancel:()=>{s(),t(!1)}})})},Ue.dialog.prompt=function(e={}){return new Promise(t=>{const s=JSswift.ui.Input({class:"jss-dialog-input",type:e.type||"text",placeholder:e.placeholder||""});e.value!=null&&(s.value=String(e.value));const{close:l}=_s({title:e.title||"Inserisci valore",message:e.message||"",okText:e.okText||"OK",cancelText:e.cancelText||"Annulla",showCancel:!0,contentNode:_.div(s),persistent:e.persistent,onOk:()=>{const n=s.value;l(),t(n)},onCancel:()=>{l(),t(null)}});setTimeout(()=>s.focus(),0)})},Ue.services=Ue.services||{},Ue.services.loading=Ue.services.loading||{},Ue.loading=Ue.services.loading;let xt=null,Pn=0;function Sl(){if(xt)return xt;xt=document.createElement("div"),xt.className="jss-loading-backdrop",xt.style.cssText=`
2
2
  position: fixed; inset: 0;
3
3
  background: rgba(0,0,0,0.45);
4
4
  display: none;
5
5
  align-items: center; justify-content: center;
6
6
  z-index: 10001;
7
7
  padding: 14px;
8
- `;const t=document.createElement("div");t.className="cms-panel cms-loading-card",t.style.cssText=`
8
+ `;const e=document.createElement("div");e.className="jss-panel jss-loading-card",e.style.cssText=`
9
9
  padding: 14px 16px;
10
- border-radius: var(--cms-r-lg);
10
+ border-radius: var(--jss-r-lg);
11
11
  min-width: 260px;
12
12
  display:flex; gap: 12px; align-items:center;
13
13
  flex-direction: column;
14
- `;const e=document.createElement("div");e.className="cms-loading-spinner",e.style.cssText=`
14
+ `;const t=document.createElement("div");t.className="jss-loading-spinner",t.style.cssText=`
15
15
  width: 18px; height: 18px;
16
16
  border-radius: 50%;
17
17
  border: 2px solid rgba(255,255,255,0.25);
18
- border-top-color: var(--cms-primary);
19
- animation: cmsSpin 0.9s linear infinite;
20
- `;const n=document.createElement("div");n.className="cms-muted cms-loading-text",n.textContent="Loading...";const s=document.createElement("div");s.className="cms-loading-progress",s.style.cssText=`
18
+ border-top-color: var(--jss-primary);
19
+ animation: jssSpin 0.9s linear infinite;
20
+ `;const s=document.createElement("div");s.className="jss-muted jss-loading-text",s.textContent="Loading...";const l=document.createElement("div");l.className="jss-loading-progress",l.style.cssText=`
21
21
  width: 100%;
22
22
  height: 6px;
23
23
  border-radius: 999px;
24
24
  overflow: hidden;
25
25
  background: rgba(255,255,255,0.08);
26
26
  display: none;
27
- `;const o=document.createElement("div");o.className="cms-loading-progress-bar",o.style.cssText=`
27
+ `;const n=document.createElement("div");n.className="jss-loading-progress-bar",n.style.cssText=`
28
28
  height: 100%;
29
29
  width: 0%;
30
- background: var(--cms-primary);
30
+ background: var(--jss-primary);
31
31
  transition: width 200ms ease;
32
- `,s.appendChild(o);const r=document.createElement("div");r.style.cssText="display:flex; gap: 12px; align-items:center; width: 100%;",r.appendChild(e),r.appendChild(n),t.appendChild(r),t.appendChild(s),_t.appendChild(t),document.body.appendChild(_t);const v=document.createElement("style");return v.textContent=`
33
- @keyframes cmsSpin { to { transform: rotate(360deg); } }
34
- `,document.head.appendChild(v),_t._textNode=n,_t._spinner=e,_t._progressWrap=s,_t._progressBar=o,_t._progressActive=!1,_t}function wl(t,e){if(typeof t=="object"&&t!==null)return{...t};const n=e&&typeof e=="object"?e:{};return typeof e=="string"&&(t==null||typeof t=="number")?{...n,message:e}:{...n,message:t}}function vl(t,e){const n=e==="progress";t._spinner.style.display=n?"none":"",t._progressWrap.style.display=n?"block":"none",t._mode=e}je.loading.show=function(t="Loading...",e={}){const n=yl(),s=wl(t,e);In++,n._progressActive=!1,n._textNode.textContent=s.message||"Loading...",vl(n,"spinner"),s.spinner===!1&&(n._spinner.style.display="none"),n.style.display="flex"},je.loading.hide=function(){_t&&(In=Math.max(0,In-1),In===0&&(_t.style.display="none",_t._progressActive=!1))},je.loading.progress=function(t=0,e={}){var r;const n=yl();typeof t=="object"&&t!==null&&(e=t,t=(r=t.value)!=null?r:0);const s=wl(null,e);n._progressActive||(In++,n._progressActive=!0);const o=Math.max(0,Math.min(100,Number(t!=null?t:0)));n._textNode.textContent=s.message||"Loading...",n._progressBar.style.width=o+"%",vl(n,"progress"),n.style.display="flex"},je.loading.wrap=async function(t,e){je.loading.show(t);try{return await e()}finally{je.loading.hide()}};function Xo(t){return typeof t=="function"?t():t||[]}function Ss(t,e){if(!(t==null||e==null))return typeof e!="string"||e.indexOf(".")<0?t==null?void 0:t[e]:e.split(".").reduce((n,s)=>n==null?n:n[s],t)}function Qo(t,e){return t==null&&e==null?0:t==null?-1:e==null?1:typeof t=="number"&&typeof e=="number"?t-e:String(t).localeCompare(String(e),void 0,{numeric:!0,sensitivity:"base"})}function Zo(t){const e=Xo(t);return Array.isArray(e)?e:[]}function Sl(t){var e,n,s,o;return(o=(s=(n=(e=t==null?void 0:t.label)!=null?e:t==null?void 0:t.title)!=null?n:t==null?void 0:t.header)!=null?s:t==null?void 0:t.key)!=null?o:""}function Cs(t,e){var n,s;return(s=(n=t==null?void 0:t.sortKey)!=null?n:t==null?void 0:t.key)!=null?s:`__col_${e}`}function Cl(t,e){return t.find((n,s)=>Cs(n,s)===e||(n==null?void 0:n.key)===e)||null}function qn(t,e,n){return t?typeof t.get=="function"?t.get(e,{row:e,rowIndex:n,col:t}):typeof t.value=="function"?t.value(e,{row:e,rowIndex:n,col:t}):typeof t.key=="string"?Ss(e,t.key):t.key!=null?e==null?void 0:e[t.key]:e:e}function Xn(t,e){return typeof t=="function"?t(e)||{}:t||{}}function Qn(t){if(t==null)return"";if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return t.map(Qn).filter(Boolean).join(" ");if(typeof Node!="undefined"&&t instanceof Node)return t.textContent||"";if(typeof t=="object"){if(typeof t.textContent=="string")return t.textContent;try{return JSON.stringify(t)}catch(e){return""}}return String(t)}function ei(t,e){const s=(Array.isArray(t)?t:e).map(o=>Number(o)).filter(o=>Number.isFinite(o)&&o>0);return s.length?Array.from(new Set(s)):e}function ti(t,e,n,s){const o=s.searchBy||s.searchPredicate;if(typeof o=="function")return!!o(t,{query:n,columns:e});const r=String(n||"").trim().toLowerCase().split(/\s+/).filter(Boolean);if(!r.length)return!0;const v=Array.isArray(s.searchKeys)&&s.searchKeys.length?s.searchKeys:e.filter(b=>(b==null?void 0:b.searchable)!==!1).map(b=>{var E;return(E=b==null?void 0:b.searchKey)!=null?E:b==null?void 0:b.key}).filter(Boolean),c=[];if(v.length)for(const b of v)if(typeof b=="function")c.push(Qn(b(t)));else{const E=e.find(k=>(k==null?void 0:k.key)===b||(k==null?void 0:k.searchKey)===b);c.push(Qn(E?qn(E,t,-1):Ss(t,b)))}else c.push(Qn(t));const a=c.join(" ").toLowerCase();return r.every(b=>a.includes(b))}he.Table=(...t)=>{var pe,ze,Me,Pe;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=Array.isArray(e.columns)?e.columns:[],r=ei(e.pageSizeOptions,[5,10,20,50]),v=Number((ze=(pe=e.pageSize)!=null?pe:r[0])!=null?ze:10)||10,c=Array.from(new Set([...r,v])).sort((Ae,y)=>Ae-y),a=e.initialSort||(e.sortBy?{key:e.sortBy,dir:e.sortDir==="desc"?"desc":"asc"}:null),b=e.searchable===!0||typeof e.searchable=="string"||e.searchPlaceholder!=null||e.search!=null||e.query!=null||!!e.searchModel||!!e.queryModel||Array.isArray(e.searchKeys)||typeof e.searchBy=="function"||typeof e.searchPredicate=="function",E=Nt(e.searchModel||e.queryModel,"UI.Table:query"),[k,S]=je.reactive.signal(Math.max(1,Number(e.page||1)||1)),[I,V]=je.reactive.signal(v),[$,ae]=je.reactive.signal(a),[F,K]=je.reactive.signal(String((Pe=E?E.get():(Me=e.search)!=null?Me:e.query)!=null?Pe:"")),oe=Ae=>{const y=String(Ae!=null?Ae:"");K(y),E&&E.set(y),S(1)},H=Ae=>{const y=Number(Ae)||v;V(y),S(1)},Y=(Ae,y)=>{const X=Cs(Ae,y),xe=$();!xe||xe.key!==X&&xe.key!==(Ae==null?void 0:Ae.key)?ae({key:X,dir:"asc"}):xe.dir==="asc"?ae({key:X,dir:"desc"}):ae(null),S(1)};let Q=null,le;E&&(le=E.watch(Ae=>{const y=String(Ae!=null?Ae:"");K(y),Q&&Q.value!==y&&(Q.value=y),S(1)},"UI.Table:queryWatch"));const re=JSswift.omit(e,["columns","rows","rowKey","loading","page","pageSize","pageSizeOptions","pagination","initialSort","sortBy","sortDir","search","query","searchable","searchPlaceholder","searchKeys","searchBy","searchPredicate","searchModel","queryModel","filter","actions","actionsLabel","emptyText","loadingText","onRowClick","onRowDblClick","tableClass","tableStyle","cardClass","dense","striped","hover","stickyHeader","toolbar","toolbarStart","toolbarEnd","caption","footer","status","rowClass","rowAttrs","minTableWidth","hideHeader","hideFooter","hideStatus","slots","body"]);re.class=ie(["cms-table-card",e.class,e.cardClass]),e.dense!=null&&(re.dense=e.dense);const Z=_.div({class:"cms-table-shell"}),ne=P(s,"default",{},n);ne.length&&Z.appendChild(_.div({class:"cms-table-lead"},...ne));const T=P(s,"toolbarStart",{},e.toolbarStart),j=P(s,"toolbar",{},e.toolbar),q=P(s,"toolbarEnd",{},e.toolbarEnd),ce=_.div({class:"cms-table-toolbar"}),J=_.div({class:"cms-table-toolbar-main"}),g=_.div({class:"cms-table-toolbar-side"});T.forEach(Ae=>J.appendChild(Ae)),j.forEach(Ae=>J.appendChild(Ae));const f=P(s,"search",{query:F(),getQuery:F,setQuery:oe},null);if(f.length)f.forEach(Ae=>g.appendChild(Ae));else if(b){Q=_.input({type:"search",class:"cms-input",placeholder:typeof e.searchable=="string"?e.searchable:e.searchPlaceholder||"Cerca nella tabella",value:String(F()||"")}),Q.addEventListener("input",()=>oe(Q.value));const Ae=he.Btn({class:"cms-table-search-clear",outline:!0,onClick:()=>{Q&&(Q.value=""),oe("")}},"Reset");g.appendChild(_.div({class:"cms-singularity cms-table-search"},_.span({class:"cms-table-search-icon","aria-hidden":"true"},"\u2315"),Q,Ae))}q.forEach(Ae=>g.appendChild(Ae)),(J.childNodes.length||g.childNodes.length)&&(ce.appendChild(J),ce.appendChild(g),Z.appendChild(ce));const p=_.div({class:"cms-singularity cms-table-chip"},""),O=_.div({class:"cms-singularity cms-table-chip"},""),W=_.div({class:"cms-singularity cms-table-chip"},""),u=P(s,"status",{},e.status),x=_.div({class:"cms-table-status"},p,O,W,...u);e.hideStatus!==!0&&Z.appendChild(x);const h=P(s,"caption",{},e.caption);h.length&&Z.appendChild(_.div({class:"cms-table-caption"},...h));const z=_.thead(),B=_.tbody(),U=!!e.actions||!!s.actions,de=ie(["cms-table",ge(e.dense,"dense"),ge(e.striped,"striped"),ge(e.hover!==!1,"hover"),ge(e.stickyHeader!==!1,"sticky-head"),e.tableClass]),L={...e.tableStyle||{}};e.minTableWidth!=null&&(L["--cms-table-min-width"]=Be(e.minTableWidth));const m=_.table({class:de,style:L},z,B),N=_.div({class:"cms-singularity cms-table-wrap"},m);Z.appendChild(N);const A=_.div({class:"cms-singularity cms-table-chip"},""),ee=_.div({class:"cms-singularity cms-table-chip"},""),me=he.Btn({outline:!0,onClick:()=>S(Math.max(1,k()-1))},"\u2039"),ye=he.Btn({outline:!0,onClick:()=>S(k()+1)},"\u203A"),be=_.div({class:"cms-singularity cms-table-chip"},""),M=_.select({class:"cms-input cms-table-size-select"},...c.map(Ae=>us({value:String(Ae)},String(Ae))));M.value=String(I()),M.addEventListener("change",()=>H(M.value));const D=P(s,"footer",{},e.footer),G=_.div({class:"cms-table-foot"},_.div({class:"cms-table-foot-main"},A,ee,_.label({class:"cms-table-size"},_.span("Righe"),M)),_.div({class:"cms-table-foot-extra"},...D,_.div({class:"cms-table-pager"},me,be,ye)));e.hideFooter!==!0&&Z.appendChild(G);const Ce=()=>{if(z.innerHTML="",e.hideHeader)return;const Ae=_.tr();if(o.forEach((y,X)=>{var ue,Se;const xe={col:y,colIndex:X,sort:$()},R={...Xn(y==null?void 0:y.style,{...xe,header:!0}),...Xn((ue=y==null?void 0:y.headerStyle)!=null?ue:y==null?void 0:y.thStyle,{...xe,header:!0})};(y==null?void 0:y.width)!=null&&(R.width=Be(y.width)),(y==null?void 0:y.minWidth)!=null&&(R.minWidth=Be(y.minWidth)),(y==null?void 0:y.maxWidth)!=null&&(R.maxWidth=Be(y.maxWidth)),y!=null&&y.align&&(R.textAlign=y.align);let d=P(y==null?void 0:y.slots,"header",xe,null);if(!d.length){const Fe=typeof(y==null?void 0:y.header)=="function"?y.header(xe):(Se=y==null?void 0:y.header)!=null?Se:Sl(y);d=P(s,"header",xe,Fe)}const i=$(),C=Cs(y,X),se=(y==null?void 0:y.sortable)!==!1&&((y==null?void 0:y.key)!=null||typeof(y==null?void 0:y.get)=="function"||typeof(y==null?void 0:y.compare)=="function"),_e=!!i&&(i.key===C||i.key===(y==null?void 0:y.key)),Ne=_.th({class:ie(["cms-table-head-cell",ge(y==null?void 0:y.nowrap,"is-nowrap"),ge(se,"cms-table-sortable"),ge(_e,"is-sorted"),y==null?void 0:y.headerClass]),style:R});se?Ne.appendChild(_.button({type:"button",class:"cms-table-head-button",onClick:()=>Y(y,X)},_.span({class:"cms-table-head-label"},...d),_.span({class:"cms-table-head-arrow","aria-hidden":"true"},_e?i.dir==="asc"?"\u2191":"\u2193":"\u2195"))):d.forEach(Fe=>Ne.appendChild(Fe)),Ae.appendChild(Ne)}),U){const y=P(s,"actionsHeader",{},e.actionsLabel||"Azioni");Ae.appendChild(_.th({class:"cms-table-head-cell cms-table-head-actions",style:{textAlign:"right"}},...y))}z.appendChild(Ae)},ke=(Ae,y)=>{const X={columns:o,count:o.length},xe=P(s,Ae,X,y),R=String(o.length+(U?1:0));B.appendChild(_.tr(_.td({colSpan:R,class:"cms-table-state"},...xe)))},fe=je.reactive.effect(()=>{const Ae=Zo(e.rows),y=String(F()||"").trim(),X=$(),xe=typeof e.loading=="function"?!!e.loading():!!e.loading,R=e.pagination!==!1;if(Ce(),B.innerHTML="",Q&&Q.value!==F()&&(Q.value=F()),M.value!==String(I())&&(M.value=String(I())),xe){p.textContent="Caricamento in corso",O.style.display="none",W.style.display="none",A.textContent="Loading\u2026",ee.textContent="",be.textContent="Pagina 1",me.disabled=!0,ye.disabled=!0,ke("loading",e.loadingText||"Loading...");return}let d=Ae.slice();const i=d.length;if(typeof e.filter=="function"&&(d=d.filter((Ee,Je)=>e.filter(Ee,{row:Ee,index:Je,query:y,rows:Ae,columns:o}))),y&&(d=d.filter(Ee=>ti(Ee,o,y,e))),X){const Ee=Cl(o,X.key);Ee&&d.sort((Je,He)=>{const Ge=qn(Ee,Je,-1),qe=qn(Ee,He,-1),Ze=typeof Ee.compare=="function"?Ee.compare(Ge,qe,Je,He):Qo(Ge,qe);return X.dir==="asc"?Ze:-Ze})}const C=d.length,se=Math.max(1,Number(I())||v),_e=R?Math.max(1,Math.ceil(C/se)):1,Ne=R?Math.min(k(),_e):1;Ne!==k()&&S(Ne);const ue=R?(Ne-1)*se:0,Se=R?ue+se:C,Fe=d.slice(ue,Se);if(p.textContent=C===i?`${C} righe`:`${C} di ${i} righe`,O.textContent=y?`Ricerca: ${y}`:"",O.style.display=y?"":"none",X){const Ee=Cl(o,X.key);W.textContent=Ee?`Ordine: ${Sl(Ee)} ${X.dir==="asc"?"\u2191":"\u2193"}`:"",W.style.display=Ee?"":"none"}else W.style.display="none";if(A.textContent=C?`${ue+1}-${Math.min(Se,C)} di ${C}`:"0 risultati",ee.textContent=C!==i?`Dataset totale ${i}`:`Page size ${se}`,be.textContent=R?`Pagina ${Ne} / ${_e}`:"Tutte le righe",me.disabled=!R||Ne<=1,ye.disabled=!R||Ne>=_e,M.disabled=!R,M.parentNode.style.display=R?"":"none",Fe.length===0){ke("empty",e.emptyText||"Nessun dato");return}for(let Ee=0;Ee<Fe.length;Ee++){const Je=Fe[Ee],He=ue+Ee,Ge={row:Je,rowIndex:He,pageIndex:Ee},qe=typeof e.rowAttrs=="function"?e.rowAttrs(Je,Ge)||{}:e.rowAttrs||{},Ze=typeof e.rowClass=="function"?e.rowClass(Je,Ge):e.rowClass,et=!!(e.onRowClick||e.onRowDblClick),We=_.tr({...qe,class:ie(["cms-table-row",Ze,qe.class,ge(et,"is-clickable")])});if(e.rowKey){const De=typeof e.rowKey=="function"?e.rowKey(Je,Ge):Ss(Je,e.rowKey);De!=null&&(We.dataset.key=String(De))}const st=De=>{const ot=De==null?void 0:De.target;return!!(ot&&ot.closest&&ot.closest("button, a, input, select, textarea, label, [data-table-action]"))};if(e.onRowClick&&We.addEventListener("click",De=>{st(De)||e.onRowClick(Je,Ge,De)}),e.onRowDblClick&&We.addEventListener("dblclick",De=>{st(De)||e.onRowDblClick(Je,Ge,De)}),o.forEach((De,ot)=>{var mt,At;const ct=qn(De,Je,He),dt={...Ge,col:De,colIndex:ot,value:ct},tt={...Xn(De==null?void 0:De.style,dt),...Xn((mt=De==null?void 0:De.cellStyle)!=null?mt:De==null?void 0:De.tdStyle,dt)};De!=null&&De.align&&(tt.textAlign=De.align),(De==null?void 0:De.width)!=null&&(tt.width=Be(De.width)),(De==null?void 0:De.minWidth)!=null&&(tt.minWidth=Be(De.minWidth)),(De==null?void 0:De.maxWidth)!=null&&(tt.maxWidth=Be(De.maxWidth));const ft=typeof(De==null?void 0:De.cellClass)=="function"?De.cellClass(Je,dt):(De==null?void 0:De.cellClass)||(De==null?void 0:De.class),St=_.td({class:ie(["cms-table-cell",ft,ge(De==null?void 0:De.nowrap,"is-nowrap")]),style:tt});let Ct=P(De==null?void 0:De.slots,"cell",dt,null);if(!Ct.length){const ht=typeof(De==null?void 0:De.render)=="function"?De.render(Je,dt):typeof(De==null?void 0:De.format)=="function"?De.format(ct,Je,dt):ct,vt=ht==null?(At=De==null?void 0:De.emptyText)!=null?At:"":ht;Ct=P(s,"cell",dt,vt)}Ct.length||(Ct=[""]),Ct.forEach(ht=>St.appendChild(ht)),We.appendChild(St)}),U){const De={...Ge},ot=typeof e.actions=="function"?e.actions(Je,Ge):e.actions;let ct=P(s,"actions",De,ot);ct.length||(ct=P(null,"default",De,ot)),We.appendChild(_.td({class:"cms-table-cell cms-table-cell-actions",style:{textAlign:"right"}},_.div({class:"cms-table-actions"},...ct)))}B.appendChild(We)}},"UI.Table:render");re.body=Z;const ve=he.Card(re);return JSswift._registerCleanup(ve,fe),le&&JSswift._registerCleanup(ve,le),ve},he.Menu=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=["primary","secondary","warning","danger","success","info","light","dark"],r=["xs","sm","md","lg","xl"];let v={...e},c=null,a=null,b=null,E=null,k=null;const S=(m,N)=>Object.prototype.hasOwnProperty.call(m||{},N),I=(m,N)=>typeof m=="function"?m(N):m,V=m=>String(m||"").split(/\s+/).filter(Boolean),$=m=>m&&typeof m=="object"&&!m.nodeType&&!Array.isArray(m)&&!(m instanceof Function),ae=m=>!!m&&typeof m=="object"&&(m.nodeType===1||typeof m.getBoundingClientRect=="function"),F=()=>{clearTimeout(E),clearTimeout(k),E=null,k=null},K=(m,N,A)=>{if(!m)return;const ee=m[N]||[];ee.length&&m.classList.remove(...ee);const me=(A||[]).filter(Boolean);me.length&&m.classList.add(...me),m[N]=me},oe=(m,N,A,ee=me=>me)=>{if(m){if(A==null||A===""){m.style.removeProperty(N);return}m.style.setProperty(N,ee(A))}},H=()=>v||{},Y=m=>{var A;const N=String(l((A=m.state)!=null?A:m.color)||"").toLowerCase();return o.includes(N)?N:""},Q=m=>{const N=String(l(m.size)||"").toLowerCase();return r.includes(N)?N:""},le=m=>{var N,A;return String(l((A=(N=m.placement)!=null?N:m.position)!=null?A:"bottom-start"))},re=()=>{var A;const m=l((A=H().delay)!=null?A:H().showDelay),N=Number(m);return Number.isFinite(N)?Math.max(0,N):0},Z=()=>{const m=l(H().hideDelay),N=Number(m);return Number.isFinite(N)?Math.max(0,N):80},ne=(m=null)=>{var A,ee,me;if(m)return m;const N=H();return a||l((me=(ee=(A=N.anchorEl)!=null?A:N.triggerEl)!=null?ee:N.target)!=null?me:N.anchor)||null},T=m=>{if(m==null||m===!0)return new Set(["click"]);if(m===!1)return new Set(["manual"]);const N=Array.isArray(m)?m:String(m).split(/[\s,|/]+/),A=new Set;return N.forEach(ee=>{const me=String(ee||"").trim().toLowerCase();me&&(me==="mouseenter"||me==="mouseover"?A.add("hover"):me==="blur"||me==="focusin"?A.add("focus"):me==="tap"?A.add("click"):A.add(me))}),A.size?A:new Set(["manual"])},j=(m,N)=>{var me,ye,be;let A=null,ee=null;if(ae(m))A=m,$(N)&&(ee=N);else if($(m)){ee=m;const M=(be=(ye=(me=m.anchorEl)!=null?me:m.triggerEl)!=null?ye:m.target)!=null?be:m.anchor;ae(M)&&(A=M)}else m!=null&&(A=m);return{anchorEl:A,nextProps:ee}},q=(m=c==null?void 0:c.panel)=>{var N;return Array.from(((N=m==null?void 0:m.querySelectorAll)==null?void 0:N.call(m,"[data-menu-item]:not([disabled]):not([tabindex='-1']), .cms-menu-item:not([disabled]):not([tabindex='-1']), [role='menuitem']:not([disabled]):not([tabindex='-1']), a[href]:not([tabindex='-1']), button:not([disabled]):not([tabindex='-1'])"))||[]).filter(A=>A.offsetParent!==null&&A.getAttribute("aria-hidden")!=="true")},ce=()=>{l(H().autoFocus)!==!1&&setTimeout(()=>{const m=q();if(!m.length)return;(m.find(A=>A.classList.contains("is-active")||A.classList.contains("is-selected")||A.classList.contains("is-checked"))||m[0]).focus()},0)},J=(m,N,A="sm")=>{const ee=I(m,N);return ee==null?[]:typeof ee=="string"?[he.Icon({name:ee,size:A})]:Ln(ee,{...N,as:"icon"})},g=(m,N)=>{var se,_e,Ne,ue,Se,Fe,Ee,Je,He,Ge,qe,Ze,et;const A=I(m,N);if(A==null||A===!1)return[];if(Array.isArray(A))return A.flatMap((We,st)=>g(We,{...N,index:st}));if(typeof A=="function")return g(A(N),N);if(A!=null&&A.nodeType)return[A];if(typeof A=="string"||typeof A=="number")return g({label:A},N);if(!$(A))return Ln(A,{...N,as:"item"});const ee=String((_e=(se=A.type)!=null?se:A.kind)!=null?_e:"").toLowerCase();if(ee==="separator"||ee==="divider"||A.separator===!0||A.divider===!0)return[_.div({class:"cms-menu-divider",role:"separator"})];const me=(Ne=A.items)!=null?Ne:A.children;if((ee==="group"||ee==="section"||Array.isArray(me))&&me!=null){const We={...N,item:A},st=P(s,"groupLabel",We,I((ue=A.label)!=null?ue:A.title,We)),De=g(me,We);return De.length?[_.div({class:ie(["cms-menu-group",A.class])},st.length?_.div({class:"cms-menu-group-label"},...st):null,_.div({class:"cms-menu-group-items"},...De))]:[]}const ye={...N,item:A,close:W,dismiss:W,open:x,toggle:B,update:u,isOpen:U,entry:()=>c,anchorEl:ne(),props:H()},be=!!l(A.disabled),M=A.checked==null?null:!!l(A.checked),D=!!l((Se=A.active)!=null?Se:A.selected),G=Y(A),Ce=l(A.href),ke=l(A.to),fe=S(A,"closeOnSelect")?!!l(A.closeOnSelect):A.keepOpen===!0?!1:H().closeOnSelect!==!1,ve=A.role||(M!=null?"menuitemcheckbox":"menuitem"),pe=J(A.icon,ye),ze=J((Fe=A.iconRight)!=null?Fe:A.endIcon,ye),Me=P(s,"itemTitle",ye,I((Ee=A.title)!=null?Ee:A.label,ye)),Pe=P(s,"itemSubtitle",ye,I((Je=A.subtitle)!=null?Je:A.description,ye)),Ae=P(s,"itemShortcut",ye,I(A.shortcut,ye)),y=P(s,"itemBadge",ye,I(A.badge,ye)),X=P(s,"item",ye,I((Ge=(He=A.content)!=null?He:A.body)!=null?Ge:A.render,ye)),xe=[...y,...Ae,...M===!0&&!ze.length&&!y.length?[_.span({class:"cms-menu-entry-check"},he.Icon({name:A.checkedIcon||"check",size:"sm"}))]:[],...ze],d={class:ie(["cms-menu-entry","cms-menu-item",G?`cms-state-${G}`:"",ge(D,"is-active"),ge(M===!0,"is-checked"),ge(be,"is-disabled"),A.class]),role:ve,tabIndex:be?-1:(qe=A.tabIndex)!=null?qe:-1,"data-menu-item":!0,"data-menu-select":fe?"true":"false","data-menu-close":A.close===!0?"true":null,"data-menu-keep-open":fe?null:"true","aria-disabled":be?"true":null,"aria-checked":M==null?null:String(M),title:(et=(Ze=A.titleAttr)!=null?Ze:A.tooltip)!=null?et:null,type:Ce?null:"button",href:Ce||null,target:A.target||null,rel:A.rel||(A.target==="_blank"?"noopener noreferrer":null),onClick:We=>{var De,ot,ct,dt;if(be){We.preventDefault(),We.stopPropagation();return}(ot=(De=H()).onItemClick)==null||ot.call(De,A,ye,We);const st=(ct=A.onClick)==null?void 0:ct.call(A,ye,We);We.defaultPrevented||(ke&&((dt=JSswift.router)!=null&&dt.navigate)&&(We.preventDefault(),JSswift.router.navigate(ke)),st!==!1&&fe&&W())}};A.attrs&&typeof A.attrs=="object"&&Object.assign(d,A.attrs);const i=Ce?_.a:_.button,C=X.length?X:[Me.length?_.div({class:"cms-menu-entry-title"},...Me):null,Pe.length?_.div({class:"cms-menu-entry-subtitle"},...Pe):null].filter(Boolean);return[i(d,pe.length?_.span({class:"cms-menu-entry-icon"},...pe):null,_.span({class:"cms-menu-entry-main"},...C),xe.length?_.span({class:"cms-menu-entry-aside"},...xe):null)]},f=()=>{var Me,Pe,Ae,y,X,xe,R;const m=H(),N={close:W,dismiss:W,open:x,toggle:B,update:u,isOpen:U,entry:()=>c,anchorEl:ne(),props:m},A=J(m.icon,N,m.iconSize||"md"),ee=P(s,"eyebrow",N,I(m.eyebrow,N)),me=P(s,"title",N,I((Pe=(Me=m.title)!=null?Me:m.heading)!=null?Pe:m.label,N)),ye=P(s,"subtitle",N,I((Ae=m.subtitle)!=null?Ae:m.description,N)),be=P(s,"before",N,I(m.before,N)),M=P(s,"header",N,I(m.header,N)),D=P(s,"after",N,I(m.after,N)),G=P(s,"footer",N,I(m.footer,N)),Ce=P(s,"status",N,I(m.status,N));let ke=(y=m.content)!=null?y:m.body;ke==null&&n&&n.length&&(ke=n);let fe=P(s,"content",N,I(ke,N));fe.length||(fe=P(s,"body",N,I(ke,N))),fe.length||(fe=P(s,"default",N,I(ke,N)));const ve=g((xe=(X=m.items)!=null?X:m.actionsList)!=null?xe:m.entries,N),pe=ve.length?[]:P(s,"empty",N,I((R=m.empty)!=null?R:m.emptyText,N));let ze=null;return M.length?ze=_.div({class:ie(["cms-menu-head","cms-menu-head-custom",m.headerClass])},...M):(A.length||ee.length||me.length||ye.length)&&(ze=_.div({class:ie(["cms-menu-head",m.headerClass])},A.length?_.div({class:"cms-menu-head-icon"},...A):null,_.div({class:"cms-menu-head-main"},ee.length?_.div({class:"cms-menu-eyebrow"},...ee):null,me.length?_.div({class:"cms-menu-title"},...me):null,ye.length?_.div({class:"cms-menu-subtitle"},...ye):null))),_.div({class:ie(["cms-menu","cms-menu-shell",ge(m.dense,"dense"),ge(ve.length>0,"has-items"),ge(G.length>0||Ce.length>0,"has-footer"),m.class]),style:m.style||{},role:m.role||"menu","aria-label":m.ariaLabel||null},be.length?_.div({class:"cms-menu-before"},...be):null,ze,fe.length?_.div({class:ie(["cms-menu-content",m.contentClass])},...fe):null,ve.length?_.div({class:ie(["cms-menu-items",m.itemsClass])},...ve):null,!ve.length&&pe.length?_.div({class:"cms-menu-empty"},...pe):null,D.length?_.div({class:"cms-menu-after"},...D):null,Ce.length||G.length?_.div({class:ie(["cms-menu-footer",m.footerClass])},Ce.length?_.div({class:"cms-menu-status"},...Ce):null,G.length?_.div({class:"cms-menu-footer-actions"},...G):null):null)},p=m=>{var me;if(!(m!=null&&m.panel))return;const N=H(),A=Y(N),ee=Q(N);K(m.panel,"_menuClassTokens",["cms-menu-panel","cms-clear-set","cms-singularity",ee?`cms-menu-${ee}`:"",A?`cms-state-${A}`:"",l(N.outline)?"outline":"",...V(N.panelClass)]),K(m.overlay,"_menuOverlayClassTokens",[...V(N.overlayClass)]),m.panel.dataset.placement=le(N),oe(m.panel,"--cms-menu-width",l(N.width),Be),oe(m.panel,"--cms-menu-min-width",l(N.minWidth),Be),oe(m.panel,"--cms-menu-max-width",l(N.maxWidth),Be),oe(m.panel,"--cms-menu-max-height",l(N.maxHeight),Be),oe(m.panel,"--cms-menu-body-max-height",l((me=N.bodyMaxHeight)!=null?me:N.contentMaxHeight),Be),N.panelStyle&&Object.assign(m.panel.style,N.panelStyle),Ye(m.panel,N)},O=()=>{c!=null&&c.panel&&c.panel.replaceChildren(f())},W=()=>{if(F(),!c)return;const m=c;c=null,bn(m,()=>JSswift.overlay.close(m.id))},u=(m={})=>{var N,A,ee,me;if(m&&typeof m=="object"&&(v={...v,...m}),c){const ye=H();p(c),O(),(me=c.reposition)==null||me.call(c,{anchorEl:c._anchorEl,placement:le(ye),offsetX:(N=ye.offsetX)!=null?N:0,offsetY:(ee=(A=ye.offsetY)!=null?A:ye.offset)!=null?ee:8}),ce()}return L},x=(m=null,N=null)=>{var ze,Me,Pe,Ae,y,X,xe,R,d,i,C,se,_e,Ne,ue,Se;F();const{anchorEl:A,nextProps:ee}=j(m,N);ee&&(v={...v,...ee});const me=H(),ye=ne(A);if(!ye||l(me.disabled))return null;if(c&&c._anchorEl===ye){const Fe=H();return p(c),O(),(Ae=c.reposition)==null||Ae.call(c,{anchorEl:c._anchorEl,placement:le(Fe),offsetX:(ze=Fe.offsetX)!=null?ze:0,offsetY:(Pe=(Me=Fe.offsetY)!=null?Me:Fe.offset)!=null?Pe:8}),ce(),c}c&&W(),b=document.activeElement;let be=null;if(c=JSswift.overlay.open(()=>f(),{type:"menu",anchorEl:ye,placement:le(me),offsetX:(y=me.offsetX)!=null?y:0,offsetY:(xe=(X=me.offsetY)!=null?X:me.offset)!=null?xe:8,backdrop:me.backdrop===!0,lockScroll:me.lockScroll===!0,trapFocus:me.trapFocus===!0,autoFocus:!1,closeOnOutside:me.closeOnOutside!==!1,closeOnBackdrop:(R=me.closeOnBackdrop)!=null?R:me.backdrop===!0,closeOnEsc:me.closeOnEsc!==!1,className:Dt(["cms-menu-panel"]),onClose:()=>{var Fe,Ee,Je;(Fe=be==null?void 0:be._menuCleanup)==null||Fe.call(be),(Je=(Ee=H()).onClose)==null||Je.call(Ee,be),H().returnFocus!==!1&&b&&typeof b.focus=="function"&&setTimeout(()=>b.focus(),0)}}),!(c!=null&&c.panel))return c;const M=c;be=M,M._anchorEl=ye;const D=()=>{clearTimeout(k),k=null},G=()=>{z()},Ce=Fe=>{const Ee=Fe.target;if(!Ee||!Ee.closest)return;if(Ee.closest("[data-menu-close]")){W();return}if(H().closeOnSelect===!1)return;const Je=Ee.closest("[data-menu-item], [data-menu-select], .cms-menu-item, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], a[href], button:not([disabled])");Je&&(Je.closest("[data-menu-keep-open]")||Je.getAttribute("data-menu-select")!=="false"&&W())},ke=Fe=>{if(Fe.key==="Escape"){Fe.preventDefault(),W();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(Fe.key))return;const Ee=q(M.panel);if(!Ee.length)return;Fe.preventDefault();const Je=Ee.indexOf(document.activeElement);if(Fe.key==="Home"){Ee[0].focus();return}if(Fe.key==="End"){Ee[Ee.length-1].focus();return}const He=Fe.key==="ArrowDown"?1:-1,Ge=Je<0?He>0?0:Ee.length-1:(Je+He+Ee.length)%Ee.length;Ee[Ge].focus()};M.panel.addEventListener("click",Ce),M.panel.addEventListener("keydown",ke);const fe=T((i=(d=me.trigger)!=null?d:me.triggers)!=null?i:S(me,"open")?"manual":null),ve=fe.has("hover"),pe=fe.has("focus");return(ve||pe)&&(M.panel.addEventListener("mouseenter",D),M.panel.addEventListener("mouseleave",G),M.panel.addEventListener("focusin",D),M.panel.addEventListener("focusout",G)),M._menuCleanup=()=>{var Fe,Ee,Je,He,Ge,qe;(Fe=M.panel)==null||Fe.removeEventListener("click",Ce),(Ee=M.panel)==null||Ee.removeEventListener("keydown",ke),(Je=M.panel)==null||Je.removeEventListener("mouseenter",D),(He=M.panel)==null||He.removeEventListener("mouseleave",G),(Ge=M.panel)==null||Ge.removeEventListener("focusin",D),(qe=M.panel)==null||qe.removeEventListener("focusout",G)},p(M),(Ne=M.reposition)==null||Ne.call(M,{anchorEl:ye,placement:le(me),offsetX:(C=me.offsetX)!=null?C:0,offsetY:(_e=(se=me.offsetY)!=null?se:me.offset)!=null?_e:8}),pn(M),(Se=(ue=H()).onOpen)==null||Se.call(ue,M),ce(),M},h=(m,N=null)=>{clearTimeout(k),k=null,clearTimeout(E),E=setTimeout(()=>x(m,N),re())},z=(m=!1)=>{if(clearTimeout(E),E=null,!!c){if(clearTimeout(k),m){W();return}k=setTimeout(()=>W(),Z())}},B=(m=null,N=null)=>U()?(W(),null):x(m,N),U=()=>!!c,L={open:x,close:W,show:h,hide:z,toggle:B,update:u,bind:m=>{var G,Ce;if(!m)return()=>{};a=m;const N=H(),A=T((Ce=(G=N.trigger)!=null?G:N.triggers)!=null?Ce:S(N,"open")?"manual":null),ee=A.has("hover"),me=A.has("focus"),ye=A.has("click"),be=A.has("manual")||!ee&&!me&&!ye,M=[],D=()=>{F(),M.forEach(ke=>ke()),a===m&&(a=null)};if(S(N,"open"))return at(N.open)?JSswift.reactive.effect(()=>{a&&(l(H().open)?x(a):z(!0))},"UI.Menu:open"):N.open===!0?x(m):N.open===!1&&z(!0),D;if(be||l(N.disabled))return D;if(ee){const ke=()=>h(m),fe=()=>z();m.addEventListener("mouseenter",ke),m.addEventListener("mouseleave",fe),M.push(()=>{m.removeEventListener("mouseenter",ke),m.removeEventListener("mouseleave",fe)})}if(me){const ke=()=>h(m),fe=()=>z();m.addEventListener("focus",ke),m.addEventListener("blur",fe),M.push(()=>{m.removeEventListener("focus",ke),m.removeEventListener("blur",fe)})}if(ye){const ke=fe=>{var ve,pe;(pe=(ve=H()).onTriggerClick)==null||pe.call(ve,fe),!fe.defaultPrevented&&B(m)};m.addEventListener("click",ke),M.push(()=>m.removeEventListener("click",ke))}return D},isOpen:U,entry:()=>c,props:()=>({...v})};return L},he.Popover=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},o=["primary","secondary","warning","danger","success","info","light","dark"],r=["xs","sm","md","lg","xl"];let v={...e},c=null,a=null,b=null,E=null,k=null;const S=(L,m)=>Object.prototype.hasOwnProperty.call(L||{},m),I=(L,m)=>typeof L=="function"?L(m):L,V=L=>String(L||"").split(/\s+/).filter(Boolean),$=L=>L&&typeof L=="object"&&!L.nodeType&&!Array.isArray(L)&&!(L instanceof Function),ae=L=>!!L&&typeof L=="object"&&(L.nodeType===1||typeof L.getBoundingClientRect=="function"),F=()=>{clearTimeout(E),clearTimeout(k),E=null,k=null},K=(L,m,N)=>{if(!L)return;const A=L[m]||[];A.length&&L.classList.remove(...A);const ee=(N||[]).filter(Boolean);ee.length&&L.classList.add(...ee),L[m]=ee},oe=(L,m,N,A=ee=>ee)=>{if(L){if(N==null||N===""){L.style.removeProperty(m);return}L.style.setProperty(m,A(N))}},H=()=>v,Y=L=>{var N;const m=l((N=L.state)!=null?N:L.color);return m?o.includes(m)?m:String(m):""},Q=L=>{const m=l(L.size);return typeof m=="string"&&r.includes(m)?m:""},le=L=>{var N,A,ee;const m=String(l((ee=(A=(N=L.actionsAlign)!=null?N:L.footerAlign)!=null?A:L.alignActions)!=null?ee:"end")).toLowerCase();return["start","left"].includes(m)?"start":["center","middle"].includes(m)?"center":["between","space-between"].includes(m)?"between":["stretch","full"].includes(m)?"stretch":"end"},re=L=>{var m,N;return String(l((N=(m=L.placement)!=null?m:L.position)!=null?N:"bottom-start"))},Z=(L,m)=>{const N=l(L);if(N==null||N==="")return m;const A=Number(N);return Number.isFinite(A)?A:m},ne=()=>Z(H().delay,0),T=()=>Z(H().hideDelay,120),j=L=>{var N,A;return((A=(N=L.closable)!=null?N:L.dismissible)!=null?A:L.closeButton)===!0},q=(L=null)=>{var N,A,ee;if(L)return L;const m=H();return a||l((ee=(A=(N=m.anchorEl)!=null?N:m.triggerEl)!=null?A:m.target)!=null?ee:m.anchor)||null},ce=L=>{if(L==null||L===!0)return new Set(["click"]);if(L===!1)return new Set(["manual"]);const m=Array.isArray(L)?L:String(L).split(/[\s,|/]+/),N=new Set;return m.forEach(A=>{const ee=String(A||"").trim().toLowerCase();ee&&(ee==="mouseenter"||ee==="mouseover"?N.add("hover"):ee==="blur"||ee==="focusin"?N.add("focus"):ee==="tap"?N.add("click"):N.add(ee))}),N.size?N:new Set(["manual"])},J=(L,m)=>{var ee,me,ye;let N=null,A=null;if(ae(L))N=L,$(m)&&(A=m);else if($(L)){A=L;const be=(ye=(me=(ee=L.anchorEl)!=null?ee:L.triggerEl)!=null?me:L.target)!=null?ye:L.anchor;ae(be)&&(N=be)}else L!=null&&(N=L);return{anchorEl:N,nextProps:A}},g=()=>{var pe,ze,Me,Pe,Ae,y,X,xe,R;const L=H(),m={close:O,dismiss:O,open:u,toggle:z,update:W,isOpen:B,entry:()=>c,anchorEl:q(),props:L},N=L.icon!=null?typeof L.icon=="string"?he.Icon({name:L.icon,size:L.iconSize||"md"}):JSswift.ui.slot(L.icon,{as:"icon"}):null,A=P(s,"eyebrow",m,I(L.eyebrow,m)),ee=P(s,"title",m,I((ze=(pe=L.title)!=null?pe:L.heading)!=null?ze:L.label,m)),me=P(s,"subtitle",m,I((Me=L.subtitle)!=null?Me:L.description,m)),ye=P(s,"icon",m,N),be=P(s,"header",m,I((Ae=(Pe=L.headerContent)!=null?Pe:L.head)!=null?Ae:L.header,m)),M=j(L)?P(s,"close",m,he.Btn({class:"cms-dialog-close",size:"sm",outline:!0,"aria-label":L.closeLabel||"Chiudi popover","data-popover-close":!0},he.Icon({name:L.closeIcon||"close",size:"sm"}))):[];let D=(xe=(X=(y=L.content)!=null?y:L.body)!=null?X:L.message)!=null?xe:L.text;D==null&&n&&n.length&&(D=n);let G=P(s,"content",m,I(D,m));G.length||(G=P(s,"body",m,I(D,m))),G.length||(G=P(s,"default",m,I(D,m)));const Ce=I((R=L.footer)!=null?R:L.actions,m);let ke=P(s,"footer",m,Ce);ke.length||(ke=P(s,"actions",m,Ce));let fe=null;be.length?fe=_.div({class:"cms-dialog-head cms-dialog-head-custom"},...be):(A.length||ee.length||me.length||ye.length||M.length)&&(fe=_.div({class:"cms-dialog-head"},ye.length?_.div({class:"cms-dialog-icon"},...ye):null,_.div({class:"cms-dialog-head-main"},A.length?_.div({class:"cms-dialog-eyebrow"},...A):null,ee.length?_.div({class:"cms-dialog-title"},...ee):null,me.length?_.div({class:"cms-dialog-subtitle"},...me):null),M.length?_.div({class:"cms-dialog-close-wrap"},...M):null));const ve=[];return fe&&ve.push(fe),G.length&&ve.push(_.div({class:ie(["cms-dialog-body",L.bodyClass])},...G)),ke.length&&ve.push(_.div({class:ie(["cms-dialog-actions",`is-${le(L)}`,ge(L.stackActions,"is-stacked"),L.actionsClass,L.footerClass])},...ke)),ve.length||ve.push(_.div({class:ie(["cms-dialog-body",L.bodyClass])})),_.div({class:ie(["cms-dialog-shell","cms-popover-shell",ge(!!fe,"has-head"),ge(ke.length>0,"has-footer"),ge(L.divider!==!1,"with-divider")])},...ve)},f=L=>{var ee;if(!(L!=null&&L.panel))return;const m=H(),N=Y(m),A=Q(m);K(L.panel,"_popoverClassTokens",["cms-dialog","cms-popover","cms-singularity","cms-clear-set",A?`cms-dialog-${A}`:"",N,N?`cms-state-${N}`:"",l(m.scrollable)?"scrollable":"",l(m.stickyHeader)?"sticky-head":"",l(m.stickyActions)?"sticky-actions":"",l(m.borderless)?"borderless":"",...V(m.class),...V(m.panelClass)]),K(L.overlay,"_popoverOverlayClassTokens",[...V(m.overlayClass)]),L.panel.dataset.placement=re(m),oe(L.panel,"--cms-dialog-width",l(m.width),Be),oe(L.panel,"--cms-dialog-min-width",l(m.minWidth),Be),oe(L.panel,"--cms-dialog-max-width",l(m.maxWidth),Be),oe(L.panel,"--cms-dialog-max-height",l(m.maxHeight),Be),oe(L.panel,"--cms-dialog-body-max-height",l((ee=m.bodyMaxHeight)!=null?ee:m.contentMaxHeight),Be),m.style&&Object.assign(L.panel.style,m.style),Ye(L.panel,m),L.panel.setAttribute("role",m.role||"dialog"),L.panel.setAttribute("aria-modal",m.modal===!0?"true":"false"),m.ariaLabel?L.panel.setAttribute("aria-label",m.ariaLabel):L.panel.removeAttribute("aria-label")},p=()=>{c!=null&&c.panel&&c.panel.replaceChildren(g())},O=()=>{if(F(),!c)return;const L=c;c=null,bn(L,()=>JSswift.overlay.close(L.id))},W=(L={})=>(L&&typeof L=="object"&&(v={...v,...L}),c&&(f(c),p()),de),u=(L=null,m=null)=>{var ve,pe,ze,Me,Pe,Ae,y,X;F();const{anchorEl:N,nextProps:A}=J(L,m);A&&(v={...v,...A});const ee=H(),me=q(N);if(!me||l(ee.disabled))return null;if(c&&c._anchorEl===me)return f(c),p(),c;c&&O(),b=document.activeElement;const ye=ce((pe=(ve=ee.trigger)!=null?ve:ee.triggers)!=null?pe:S(ee,"open")?"manual":null),be=ye.has("hover"),M=ye.has("focus");let D=null;if(c=JSswift.overlay.open(()=>g(),{type:"popover",anchorEl:me,placement:re(ee),offsetX:(ze=ee.offsetX)!=null?ze:0,offsetY:(Pe=(Me=ee.offsetY)!=null?Me:ee.offset)!=null?Pe:10,backdrop:ee.backdrop===!0,lockScroll:ee.lockScroll===!0,trapFocus:ee.trapFocus===!0,autoFocus:ee.autoFocus===!0,closeOnOutside:ee.closeOnOutside!==!1,closeOnBackdrop:(Ae=ee.closeOnBackdrop)!=null?Ae:ee.backdrop===!0,closeOnEsc:ee.closeOnEsc!==!1,className:Dt(["cms-dialog","cms-popover"]),onClose:()=>{var xe,R,d;(xe=D==null?void 0:D._popoverCleanup)==null||xe.call(D),(d=(R=H()).onClose)==null||d.call(R,D),H().returnFocus!==!1&&b&&typeof b.focus=="function"&&setTimeout(()=>b.focus(),0)}}),!(c!=null&&c.panel))return c;const G=c;D=G,G._anchorEl=me;const Ce=()=>{clearTimeout(k),k=null},ke=()=>{!be&&!M||h()},fe=xe=>{const R=xe.target;if(!(!R||!R.closest)){if(R.closest("[data-popover-close]")||R.closest("[data-dialog-close]")){O();return}H().closeOnSelect===!0&&R.closest("[data-popover-select]")&&O()}};return G.panel.addEventListener("click",fe),(be||M)&&(G.panel.addEventListener("mouseenter",Ce),G.panel.addEventListener("mouseleave",ke),G.panel.addEventListener("focusin",Ce),G.panel.addEventListener("focusout",ke)),G._popoverCleanup=()=>{var xe,R,d,i,C;(xe=G.panel)==null||xe.removeEventListener("click",fe),(R=G.panel)==null||R.removeEventListener("mouseenter",Ce),(d=G.panel)==null||d.removeEventListener("mouseleave",ke),(i=G.panel)==null||i.removeEventListener("focusin",Ce),(C=G.panel)==null||C.removeEventListener("focusout",ke)},f(G),pn(G),(X=(y=H()).onOpen)==null||X.call(y,G),G},x=(L,m=null)=>{clearTimeout(k),k=null,clearTimeout(E),E=setTimeout(()=>u(L,m),ne())},h=(L=!1)=>{if(clearTimeout(E),E=null,!!c){if(clearTimeout(k),L){O();return}k=setTimeout(()=>O(),T())}},z=(L=null,m=null)=>B()?(O(),null):u(L,m),B=()=>!!c,de={open:u,close:O,show:x,hide:h,toggle:z,update:W,bind:L=>{var D,G;if(!L)return()=>{};a=L;const m=H(),N=ce((G=(D=m.trigger)!=null?D:m.triggers)!=null?G:S(m,"open")?"manual":null),A=N.has("hover"),ee=N.has("focus"),me=N.has("click"),ye=N.has("manual")||!A&&!ee&&!me,be=[],M=()=>{F(),be.forEach(Ce=>Ce()),a===L&&(a=null)};if(S(m,"open"))return at(m.open)?JSswift.reactive.effect(()=>{a&&(l(H().open)?u(a):h(!0))},"UI.Popover:open"):m.open===!0?u(L):m.open===!1&&h(!0),M;if(ye||l(m.disabled))return M;if(A){const Ce=()=>x(L),ke=()=>h();L.addEventListener("mouseenter",Ce),L.addEventListener("mouseleave",ke),be.push(()=>{L.removeEventListener("mouseenter",Ce),L.removeEventListener("mouseleave",ke)})}if(ee){const Ce=()=>x(L),ke=()=>h();L.addEventListener("focus",Ce),L.addEventListener("blur",ke),be.push(()=>{L.removeEventListener("focus",Ce),L.removeEventListener("blur",ke)})}if(me){const Ce=ke=>{var fe,ve;(ve=(fe=H()).onTriggerClick)==null||ve.call(fe,ke),!ke.defaultPrevented&&z(L)};L.addEventListener("click",Ce),be.push(()=>L.removeEventListener("click",Ce))}return M},isOpen:B,entry:()=>c,props:()=>({...v})};return de},he.ContextMenu=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t);let s={...e},o=null,r=null,v=null;const c=p=>p&&typeof p=="object"&&!p.nodeType&&!Array.isArray(p)&&!(p instanceof Function),a=p=>!!p&&typeof p=="object"&&(p.nodeType===1||typeof p.getBoundingClientRect=="function"),b=p=>!!p&&typeof p=="object"&&("clientX"in p||"type"in p||"target"in p||"currentTarget"in p),E=p=>!!p&&Number.isFinite(Number(p.x))&&Number.isFinite(Number(p.y)),k=()=>s,S=(p,O)=>{const W=Number(p),u=Number(O);return!Number.isFinite(W)||!Number.isFinite(u)?null:{x:W,y:u}},I=p=>p?{_cmsContextPoint:p,getBoundingClientRect:()=>({top:p.y,bottom:p.y,left:p.x,right:p.x,width:0,height:0})}:null,V=p=>{if(!a(p))return null;const O=p.getBoundingClientRect();return S(O.left+Math.min(O.width/2,24),O.top+Math.min(O.height/2,24))},$=p=>{var O,W,u,x;return l((x=(u=(W=(O=p==null?void 0:p.anchorEl)!=null?O:p==null?void 0:p.triggerEl)!=null?W:p==null?void 0:p.target)!=null?u:p==null?void 0:p.anchor)!=null?x:null)},ae=(p,O=null)=>{if(!p)return V(O||v);const W=S(p.clientX,p.clientY);if(W)return W;const u=$({anchorEl:O||p.currentTarget||p.target||v});return V(u)},F=(p={})=>{if(!c(p))return{};const O={...p};return delete O.event,delete O.point,delete O.x,delete O.y,O},K=()=>{var O,W,u;const p=k();return{...p,trigger:"manual",placement:p.placement||"bottom-start",offsetX:(O=p.offsetX)!=null?O:0,offsetY:(u=(W=p.offsetY)!=null?W:p.offset)!=null?u:4,closeOnOutside:p.closeOnOutside!==!1,closeOnEsc:p.closeOnEsc!==!1,role:p.role||"menu",ariaLabel:p.ariaLabel||p.title||"Context menu",class:ie(["cms-context-menu-shell",p.class]),panelClass:ie(["cms-context-menu-panel",p.panelClass])}},oe=he.Menu(K(),...n),H=(p=null,O=null,W=null)=>{let u=null,x=null,h=null;if(b(p))u=ae(p,v),h=c(O)?F(O):null;else if(typeof p=="number"||typeof O=="number")u=S(p,O),h=c(W)?F(W):null;else if(E(p))u=S(p.x,p.y),h=c(O)?F(O):null;else if(a(p))x=p,h=c(O)?F(O):null;else if(c(p)){const z=E(p.point)?p.point:E(p)?p:null,B=$(p),U=p.event;u=z?S(z.x,z.y):ae(U,B||v),x=B&&a(B)?B:null,h={...F(p),...c(O)?F(O):{}}}else o&&(u={...o});return{point:u,anchor:x,nextProps:h}},Y=(p,O=null)=>{r=p||r,o=O||p&&p._cmsContextPoint||o},Q=(p=null)=>{c(p)&&Object.keys(p).length&&(s={...s,...p})},le=(p=null,O=null)=>{if(O)return I(O);if(p&&a(p))return p;const W=$(k());return a(W)?W:o?I(o):a(r)?r:a(v)?v:null},re=(p=null,O=null,W=null)=>{const{point:u,anchor:x,nextProps:h}=H(p,O,W);Q(h);const z=le(x,u);return z?(Y(z,u),oe.open(z,K())):null},Z=(p,O,W=null)=>re(p,O,W),ne=(p,O=null)=>re(p,O),T=()=>(oe.close(),f),j=(p=!0)=>(p===!1?oe.hide(!1):oe.close(),f),q=(p=null,O=null,W=null)=>re(p,O,W),ce=(p=null,O=null,W=null)=>oe.isOpen()?(T(),null):re(p,O,W),J=(p={})=>(Q(F(p)),oe.update(K()),f),f={open:re,openAt:Z,openFromEvent:ne,show:q,hide:j,close:T,toggle:ce,update:J,bind:(p,O=null)=>{if(!p)return()=>{};const W=c(O)?F(O):null,u=h=>{var B,U;v=p,h.preventDefault(),!(((U=(B=k()).onTrigger)==null?void 0:U.call(B,h,{element:p,open:re,close:T,update:J}))===!1||l(k().disabled))&&re({event:h,anchorEl:p},W)},x=h=>{var B,U;h.key!=="ContextMenu"&&!(h.shiftKey&&h.key==="F10")||(v=p,h.preventDefault(),((U=(B=k()).onTrigger)==null?void 0:U.call(B,h,{element:p,open:re,close:T,update:J}))===!1||l(k().disabled))||re({event:h,anchorEl:p},W)};return p.addEventListener("contextmenu",u),p.addEventListener("keydown",x),()=>{p.removeEventListener("contextmenu",u),p.removeEventListener("keydown",x)}},isOpen:oe.isOpen,entry:oe.entry,props:()=>({...s})};return f}})(JSswift);
32
+ `,l.appendChild(n);const i=document.createElement("div");i.style.cssText="display:flex; gap: 12px; align-items:center; width: 100%;",i.appendChild(t),i.appendChild(s),e.appendChild(i),e.appendChild(l),xt.appendChild(e),document.body.appendChild(xt);const c=document.createElement("style");return c.textContent=`
33
+ @keyframes jssSpin { to { transform: rotate(360deg); } }
34
+ `,document.head.appendChild(c),xt._textNode=s,xt._spinner=t,xt._progressWrap=l,xt._progressBar=n,xt._progressActive=!1,xt}function jl(e,t){if(typeof e=="object"&&e!==null)return{...e};const s=t&&typeof t=="object"?t:{};return typeof t=="string"&&(e==null||typeof e=="number")?{...s,message:t}:{...s,message:e}}function Cl(e,t){const s=t==="progress";e._spinner.style.display=s?"none":"",e._progressWrap.style.display=s?"block":"none",e._mode=t}Ue.loading.show=function(e="Loading...",t={}){const s=Sl(),l=jl(e,t);Pn++,s._progressActive=!1,s._textNode.textContent=l.message||"Loading...",Cl(s,"spinner"),l.spinner===!1&&(s._spinner.style.display="none"),s.style.display="flex"},Ue.loading.hide=function(){xt&&(Pn=Math.max(0,Pn-1),Pn===0&&(xt.style.display="none",xt._progressActive=!1))},Ue.loading.progress=function(e=0,t={}){var s;const l=Sl();typeof e=="object"&&e!==null&&(t=e,e=(s=e.value)!=null?s:0);const n=jl(null,t);l._progressActive||(Pn++,l._progressActive=!0);const i=Math.max(0,Math.min(100,Number(e!=null?e:0)));l._textNode.textContent=n.message||"Loading...",l._progressBar.style.width=i+"%",Cl(l,"progress"),l.style.display="flex"},Ue.loading.wrap=async function(e,t){Ue.loading.show(e);try{return await t()}finally{Ue.loading.hide()}};function Vo(e){return typeof e=="function"?e():e||[]}function Ss(e,t){if(!(e==null||t==null))return typeof t!="string"||t.indexOf(".")<0?e==null?void 0:e[t]:t.split(".").reduce((s,l)=>s==null?s:s[l],e)}function Bo(e,t){return e==null&&t==null?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function Ho(e){const t=Vo(e);return Array.isArray(t)?t:[]}function xl(e){var t,s,l,n;return(n=(l=(s=(t=e==null?void 0:e.label)!=null?t:e==null?void 0:e.title)!=null?s:e==null?void 0:e.header)!=null?l:e==null?void 0:e.key)!=null?n:""}function js(e,t){var s,l;return(l=(s=e==null?void 0:e.sortKey)!=null?s:e==null?void 0:e.key)!=null?l:`__col_${t}`}function kl(e,t){return e.find((s,l)=>js(s,l)===t||(s==null?void 0:s.key)===t)||null}function qn(e,t,s){return e?typeof e.get=="function"?e.get(t,{row:t,rowIndex:s,col:e}):typeof e.value=="function"?e.value(t,{row:t,rowIndex:s,col:e}):typeof e.key=="string"?Ss(t,e.key):e.key!=null?t==null?void 0:t[e.key]:t:t}function Xn(e,t){return typeof e=="function"?e(t)||{}:e||{}}function Qn(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(Qn).filter(Boolean).join(" ");if(typeof Node!="undefined"&&e instanceof Node)return e.textContent||"";if(typeof e=="object"){if(typeof e.textContent=="string")return e.textContent;try{return JSON.stringify(e)}catch(t){return""}}return String(e)}function Wo(e,t){const l=(Array.isArray(e)?e:t).map(n=>Number(n)).filter(n=>Number.isFinite(n)&&n>0);return l.length?Array.from(new Set(l)):t}function Uo(e,t,s,l){const n=l.searchBy||l.searchPredicate;if(typeof n=="function")return!!n(e,{query:s,columns:t});const i=String(s||"").trim().toLowerCase().split(/\s+/).filter(Boolean);if(!i.length)return!0;const c=Array.isArray(l.searchKeys)&&l.searchKeys.length?l.searchKeys:t.filter(a=>(a==null?void 0:a.searchable)!==!1).map(a=>{var z;return(z=a==null?void 0:a.searchKey)!=null?z:a==null?void 0:a.key}).filter(Boolean),r=[];if(c.length)for(const a of c)if(typeof a=="function")r.push(Qn(a(e)));else{const z=t.find(u=>(u==null?void 0:u.key)===a||(u==null?void 0:u.searchKey)===a);r.push(Qn(z?qn(z,e,-1):Ss(e,a)))}else r.push(Qn(e));const v=r.join(" ").toLowerCase();return i.every(a=>v.includes(a))}he.Table=(...e)=>{var t,s,l,n;const{props:i,children:c}=JSswift.uiNormalizeArgs(e),r=i.slots||{},v=Array.isArray(i.columns)?i.columns:[],a=Wo(i.pageSizeOptions,[5,10,20,50]),z=Number((s=(t=i.pageSize)!=null?t:a[0])!=null?s:10)||10,u=Array.from(new Set([...a,z])).sort((we,j)=>we-j),x=i.initialSort||(i.sortBy?{key:i.sortBy,dir:i.sortDir==="desc"?"desc":"asc"}:null),k=i.searchable===!0||typeof i.searchable=="string"||i.searchPlaceholder!=null||i.search!=null||i.query!=null||!!i.searchModel||!!i.queryModel||Array.isArray(i.searchKeys)||typeof i.searchBy=="function"||typeof i.searchPredicate=="function",f=At(i.searchModel||i.queryModel,"UI.Table:query"),[B,y]=Ue.reactive.signal(Math.max(1,Number(i.page||1)||1)),[M,D]=Ue.reactive.signal(z),[q,L]=Ue.reactive.signal(x),[ce,X]=Ue.reactive.signal(String((n=f?f.get():(l=i.search)!=null?l:i.query)!=null?n:"")),Z=we=>{const j=String(we!=null?we:"");X(j),f&&f.set(j),y(1)},ie=we=>{const j=Number(we)||z;D(j),y(1)},te=(we,j)=>{const fe=js(we,j),je=q();!je||je.key!==fe&&je.key!==(we==null?void 0:we.key)?L({key:fe,dir:"asc"}):je.dir==="asc"?L({key:fe,dir:"desc"}):L(null),y(1)};let se=null,R;f&&(R=f.watch(we=>{const j=String(we!=null?we:"");X(j),se&&se.value!==j&&(se.value=j),y(1)},"UI.Table:queryWatch"));const ae=JSswift.omit(i,["columns","rows","rowKey","loading","page","pageSize","pageSizeOptions","pagination","initialSort","sortBy","sortDir","search","query","searchable","searchPlaceholder","searchKeys","searchBy","searchPredicate","searchModel","queryModel","filter","actions","actionsLabel","emptyText","loadingText","onRowClick","onRowDblClick","tableClass","tableStyle","cardClass","dense","striped","hover","stickyHeader","toolbar","toolbarStart","toolbarEnd","caption","footer","status","rowClass","rowAttrs","minTableWidth","hideHeader","hideFooter","hideStatus","slots","body"]);ae.class=oe(["jss-table-card",i.class,i.cardClass]),i.dense!=null&&(ae.dense=i.dense);const re=_.div({class:"jss-table-shell"}),ne=F(r,"default",{},c);ne.length&&re.appendChild(_.div({class:"jss-table-lead"},...ne));const K=F(r,"toolbarStart",{},i.toolbarStart),S=F(r,"toolbar",{},i.toolbar),I=F(r,"toolbarEnd",{},i.toolbarEnd),m=_.div({class:"jss-table-toolbar"}),P=_.div({class:"jss-table-toolbar-main"}),G=_.div({class:"jss-table-toolbar-side"});K.forEach(we=>P.appendChild(we)),S.forEach(we=>P.appendChild(we));const h=F(r,"search",{query:ce(),getQuery:ce,setQuery:Z},null);if(h.length)h.forEach(we=>G.appendChild(we));else if(k){se=_.input({type:"search",class:"jss-input",placeholder:typeof i.searchable=="string"?i.searchable:i.searchPlaceholder||"Cerca nella tabella",value:String(ce()||"")}),se.addEventListener("input",()=>Z(se.value));const we=he.Btn({class:"jss-table-search-clear",outline:!0,onClick:()=>{se&&(se.value=""),Z("")}},"Reset");G.appendChild(_.div({class:"jss-singularity jss-table-search"},_.span({class:"jss-table-search-icon","aria-hidden":"true"},"\u2315"),se,we))}I.forEach(we=>G.appendChild(we)),(P.childNodes.length||G.childNodes.length)&&(m.appendChild(P),m.appendChild(G),re.appendChild(m));const b=_.div({class:"jss-singularity jss-table-chip"},""),g=_.div({class:"jss-singularity jss-table-chip"},""),J=_.div({class:"jss-singularity jss-table-chip"},""),W=F(r,"status",{},i.status),H=_.div({class:"jss-table-status"},b,g,J,...W);i.hideStatus!==!0&&re.appendChild(H);const de=F(r,"caption",{},i.caption);de.length&&re.appendChild(_.div({class:"jss-table-caption"},...de));const E=_.thead(),N=_.tbody(),A=!!i.actions||!!r.actions,T=oe(["jss-table",pe(i.dense,"dense"),pe(i.striped,"striped"),pe(i.hover!==!1,"hover"),pe(i.stickyHeader!==!1,"sticky-head"),i.tableClass]),U={...i.tableStyle||{}};i.minTableWidth!=null&&(U["--jss-table-min-width"]=He(i.minTableWidth));const ue=_.table({class:T,style:U},E,N),xe=_.div({class:"jss-singularity jss-table-wrap"},ue);re.appendChild(xe);const Ne=_.div({class:"jss-singularity jss-table-chip"},""),$=_.div({class:"jss-singularity jss-table-chip"},""),V=he.Btn({outline:!0,onClick:()=>y(Math.max(1,B()-1))},"\u2039"),Y=he.Btn({outline:!0,onClick:()=>y(B()+1)},"\u203A"),ge=_.div({class:"jss-singularity jss-table-chip"},""),ye=_.select({class:"jss-input jss-table-size-select"},...u.map(we=>ds({value:String(we)},String(we))));ye.value=String(M()),ye.addEventListener("change",()=>ie(ye.value));const Q=F(r,"footer",{},i.footer),ve=_.div({class:"jss-table-foot"},_.div({class:"jss-table-foot-main"},Ne,$,_.label({class:"jss-table-size"},_.span("Righe"),ye)),_.div({class:"jss-table-foot-extra"},...Q,_.div({class:"jss-table-pager"},V,ge,Y)));i.hideFooter!==!0&&re.appendChild(ve);const be=()=>{if(E.innerHTML="",i.hideHeader)return;const we=_.tr();if(v.forEach((j,fe)=>{var je,O;const d={col:j,colIndex:fe,sort:q()},p={...Xn(j==null?void 0:j.style,{...d,header:!0}),...Xn((je=j==null?void 0:j.headerStyle)!=null?je:j==null?void 0:j.thStyle,{...d,header:!0})};(j==null?void 0:j.width)!=null&&(p.width=He(j.width)),(j==null?void 0:j.minWidth)!=null&&(p.minWidth=He(j.minWidth)),(j==null?void 0:j.maxWidth)!=null&&(p.maxWidth=He(j.maxWidth)),j!=null&&j.align&&(p.textAlign=j.align);let C=F(j==null?void 0:j.slots,"header",d,null);if(!C.length){const ke=typeof(j==null?void 0:j.header)=="function"?j.header(d):(O=j==null?void 0:j.header)!=null?O:xl(j);C=F(r,"header",d,ke)}const ee=q(),Se=js(j,fe),Ce=(j==null?void 0:j.sortable)!==!1&&((j==null?void 0:j.key)!=null||typeof(j==null?void 0:j.get)=="function"||typeof(j==null?void 0:j.compare)=="function"),Ae=!!ee&&(ee.key===Se||ee.key===(j==null?void 0:j.key)),Le=_.th({class:oe(["jss-table-head-cell",pe(j==null?void 0:j.nowrap,"is-nowrap"),pe(Ce,"jss-table-sortable"),pe(Ae,"is-sorted"),j==null?void 0:j.headerClass]),style:p});Ce?Le.appendChild(_.button({type:"button",class:"jss-table-head-button",onClick:()=>te(j,fe)},_.span({class:"jss-table-head-label"},...C),_.span({class:"jss-table-head-arrow","aria-hidden":"true"},Ae?ee.dir==="asc"?"\u2191":"\u2193":"\u2195"))):C.forEach(ke=>Le.appendChild(ke)),we.appendChild(Le)}),A){const j=F(r,"actionsHeader",{},i.actionsLabel||"Azioni");we.appendChild(_.th({class:"jss-table-head-cell jss-table-head-actions",style:{textAlign:"right"}},...j))}E.appendChild(we)},me=(we,j)=>{const fe={columns:v,count:v.length},je=F(r,we,fe,j),O=String(v.length+(A?1:0));N.appendChild(_.tr(_.td({colSpan:O,class:"jss-table-state"},...je)))},Ie=Ue.reactive.effect(()=>{const we=Ho(i.rows),j=String(ce()||"").trim(),fe=q(),je=typeof i.loading=="function"?!!i.loading():!!i.loading,O=i.pagination!==!1;if(be(),N.innerHTML="",se&&se.value!==ce()&&(se.value=ce()),ye.value!==String(M())&&(ye.value=String(M())),je){b.textContent="Caricamento in corso",g.style.display="none",J.style.display="none",Ne.textContent="Loading\u2026",$.textContent="",ge.textContent="Pagina 1",V.disabled=!0,Y.disabled=!0,me("loading",i.loadingText||"Loading...");return}let d=we.slice();const p=d.length;if(typeof i.filter=="function"&&(d=d.filter((Ee,Re)=>i.filter(Ee,{row:Ee,index:Re,query:j,rows:we,columns:v}))),j&&(d=d.filter(Ee=>Uo(Ee,v,j,i))),fe){const Ee=kl(v,fe.key);Ee&&d.sort((Re,Me)=>{const $e=qn(Ee,Re,-1),Ye=qn(Ee,Me,-1),qe=typeof Ee.compare=="function"?Ee.compare($e,Ye,Re,Me):Bo($e,Ye);return fe.dir==="asc"?qe:-qe})}const C=d.length,ee=Math.max(1,Number(M())||z),Se=O?Math.max(1,Math.ceil(C/ee)):1,Ce=O?Math.min(B(),Se):1;Ce!==B()&&y(Ce);const Ae=O?(Ce-1)*ee:0,Le=O?Ae+ee:C,ke=d.slice(Ae,Le);if(b.textContent=C===p?`${C} righe`:`${C} di ${p} righe`,g.textContent=j?`Ricerca: ${j}`:"",g.style.display=j?"":"none",fe){const Ee=kl(v,fe.key);J.textContent=Ee?`Ordine: ${xl(Ee)} ${fe.dir==="asc"?"\u2191":"\u2193"}`:"",J.style.display=Ee?"":"none"}else J.style.display="none";if(Ne.textContent=C?`${Ae+1}-${Math.min(Le,C)} di ${C}`:"0 risultati",$.textContent=C!==p?`Dataset totale ${p}`:`Page size ${ee}`,ge.textContent=O?`Pagina ${Ce} / ${Se}`:"Tutte le righe",V.disabled=!O||Ce<=1,Y.disabled=!O||Ce>=Se,ye.disabled=!O,ye.parentNode.style.display=O?"":"none",ke.length===0){me("empty",i.emptyText||"Nessun dato");return}for(let Ee=0;Ee<ke.length;Ee++){const Re=ke[Ee],Me=Ae+Ee,$e={row:Re,rowIndex:Me,pageIndex:Ee},Ye=typeof i.rowAttrs=="function"?i.rowAttrs(Re,$e)||{}:i.rowAttrs||{},qe=typeof i.rowClass=="function"?i.rowClass(Re,$e):i.rowClass,lt=!!(i.onRowClick||i.onRowDblClick),Xe=_.tr({...Ye,class:oe(["jss-table-row",qe,Ye.class,pe(lt,"is-clickable")])});if(i.rowKey){const Ve=typeof i.rowKey=="function"?i.rowKey(Re,$e):Ss(Re,i.rowKey);Ve!=null&&(Xe.dataset.key=String(Ve))}const ze=Ve=>{const Ke=Ve==null?void 0:Ve.target;return!!(Ke&&Ke.closest&&Ke.closest("button, a, input, select, textarea, label, [data-table-action]"))};if(i.onRowClick&&Xe.addEventListener("click",Ve=>{ze(Ve)||i.onRowClick(Re,$e,Ve)}),i.onRowDblClick&&Xe.addEventListener("dblclick",Ve=>{ze(Ve)||i.onRowDblClick(Re,$e,Ve)}),v.forEach((Ve,Ke)=>{var gt,yt;const ut=qn(Ve,Re,Me),dt={...$e,col:Ve,colIndex:Ke,value:ut},_t={...Xn(Ve==null?void 0:Ve.style,dt),...Xn((gt=Ve==null?void 0:Ve.cellStyle)!=null?gt:Ve==null?void 0:Ve.tdStyle,dt)};Ve!=null&&Ve.align&&(_t.textAlign=Ve.align),(Ve==null?void 0:Ve.width)!=null&&(_t.width=He(Ve.width)),(Ve==null?void 0:Ve.minWidth)!=null&&(_t.minWidth=He(Ve.minWidth)),(Ve==null?void 0:Ve.maxWidth)!=null&&(_t.maxWidth=He(Ve.maxWidth));const ft=typeof(Ve==null?void 0:Ve.cellClass)=="function"?Ve.cellClass(Re,dt):(Ve==null?void 0:Ve.cellClass)||(Ve==null?void 0:Ve.class),at=_.td({class:oe(["jss-table-cell",ft,pe(Ve==null?void 0:Ve.nowrap,"is-nowrap")]),style:_t});let ht=F(Ve==null?void 0:Ve.slots,"cell",dt,null);if(!ht.length){const vt=typeof(Ve==null?void 0:Ve.render)=="function"?Ve.render(Re,dt):typeof(Ve==null?void 0:Ve.format)=="function"?Ve.format(ut,Re,dt):ut,tn=vt==null?(yt=Ve==null?void 0:Ve.emptyText)!=null?yt:"":vt;ht=F(r,"cell",dt,tn)}ht.length||(ht=[""]),ht.forEach(vt=>at.appendChild(vt)),Xe.appendChild(at)}),A){const Ve={...$e},Ke=typeof i.actions=="function"?i.actions(Re,$e):i.actions;let gt=F(r,"actions",Ve,Ke);gt.length||(gt=F(null,"default",Ve,Ke)),Xe.appendChild(_.td({class:"jss-table-cell jss-table-cell-actions",style:{textAlign:"right"}},_.div({class:"jss-table-actions"},...gt)))}N.appendChild(Xe)}},"UI.Table:render");ae.body=re;const Oe=he.Card(ae);return JSswift._registerCleanup(Oe,Ie),R&&JSswift._registerCleanup(Oe,R),Oe},he.Menu=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=["primary","secondary","warning","danger","success","info","light","dark"],i=["xs","sm","md","lg","xl"];let c={...t},r=null,v=null,a=null,z=null,u=null;const x=(N,A)=>Object.prototype.hasOwnProperty.call(N||{},A),k=(N,A)=>typeof N=="function"?N(A):N,f=N=>String(N||"").split(/\s+/).filter(Boolean),B=N=>N&&typeof N=="object"&&!N.nodeType&&!Array.isArray(N)&&!(N instanceof Function),y=N=>!!N&&typeof N=="object"&&(N.nodeType===1||typeof N.getBoundingClientRect=="function"),M=()=>{clearTimeout(z),clearTimeout(u),z=null,u=null},D=(N,A,T)=>{if(!N)return;const U=N[A]||[];U.length&&N.classList.remove(...U);const ue=(T||[]).filter(Boolean);ue.length&&N.classList.add(...ue),N[A]=ue},q=(N,A,T,U=ue=>ue)=>{if(N){if(T==null||T===""){N.style.removeProperty(A);return}N.style.setProperty(A,U(T))}},L=()=>c||{},ce=N=>{var A;const T=String(o((A=N.state)!=null?A:N.color)||"").toLowerCase();return n.includes(T)?T:""},X=N=>{const A=String(o(N.size)||"").toLowerCase();return i.includes(A)?A:""},Z=N=>{var A,T;return String(o((T=(A=N.placement)!=null?A:N.position)!=null?T:"bottom-start"))},ie=()=>{var N;const A=o((N=L().delay)!=null?N:L().showDelay),T=Number(A);return Number.isFinite(T)?Math.max(0,T):0},te=()=>{const N=o(L().hideDelay),A=Number(N);return Number.isFinite(A)?Math.max(0,A):80},se=(N=null)=>{var A,T,U;if(N)return N;const ue=L();return v||o((U=(T=(A=ue.anchorEl)!=null?A:ue.triggerEl)!=null?T:ue.target)!=null?U:ue.anchor)||null},R=N=>{if(N==null||N===!0)return new Set(["click"]);if(N===!1)return new Set(["manual"]);const A=Array.isArray(N)?N:String(N).split(/[\s,|/]+/),T=new Set;return A.forEach(U=>{const ue=String(U||"").trim().toLowerCase();ue&&(ue==="mouseenter"||ue==="mouseover"?T.add("hover"):ue==="blur"||ue==="focusin"?T.add("focus"):ue==="tap"?T.add("click"):T.add(ue))}),T.size?T:new Set(["manual"])},ae=(N,A)=>{var T,U,ue;let xe=null,Ne=null;if(y(N))xe=N,B(A)&&(Ne=A);else if(B(N)){Ne=N;const $=(ue=(U=(T=N.anchorEl)!=null?T:N.triggerEl)!=null?U:N.target)!=null?ue:N.anchor;y($)&&(xe=$)}else N!=null&&(xe=N);return{anchorEl:xe,nextProps:Ne}},re=(N=r==null?void 0:r.panel)=>{var A;return Array.from(((A=N==null?void 0:N.querySelectorAll)==null?void 0:A.call(N,"[data-menu-item]:not([disabled]):not([tabindex='-1']), .jss-menu-item:not([disabled]):not([tabindex='-1']), [role='menuitem']:not([disabled]):not([tabindex='-1']), a[href]:not([tabindex='-1']), button:not([disabled]):not([tabindex='-1'])"))||[]).filter(T=>T.offsetParent!==null&&T.getAttribute("aria-hidden")!=="true")},ne=()=>{o(L().autoFocus)!==!1&&setTimeout(()=>{const N=re();if(!N.length)return;(N.find(T=>T.classList.contains("is-active")||T.classList.contains("is-selected")||T.classList.contains("is-checked"))||N[0]).focus()},0)},K=(N,A,T="sm")=>{const U=k(N,A);return U==null?[]:typeof U=="string"?[he.Icon({name:U,size:T})]:zn(U,{...A,as:"icon"})},S=(N,A)=>{var T,U,ue,xe,Ne,$,V,Y,ge,ye,Q,ve,be;const me=k(N,A);if(me==null||me===!1)return[];if(Array.isArray(me))return me.flatMap((Xe,ze)=>S(Xe,{...A,index:ze}));if(typeof me=="function")return S(me(A),A);if(me!=null&&me.nodeType)return[me];if(typeof me=="string"||typeof me=="number")return S({label:me},A);if(!B(me))return zn(me,{...A,as:"item"});const Ie=String((U=(T=me.type)!=null?T:me.kind)!=null?U:"").toLowerCase();if(Ie==="separator"||Ie==="divider"||me.separator===!0||me.divider===!0)return[_.div({class:"jss-menu-divider",role:"separator"})];const Oe=(ue=me.items)!=null?ue:me.children;if((Ie==="group"||Ie==="section"||Array.isArray(Oe))&&Oe!=null){const Xe={...A,item:me},ze=F(l,"groupLabel",Xe,k((xe=me.label)!=null?xe:me.title,Xe)),Ve=S(Oe,Xe);return Ve.length?[_.div({class:oe(["jss-menu-group",me.class])},ze.length?_.div({class:"jss-menu-group-label"},...ze):null,_.div({class:"jss-menu-group-items"},...Ve))]:[]}const we={...A,item:me,close:G,dismiss:G,open:b,toggle:W,update:h,isOpen:H,entry:()=>r,anchorEl:se(),props:L()},j=!!o(me.disabled),fe=me.checked==null?null:!!o(me.checked),je=!!o((Ne=me.active)!=null?Ne:me.selected),O=ce(me),d=o(me.href),p=o(me.to),C=x(me,"closeOnSelect")?!!o(me.closeOnSelect):me.keepOpen===!0?!1:L().closeOnSelect!==!1,ee=me.role||(fe!=null?"menuitemcheckbox":"menuitem"),Se=K(me.icon,we),Ce=K(($=me.iconRight)!=null?$:me.endIcon,we),Ae=F(l,"itemTitle",we,k((V=me.title)!=null?V:me.label,we)),Le=F(l,"itemSubtitle",we,k((Y=me.subtitle)!=null?Y:me.description,we)),ke=F(l,"itemShortcut",we,k(me.shortcut,we)),Ee=F(l,"itemBadge",we,k(me.badge,we)),Re=F(l,"item",we,k((ye=(ge=me.content)!=null?ge:me.body)!=null?ye:me.render,we)),Me=[...Ee,...ke,...fe===!0&&!Ce.length&&!Ee.length?[_.span({class:"jss-menu-entry-check"},he.Icon({name:me.checkedIcon||"check",size:"sm"}))]:[],...Ce],Ye={class:oe(["jss-menu-entry","jss-menu-item",O?`jss-state-${O}`:"",pe(je,"is-active"),pe(fe===!0,"is-checked"),pe(j,"is-disabled"),me.class]),role:ee,tabIndex:j?-1:(Q=me.tabIndex)!=null?Q:-1,"data-menu-item":!0,"data-menu-select":C?"true":"false","data-menu-close":me.close===!0?"true":null,"data-menu-keep-open":C?null:"true","aria-disabled":j?"true":null,"aria-checked":fe==null?null:String(fe),title:(be=(ve=me.titleAttr)!=null?ve:me.tooltip)!=null?be:null,type:d?null:"button",href:d||null,target:me.target||null,rel:me.rel||(me.target==="_blank"?"noopener noreferrer":null),onClick:Xe=>{var ze,Ve,Ke,gt;if(j){Xe.preventDefault(),Xe.stopPropagation();return}(Ve=(ze=L()).onItemClick)==null||Ve.call(ze,me,we,Xe);const yt=(Ke=me.onClick)==null?void 0:Ke.call(me,we,Xe);Xe.defaultPrevented||(p&&((gt=JSswift.router)!=null&&gt.navigate)&&(Xe.preventDefault(),JSswift.router.navigate(p)),yt!==!1&&C&&G())}};me.attrs&&typeof me.attrs=="object"&&Object.assign(Ye,me.attrs);const qe=d?_.a:_.button,lt=Re.length?Re:[Ae.length?_.div({class:"jss-menu-entry-title"},...Ae):null,Le.length?_.div({class:"jss-menu-entry-subtitle"},...Le):null].filter(Boolean);return[qe(Ye,Se.length?_.span({class:"jss-menu-entry-icon"},...Se):null,_.span({class:"jss-menu-entry-main"},...lt),Me.length?_.span({class:"jss-menu-entry-aside"},...Me):null)]},I=()=>{var N,A,T,U,ue,xe,Ne;const $=L(),V={close:G,dismiss:G,open:b,toggle:W,update:h,isOpen:H,entry:()=>r,anchorEl:se(),props:$},Y=K($.icon,V,$.iconSize||"md"),ge=F(l,"eyebrow",V,k($.eyebrow,V)),ye=F(l,"title",V,k((A=(N=$.title)!=null?N:$.heading)!=null?A:$.label,V)),Q=F(l,"subtitle",V,k((T=$.subtitle)!=null?T:$.description,V)),ve=F(l,"before",V,k($.before,V)),be=F(l,"header",V,k($.header,V)),me=F(l,"after",V,k($.after,V)),Ie=F(l,"footer",V,k($.footer,V)),Oe=F(l,"status",V,k($.status,V));let we=(U=$.content)!=null?U:$.body;we==null&&s&&s.length&&(we=s);let j=F(l,"content",V,k(we,V));j.length||(j=F(l,"body",V,k(we,V))),j.length||(j=F(l,"default",V,k(we,V)));const fe=S((xe=(ue=$.items)!=null?ue:$.actionsList)!=null?xe:$.entries,V),je=fe.length?[]:F(l,"empty",V,k((Ne=$.empty)!=null?Ne:$.emptyText,V));let O=null;return be.length?O=_.div({class:oe(["jss-menu-head","jss-menu-head-custom",$.headerClass])},...be):(Y.length||ge.length||ye.length||Q.length)&&(O=_.div({class:oe(["jss-menu-head",$.headerClass])},Y.length?_.div({class:"jss-menu-head-icon"},...Y):null,_.div({class:"jss-menu-head-main"},ge.length?_.div({class:"jss-menu-eyebrow"},...ge):null,ye.length?_.div({class:"jss-menu-title"},...ye):null,Q.length?_.div({class:"jss-menu-subtitle"},...Q):null))),_.div({class:oe(["jss-menu","jss-menu-shell",pe($.dense,"dense"),pe(fe.length>0,"has-items"),pe(Ie.length>0||Oe.length>0,"has-footer"),$.class]),style:$.style||{},role:$.role||"menu","aria-label":$.ariaLabel||null},ve.length?_.div({class:"jss-menu-before"},...ve):null,O,j.length?_.div({class:oe(["jss-menu-content",$.contentClass])},...j):null,fe.length?_.div({class:oe(["jss-menu-items",$.itemsClass])},...fe):null,!fe.length&&je.length?_.div({class:"jss-menu-empty"},...je):null,me.length?_.div({class:"jss-menu-after"},...me):null,Oe.length||Ie.length?_.div({class:oe(["jss-menu-footer",$.footerClass])},Oe.length?_.div({class:"jss-menu-status"},...Oe):null,Ie.length?_.div({class:"jss-menu-footer-actions"},...Ie):null):null)},m=N=>{var A;if(!(N!=null&&N.panel))return;const T=L(),U=ce(T),ue=X(T);D(N.panel,"_menuClassTokens",["jss-menu-panel","jss-clear-set","jss-singularity",ue?`jss-menu-${ue}`:"",U?`jss-state-${U}`:"",o(T.outline)?"outline":"",...f(T.panelClass)]),D(N.overlay,"_menuOverlayClassTokens",[...f(T.overlayClass)]),N.panel.dataset.placement=Z(T),q(N.panel,"--jss-menu-width",o(T.width),He),q(N.panel,"--jss-menu-min-width",o(T.minWidth),He),q(N.panel,"--jss-menu-max-width",o(T.maxWidth),He),q(N.panel,"--jss-menu-max-height",o(T.maxHeight),He),q(N.panel,"--jss-menu-body-max-height",o((A=T.bodyMaxHeight)!=null?A:T.contentMaxHeight),He),T.panelStyle&&Object.assign(N.panel.style,T.panelStyle),Qe(N.panel,T)},P=()=>{r!=null&&r.panel&&r.panel.replaceChildren(I())},G=()=>{if(M(),!r)return;const N=r;r=null,_n(N,()=>JSswift.overlay.close(N.id))},h=(N={})=>{var A,T,U,ue;if(N&&typeof N=="object"&&(c={...c,...N}),r){const xe=L();m(r),P(),(ue=r.reposition)==null||ue.call(r,{anchorEl:r._anchorEl,placement:Z(xe),offsetX:(A=xe.offsetX)!=null?A:0,offsetY:(U=(T=xe.offsetY)!=null?T:xe.offset)!=null?U:8}),ne()}return E},b=(N=null,A=null)=>{var T,U,ue,xe,Ne,$,V,Y,ge,ye,Q,ve,be,me,Ie,Oe;M();const{anchorEl:we,nextProps:j}=ae(N,A);j&&(c={...c,...j});const fe=L(),je=se(we);if(!je||o(fe.disabled))return null;if(r&&r._anchorEl===je){const ke=L();return m(r),P(),(xe=r.reposition)==null||xe.call(r,{anchorEl:r._anchorEl,placement:Z(ke),offsetX:(T=ke.offsetX)!=null?T:0,offsetY:(ue=(U=ke.offsetY)!=null?U:ke.offset)!=null?ue:8}),ne(),r}r&&G(),a=document.activeElement;let O=null;if(r=JSswift.overlay.open(()=>I(),{type:"menu",anchorEl:je,placement:Z(fe),offsetX:(Ne=fe.offsetX)!=null?Ne:0,offsetY:(V=($=fe.offsetY)!=null?$:fe.offset)!=null?V:8,backdrop:fe.backdrop===!0,lockScroll:fe.lockScroll===!0,trapFocus:fe.trapFocus===!0,autoFocus:!1,closeOnOutside:fe.closeOnOutside!==!1,closeOnBackdrop:(Y=fe.closeOnBackdrop)!=null?Y:fe.backdrop===!0,closeOnEsc:fe.closeOnEsc!==!1,className:Ht(["jss-menu-panel"]),onClose:()=>{var ke,Ee,Re;(ke=O==null?void 0:O._menuCleanup)==null||ke.call(O),(Re=(Ee=L()).onClose)==null||Re.call(Ee,O),L().returnFocus!==!1&&a&&typeof a.focus=="function"&&setTimeout(()=>a.focus(),0)}}),!(r!=null&&r.panel))return r;const d=r;O=d,d._anchorEl=je;const p=()=>{clearTimeout(u),u=null},C=()=>{J()},ee=ke=>{const Ee=ke.target;if(!Ee||!Ee.closest)return;if(Ee.closest("[data-menu-close]")){G();return}if(L().closeOnSelect===!1)return;const Re=Ee.closest("[data-menu-item], [data-menu-select], .jss-menu-item, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], a[href], button:not([disabled])");Re&&(Re.closest("[data-menu-keep-open]")||Re.getAttribute("data-menu-select")!=="false"&&G())},Se=ke=>{if(ke.key==="Escape"){ke.preventDefault(),G();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(ke.key))return;const Ee=re(d.panel);if(!Ee.length)return;ke.preventDefault();const Re=Ee.indexOf(document.activeElement);if(ke.key==="Home"){Ee[0].focus();return}if(ke.key==="End"){Ee[Ee.length-1].focus();return}const Me=ke.key==="ArrowDown"?1:-1,$e=Re<0?Me>0?0:Ee.length-1:(Re+Me+Ee.length)%Ee.length;Ee[$e].focus()};d.panel.addEventListener("click",ee),d.panel.addEventListener("keydown",Se);const Ce=R((ye=(ge=fe.trigger)!=null?ge:fe.triggers)!=null?ye:x(fe,"open")?"manual":null),Ae=Ce.has("hover"),Le=Ce.has("focus");return(Ae||Le)&&(d.panel.addEventListener("mouseenter",p),d.panel.addEventListener("mouseleave",C),d.panel.addEventListener("focusin",p),d.panel.addEventListener("focusout",C)),d._menuCleanup=()=>{var ke,Ee,Re,Me,$e,Ye;(ke=d.panel)==null||ke.removeEventListener("click",ee),(Ee=d.panel)==null||Ee.removeEventListener("keydown",Se),(Re=d.panel)==null||Re.removeEventListener("mouseenter",p),(Me=d.panel)==null||Me.removeEventListener("mouseleave",C),($e=d.panel)==null||$e.removeEventListener("focusin",p),(Ye=d.panel)==null||Ye.removeEventListener("focusout",C)},m(d),(me=d.reposition)==null||me.call(d,{anchorEl:je,placement:Z(fe),offsetX:(Q=fe.offsetX)!=null?Q:0,offsetY:(be=(ve=fe.offsetY)!=null?ve:fe.offset)!=null?be:8}),wn(d),(Oe=(Ie=L()).onOpen)==null||Oe.call(Ie,d),ne(),d},g=(N,A=null)=>{clearTimeout(u),u=null,clearTimeout(z),z=setTimeout(()=>b(N,A),ie())},J=(N=!1)=>{if(clearTimeout(z),z=null,!!r){if(clearTimeout(u),N){G();return}u=setTimeout(()=>G(),te())}},W=(N=null,A=null)=>H()?(G(),null):b(N,A),H=()=>!!r,E={open:b,close:G,show:g,hide:J,toggle:W,update:h,bind:N=>{var A,T;if(!N)return()=>{};v=N;const U=L(),ue=R((T=(A=U.trigger)!=null?A:U.triggers)!=null?T:x(U,"open")?"manual":null),xe=ue.has("hover"),Ne=ue.has("focus"),$=ue.has("click"),V=ue.has("manual")||!xe&&!Ne&&!$,Y=[],ge=()=>{M(),Y.forEach(ye=>ye()),v===N&&(v=null)};if(x(U,"open"))return rt(U.open)?JSswift.reactive.effect(()=>{v&&(o(L().open)?b(v):J(!0))},"UI.Menu:open"):U.open===!0?b(N):U.open===!1&&J(!0),ge;if(V||o(U.disabled))return ge;if(xe){const ye=()=>g(N),Q=()=>J();N.addEventListener("mouseenter",ye),N.addEventListener("mouseleave",Q),Y.push(()=>{N.removeEventListener("mouseenter",ye),N.removeEventListener("mouseleave",Q)})}if(Ne){const ye=()=>g(N),Q=()=>J();N.addEventListener("focus",ye),N.addEventListener("blur",Q),Y.push(()=>{N.removeEventListener("focus",ye),N.removeEventListener("blur",Q)})}if($){const ye=Q=>{var ve,be;(be=(ve=L()).onTriggerClick)==null||be.call(ve,Q),!Q.defaultPrevented&&W(N)};N.addEventListener("click",ye),Y.push(()=>N.removeEventListener("click",ye))}return ge},isOpen:H,entry:()=>r,props:()=>({...c})};return E},he.Popover=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e),l=t.slots||{},n=["primary","secondary","warning","danger","success","info","light","dark"],i=["xs","sm","md","lg","xl"];let c={...t},r=null,v=null,a=null,z=null,u=null;const x=(E,N)=>Object.prototype.hasOwnProperty.call(E||{},N),k=(E,N)=>typeof E=="function"?E(N):E,f=E=>String(E||"").split(/\s+/).filter(Boolean),B=E=>E&&typeof E=="object"&&!E.nodeType&&!Array.isArray(E)&&!(E instanceof Function),y=E=>!!E&&typeof E=="object"&&(E.nodeType===1||typeof E.getBoundingClientRect=="function"),M=()=>{clearTimeout(z),clearTimeout(u),z=null,u=null},D=(E,N,A)=>{if(!E)return;const T=E[N]||[];T.length&&E.classList.remove(...T);const U=(A||[]).filter(Boolean);U.length&&E.classList.add(...U),E[N]=U},q=(E,N,A,T=U=>U)=>{if(E){if(A==null||A===""){E.style.removeProperty(N);return}E.style.setProperty(N,T(A))}},L=()=>c,ce=E=>{var N;const A=o((N=E.state)!=null?N:E.color);return A?n.includes(A)?A:String(A):""},X=E=>{const N=o(E.size);return typeof N=="string"&&i.includes(N)?N:""},Z=E=>{var N,A,T;const U=String(o((T=(A=(N=E.actionsAlign)!=null?N:E.footerAlign)!=null?A:E.alignActions)!=null?T:"end")).toLowerCase();return["start","left"].includes(U)?"start":["center","middle"].includes(U)?"center":["between","space-between"].includes(U)?"between":["stretch","full"].includes(U)?"stretch":"end"},ie=E=>{var N,A;return String(o((A=(N=E.placement)!=null?N:E.position)!=null?A:"bottom-start"))},te=(E,N)=>{const A=o(E);if(A==null||A==="")return N;const T=Number(A);return Number.isFinite(T)?T:N},se=()=>te(L().delay,0),R=()=>te(L().hideDelay,120),ae=E=>{var N,A;return((A=(N=E.closable)!=null?N:E.dismissible)!=null?A:E.closeButton)===!0},re=(E=null)=>{var N,A,T;if(E)return E;const U=L();return v||o((T=(A=(N=U.anchorEl)!=null?N:U.triggerEl)!=null?A:U.target)!=null?T:U.anchor)||null},ne=E=>{if(E==null||E===!0)return new Set(["click"]);if(E===!1)return new Set(["manual"]);const N=Array.isArray(E)?E:String(E).split(/[\s,|/]+/),A=new Set;return N.forEach(T=>{const U=String(T||"").trim().toLowerCase();U&&(U==="mouseenter"||U==="mouseover"?A.add("hover"):U==="blur"||U==="focusin"?A.add("focus"):U==="tap"?A.add("click"):A.add(U))}),A.size?A:new Set(["manual"])},K=(E,N)=>{var A,T,U;let ue=null,xe=null;if(y(E))ue=E,B(N)&&(xe=N);else if(B(E)){xe=E;const Ne=(U=(T=(A=E.anchorEl)!=null?A:E.triggerEl)!=null?T:E.target)!=null?U:E.anchor;y(Ne)&&(ue=Ne)}else E!=null&&(ue=E);return{anchorEl:ue,nextProps:xe}},S=()=>{var E,N,A,T,U,ue,xe,Ne,$;const V=L(),Y={close:P,dismiss:P,open:h,toggle:J,update:G,isOpen:W,entry:()=>r,anchorEl:re(),props:V},ge=V.icon!=null?typeof V.icon=="string"?he.Icon({name:V.icon,size:V.iconSize||"md"}):JSswift.ui.slot(V.icon,{as:"icon"}):null,ye=F(l,"eyebrow",Y,k(V.eyebrow,Y)),Q=F(l,"title",Y,k((N=(E=V.title)!=null?E:V.heading)!=null?N:V.label,Y)),ve=F(l,"subtitle",Y,k((A=V.subtitle)!=null?A:V.description,Y)),be=F(l,"icon",Y,ge),me=F(l,"header",Y,k((U=(T=V.headerContent)!=null?T:V.head)!=null?U:V.header,Y)),Ie=ae(V)?F(l,"close",Y,he.Btn({class:"jss-dialog-close",size:"sm",outline:!0,"aria-label":V.closeLabel||"Chiudi popover","data-popover-close":!0},he.Icon({name:V.closeIcon||"close",size:"sm"}))):[];let Oe=(Ne=(xe=(ue=V.content)!=null?ue:V.body)!=null?xe:V.message)!=null?Ne:V.text;Oe==null&&s&&s.length&&(Oe=s);let we=F(l,"content",Y,k(Oe,Y));we.length||(we=F(l,"body",Y,k(Oe,Y))),we.length||(we=F(l,"default",Y,k(Oe,Y)));const j=k(($=V.footer)!=null?$:V.actions,Y);let fe=F(l,"footer",Y,j);fe.length||(fe=F(l,"actions",Y,j));let je=null;me.length?je=_.div({class:"jss-dialog-head jss-dialog-head-custom"},...me):(ye.length||Q.length||ve.length||be.length||Ie.length)&&(je=_.div({class:"jss-dialog-head"},be.length?_.div({class:"jss-dialog-icon"},...be):null,_.div({class:"jss-dialog-head-main"},ye.length?_.div({class:"jss-dialog-eyebrow"},...ye):null,Q.length?_.div({class:"jss-dialog-title"},...Q):null,ve.length?_.div({class:"jss-dialog-subtitle"},...ve):null),Ie.length?_.div({class:"jss-dialog-close-wrap"},...Ie):null));const O=[];return je&&O.push(je),we.length&&O.push(_.div({class:oe(["jss-dialog-body",V.bodyClass])},...we)),fe.length&&O.push(_.div({class:oe(["jss-dialog-actions",`is-${Z(V)}`,pe(V.stackActions,"is-stacked"),V.actionsClass,V.footerClass])},...fe)),O.length||O.push(_.div({class:oe(["jss-dialog-body",V.bodyClass])})),_.div({class:oe(["jss-dialog-shell","jss-popover-shell",pe(!!je,"has-head"),pe(fe.length>0,"has-footer"),pe(V.divider!==!1,"with-divider")])},...O)},I=E=>{var N;if(!(E!=null&&E.panel))return;const A=L(),T=ce(A),U=X(A);D(E.panel,"_popoverClassTokens",["jss-dialog","jss-popover","jss-singularity","jss-clear-set",U?`jss-dialog-${U}`:"",T,T?`jss-state-${T}`:"",o(A.scrollable)?"scrollable":"",o(A.stickyHeader)?"sticky-head":"",o(A.stickyActions)?"sticky-actions":"",o(A.borderless)?"borderless":"",...f(A.class),...f(A.panelClass)]),D(E.overlay,"_popoverOverlayClassTokens",[...f(A.overlayClass)]),E.panel.dataset.placement=ie(A),q(E.panel,"--jss-dialog-width",o(A.width),He),q(E.panel,"--jss-dialog-min-width",o(A.minWidth),He),q(E.panel,"--jss-dialog-max-width",o(A.maxWidth),He),q(E.panel,"--jss-dialog-max-height",o(A.maxHeight),He),q(E.panel,"--jss-dialog-body-max-height",o((N=A.bodyMaxHeight)!=null?N:A.contentMaxHeight),He),A.style&&Object.assign(E.panel.style,A.style),Qe(E.panel,A),E.panel.setAttribute("role",A.role||"dialog"),E.panel.setAttribute("aria-modal",A.modal===!0?"true":"false"),A.ariaLabel?E.panel.setAttribute("aria-label",A.ariaLabel):E.panel.removeAttribute("aria-label")},m=()=>{r!=null&&r.panel&&r.panel.replaceChildren(S())},P=()=>{if(M(),!r)return;const E=r;r=null,_n(E,()=>JSswift.overlay.close(E.id))},G=(E={})=>(E&&typeof E=="object"&&(c={...c,...E}),r&&(I(r),m()),de),h=(E=null,N=null)=>{var A,T,U,ue,xe,Ne,$,V;M();const{anchorEl:Y,nextProps:ge}=K(E,N);ge&&(c={...c,...ge});const ye=L(),Q=re(Y);if(!Q||o(ye.disabled))return null;if(r&&r._anchorEl===Q)return I(r),m(),r;r&&P(),a=document.activeElement;const ve=ne((T=(A=ye.trigger)!=null?A:ye.triggers)!=null?T:x(ye,"open")?"manual":null),be=ve.has("hover"),me=ve.has("focus");let Ie=null;if(r=JSswift.overlay.open(()=>S(),{type:"popover",anchorEl:Q,placement:ie(ye),offsetX:(U=ye.offsetX)!=null?U:0,offsetY:(xe=(ue=ye.offsetY)!=null?ue:ye.offset)!=null?xe:10,backdrop:ye.backdrop===!0,lockScroll:ye.lockScroll===!0,trapFocus:ye.trapFocus===!0,autoFocus:ye.autoFocus===!0,closeOnOutside:ye.closeOnOutside!==!1,closeOnBackdrop:(Ne=ye.closeOnBackdrop)!=null?Ne:ye.backdrop===!0,closeOnEsc:ye.closeOnEsc!==!1,className:Ht(["jss-dialog","jss-popover"]),onClose:()=>{var je,O,d;(je=Ie==null?void 0:Ie._popoverCleanup)==null||je.call(Ie),(d=(O=L()).onClose)==null||d.call(O,Ie),L().returnFocus!==!1&&a&&typeof a.focus=="function"&&setTimeout(()=>a.focus(),0)}}),!(r!=null&&r.panel))return r;const Oe=r;Ie=Oe,Oe._anchorEl=Q;const we=()=>{clearTimeout(u),u=null},j=()=>{!be&&!me||g()},fe=je=>{const O=je.target;if(!(!O||!O.closest)){if(O.closest("[data-popover-close]")||O.closest("[data-dialog-close]")){P();return}L().closeOnSelect===!0&&O.closest("[data-popover-select]")&&P()}};return Oe.panel.addEventListener("click",fe),(be||me)&&(Oe.panel.addEventListener("mouseenter",we),Oe.panel.addEventListener("mouseleave",j),Oe.panel.addEventListener("focusin",we),Oe.panel.addEventListener("focusout",j)),Oe._popoverCleanup=()=>{var je,O,d,p,C;(je=Oe.panel)==null||je.removeEventListener("click",fe),(O=Oe.panel)==null||O.removeEventListener("mouseenter",we),(d=Oe.panel)==null||d.removeEventListener("mouseleave",j),(p=Oe.panel)==null||p.removeEventListener("focusin",we),(C=Oe.panel)==null||C.removeEventListener("focusout",j)},I(Oe),wn(Oe),(V=($=L()).onOpen)==null||V.call($,Oe),Oe},b=(E,N=null)=>{clearTimeout(u),u=null,clearTimeout(z),z=setTimeout(()=>h(E,N),se())},g=(E=!1)=>{if(clearTimeout(z),z=null,!!r){if(clearTimeout(u),E){P();return}u=setTimeout(()=>P(),R())}},J=(E=null,N=null)=>W()?(P(),null):h(E,N),W=()=>!!r,de={open:h,close:P,show:b,hide:g,toggle:J,update:G,bind:E=>{var N,A;if(!E)return()=>{};v=E;const T=L(),U=ne((A=(N=T.trigger)!=null?N:T.triggers)!=null?A:x(T,"open")?"manual":null),ue=U.has("hover"),xe=U.has("focus"),Ne=U.has("click"),$=U.has("manual")||!ue&&!xe&&!Ne,V=[],Y=()=>{M(),V.forEach(ge=>ge()),v===E&&(v=null)};if(x(T,"open"))return rt(T.open)?JSswift.reactive.effect(()=>{v&&(o(L().open)?h(v):g(!0))},"UI.Popover:open"):T.open===!0?h(E):T.open===!1&&g(!0),Y;if($||o(T.disabled))return Y;if(ue){const ge=()=>b(E),ye=()=>g();E.addEventListener("mouseenter",ge),E.addEventListener("mouseleave",ye),V.push(()=>{E.removeEventListener("mouseenter",ge),E.removeEventListener("mouseleave",ye)})}if(xe){const ge=()=>b(E),ye=()=>g();E.addEventListener("focus",ge),E.addEventListener("blur",ye),V.push(()=>{E.removeEventListener("focus",ge),E.removeEventListener("blur",ye)})}if(Ne){const ge=ye=>{var Q,ve;(ve=(Q=L()).onTriggerClick)==null||ve.call(Q,ye),!ye.defaultPrevented&&J(E)};E.addEventListener("click",ge),V.push(()=>E.removeEventListener("click",ge))}return Y},isOpen:W,entry:()=>r,props:()=>({...c})};return de},he.ContextMenu=(...e)=>{const{props:t,children:s}=JSswift.uiNormalizeArgs(e);let l={...t},n=null,i=null,c=null;const r=m=>m&&typeof m=="object"&&!m.nodeType&&!Array.isArray(m)&&!(m instanceof Function),v=m=>!!m&&typeof m=="object"&&(m.nodeType===1||typeof m.getBoundingClientRect=="function"),a=m=>!!m&&typeof m=="object"&&("clientX"in m||"type"in m||"target"in m||"currentTarget"in m),z=m=>!!m&&Number.isFinite(Number(m.x))&&Number.isFinite(Number(m.y)),u=()=>l,x=(m,P)=>{const G=Number(m),h=Number(P);return!Number.isFinite(G)||!Number.isFinite(h)?null:{x:G,y:h}},k=m=>m?{_jssContextPoint:m,getBoundingClientRect:()=>({top:m.y,bottom:m.y,left:m.x,right:m.x,width:0,height:0})}:null,f=m=>{if(!v(m))return null;const P=m.getBoundingClientRect();return x(P.left+Math.min(P.width/2,24),P.top+Math.min(P.height/2,24))},B=m=>{var P,G,h,b;return o((b=(h=(G=(P=m==null?void 0:m.anchorEl)!=null?P:m==null?void 0:m.triggerEl)!=null?G:m==null?void 0:m.target)!=null?h:m==null?void 0:m.anchor)!=null?b:null)},y=(m,P=null)=>{if(!m)return f(P||c);const G=x(m.clientX,m.clientY);if(G)return G;const h=B({anchorEl:P||m.currentTarget||m.target||c});return f(h)},M=(m={})=>{if(!r(m))return{};const P={...m};return delete P.event,delete P.point,delete P.x,delete P.y,P},D=()=>{var m,P,G;const h=u();return{...h,trigger:"manual",placement:h.placement||"bottom-start",offsetX:(m=h.offsetX)!=null?m:0,offsetY:(G=(P=h.offsetY)!=null?P:h.offset)!=null?G:4,closeOnOutside:h.closeOnOutside!==!1,closeOnEsc:h.closeOnEsc!==!1,role:h.role||"menu",ariaLabel:h.ariaLabel||h.title||"Context menu",class:oe(["jss-context-menu-shell",h.class]),panelClass:oe(["jss-context-menu-panel",h.panelClass])}},q=he.Menu(D(),...s),L=(m=null,P=null,G=null)=>{let h=null,b=null,g=null;if(a(m))h=y(m,c),g=r(P)?M(P):null;else if(typeof m=="number"||typeof P=="number")h=x(m,P),g=r(G)?M(G):null;else if(z(m))h=x(m.x,m.y),g=r(P)?M(P):null;else if(v(m))b=m,g=r(P)?M(P):null;else if(r(m)){const J=z(m.point)?m.point:z(m)?m:null,W=B(m),H=m.event;h=J?x(J.x,J.y):y(H,W||c),b=W&&v(W)?W:null,g={...M(m),...r(P)?M(P):{}}}else n&&(h={...n});return{point:h,anchor:b,nextProps:g}},ce=(m,P=null)=>{i=m||i,n=P||m&&m._jssContextPoint||n},X=(m=null)=>{r(m)&&Object.keys(m).length&&(l={...l,...m})},Z=(m=null,P=null)=>{if(P)return k(P);if(m&&v(m))return m;const G=B(u());return v(G)?G:n?k(n):v(i)?i:v(c)?c:null},ie=(m=null,P=null,G=null)=>{const{point:h,anchor:b,nextProps:g}=L(m,P,G);X(g);const J=Z(b,h);return J?(ce(J,h),q.open(J,D())):null},te=(m,P,G=null)=>ie(m,P,G),se=(m,P=null)=>ie(m,P),R=()=>(q.close(),I),ae=(m=!0)=>(m===!1?q.hide(!1):q.close(),I),re=(m=null,P=null,G=null)=>ie(m,P,G),ne=(m=null,P=null,G=null)=>q.isOpen()?(R(),null):ie(m,P,G),K=(m={})=>(X(M(m)),q.update(D()),I),I={open:ie,openAt:te,openFromEvent:se,show:re,hide:ae,close:R,toggle:ne,update:K,bind:(m,P=null)=>{if(!m)return()=>{};const G=r(P)?M(P):null,h=g=>{var J,W;c=m,g.preventDefault(),!(((W=(J=u()).onTrigger)==null?void 0:W.call(J,g,{element:m,open:ie,close:R,update:K}))===!1||o(u().disabled))&&ie({event:g,anchorEl:m},G)},b=g=>{var J,W;g.key!=="ContextMenu"&&!(g.shiftKey&&g.key==="F10")||(c=m,g.preventDefault(),((W=(J=u()).onTrigger)==null?void 0:W.call(J,g,{element:m,open:ie,close:R,update:K}))===!1||o(u().disabled))||ie({event:g,anchorEl:m},G)};return m.addEventListener("contextmenu",h),m.addEventListener("keydown",b),()=>{m.removeEventListener("contextmenu",h),m.removeEventListener("keydown",b)}},isOpen:q.isOpen,entry:q.entry,props:()=>({...l})};return I}})(JSswift);