@ctrliq/quantic-components 1.62.1 → 1.63.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.
@@ -32399,7 +32399,7 @@ const{I:Ze}=re,Ge=()=>document.createComment(""),Ne=(e,t,i)=>{const n=e._$AA.par
32399
32399
  * @license
32400
32400
  * Copyright 2020 Google LLC
32401
32401
  * SPDX-License-Identifier: BSD-3-Clause
32402
- */const ct=()=>new rt;class rt{}const lt=new WeakMap,at=Fe(class extends st{render(e){return W}update(e,[t]){const i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),W}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let i=lt.get(t);void 0===i&&(i=new WeakMap,lt.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),dt=Math.min,ut=Math.max,ht=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),vt={left:"right",right:"left",bottom:"top",top:"bottom"};function wt(e,t,i){return ut(e,dt(t,i))}function mt(e,t){return"function"==typeof e?e(t):e}function kt(e){return e.split("-")[0]}function xt(e){return e.split("-")[1]}function yt(e){return"x"===e?"y":"x"}function Lt(e){return"y"===e?"height":"width"}function It(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ft(e){return yt(It(e))}function Ct(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bt=["left","right"],Mt=["right","left"],qt=["top","bottom"],St=["bottom","top"];function Bt(e,t,i,n){const o=xt(e);let s=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Mt:bt:t?bt:Mt;case"left":case"right":return t?qt:St;default:return[]}}(kt(e),"start"===i,n);return o&&(s=s.map(e=>e+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function At(e){const t=kt(e);return vt[t]+e.slice(t.length)}function Pt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function jt(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function zt(e,t,i){let{reference:n,floating:o}=e;const s=It(t),c=ft(t),r=Lt(c),l=kt(t),a="y"===s,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,h=n[r]/2-o[r]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(xt(t)){case"start":p[c]-=h*(i&&a?-1:1);break;case"end":p[c]+=h*(i&&a?-1:1)}return p}async function Ht(e,t){var i;void 0===t&&(t={});const{x:n,y:o,platform:s,rects:c,elements:r,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=mt(t,e),g=Pt(p),v=r[h?"floating"===u?"reference":"floating":u],w=jt(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(v)))||i?v:v.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(r.floating)),boundary:a,rootBoundary:d,strategy:l})),m="floating"===u?{x:n,y:o,width:c.floating.width,height:c.floating.height}:c.reference,k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(r.floating)),x=await(null==s.isElement?void 0:s.isElement(k))&&await(null==s.getScale?void 0:s.getScale(k))||{x:1,y:1},y=jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:m,offsetParent:k,strategy:l}):m);return{top:(w.top-y.top+g.top)/x.y,bottom:(y.bottom-w.bottom+g.bottom)/x.y,left:(w.left-y.left+g.left)/x.x,right:(y.right-w.right+g.right)/x.x}}const Tt=new Set(["left","top"]);function Dt(){return"undefined"!=typeof window}function Vt(e){return Ot(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rt(e){var t;return null==(t=(Ot(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ot(e){return!!Dt()&&(e instanceof Node||e instanceof Ft(e).Node)}function $t(e){return!!Dt()&&(e instanceof Element||e instanceof Ft(e).Element)}function _t(e){return!!Dt()&&(e instanceof HTMLElement||e instanceof Ft(e).HTMLElement)}function Et(e){return!(!Dt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot)}function Ut(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=ei(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&"inline"!==o&&"contents"!==o}function Zt(e){return/^(table|td|th)$/.test(Vt(e))}function Gt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Nt=/transform|translate|scale|rotate|perspective|filter/,Wt=/paint|layout|strict|content/,Xt=e=>!!e&&"none"!==e;let Kt;function Jt(e){const t=$t(e)?ei(e):e;return Xt(t.transform)||Xt(t.translate)||Xt(t.scale)||Xt(t.rotate)||Xt(t.perspective)||!Qt()&&(Xt(t.backdropFilter)||Xt(t.filter))||Nt.test(t.willChange||"")||Wt.test(t.contain||"")}function Qt(){return null==Kt&&(Kt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kt}function Yt(e){return/^(html|body|#document)$/.test(Vt(e))}function ei(e){return Ft(e).getComputedStyle(e)}function ti(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if("html"===Vt(e))return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Rt(e);return Et(t)?t.host:t}function ni(e){const t=ii(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&Ut(t)?t:ni(t)}function oi(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=ni(e),s=o===(null==(n=e.ownerDocument)?void 0:n.body),c=Ft(o);if(s){const e=si(c);return t.concat(c,c.visualViewport||[],Ut(o)?o:[],e&&i?oi(e):[])}return t.concat(o,oi(o,[],i))}function si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ci(e){const t=ei(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_t(e),s=o?e.offsetWidth:i,c=o?e.offsetHeight:n,r=ht(i)!==s||ht(n)!==c;return r&&(i=s,n=c),{width:i,height:n,$:r}}function ri(e){return $t(e)?e:e.contextElement}function li(e){const t=ri(e);if(!_t(t))return gt(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=ci(t);let c=(s?ht(i.width):i.width)/n,r=(s?ht(i.height):i.height)/o;return c&&Number.isFinite(c)||(c=1),r&&Number.isFinite(r)||(r=1),{x:c,y:r}}const ai=gt(0);function di(e){const t=Ft(e);return Qt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ai}function ui(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),s=ri(e);let c=gt(1);t&&(n?$t(n)&&(c=li(n)):c=li(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Ft(e))&&t}(s,i,n)?di(s):gt(0);let l=(o.left+r.x)/c.x,a=(o.top+r.y)/c.y,d=o.width/c.x,u=o.height/c.y;if(s){const e=Ft(s),t=n&&$t(n)?Ft(n):n;let i=e,o=si(i);for(;o&&n&&t!==i;){const e=li(o),t=o.getBoundingClientRect(),n=ei(o),s=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,c=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,a*=e.y,d*=e.x,u*=e.y,l+=s,a+=c,i=Ft(o),o=si(i)}}return jt({width:d,height:u,x:l,y:a})}function hi(e,t){const i=ti(e).scrollLeft;return t?t.left+i:ui(Rt(e)).left+i}function pi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-hi(e,i),y:i.top+t.scrollTop}}function gi(e,t,i){let n;if("viewport"===t)n=function(e,t){const i=Ft(e),n=Rt(e),o=i.visualViewport;let s=n.clientWidth,c=n.clientHeight,r=0,l=0;if(o){s=o.width,c=o.height;const e=Qt();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,l=o.offsetTop)}const a=hi(n);if(a<=0){const e=n.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,c=Math.abs(n.clientWidth-t.clientWidth-o);c<=25&&(s-=c)}else a<=25&&(s+=a);return{width:s,height:c,x:r,y:l}}(e,i);else if("document"===t)n=function(e){const t=Rt(e),i=ti(e),n=e.ownerDocument.body,o=ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-i.scrollLeft+hi(e);const r=-i.scrollTop;return"rtl"===ei(n).direction&&(c+=ut(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:c,y:r}}(Rt(e));else if($t(t))n=function(e,t){const i=ui(e,!0,"fixed"===t),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=_t(e)?li(e):gt(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:n*s.y}}(t,i);else{const i=di(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return jt(n)}function vi(e,t){const i=ii(e);return!(i===t||!$t(i)||Yt(i))&&("fixed"===ei(i).position||vi(i,t))}function wi(e,t,i){const n=_t(t),o=Rt(t),s="fixed"===i,c=ui(e,!0,s,t);let r={scrollLeft:0,scrollTop:0};const l=gt(0);function a(){l.x=hi(o)}if(n||!n&&!s)if(("body"!==Vt(t)||Ut(o))&&(r=ti(t)),n){const e=ui(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&a();s&&!n&&o&&a();const d=!o||n||s?gt(0):pi(o,r);return{x:c.left+r.scrollLeft-l.x-d.x,y:c.top+r.scrollTop-l.y-d.y,width:c.width,height:c.height}}function mi(e){return"static"===ei(e).position}function ki(e,t){if(!_t(e)||"fixed"===ei(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Rt(e)===i&&(i=i.ownerDocument.body),i}function xi(e,t){const i=Ft(e);if(Gt(e))return i;if(!_t(e)){let t=ii(e);for(;t&&!Yt(t);){if($t(t)&&!mi(t))return t;t=ii(t)}return i}let n=ki(e,t);for(;n&&Zt(n)&&mi(n);)n=ki(n,t);return n&&Yt(n)&&mi(n)&&!Jt(n)?i:n||function(e){let t=ii(e);for(;_t(t)&&!Yt(t);){if(Jt(t))return t;if(Gt(t))return null;t=ii(t)}return null}(e)||i}const yi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s="fixed"===o,c=Rt(n),r=!!t&&Gt(t.floating);if(n===c||r&&s)return i;let l={scrollLeft:0,scrollTop:0},a=gt(1);const d=gt(0),u=_t(n);if((u||!u&&!s)&&(("body"!==Vt(n)||Ut(c))&&(l=ti(n)),u)){const e=ui(n);a=li(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!c||u||s?gt(0):pi(c,l);return{width:i.width*a.x,height:i.height*a.y,x:i.x*a.x-l.scrollLeft*a.x+d.x+h.x,y:i.y*a.y-l.scrollTop*a.y+d.y+h.y}},getDocumentElement:Rt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[..."clippingAncestors"===i?Gt(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let n=oi(e,[],!1).filter(e=>$t(e)&&"body"!==Vt(e)),o=null;const s="fixed"===ei(e).position;let c=s?ii(e):e;for(;$t(c)&&!Yt(c);){const t=ei(c),i=Jt(c);i||"fixed"!==t.position||(o=null),(s?!i&&!o:!i&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ut(c)&&!i&&vi(e,c))?n=n.filter(e=>e!==c):o=t,c=ii(c)}return t.set(e,n),n}(t,this._c):[].concat(i),n],c=gi(t,s[0],o);let r=c.top,l=c.right,a=c.bottom,d=c.left;for(let e=1;e<s.length;e++){const i=gi(t,s[e],o);r=ut(i.top,r),l=dt(i.right,l),a=dt(i.bottom,a),d=ut(i.left,d)}return{width:l-d,height:a-r,x:d,y:r}},getOffsetParent:xi,getElementRects:async function(e){const t=this.getOffsetParent||xi,i=this.getDimensions,n=await i(e.floating);return{reference:wi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=ci(e);return{width:t,height:i}},getScale:li,isElement:$t,isRTL:function(e){return"rtl"===ei(e).direction}};function Li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ii(e,t,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,a=ri(e),d=o||s?[...a?oi(a):[],...t?oi(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",i,{passive:!0}),s&&e.addEventListener("resize",i)});const u=a&&r?function(e,t){let i,n=null;const o=Rt(e);function s(){var e;clearTimeout(i),null==(e=n)||e.disconnect(),n=null}return function c(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),s();const a=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=a;if(r||t(),!h||!p)return;const g={rootMargin:-pt(u)+"px "+-pt(o.clientWidth-(d+h))+"px "+-pt(o.clientHeight-(u+p))+"px "+-pt(d)+"px",threshold:ut(0,dt(1,l))||1};let v=!0;function w(t){const n=t[0].intersectionRatio;if(n!==l){if(!v)return c();n?c(!1,n):i=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==n||Li(a,e.getBoundingClientRect())||c(),v=!1}try{n=new IntersectionObserver(w,{...g,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(w,g)}n.observe(e)}(!0),s}(a,i):null;let h,p=-1,g=null;c&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===a&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),i()}),a&&!l&&g.observe(a),t&&g.observe(t));let v=l?ui(e):null;return l&&function t(){const n=ui(e);v&&!Li(v,n)&&i();v=n,h=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",i),s&&e.removeEventListener("resize",i)}),null==u||u(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:c,middlewareData:r}=t,l=await async function(e,t){const{placement:i,platform:n,elements:o}=e,s=await(null==n.isRTL?void 0:n.isRTL(o.floating)),c=kt(i),r=xt(i),l="y"===It(i),a=Tt.has(c)?-1:1,d=s&&l?-1:1,u=mt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&"number"==typeof g&&(p="end"===r?-1*g:g),l?{x:p*d,y:h*a}:{x:h*a,y:p*d}}(t,e);return c===(null==(i=r.offset)?void 0:i.placement)&&null!=(n=r.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:c}}}}},Ci=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:r=!1,limiter:l={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...a}=mt(e,t),d={x:i,y:n},u=await s.detectOverflow(t,a),h=It(kt(o)),p=yt(h);let g=d[p],v=d[h];if(c){const e="y"===p?"bottom":"right";g=wt(g+u["y"===p?"top":"left"],g,g-u[e])}if(r){const e="y"===h?"bottom":"right";v=wt(v+u["y"===h?"top":"left"],v,v-u[e])}const w=l.fn({...t,[p]:g,[h]:v});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[p]:c,[h]:r}}}}}},bi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:o,middlewareData:s,rects:c,initialPlacement:r,platform:l,elements:a}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=mt(e,t);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const m=kt(o),k=It(r),x=kt(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(a.floating)),L=h||(x||!v?[At(r)]:function(e){const t=At(e);return[Ct(e),t,Ct(t)]}(r)),I="none"!==g;!h&&I&&L.push(...Bt(r,v,g,y));const f=[r,...L],C=await l.detectOverflow(t,w),b=[];let M=(null==(n=s.flip)?void 0:n.overflows)||[];if(d&&b.push(C[m]),u){const e=function(e,t,i){void 0===i&&(i=!1);const n=xt(e),o=ft(e),s=Lt(o);let c="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=At(c)),[c,At(c)]}(o,c,y);b.push(C[e[0]],C[e[1]])}if(M=[...M,{placement:o,overflows:b}],!b.every(e=>e<=0)){var q,S;const e=((null==(q=s.flip)?void 0:q.index)||0)+1,t=f[e];if(t){if(!("alignment"===u&&k!==It(t))||M.every(e=>It(e.placement)!==k||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let i=null==(S=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var B;const e=null==(B=M.filter(e=>{if(I){const t=It(e.placement);return t===k||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Mi=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:o,rects:s,platform:c,elements:r,middlewareData:l}=t,{element:a,padding:d=0}=mt(e,t)||{};if(null==a)return{};const u=Pt(d),h={x:i,y:n},p=ft(o),g=Lt(p),v=await c.getDimensions(a),w="y"===p,m=w?"top":"left",k=w?"bottom":"right",x=w?"clientHeight":"clientWidth",y=s.reference[g]+s.reference[p]-h[p]-s.floating[g],L=h[p]-s.reference[p],I=await(null==c.getOffsetParent?void 0:c.getOffsetParent(a));let f=I?I[x]:0;f&&await(null==c.isElement?void 0:c.isElement(I))||(f=r.floating[x]||s.floating[g]);const C=y/2-L/2,b=f/2-v[g]/2-1,M=dt(u[m],b),q=dt(u[k],b),S=M,B=f-v[g]-q,A=f/2-v[g]/2+C,P=wt(S,A,B),j=!l.arrow&&null!=xt(o)&&A!==P&&s.reference[g]/2-(A<S?M:q)-v[g]/2<0,z=j?A<S?A-S:A-B:0;return{[p]:h[p]+z,data:{[p]:P,centerOffset:A-P-z,...j&&{alignmentOffset:z}},reset:j}}}),qi=(e,t,i)=>{const n=new Map,o={platform:yi,...i},s={...o.platform,_c:n};return(async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:c}=i,r=c.detectOverflow?c:{...c,detectOverflow:Ht},l=await(null==c.isRTL?void 0:c.isRTL(t));let a=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=zt(a,n,l),h=n,p=0;const g={};for(let i=0;i<s.length;i++){const v=s[i];if(!v)continue;const{name:w,fn:m}=v,{x:k,y:x,data:y,reset:L}=await m({x:d,y:u,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:a,platform:r,elements:{reference:e,floating:t}});d=null!=k?k:d,u=null!=x?x:u,g[w]={...g[w],...y},L&&p<50&&(p++,"object"==typeof L&&(L.placement&&(h=L.placement),L.rects&&(a=!0===L.rects?await c.getElementRects({reference:e,floating:t,strategy:o}):L.rects),({x:d,y:u}=zt(a,h,l))),i=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:g}})(e,t,{...o,platform:s})};function Si(e){class i extends e{constructor(){super(...arguments),this.ariaLabel=null,this.ariaDescription=null,this.ariaInvalid=null}getA11yAttributes(e){const t=e?.label??this.ariaLabel,i=e?.description??this.ariaDescription,n=e?.invalid??"true"===this.ariaInvalid;return{label:$e(t||void 0),description:$e(i||void 0),invalid:$e(n?"true":void 0)}}}return t([Le({type:"string",attribute:"aria-label",description:"Accessible label for the component (aria-label)."})],i.prototype,"ariaLabel",void 0),t([Le({type:"string",attribute:"aria-description",description:"Accessible description bound directly to aria-description."})],i.prototype,"ariaDescription",void 0),t([Le({type:"string",attribute:"aria-invalid",description:"Marks the component invalid for assistive technologies (aria-invalid)."})],i.prototype,"ariaInvalid",void 0),i}const Bi={Gray:"gray",Brand:"brand",Error:"error",Warning:"warning",Success:"success",GrayBlue:"gray-blue",BlueLight:"blue-light",Blue:"blue",Indigo:"indigo",Purple:"purple",Pink:"pink",Orange:"orange"},Ai=["gray","brand","error","warning","success","gray-blue","blue-light","blue","indigo","purple","pink","orange"],Pi="24rem",ji="36rem",zi="48rem",Hi="64rem",Ti="75rem",Di="96rem";function Vi(e,t,i){return Math.min(Math.max(e,t),i)}function Fi(e){return Ai.map(t=>`.color--${t} {\n ${e(t)}\n}`).join("\n")}function Ri(e){const t="undefined"!=typeof crypto?crypto.randomUUID():Math.random().toString(36).substring(2);return e?`${e}-${t}`:t}const Oi={ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"};e.LucideIconChevronDown.ensureDefined(),e.LucideIconCircleAlert.ensureDefined(),e.Combobox=class extends(Si(fe)){constructor(){super(),this.listboxId=Ri("combobox-listbox"),this.value="",this.name="",this.placeholder="",this.options=[],this.size=Oi.Medium,this.disabled=!1,this.required=!1,this.invalid=!1,this.emptyLabel="No results",this.allowCustomValue=!1,this._open=!1,this._inputValue="",this._activeIndex=-1,this._inputRef=ct(),this._listboxRef=ct(),this.internals=this.attachInternals()}updated(e){const t=e.has("value"),i=e.has("options"),n=e.has("allowCustomValue");if(t||n||i&&!this._open){const e=this.options.find(e=>e.value===this.value);e?this._inputValue=e.label:this.allowCustomValue?this._inputValue=this.value:this._inputValue=""}e.has("value")&&this.internals.setFormValue(this.value),(e.has("value")||e.has("required"))&&this.updateValidity(),e.has("options")&&this._open&&(this._activeIndex=-1),e.has("_activeIndex")&&this._activeIndex>=0&&this.shadowRoot?.querySelectorAll('[role="option"]')[this._activeIndex]?.scrollIntoView({block:"nearest"})}get filteredOptions(){if(!this._inputValue)return this.options;const e=this.filterFn??((e,t)=>e.label.toLowerCase().includes(t.toLowerCase()));return this.options.filter(t=>e(t,this._inputValue))}firstNavigableIndex(){return this.filteredOptions.findIndex(e=>!e.disabled)}lastNavigableIndex(){const e=this.filteredOptions;for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}nextNavigableIndex(e,t){const i=this.filteredOptions;let n=e+t;for(;n>=0&&n<i.length;){if(!i[n].disabled)return n;n+=t}return e}async openList(){this._open||this.disabled||(this._open=!0,this._activeIndex=-1,await this.updateComplete,this.positionListbox())}closeList(e=!1){if(this._open)if(this._open=!1,this._activeIndex=-1,this.cleanup?.(),this.cleanup=void 0,this.allowCustomValue&&e)this.commitCustomValue();else{const e=this.options.find(e=>e.value===this.value);this._inputValue=e?.label??(this.allowCustomValue?this.value:"")}}commitCustomValue(){const e=this._inputValue.trim();this._inputValue=e,e!==this.value&&(this.value=e,this.internals.setFormValue(e),this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:e},bubbles:!0,composed:!0})))}positionListbox(){const e=this._listboxRef.value;e&&(this.cleanup=Ii(this,e,async()=>{if(!e)return;const{x:t,y:i}=await qi(this,e,{placement:"bottom-start",middleware:[fi(4),bi(),Ci({padding:8})],strategy:"absolute"});Object.assign(e.style,{left:`${t}px`,top:`${i}px`,width:`${this.getBoundingClientRect().width}px`})}))}selectOption(e){this.value=e.value,this._inputValue=e.label,this.internals.setFormValue(e.value),this._open=!1,this._activeIndex=-1,this.cleanup?.(),this.cleanup=void 0,this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:this.value},bubbles:!0,composed:!0})),this._inputRef.value?.focus()}handleInput(e){const t=e.target;this._inputValue=t.value,this._activeIndex=-1,this._open||this.openList(),this.dispatchEvent(new CustomEvent("input-changed",{detail:{value:this._inputValue},bubbles:!0,composed:!0}))}handleKeyDown(e){switch(e.key){case"ArrowDown":e.preventDefault(),this._open?this._activeIndex=this.nextNavigableIndex(this._activeIndex,1):this.openList().then(()=>{this._activeIndex=this.firstNavigableIndex()});break;case"ArrowUp":if(!this._open)return;e.preventDefault(),this._activeIndex=this.nextNavigableIndex(this._activeIndex,-1);break;case"Home":if(!this._open)return;e.preventDefault(),this._activeIndex=this.firstNavigableIndex();break;case"End":if(!this._open)return;e.preventDefault(),this._activeIndex=this.lastNavigableIndex();break;case"Enter":if(this._open&&this._activeIndex>=0){const t=this.filteredOptions[this._activeIndex];t&&!t.disabled&&(e.preventDefault(),this.selectOption(t))}else this.allowCustomValue&&this._inputValue.trim()&&(e.preventDefault(),this.closeList(!0),this.commitCustomValue());break;case"Escape":e.preventDefault(),this.closeList();break;case"Tab":this.closeList(!0)}}handleBlur(){this.closeList(!0),this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0}))}handleFocus(){this.dispatchEvent(new Event("focus",{bubbles:!0,composed:!0}))}handleChevronMouseDown(e){e.preventDefault(),this._open?this.closeList():(this._inputRef.value?.focus(),this.openList())}formResetCallback(){this.value="",this._inputValue="",this.internals.setFormValue("")}formStateRestoreCallback(e){this.value=e,this.internals.setFormValue(e);const t=this.options.find(t=>t.value===e);this._inputValue=t?.label??(this.allowCustomValue?e:"")}formDisabledCallback(e){this.disabled=e}disconnectedCallback(){super.disconnectedCallback(),this.cleanup?.()}updateValidity(){const e=this._inputRef.value;e&&this.internals.setValidity(e.validity,e.validationMessage,e)}get activeDescendant(){if(this._open&&!(this._activeIndex<0))return`${this.listboxId}-opt-${this._activeIndex}`}render(){const e=Oe({main:!0,[`size--${this.size}`]:!0}),t=Oe({listbox:!0,"is-open":this._open,[`size--${this.size}`]:!0}),i=this.getA11yAttributes({invalid:this.invalid}),n=this.filteredOptions;return Z`
32402
+ */const ct=()=>new rt;class rt{}const lt=new WeakMap,at=Fe(class extends st{render(e){return W}update(e,[t]){const i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),W}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let i=lt.get(t);void 0===i&&(i=new WeakMap,lt.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),dt=Math.min,ut=Math.max,ht=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),vt={left:"right",right:"left",bottom:"top",top:"bottom"};function wt(e,t,i){return ut(e,dt(t,i))}function mt(e,t){return"function"==typeof e?e(t):e}function kt(e){return e.split("-")[0]}function xt(e){return e.split("-")[1]}function yt(e){return"x"===e?"y":"x"}function Lt(e){return"y"===e?"height":"width"}function It(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ft(e){return yt(It(e))}function Ct(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bt=["left","right"],Mt=["right","left"],qt=["top","bottom"],St=["bottom","top"];function Bt(e,t,i,n){const o=xt(e);let s=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Mt:bt:t?bt:Mt;case"left":case"right":return t?qt:St;default:return[]}}(kt(e),"start"===i,n);return o&&(s=s.map(e=>e+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function At(e){const t=kt(e);return vt[t]+e.slice(t.length)}function Pt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function jt(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function zt(e,t,i){let{reference:n,floating:o}=e;const s=It(t),c=ft(t),r=Lt(c),l=kt(t),a="y"===s,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,h=n[r]/2-o[r]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(xt(t)){case"start":p[c]-=h*(i&&a?-1:1);break;case"end":p[c]+=h*(i&&a?-1:1)}return p}async function Ht(e,t){var i;void 0===t&&(t={});const{x:n,y:o,platform:s,rects:c,elements:r,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=mt(t,e),g=Pt(p),v=r[h?"floating"===u?"reference":"floating":u],w=jt(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(v)))||i?v:v.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(r.floating)),boundary:a,rootBoundary:d,strategy:l})),m="floating"===u?{x:n,y:o,width:c.floating.width,height:c.floating.height}:c.reference,k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(r.floating)),x=await(null==s.isElement?void 0:s.isElement(k))&&await(null==s.getScale?void 0:s.getScale(k))||{x:1,y:1},y=jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:m,offsetParent:k,strategy:l}):m);return{top:(w.top-y.top+g.top)/x.y,bottom:(y.bottom-w.bottom+g.bottom)/x.y,left:(w.left-y.left+g.left)/x.x,right:(y.right-w.right+g.right)/x.x}}const Tt=new Set(["left","top"]);function Dt(){return"undefined"!=typeof window}function Vt(e){return Ot(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rt(e){var t;return null==(t=(Ot(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ot(e){return!!Dt()&&(e instanceof Node||e instanceof Ft(e).Node)}function $t(e){return!!Dt()&&(e instanceof Element||e instanceof Ft(e).Element)}function _t(e){return!!Dt()&&(e instanceof HTMLElement||e instanceof Ft(e).HTMLElement)}function Et(e){return!(!Dt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot)}function Ut(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=ei(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&"inline"!==o&&"contents"!==o}function Zt(e){return/^(table|td|th)$/.test(Vt(e))}function Gt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Nt=/transform|translate|scale|rotate|perspective|filter/,Wt=/paint|layout|strict|content/,Xt=e=>!!e&&"none"!==e;let Kt;function Jt(e){const t=$t(e)?ei(e):e;return Xt(t.transform)||Xt(t.translate)||Xt(t.scale)||Xt(t.rotate)||Xt(t.perspective)||!Qt()&&(Xt(t.backdropFilter)||Xt(t.filter))||Nt.test(t.willChange||"")||Wt.test(t.contain||"")}function Qt(){return null==Kt&&(Kt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kt}function Yt(e){return/^(html|body|#document)$/.test(Vt(e))}function ei(e){return Ft(e).getComputedStyle(e)}function ti(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if("html"===Vt(e))return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Rt(e);return Et(t)?t.host:t}function ni(e){const t=ii(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&Ut(t)?t:ni(t)}function oi(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=ni(e),s=o===(null==(n=e.ownerDocument)?void 0:n.body),c=Ft(o);if(s){const e=si(c);return t.concat(c,c.visualViewport||[],Ut(o)?o:[],e&&i?oi(e):[])}return t.concat(o,oi(o,[],i))}function si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ci(e){const t=ei(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_t(e),s=o?e.offsetWidth:i,c=o?e.offsetHeight:n,r=ht(i)!==s||ht(n)!==c;return r&&(i=s,n=c),{width:i,height:n,$:r}}function ri(e){return $t(e)?e:e.contextElement}function li(e){const t=ri(e);if(!_t(t))return gt(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=ci(t);let c=(s?ht(i.width):i.width)/n,r=(s?ht(i.height):i.height)/o;return c&&Number.isFinite(c)||(c=1),r&&Number.isFinite(r)||(r=1),{x:c,y:r}}const ai=gt(0);function di(e){const t=Ft(e);return Qt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ai}function ui(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),s=ri(e);let c=gt(1);t&&(n?$t(n)&&(c=li(n)):c=li(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Ft(e))&&t}(s,i,n)?di(s):gt(0);let l=(o.left+r.x)/c.x,a=(o.top+r.y)/c.y,d=o.width/c.x,u=o.height/c.y;if(s){const e=Ft(s),t=n&&$t(n)?Ft(n):n;let i=e,o=si(i);for(;o&&n&&t!==i;){const e=li(o),t=o.getBoundingClientRect(),n=ei(o),s=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,c=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,a*=e.y,d*=e.x,u*=e.y,l+=s,a+=c,i=Ft(o),o=si(i)}}return jt({width:d,height:u,x:l,y:a})}function hi(e,t){const i=ti(e).scrollLeft;return t?t.left+i:ui(Rt(e)).left+i}function pi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-hi(e,i),y:i.top+t.scrollTop}}function gi(e,t,i){let n;if("viewport"===t)n=function(e,t){const i=Ft(e),n=Rt(e),o=i.visualViewport;let s=n.clientWidth,c=n.clientHeight,r=0,l=0;if(o){s=o.width,c=o.height;const e=Qt();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,l=o.offsetTop)}const a=hi(n);if(a<=0){const e=n.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,c=Math.abs(n.clientWidth-t.clientWidth-o);c<=25&&(s-=c)}else a<=25&&(s+=a);return{width:s,height:c,x:r,y:l}}(e,i);else if("document"===t)n=function(e){const t=Rt(e),i=ti(e),n=e.ownerDocument.body,o=ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-i.scrollLeft+hi(e);const r=-i.scrollTop;return"rtl"===ei(n).direction&&(c+=ut(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:c,y:r}}(Rt(e));else if($t(t))n=function(e,t){const i=ui(e,!0,"fixed"===t),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=_t(e)?li(e):gt(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:n*s.y}}(t,i);else{const i=di(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return jt(n)}function vi(e,t){const i=ii(e);return!(i===t||!$t(i)||Yt(i))&&("fixed"===ei(i).position||vi(i,t))}function wi(e,t,i){const n=_t(t),o=Rt(t),s="fixed"===i,c=ui(e,!0,s,t);let r={scrollLeft:0,scrollTop:0};const l=gt(0);function a(){l.x=hi(o)}if(n||!n&&!s)if(("body"!==Vt(t)||Ut(o))&&(r=ti(t)),n){const e=ui(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&a();s&&!n&&o&&a();const d=!o||n||s?gt(0):pi(o,r);return{x:c.left+r.scrollLeft-l.x-d.x,y:c.top+r.scrollTop-l.y-d.y,width:c.width,height:c.height}}function mi(e){return"static"===ei(e).position}function ki(e,t){if(!_t(e)||"fixed"===ei(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Rt(e)===i&&(i=i.ownerDocument.body),i}function xi(e,t){const i=Ft(e);if(Gt(e))return i;if(!_t(e)){let t=ii(e);for(;t&&!Yt(t);){if($t(t)&&!mi(t))return t;t=ii(t)}return i}let n=ki(e,t);for(;n&&Zt(n)&&mi(n);)n=ki(n,t);return n&&Yt(n)&&mi(n)&&!Jt(n)?i:n||function(e){let t=ii(e);for(;_t(t)&&!Yt(t);){if(Jt(t))return t;if(Gt(t))return null;t=ii(t)}return null}(e)||i}const yi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s="fixed"===o,c=Rt(n),r=!!t&&Gt(t.floating);if(n===c||r&&s)return i;let l={scrollLeft:0,scrollTop:0},a=gt(1);const d=gt(0),u=_t(n);if((u||!u&&!s)&&(("body"!==Vt(n)||Ut(c))&&(l=ti(n)),u)){const e=ui(n);a=li(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!c||u||s?gt(0):pi(c,l);return{width:i.width*a.x,height:i.height*a.y,x:i.x*a.x-l.scrollLeft*a.x+d.x+h.x,y:i.y*a.y-l.scrollTop*a.y+d.y+h.y}},getDocumentElement:Rt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[..."clippingAncestors"===i?Gt(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let n=oi(e,[],!1).filter(e=>$t(e)&&"body"!==Vt(e)),o=null;const s="fixed"===ei(e).position;let c=s?ii(e):e;for(;$t(c)&&!Yt(c);){const t=ei(c),i=Jt(c);i||"fixed"!==t.position||(o=null),(s?!i&&!o:!i&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ut(c)&&!i&&vi(e,c))?n=n.filter(e=>e!==c):o=t,c=ii(c)}return t.set(e,n),n}(t,this._c):[].concat(i),n],c=gi(t,s[0],o);let r=c.top,l=c.right,a=c.bottom,d=c.left;for(let e=1;e<s.length;e++){const i=gi(t,s[e],o);r=ut(i.top,r),l=dt(i.right,l),a=dt(i.bottom,a),d=ut(i.left,d)}return{width:l-d,height:a-r,x:d,y:r}},getOffsetParent:xi,getElementRects:async function(e){const t=this.getOffsetParent||xi,i=this.getDimensions,n=await i(e.floating);return{reference:wi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=ci(e);return{width:t,height:i}},getScale:li,isElement:$t,isRTL:function(e){return"rtl"===ei(e).direction}};function Li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ii(e,t,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,a=ri(e),d=o||s?[...a?oi(a):[],...t?oi(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",i,{passive:!0}),s&&e.addEventListener("resize",i)});const u=a&&r?function(e,t){let i,n=null;const o=Rt(e);function s(){var e;clearTimeout(i),null==(e=n)||e.disconnect(),n=null}return function c(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),s();const a=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=a;if(r||t(),!h||!p)return;const g={rootMargin:-pt(u)+"px "+-pt(o.clientWidth-(d+h))+"px "+-pt(o.clientHeight-(u+p))+"px "+-pt(d)+"px",threshold:ut(0,dt(1,l))||1};let v=!0;function w(t){const n=t[0].intersectionRatio;if(n!==l){if(!v)return c();n?c(!1,n):i=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==n||Li(a,e.getBoundingClientRect())||c(),v=!1}try{n=new IntersectionObserver(w,{...g,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(w,g)}n.observe(e)}(!0),s}(a,i):null;let h,p=-1,g=null;c&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===a&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),i()}),a&&!l&&g.observe(a),t&&g.observe(t));let v=l?ui(e):null;return l&&function t(){const n=ui(e);v&&!Li(v,n)&&i();v=n,h=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",i),s&&e.removeEventListener("resize",i)}),null==u||u(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:c,middlewareData:r}=t,l=await async function(e,t){const{placement:i,platform:n,elements:o}=e,s=await(null==n.isRTL?void 0:n.isRTL(o.floating)),c=kt(i),r=xt(i),l="y"===It(i),a=Tt.has(c)?-1:1,d=s&&l?-1:1,u=mt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&"number"==typeof g&&(p="end"===r?-1*g:g),l?{x:p*d,y:h*a}:{x:h*a,y:p*d}}(t,e);return c===(null==(i=r.offset)?void 0:i.placement)&&null!=(n=r.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:c}}}}},Ci=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:r=!1,limiter:l={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...a}=mt(e,t),d={x:i,y:n},u=await s.detectOverflow(t,a),h=It(kt(o)),p=yt(h);let g=d[p],v=d[h];if(c){const e="y"===p?"bottom":"right";g=wt(g+u["y"===p?"top":"left"],g,g-u[e])}if(r){const e="y"===h?"bottom":"right";v=wt(v+u["y"===h?"top":"left"],v,v-u[e])}const w=l.fn({...t,[p]:g,[h]:v});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[p]:c,[h]:r}}}}}},bi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:o,middlewareData:s,rects:c,initialPlacement:r,platform:l,elements:a}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=mt(e,t);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const m=kt(o),k=It(r),x=kt(r)===r,y=await(null==l.isRTL?void 0:l.isRTL(a.floating)),L=h||(x||!v?[At(r)]:function(e){const t=At(e);return[Ct(e),t,Ct(t)]}(r)),I="none"!==g;!h&&I&&L.push(...Bt(r,v,g,y));const f=[r,...L],C=await l.detectOverflow(t,w),b=[];let M=(null==(n=s.flip)?void 0:n.overflows)||[];if(d&&b.push(C[m]),u){const e=function(e,t,i){void 0===i&&(i=!1);const n=xt(e),o=ft(e),s=Lt(o);let c="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=At(c)),[c,At(c)]}(o,c,y);b.push(C[e[0]],C[e[1]])}if(M=[...M,{placement:o,overflows:b}],!b.every(e=>e<=0)){var q,S;const e=((null==(q=s.flip)?void 0:q.index)||0)+1,t=f[e];if(t){if(!("alignment"===u&&k!==It(t))||M.every(e=>It(e.placement)!==k||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let i=null==(S=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var B;const e=null==(B=M.filter(e=>{if(I){const t=It(e.placement);return t===k||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Mi=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:o,rects:s,platform:c,elements:r,middlewareData:l}=t,{element:a,padding:d=0}=mt(e,t)||{};if(null==a)return{};const u=Pt(d),h={x:i,y:n},p=ft(o),g=Lt(p),v=await c.getDimensions(a),w="y"===p,m=w?"top":"left",k=w?"bottom":"right",x=w?"clientHeight":"clientWidth",y=s.reference[g]+s.reference[p]-h[p]-s.floating[g],L=h[p]-s.reference[p],I=await(null==c.getOffsetParent?void 0:c.getOffsetParent(a));let f=I?I[x]:0;f&&await(null==c.isElement?void 0:c.isElement(I))||(f=r.floating[x]||s.floating[g]);const C=y/2-L/2,b=f/2-v[g]/2-1,M=dt(u[m],b),q=dt(u[k],b),S=M,B=f-v[g]-q,A=f/2-v[g]/2+C,P=wt(S,A,B),j=!l.arrow&&null!=xt(o)&&A!==P&&s.reference[g]/2-(A<S?M:q)-v[g]/2<0,z=j?A<S?A-S:A-B:0;return{[p]:h[p]+z,data:{[p]:P,centerOffset:A-P-z,...j&&{alignmentOffset:z}},reset:j}}}),qi=(e,t,i)=>{const n=new Map,o={platform:yi,...i},s={...o.platform,_c:n};return(async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:c}=i,r=c.detectOverflow?c:{...c,detectOverflow:Ht},l=await(null==c.isRTL?void 0:c.isRTL(t));let a=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=zt(a,n,l),h=n,p=0;const g={};for(let i=0;i<s.length;i++){const v=s[i];if(!v)continue;const{name:w,fn:m}=v,{x:k,y:x,data:y,reset:L}=await m({x:d,y:u,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:a,platform:r,elements:{reference:e,floating:t}});d=null!=k?k:d,u=null!=x?x:u,g[w]={...g[w],...y},L&&p<50&&(p++,"object"==typeof L&&(L.placement&&(h=L.placement),L.rects&&(a=!0===L.rects?await c.getElementRects({reference:e,floating:t,strategy:o}):L.rects),({x:d,y:u}=zt(a,h,l))),i=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:g}})(e,t,{...o,platform:s})};function Si(e){class i extends e{constructor(){super(...arguments),this.ariaLabel=null,this.ariaDescription=null,this.ariaInvalid=null}getA11yAttributes(e){const t=e?.label??this.ariaLabel,i=e?.description??this.ariaDescription,n=e?.invalid??"true"===this.ariaInvalid;return{label:$e(t||void 0),description:$e(i||void 0),invalid:$e(n?"true":void 0)}}}return t([Le({type:"string",attribute:"aria-label",description:"Accessible label for the component (aria-label)."})],i.prototype,"ariaLabel",void 0),t([Le({type:"string",attribute:"aria-description",description:"Accessible description bound directly to aria-description."})],i.prototype,"ariaDescription",void 0),t([Le({type:"string",attribute:"aria-invalid",description:"Marks the component invalid for assistive technologies (aria-invalid)."})],i.prototype,"ariaInvalid",void 0),i}const Bi={Gray:"gray",Brand:"brand",Error:"error",Warning:"warning",Success:"success",GrayBlue:"gray-blue",BlueLight:"blue-light",Blue:"blue",Indigo:"indigo",Purple:"purple",Pink:"pink",Orange:"orange"},Ai=["gray","brand","error","warning","success","gray-blue","blue-light","blue","indigo","purple","pink","orange"],Pi="24rem",ji="36rem",zi="48rem",Hi="64rem",Ti="75rem",Di="96rem";function Vi(e,t,i){return Math.min(Math.max(e,t),i)}function Fi(e){return Ai.map(t=>`.color--${t} {\n ${e(t)}\n}`).join("\n")}function Ri(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});return e?`${e}-${t}`:t}const Oi={ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"};e.LucideIconChevronDown.ensureDefined(),e.LucideIconCircleAlert.ensureDefined(),e.Combobox=class extends(Si(fe)){constructor(){super(),this.listboxId=Ri("combobox-listbox"),this.value="",this.name="",this.placeholder="",this.options=[],this.size=Oi.Medium,this.disabled=!1,this.required=!1,this.invalid=!1,this.emptyLabel="No results",this.allowCustomValue=!1,this._open=!1,this._inputValue="",this._activeIndex=-1,this._inputRef=ct(),this._listboxRef=ct(),this.internals=this.attachInternals()}updated(e){const t=e.has("value"),i=e.has("options"),n=e.has("allowCustomValue");if(t||n||i&&!this._open){const e=this.options.find(e=>e.value===this.value);e?this._inputValue=e.label:this.allowCustomValue?this._inputValue=this.value:this._inputValue=""}e.has("value")&&this.internals.setFormValue(this.value),(e.has("value")||e.has("required"))&&this.updateValidity(),e.has("options")&&this._open&&(this._activeIndex=-1),e.has("_activeIndex")&&this._activeIndex>=0&&this.shadowRoot?.querySelectorAll('[role="option"]')[this._activeIndex]?.scrollIntoView({block:"nearest"})}get filteredOptions(){if(!this._inputValue)return this.options;const e=this.filterFn??((e,t)=>e.label.toLowerCase().includes(t.toLowerCase()));return this.options.filter(t=>e(t,this._inputValue))}firstNavigableIndex(){return this.filteredOptions.findIndex(e=>!e.disabled)}lastNavigableIndex(){const e=this.filteredOptions;for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}nextNavigableIndex(e,t){const i=this.filteredOptions;let n=e+t;for(;n>=0&&n<i.length;){if(!i[n].disabled)return n;n+=t}return e}async openList(){this._open||this.disabled||(this._open=!0,this._activeIndex=-1,await this.updateComplete,this.positionListbox())}closeList(e=!1){if(this._open)if(this._open=!1,this._activeIndex=-1,this.cleanup?.(),this.cleanup=void 0,this.allowCustomValue&&e)this.commitCustomValue();else{const e=this.options.find(e=>e.value===this.value);this._inputValue=e?.label??(this.allowCustomValue?this.value:"")}}commitCustomValue(){const e=this._inputValue.trim();this._inputValue=e,e!==this.value&&(this.value=e,this.internals.setFormValue(e),this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:e},bubbles:!0,composed:!0})))}positionListbox(){const e=this._listboxRef.value;e&&(this.cleanup=Ii(this,e,async()=>{if(!e)return;const{x:t,y:i}=await qi(this,e,{placement:"bottom-start",middleware:[fi(4),bi(),Ci({padding:8})],strategy:"absolute"});Object.assign(e.style,{left:`${t}px`,top:`${i}px`,width:`${this.getBoundingClientRect().width}px`})}))}selectOption(e){this.value=e.value,this._inputValue=e.label,this.internals.setFormValue(e.value),this._open=!1,this._activeIndex=-1,this.cleanup?.(),this.cleanup=void 0,this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:this.value},bubbles:!0,composed:!0})),this._inputRef.value?.focus()}handleInput(e){const t=e.target;this._inputValue=t.value,this._activeIndex=-1,this._open||this.openList(),this.dispatchEvent(new CustomEvent("input-changed",{detail:{value:this._inputValue},bubbles:!0,composed:!0}))}handleKeyDown(e){switch(e.key){case"ArrowDown":e.preventDefault(),this._open?this._activeIndex=this.nextNavigableIndex(this._activeIndex,1):this.openList().then(()=>{this._activeIndex=this.firstNavigableIndex()});break;case"ArrowUp":if(!this._open)return;e.preventDefault(),this._activeIndex=this.nextNavigableIndex(this._activeIndex,-1);break;case"Home":if(!this._open)return;e.preventDefault(),this._activeIndex=this.firstNavigableIndex();break;case"End":if(!this._open)return;e.preventDefault(),this._activeIndex=this.lastNavigableIndex();break;case"Enter":if(this._open&&this._activeIndex>=0){const t=this.filteredOptions[this._activeIndex];t&&!t.disabled&&(e.preventDefault(),this.selectOption(t))}else this.allowCustomValue&&this._inputValue.trim()&&(e.preventDefault(),this.closeList(!0),this.commitCustomValue());break;case"Escape":e.preventDefault(),this.closeList();break;case"Tab":this.closeList(!0)}}handleBlur(){this.closeList(!0),this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0}))}handleFocus(){this.dispatchEvent(new Event("focus",{bubbles:!0,composed:!0}))}handleChevronMouseDown(e){e.preventDefault(),this._open?this.closeList():(this._inputRef.value?.focus(),this.openList())}formResetCallback(){this.value="",this._inputValue="",this.internals.setFormValue("")}formStateRestoreCallback(e){this.value=e,this.internals.setFormValue(e);const t=this.options.find(t=>t.value===e);this._inputValue=t?.label??(this.allowCustomValue?e:"")}formDisabledCallback(e){this.disabled=e}disconnectedCallback(){super.disconnectedCallback(),this.cleanup?.()}updateValidity(){const e=this._inputRef.value;e&&this.internals.setValidity(e.validity,e.validationMessage,e)}get activeDescendant(){if(this._open&&!(this._activeIndex<0))return`${this.listboxId}-opt-${this._activeIndex}`}render(){const e=Oe({main:!0,[`size--${this.size}`]:!0}),t=Oe({listbox:!0,"is-open":this._open,[`size--${this.size}`]:!0}),i=this.getA11yAttributes({invalid:this.invalid}),n=this.filteredOptions;return Z`
32403
32403
  <div class=${e}>
32404
32404
  <input
32405
32405
  ${at(this._inputRef)}
@@ -37438,7 +37438,7 @@ const Jn="important",Qn=" !"+Jn,Yn=Fe(class extends Re{constructor(e){if(super(e
37438
37438
  background-color: var(--quantic-component-tooltip-background);
37439
37439
  transform: rotate(45deg);
37440
37440
  }
37441
- `,t([Le({type:"boolean",default:"false",reflect:!0,description:"Controls visibility — toggled by the parent quantic-tooltip."})],e.TooltipPopup.prototype,"visible",void 0),t([me(".arrow")],e.TooltipPopup.prototype,"arrowElement",void 0),e.TooltipPopup=t([Ce("quantic-tooltip-popup")],e.TooltipPopup),e.TooltipPopup.ensureDefined(),e.Tooltip=class extends fe{constructor(){super(...arguments),this.placement=Ao.Top,this.size=Po.Medium,this.showDelay=250,this.hideDelay=0,this.disabled=!1,this.offset=8,this.open=!1,this.tooltipId=`tooltip-${"undefined"!=typeof crypto?crypto.randomUUID():Math.random().toString(36)}`,this.contentElements=[],this.handleMouseEnter=()=>{this.disabled||this.open||(this.clearTimeouts(),this.showTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseLeave=()=>{this.disabled||this.open||(this.clearTimeouts(),this.hideTimeout=window.setTimeout(()=>this.hide(),this.hideDelay))},this.handleFocus=()=>{this.disabled||this.open||(this.clearTimeouts(),this.show())},this.handleBlur=()=>{this.disabled||this.open||(this.clearTimeouts(),this.hide())},this.handleEscape=e=>{"Escape"!==e.key||this.open||this.hide()}}firstUpdated(){this.isConnected&&this.initPopup()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&!this.popup&&this.initPopup()}initPopup(){this.popup=document.createElement("quantic-tooltip-popup"),this.movePopupToContainer(),this.open&&this.show()}disconnectedCallback(){super.disconnectedCallback(),this.clearTimeouts(),this.cleanup?.(),this.restorePopup()}restorePopup(){this.contentElements.forEach(e=>{e.setAttribute("slot","content"),this.appendChild(e)}),this.contentElements=[],this.popup?.remove(),this.popup=void 0}get triggerElement(){return this.triggerSlot?.assignedElements({flatten:!0})[0]}handleSlotChange(){const e=this.triggerElement;e&&e.setAttribute("aria-describedby",this.tooltipId)}clearTimeouts(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout&&clearTimeout(this.hideTimeout),this.showTimeout=void 0,this.hideTimeout=void 0}async show(){this.popup&&this.triggerElement&&(await this.popup.updateComplete,this.popup.visible=!0,this.popup.id=this.tooltipId,this.popup.setAttribute("role","tooltip"),this.popup.setAttribute("aria-hidden","false"),this.updatePosition(),document.addEventListener("keydown",this.handleEscape))}hide(){this.popup&&(this.cleanup?.(),this.popup.visible=!1,this.popup.setAttribute("aria-hidden","true"),document.removeEventListener("keydown",this.handleEscape))}movePopupToContainer(){if(!this.popup)return;this.copyCustomPropertiesToPopup(),this.contentElements=Array.from(this.children).filter(e=>"content"===e.getAttribute("slot")),this.contentElements.forEach(e=>{e.removeAttribute("slot"),this.popup.appendChild(e)});let e=this.container?document.querySelector(this.container):document.body;e||(console.warn(`Tooltip container "${this.container}" not found, using body`),e=document.body),e.appendChild(this.popup)}copyCustomPropertiesToPopup(){if(!this.popup)return;const e=getComputedStyle(this);for(const t of Array.from(e)){if(!t.startsWith("--quantic"))continue;const i=e.getPropertyValue(t).trim();i&&this.popup.style.setProperty(t,i)}}updatePosition(){if(this.triggerElement&&this.popup&&this.popup.arrowElement){const{arrowElement:e}=this.popup,t=[fi(this.offset),bi(),Ci({padding:8}),Mi({element:e})];this.cleanup=Ii(this.triggerElement,this.popup,async()=>{if(!this.triggerElement||!this.popup||!e)return;const{x:i,y:n,placement:o,middlewareData:s}=await qi(this.triggerElement,this.popup,{placement:this.placement,middleware:t,strategy:"fixed"});if(Object.assign(this.popup.style,{left:`${i}px`,top:`${n}px`}),s.arrow){const{x:t,y:i}=s.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];Object.assign(e.style,{left:null!=t?`${t}px`:"",top:null!=i?`${i}px`:"",right:"",bottom:"",[n]:"calc(var(--quantic-component-tooltip-arrow-size) / -2)"})}})}}render(){return Z`
37441
+ `,t([Le({type:"boolean",default:"false",reflect:!0,description:"Controls visibility — toggled by the parent quantic-tooltip."})],e.TooltipPopup.prototype,"visible",void 0),t([me(".arrow")],e.TooltipPopup.prototype,"arrowElement",void 0),e.TooltipPopup=t([Ce("quantic-tooltip-popup")],e.TooltipPopup),e.TooltipPopup.ensureDefined(),e.Tooltip=class extends fe{constructor(){super(...arguments),this.placement=Ao.Top,this.size=Po.Medium,this.showDelay=250,this.hideDelay=0,this.disabled=!1,this.offset=8,this.open=!1,this.tooltipId=Ri("tooltip"),this.contentElements=[],this.handleMouseEnter=()=>{this.disabled||this.open||(this.clearTimeouts(),this.showTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseLeave=()=>{this.disabled||this.open||(this.clearTimeouts(),this.hideTimeout=window.setTimeout(()=>this.hide(),this.hideDelay))},this.handleFocus=()=>{this.disabled||this.open||(this.clearTimeouts(),this.show())},this.handleBlur=()=>{this.disabled||this.open||(this.clearTimeouts(),this.hide())},this.handleEscape=e=>{"Escape"!==e.key||this.open||this.hide()}}firstUpdated(){this.isConnected&&this.initPopup()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&!this.popup&&this.initPopup()}initPopup(){this.popup=document.createElement("quantic-tooltip-popup"),this.movePopupToContainer(),this.open&&this.show()}disconnectedCallback(){super.disconnectedCallback(),this.clearTimeouts(),this.cleanup?.(),this.restorePopup()}restorePopup(){this.contentElements.forEach(e=>{e.setAttribute("slot","content"),this.appendChild(e)}),this.contentElements=[],this.popup?.remove(),this.popup=void 0}get triggerElement(){return this.triggerSlot?.assignedElements({flatten:!0})[0]}handleSlotChange(){const e=this.triggerElement;e&&e.setAttribute("aria-describedby",this.tooltipId)}clearTimeouts(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout&&clearTimeout(this.hideTimeout),this.showTimeout=void 0,this.hideTimeout=void 0}async show(){this.popup&&this.triggerElement&&(await this.popup.updateComplete,this.popup.visible=!0,this.popup.id=this.tooltipId,this.popup.setAttribute("role","tooltip"),this.popup.setAttribute("aria-hidden","false"),this.updatePosition(),document.addEventListener("keydown",this.handleEscape))}hide(){this.popup&&(this.cleanup?.(),this.popup.visible=!1,this.popup.setAttribute("aria-hidden","true"),document.removeEventListener("keydown",this.handleEscape))}movePopupToContainer(){if(!this.popup)return;this.copyCustomPropertiesToPopup(),this.contentElements=Array.from(this.children).filter(e=>"content"===e.getAttribute("slot")),this.contentElements.forEach(e=>{e.removeAttribute("slot"),this.popup.appendChild(e)});let e=this.container?document.querySelector(this.container):document.body;e||(console.warn(`Tooltip container "${this.container}" not found, using body`),e=document.body),e.appendChild(this.popup)}copyCustomPropertiesToPopup(){if(!this.popup)return;const e=getComputedStyle(this);for(const t of Array.from(e)){if(!t.startsWith("--quantic"))continue;const i=e.getPropertyValue(t).trim();i&&this.popup.style.setProperty(t,i)}}updatePosition(){if(this.triggerElement&&this.popup&&this.popup.arrowElement){const{arrowElement:e}=this.popup,t=[fi(this.offset),bi(),Ci({padding:8}),Mi({element:e})];this.cleanup=Ii(this.triggerElement,this.popup,async()=>{if(!this.triggerElement||!this.popup||!e)return;const{x:i,y:n,placement:o,middlewareData:s}=await qi(this.triggerElement,this.popup,{placement:this.placement,middleware:t,strategy:"fixed"});if(Object.assign(this.popup.style,{left:`${i}px`,top:`${n}px`}),s.arrow){const{x:t,y:i}=s.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];Object.assign(e.style,{left:null!=t?`${t}px`:"",top:null!=i?`${i}px`:"",right:"",bottom:"",[n]:"calc(var(--quantic-component-tooltip-arrow-size) / -2)"})}})}}render(){return Z`
37442
37442
  <div
37443
37443
  class="trigger"
37444
37444
  @mouseenter=${this.handleMouseEnter}
@@ -37611,32 +37611,38 @@ const Jn="important",Qn=" !"+Jn,Yn=Fe(class extends Re{constructor(e){if(super(e
37611
37611
  aria-label=${this.ariaLabel}
37612
37612
  aria-expanded=${!1!==this.isAsideExpanded?"true":"false"}
37613
37613
  >
37614
- <div class="body">
37615
- <slot @slotchange=${this.handleAutoHide}></slot>
37614
+ <div class="header">
37615
+ <slot name="header" @slotchange=${this.handleAutoHide}></slot>
37616
37616
  </div>
37617
37617
 
37618
- <div class="footer">
37619
- <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
37620
- </div>
37618
+ <div class="scroll-area">
37619
+ <div class="body">
37620
+ <slot @slotchange=${this.handleAutoHide}></slot>
37621
+ </div>
37621
37622
 
37622
- ${this.isDesktopViewport&&this.collapsible?je`<div class="toggle-container">
37623
- <quantic-sidebar-menu-item
37624
- @click=${this.handleToggle}
37625
- title=${this.isAsideExpanded?"Collapse sidebar":"Expand sidebar"}
37626
- label=${this.isAsideExpanded?"Collapse":"Expand sidebar"}
37627
- variant=${Co.Secondary}
37628
- >
37629
- ${this.isAsideExpanded?je`<quantic-icon-lucide-panel-left-close
37630
- slot="icon"
37631
- size="sm"
37632
- ></quantic-icon-lucide-panel-left-close>`:je`<quantic-icon-lucide-panel-left
37633
- slot="icon"
37634
- size="sm"
37635
- ></quantic-icon-lucide-panel-left>`}
37636
- </quantic-sidebar-menu-item>
37637
- </div>`:null}
37623
+ <div class="footer">
37624
+ <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
37625
+ </div>
37626
+
37627
+ ${this.isDesktopViewport&&this.collapsible?je`<div class="toggle-container">
37628
+ <quantic-sidebar-menu-item
37629
+ @click=${this.handleToggle}
37630
+ title=${this.isAsideExpanded?"Collapse sidebar":"Expand sidebar"}
37631
+ label=${this.isAsideExpanded?"Collapse":"Expand sidebar"}
37632
+ variant=${Co.Secondary}
37633
+ >
37634
+ ${this.isAsideExpanded?je`<quantic-icon-lucide-panel-left-close
37635
+ slot="icon"
37636
+ size="sm"
37637
+ ></quantic-icon-lucide-panel-left-close>`:je`<quantic-icon-lucide-panel-left
37638
+ slot="icon"
37639
+ size="sm"
37640
+ ></quantic-icon-lucide-panel-left>`}
37641
+ </quantic-sidebar-menu-item>
37642
+ </div>`:null}
37643
+ </div>
37638
37644
  </nav>
37639
- `}},e.Sidebar.meta={tag:"quantic-sidebar",description:"Collapsible side navigation panel placed in the sidebar slot of quantic-layout. On desktop it can collapse to an icon rail; on mobile it is controlled by the layout as a drawer.",category:"navigation",subComponents:["quantic-sidebar-menu-item","quantic-sidebar-menu-item-group"],slots:{"":{description:"Primary nav items (quantic-sidebar-menu-item or quantic-sidebar-menu-item-group)."},footer:{description:"Footer nav items pinned to the bottom of the sidebar."}},relatedTo:["quantic-layout","quantic-sidebar-menu-item"]},e.Sidebar.styles=l`
37645
+ `}},e.Sidebar.meta={tag:"quantic-sidebar",description:"Collapsible side navigation panel placed in the sidebar slot of quantic-layout. On desktop it can collapse to an icon rail; on mobile it is controlled by the layout as a drawer.",category:"navigation",subComponents:["quantic-sidebar-menu-item","quantic-sidebar-menu-item-group"],slots:{header:{description:"Optional sticky header rendered above the scrollable content."},"":{description:"Primary nav items (quantic-sidebar-menu-item or quantic-sidebar-menu-item-group)."},footer:{description:"Footer nav items pinned to the bottom of the sidebar."}},relatedTo:["quantic-layout","quantic-sidebar-menu-item"]},e.Sidebar.styles=l`
37640
37646
  :host {
37641
37647
  height: 100%;
37642
37648
  }
@@ -37646,6 +37652,24 @@ const Jn="important",Qn=" !"+Jn,Yn=Fe(class extends Re{constructor(e){if(super(e
37646
37652
  flex-direction: column;
37647
37653
  height: 100%;
37648
37654
  flex: 1;
37655
+ box-sizing: border-box;
37656
+ overflow: hidden;
37657
+ }
37658
+
37659
+ .header {
37660
+ padding: var(--quantic-spacing-2);
37661
+ padding-bottom: 0;
37662
+ flex-shrink: 0;
37663
+ }
37664
+
37665
+ .header:has(slot[hidden]) {
37666
+ display: none;
37667
+ }
37668
+
37669
+ .scroll-area {
37670
+ flex: 1;
37671
+ display: flex;
37672
+ flex-direction: column;
37649
37673
  padding: var(--quantic-spacing-2);
37650
37674
  box-sizing: border-box;
37651
37675
  overflow-x: hidden;
@@ -37654,20 +37678,20 @@ const Jn="important",Qn=" !"+Jn,Yn=Fe(class extends Re{constructor(e){if(super(e
37654
37678
  scrollbar-color: var(--quantic-border-secondary) transparent;
37655
37679
  }
37656
37680
 
37657
- .main::-webkit-scrollbar {
37681
+ .scroll-area::-webkit-scrollbar {
37658
37682
  width: 4px;
37659
37683
  }
37660
37684
 
37661
- .main::-webkit-scrollbar-track {
37685
+ .scroll-area::-webkit-scrollbar-track {
37662
37686
  background: transparent;
37663
37687
  }
37664
37688
 
37665
- .main::-webkit-scrollbar-thumb {
37689
+ .scroll-area::-webkit-scrollbar-thumb {
37666
37690
  background: var(--quantic-border-secondary);
37667
37691
  border-radius: var(--quantic-radius-full);
37668
37692
  }
37669
37693
 
37670
- .main:not(.is-aside-expanded) .main {
37694
+ .main:not(.is-aside-expanded) .scroll-area {
37671
37695
  padding: var(--quantic-spacing-1);
37672
37696
  }
37673
37697