@workday/canvas-kit-mcp 15.0.19 → 15.0.21

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.
@@ -290,7 +290,7 @@ ${s}
290
290
  */(function(e){(function(){var t=typeof window<"u"&&typeof window.document<"u"?window.document:{},n=e.exports,a=function(){for(var o,s=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],l=0,u=s.length,c={};l<u;l++)if(o=s[l],o&&o[1]in t){for(l=0;l<o.length;l++)c[s[0][l]]=o[l];return c}return!1}(),r={change:a.fullscreenchange,error:a.fullscreenerror},i={request:function(o,s){return new Promise((function(l,u){var c=(function(){this.off("change",c),l()}).bind(this);this.on("change",c),o=o||t.documentElement;var d=o[a.requestFullscreen](s);d instanceof Promise&&d.then(c).catch(u)}).bind(this))},exit:function(){return new Promise((function(o,s){if(!this.isFullscreen){o();return}var l=(function(){this.off("change",l),o()}).bind(this);this.on("change",l);var u=t[a.exitFullscreen]();u instanceof Promise&&u.then(l).catch(s)}).bind(this))},toggle:function(o,s){return this.isFullscreen?this.exit():this.request(o,s)},onchange:function(o){this.on("change",o)},onerror:function(o){this.on("error",o)},on:function(o,s){var l=r[o];l&&t.addEventListener(l,s,!1)},off:function(o,s){var l=r[o];l&&t.removeEventListener(l,s,!1)},raw:a};if(!a){n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(i,{isFullscreen:{get:function(){return!!t[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return t[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!t[a.fullscreenEnabled]}}}),n?e.exports=i:window.screenfull=i})()})(FU);var XQ=FU.exports;const pr=Ec(XQ);function JQ(e){try{return localStorage.get(e)}catch{return null}}function QQ(e,t){try{localStorage.set(e,t)}catch{}}let ey=JQ("modality")||(typeof document<"u"&&document.documentElement.clientWidth<768?"touch":"")||"mouse";const eee=e=>{ey!==e&&QQ("modality",e),ey=e},Sw=()=>{const[e,t]=P.useState(ey);return P.useEffect(()=>{const n=a=>{const r=a.pointerType;t(r),eee(r)};return document.addEventListener("pointerdown",n),()=>{document.removeEventListener("pointerdown",n)}},[]),e};function tee(e,t){var n=H.useRef(null),a=H.useRef(null);a.current=t;var r=H.useRef(null);H.useEffect(function(){i()});var i=H.useCallback(function(){var o=r.current,s=a.current,l=o||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return H.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),H.useCallback(function(o){r.current=o,i()},[i])}function bN(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function nee(e){e===void 0&&(e={});var t=e.onResize,n=H.useRef(void 0);n.current=t;var a=e.round||Math.round,r=H.useRef(),i=H.useState({width:void 0,height:void 0}),o=i[0],s=i[1],l=H.useRef(!1);H.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=H.useRef({width:void 0,height:void 0}),c=tee(H.useCallback(function(d){return(!r.current||r.current.box!==e.box||r.current.round!==a)&&(r.current={box:e.box,round:a,instance:new ResizeObserver(function(p){var g=p[0],b=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",S=bN(g,b,"inlineSize"),T=bN(g,b,"blockSize"),h=S?a(S):void 0,f=T?a(T):void 0;if(u.current.width!==h||u.current.height!==f){var m={width:h,height:f};u.current.width=h,u.current.height=f,n.current?n.current(m):l.current||s(m)}})}),r.current.instance.observe(d,{box:e.box}),function(){r.current&&r.current.instance.unobserve(d)}},[e.box,a]),e.ref);return H.useMemo(function(){return{ref:c,width:o.width,height:o.height}},[c,o.width,o.height])}const ree={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},vN={lightest:"25",lighter:"50",light:"200",main:"600",dark:"700",darkest:"800"},aee={primary:"primary",error:"critical",success:"positive",alert:"caution",neutral:"neutral"},iee={focusOutline:Pt.focus,alertInner:Pt.caution.inner,alertOuter:Pt.caution.outer,errorInner:Pt.critical},oee=di({[Pt.alertInner]:gc,[Pt.alertOuter]:hc,[Pt.errorInner]:hU,[Pt.focusOutline]:nU,[Cr.accent]:Yn,[Cr.darkest]:TU,[Cr.dark]:kU,[Cr.base]:wU,[Cr.light]:_U,[Cr.lighter]:EU,[Cr.lightest]:SU,[Vt.accent]:Yn,[Vt.darkest]:dU,[Vt.dark]:cU,[Vt.base]:uU,[Vt.light]:lU,[Vt.lighter]:sU,[Vt.lightest]:oU,[xt.accent]:Yn,[xt.darkest]:yU,[xt.dark]:vU,[xt.base]:bU,[xt.light]:gU,[xt.lighter]:mU,[xt.lightest]:fU,[Rt.accent]:pU,[Rt.darkest]:JM,[Rt.dark]:hc,[Rt.base]:gc,[Rt.light]:XM,[Rt.lighter]:KM,[Rt.lightest]:YM,[it.accent]:Yn,[it.darkest]:iU,[it.dark]:aU,[it.base]:rU,[it.light]:tU,[it.lighter]:eU,[it.lightest]:QM,[IU.primary]:`linear-gradient(90deg, ${it.base} 0%, ${it.dark} 100%)`,[$.brand.focus.primary]:Pt.focusOutline,[$.brand.border.primary]:Pt.focusOutline,[$.brand.accent.primary]:it.base,[$.brand.accent.action]:it.base,[$.brand.accent.critical]:xt.base,[$.brand.accent.caution]:Rt.base,[$.brand.accent.positive]:Vt.base,[$.brand.fg.primary.default]:it.base,[$.brand.fg.primary.strong]:it.dark,[$.brand.fg.critical.default]:xt.base,[$.brand.fg.critical.strong]:xt.dark,[$.brand.fg.caution.default]:Rt.darkest,[$.brand.fg.caution.strong]:Rt.darkest,[$.brand.fg.positive.default]:Vt.base,[$.brand.fg.positive.strong]:Vt.dark,[$.brand.fg.selected]:it.dark,[$.brand.focus.critical]:xt.dark,[$.brand.border.critical]:xt.base,...$.brand.focus.caution?{[$.brand.focus.caution.inner]:Pt.alertInner,[$.brand.focus.caution.outer]:Rt.dark}:{},[$.brand.border.caution]:Rt.dark,[$.brand.surface.primary.default]:it.lightest,[$.brand.surface.primary.strong]:it.lighter,[$.brand.surface.critical.default]:xt.lightest,[$.brand.surface.critical.strong]:xt.lighter,[$.brand.surface.caution.default]:Rt.lightest,[$.brand.surface.caution.strong]:Rt.lighter,[$.brand.surface.positive.default]:Vt.lightest,[$.brand.surface.positive.strong]:Vt.lighter,[$.brand.surface.selected]:it.lighter}),jU=(e,t)=>{const n=EQ(e),a=(t.className||"").split(" ").concat(oee).join(" "),r=t.style||{},{palette:i}=n.canvas;return["common","primary","error","alert","success","neutral"].forEach(o=>{o==="common"?["focusOutline","alertInner","alertOuter","errorInner"].forEach(s=>{if(i.common[s]!==Ln.palette.common[s]){const l=Jv(i.common[s]);r[Pt[s]]=l,r[iee[s]]=l,s==="focusOutline"&&(r[$.brand.focus.primary]=l,r[$.brand.border.primary]=l),s==="alertInner"&&(r[$.brand.focus.caution.inner]=l),s==="alertOuter"&&(r[$.brand.border.caution]=l),s==="errorInner"&&(r[$.brand.focus.critical]=l,r[$.brand.border.critical]=l)}}):["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{var l,u,c,d,p;if(i[o][s]!==Ln.palette[o][s]){const g=Jv(i[o][s]);if(r[oN[o][ree[s]]]=g,s!=="contrast"&&s in vN){const b=aee[o],S=vN[s],T=oN[b+S];if(T&&(r[T]=g),s==="main"){const h=$.brand.accent[b];h&&(r[h]=g);const f=(l=$.brand.fg[b])==null?void 0:l.default;if(f&&(r[f]=g),b==="primary"&&!(i.common.focusOutline!==Ln.palette.common.focusOutline)){const y=$.brand.focus.primary;r[y]=g}}else if(s==="dark"){const h=(u=$.brand.fg[b])==null?void 0:u.strong;if(h&&(r[h]=g),b==="primary"){const f=$.brand.fg.selected;r[f]=g}if(b==="critical"){const f=$.brand.focus.critical;r[f]=g;const m=$.brand.border.critical;r[m]=g}if(b==="caution"){const f=(c=$.brand.focus.caution)==null?void 0:c.outer;r[f]=g;const m=$.brand.border.caution;r[m]=g}}else if(s==="lighter"){const h=(d=$.brand.surface[b])==null?void 0:d.strong;if(h&&(r[h]=g),b==="primary"){const f=$.brand.surface.selected;r[f]=g}}else if(s==="lightest"){const h=(p=$.brand.surface[b])==null?void 0:p.default;h&&(r[h]=g)}}}})}),{...t,className:a,style:r}},see=({children:e,theme:t={canvas:{}},...n})=>{var s;const{className:a,...r}=jU(t,n),i=dQ(),o={...r,...n};return v.jsx(BK,{value:i,children:v.jsx(VK,{theme:t,children:v.jsx("div",{dir:((s=t==null?void 0:t.canvas)==null?void 0:s.direction)||Ln.direction,...o,children:e})})})},lee=di({whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}),uee=Ge("span")({displayName:"EllipsisText",Component({children:e,...t},n,a){return v.jsx(a,{ref:n,...Wt(t,lee),children:e})}});function Ua(e,t,n){let a=n.initialDeps??[],r;function i(){var o,s,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const d=e();if(!(d.length!==a.length||d.some((b,S)=>a[S]!==b)))return r;a=d;let g;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(g=Date.now()),r=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-c)*100)/100,S=Math.round((Date.now()-g)*100)/100,T=S/16,h=(f,m)=>{for(f=String(f);f.length<m;)f=" "+f;return f};console.info(`%c⏱ ${h(S,5)} /${h(b,5)} ms`,`
291
291
  font-size: .6rem;
292
292
  font-weight: bold;
293
- color: hsl(${Math.max(0,Math.min(120-120*T,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,r),r}return i.updateDeps=o=>{a=o},i}function yN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cee=(e,t)=>Math.abs(e-t)<=1,dee=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},SN=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},pee=e=>e,fee=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},mee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(SN(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(SN(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},EN={passive:!0},_N=typeof window>"u"?!0:"onscrollend"in window,gee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&_N?()=>{}:dee(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:d,isRtl:p}=e.options;r=d?n.scrollLeft*(p&&-1||1):n.scrollTop,i(),t(r,c)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,EN);const u=e.options.useScrollendEvent&&_N;return u&&n.addEventListener("scrollend",l,EN),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},hee=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},bee=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class vee{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pee,rangeExtractor:fee,onChange:()=>{},measureElement:hee,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Ua(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Ua(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Ua(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=i(c),p=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),g=p?p.end+this.options.gap:a+r,b=s.get(d),S=typeof b=="number"?b:this.options.estimateSize(c),T=g+S,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:g,size:S,end:T,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ua(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?yee({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ua(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ua(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return yN(a[BU(0,a.length-1,r=>yN(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const u=this.getOffsetForIndex(n,s);if(!u)return;const[c]=u,d=this.getScrollOffset();cee(c,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const BU=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function yee({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=BU(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(c=>c<n+t);){const c=e[s];l[c.lane]=c.end,s++}const u=Array(a).fill(n+t);for(;o>=0&&u.some(c=>c>=n);){const c=e[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const wN=typeof document<"u"?H.useLayoutEffect:H.useEffect;function See(e){const t=H.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Ky.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=H.useState(()=>new vee(n));return a.setOptions(n),wN(()=>a._didMount(),[]),wN(()=>a._willUpdate()),a}function Eee(e){return See({observeElementRect:mee,observeElementOffset:gee,scrollToFn:bee,...e})}const qo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Gb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",_ee={items:[]},pu=zn({defaultConfig:{..._ee,id:"",getId:qo,getTextValue:Gb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=rp(e.id),n=P.useRef(qo),a=P.useRef(Gb);n.current=e.getId||qo,a.current=e.getTextValue||e.getId||Gb;const[r]=P.useState(e.orientation||"vertical"),[i,o]=P.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=P.useRef(0),u=P.useRef(null),c=P.useMemo(()=>(e.items||[]).map((f,m)=>({id:n.current(f),index:m,value:f,textValue:a.current(f)})),[e.items]),[d,p]=P.useState([]),g=Eee({count:c.length,getScrollElement:()=>u.current,estimateSize:P.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(m=>m.concat({...f,value:f,index:m.length}))},unregisterItem(f){p(m=>m.find(y=>y.id===f.id)?m.filter(y=>y.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),wee=e=>e,ap=()=>0,ip=(e,{state:t})=>t.items.length-1,kee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return ap()},Tee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount-t.columnCount+1;let a=e-n;return a>=t.items.length&&(a=t.items.length-1),a}return ip(e,{state:t})},Iee=(e,{state:t})=>t.columnCount?e%t.columnCount:ap(),xee=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:ip(e,{state:t}),Ree=(e,{state:t})=>t.items.find(n=>n.id===e),Aee=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",wa=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),Oo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return ap();if(e===-1)return ip(t,{state:n})}const r=n.items;let i=t+e;const s=Math.ceil(r.length/n.columnCount)*n.columnCount;return i<0?e===-1?i=r.length-1:(s+i>=r.length&&(i-=n.columnCount),i=s+i):i>=r.length&&(e===1?i=0:(i-s<0&&(i+=n.columnCount),i=i-s)),r.length>1&&n.nonInteractiveIds.includes(r[i].id)&&a>0?Oo(e)(i,{state:n},a-1):i},Nee=wee({getFirst:ap,getLast:ip,getItem:Ree,getNext:Oo(1),getNextRow:(e,{state:t})=>Oo(t.columnCount)(e,{state:t}),getPrevious:Oo(-1),getPreviousRow:(e,{state:t})=>Oo(-t.columnCount)(e,{state:t}),getPreviousPage:Iee,getNextPage:xee,getFirstOfRow:kee,getLastOfRow:Tee}),fu=zn({defaultConfig:{...pu.defaultConfig,initialCursorId:"",columnCount:0,navigation:Nee,pageSize:0},requiredConfig:pu.requiredConfig,contextOverride:pu.Context})(e=>{var d;const[t,n]=P.useState(e.initialCursorId),a=P.useRef(e.pageSize),r=e.columnCount||0,i=pu(e),o=e.navigation,s=P.useRef(-1),l=p=>{var b;const g=((b=u.items[p])==null?void 0:b.id)||"";n(g)};t&&((d=i.state.items[s.current])==null?void 0:d.id)!==t?s.current=i.state.items.findIndex(p=>p.id===t):t||(s.current=-1);const u={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},c={...i.events,goTo(p){const g=u.items.findIndex(b=>b.id===p.id);l(g)},goToNext(){const p=o.getNext(s.current,{state:u});l(p)},goToPrevious(){const p=o.getPrevious(s.current,{state:u});l(p)},goToPreviousRow(){const p=o.getPreviousRow(s.current,{state:u});l(p)},goToNextRow(){const p=o.getNextRow(s.current,{state:u});l(p)},goToFirst(){const p=o.getFirst(s.current,{state:u});l(p)},goToLast(){const p=o.getLast(s.current,{state:u});l(p)},goToFirstOfRow(){const p=o.getFirstOfRow(s.current,{state:u});l(p)},goToLastOfRow(){const p=o.getLastOfRow(s.current,{state:u});l(p)},goToNextPage(){const p=o.getNextPage(s.current,{state:u});l(p)},goToPreviousPage(){const p=o.getPreviousPage(s.current,{state:u});l(p)}};return{...i,state:u,events:c,navigation:o}}),Ew=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),qU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Cee={select(e,{selectedIds:t,unselectedIds:n}){return t==="all"?{selectedIds:"all",unselectedIds:n.includes(e)?n.filter(r=>r!==e):n.concat(e)}:{selectedIds:t.includes(e)?t.filter(r=>r!==e):t.concat(e),unselectedIds:[]}}},ca=zn({defaultConfig:{...fu.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:qU},requiredConfig:fu.requiredConfig,contextOverride:fu.Context})(e=>{const t=fu(e),[n,a]=P.useState(e.initialSelectedIds),[r,i]=P.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(u){const{selectedIds:c,unselectedIds:d}=o.select(u.id,s);a(c),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(u){a(u)},remove(u){}};return{...t,state:s,events:l,selection:o}}),On=zn({defaultConfig:{UNSTABLE_parentModel:void 0,...ca.defaultConfig},requiredConfig:ca.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...ca(e)})),Go=P.createContext({});function op(e,t){return typeof t=="function"?e.state.isVirtualized?e.state.UNSTABLE_virtual.getVirtualItems().map(a=>{const r=e.state.items[a.index],i=t(r.value,a.index);return v.jsx(Go.Provider,{value:{item:r,virtual:a},children:i},r.id||r.index)}):e.state.items.map(a=>{const r=t(a.value,a.index);return v.jsx(Go.Provider,{value:{item:a},children:r},a.id||a.index)}):v.jsx(Go.Provider,{value:{},children:t})}const oo=ue()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=P.useContext(Go),[s,l]=P.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Rr(io(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return ro(()=>{var S;if((o==null?void 0:o.index)===0&&((S=u.current)!=null&&S.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(T=>T.id===g))return;const b={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(g),()=>{r.unregisterItem({id:g})}}),{ref:c,"data-id":s,disabled:n.disabled||a.nonInteractiveIds.includes(s)?!0:void 0,"aria-setsize":o?a.UNSTABLE_virtual.options.count:void 0,"aria-posinset":o?i.index+1:void 0,"data-index":o?i.index:void 0,style:d,id:Li(`${a.id}-${s}`)}});function _o(e,t,n,a,r,i){let o,s=0;const l=[];let u=!1;if(r!=="all"&&r.length&&i.length&&(o=i.find(c=>c.id===r[0])?r[0]:i[0].id),Object.keys(a).reduce((c,d,p)=>c+a[d]+(p>0?t:0),0)<=e)return[];if(o){if(a[o]+n>e)return Object.keys(a);s+=a[o]+n,u=!0}else s+=n;for(const c in a)c!==o&&(s+=a[c]+(u?t:0),u=!0,s>e&&l.push(c));return l}const wo=zn({defaultConfig:{...ca.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:ca.requiredConfig,contextOverride:ca.Context})(e=>{const t=e.shouldCalculateOverflow===void 0?!0:e.shouldCalculateOverflow,[n,a]=P.useState(e.initialHiddenIds),[r,i]=P.useState({}),[o,s]=P.useState(0),[l,u]=P.useState(0),c=P.useRef(0),d=P.useRef(r),[p,g]=P.useState(0),b=P.useRef(0),S=t?n:[],T=(e.nonInteractiveIds||[]).concat(S),h=ca({...e,nonInteractiveIds:T}),f={...h.state,hiddenIds:S,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},m={...h.events,select(y){const{selectedIds:_}=h.selection.select(y.id,f),w=_o(c.current,l,b.current,d.current,_,e.items);h.events.select(y),a(w)},setContainerSize(y){c.current=h.state.orientation==="horizontal"?y.width||0:y.height||0,s(c.current);const _=_o(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},setContainerWidth(y){m.setContainerSize({width:y.width,height:0})},setContainerGap(y){u(y.size);const _=_o(c.current,y.size,b.current,d.current,f.selectedIds,e.items);a(_)},setOverflowTargetSize(y){b.current=h.state.orientation==="horizontal"?y.width||0:y.height||0,g(b.current)},setOverflowTargetWidth(y){b.current=y.width,m.setOverflowTargetSize({width:b.current,height:0})},addItemWidth(y){m.addItemSize({id:y.id,width:y.width,height:0})},addItemSize(y){d.current={...d.current,[y.id]:h.state.orientation==="horizontal"?y.width:y.height},i(d.current);const _=_o(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},removeItemSize(y){const _={...d.current};delete _[y.id],d.current=_,i(d.current);const w=_o(c.current,l,b.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(I=>y.id!==I):f.selectedIds,e.items);a(w)},removeItemWidth(y){m.removeItemSize({id:y.id})},addHiddenKey(y){a(_=>_.concat(y.id))},removeHiddenKey(y){a(_=>_.filter(w=>w!==y.id))}};return{...h,state:f,events:m}}),Oee=ue()((e,t)=>{const{elementRef:n,localRef:a}=Rr(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return nee({ref:a,onResize:e.events.setContainerSize}),ro(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),$ee={position:"absolute",left:-99999},Lee=ue()((e,t,n={})=>{const{elementRef:a,localRef:r}=Rr(t),i=n["data-id"]||"";ro(()=>{if(r.current){const s=getComputedStyle(r.current);e.events.addItemSize({id:i,width:r.current.offsetWidth+parseFloat(s.marginLeft)+parseFloat(s.marginRight),height:r.current.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom)})}return()=>{e.events.removeItemSize({id:i})}});const o=e.state.hiddenIds.includes(i);return{ref:a,"aria-hidden":o||void 0,style:o?$ee:{},inert:P.use?o:o?"":void 0}}),Dee={position:"absolute",left:-99999},Pee=ue()((e,t)=>{const{elementRef:n,localRef:a}=Rr(t),r=P.useRef(!0);ro(()=>{if(r.current=!1,a.current){const o=getComputedStyle(a.current);e.events.setOverflowTargetSize({width:a.current.offsetWidth+parseFloat(o.marginLeft)+parseFloat(o.marginRight),height:a.current.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom)})}});const i=!e.state.hiddenIds.length;return{ref:n,"aria-hidden":i,tabIndex:i?-1:0,style:i?Dee:void 0}}),yc={horizontal:{ArrowLeft:"goToPrevious",Left:"goToPrevious",ArrowRight:"goToNext",Right:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"},vertical:{ArrowUp:"goToPrevious",Up:"goToPrevious",ArrowDown:"goToNext",Down:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"}},Mee={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},kN={...yc.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},Hb={Home:"goToFirst",End:"goToLast"},TN=(e,t)=>e.hasOwnProperty(t);function Uee(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in Hb)if(TN(Hb,l)&&e.key===l)return(i=(r=t.events)[Hb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?kN:yc[t.state.orientation],a=OU(e.currentTarget);for(const l in n)if(TN(n,l)&&(a?e.key===Mee[l]:e.key===l)){const u=t.state.columnCount>0?kN[l]:yc[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const zee=ue()(({state:e,events:t})=>{const n=P.useRef(!1),a=P.useRef(0);return ro(()=>()=>{cancelAnimationFrame(a.current)}),{onKeyDown(r){Object.keys(yc[e.orientation]).indexOf(r.key)!==-1&&(n.current=!0)},onFocus(){n.current=!1},onBlur(){n.current||(a.current=requestAnimationFrame(()=>{wa(e,e.selectedIds[0])||t.goTo({id:e.selectedIds[0]})}))}}}),GU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>GU(e,t-1)),n==null||n("Retry timeout")},Fee=(e,t,n)=>new Promise((a,r)=>{var s;const i=(((s=n==null?void 0:n.dataset)==null?void 0:s.focusId)||"").split("-")[0]||e.state.id,o=e.navigation.getItem(t,e);if(o){e.state.isVirtualized&&e.state.UNSTABLE_virtual.scrollToIndex(o.index);const l=u=>document.querySelector(`[data-focus-id="${CU(`${u}-${o.id}`)}"]`);GU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),_w=ue()((e,t,n={})=>{const a=P.useRef(e.state);a.current=e.state;const r=P.useRef(null);return P.useEffect(()=>{r.current&&Fee(e,Aee(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),P.useEffect(()=>{!e.state.cursorId&&e.state.items.length&&e.events.goTo({id:e.state.items[0].id})},[e.state.cursorId,e.state.items,e.events]),{onKeyDown(i){Uee(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":Li(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&wa(e.state,n["data-id"])?0:-1:0}}),ww=ue()(({state:e,events:t},n,a={})=>{const r=a["data-id"]||"";return{onClick:o=>{!e.nonInteractiveIds.includes(r)&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&t.select({id:r})}}}),jee=ue()((e,t,n={})=>{const a=n["data-id"]||"";return{className:wa(e.state,a)?"focus":""}}),Bee=e=>kQ[e]||tr(e),qee=e=>TQ[e],Gee=e=>IQ[e]||tr(e),Hee=e=>xQ[e]||tr(e),Wee=e=>bw.properties.fontFamilies[e]||tr(e),Vee=e=>bw.properties.fontSizes[e]||tr(e),Zee=e=>bw.properties.fontWeights[e]||tr(e);function ht(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:Bee(r)};if(n.system==="depth"){const s=qee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:Wee(r)}:n.system==="fontSize"?{...i,[o]:Vee(r)}:n.system==="fontWeight"?{...i,[o]:Zee(r)}:n.system==="shape"?{...i,[o]:Gee(r)}:n.system==="space"?{...i,[o]:Hee(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function on(e){return t=>{let n={};for(const a in t)if(a in t&&a in e){const r=e[a],i=t[a],o=r(i);n={...n,...o};continue}return n}}const HU=[{name:"background",properties:["background"],system:"color"},{name:"backgroundAttachment",properties:["backgroundAttachment"],system:"none"},{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"backgroundImage",properties:["backgroundImage"],system:"none"},{name:"backgroundPosition",properties:["backgroundPosition"],system:"none"},{name:"backgroundRepeat",properties:["backgroundRepeat"],system:"none"},{name:"backgroundSize",properties:["backgroundSize"],system:"none"}],Yee=ht(HU),Kee=on(Yee),WU=[{name:"borderColor",properties:["borderColor"],system:"color"},{name:"borderTopColor",properties:["borderTopColor"],system:"color"},{name:"borderRightColor",properties:["borderRightColor"],system:"color"},{name:"borderBottomColor",properties:["borderBottomColor"],system:"color"},{name:"borderLeftColor",properties:["borderLeftColor"],system:"color"},{name:"borderInlineStartColor",properties:["borderInlineStartColor"],system:"color"},{name:"borderInlineEndColor",properties:["borderInlineEndColor"],system:"color"}],Xee=ht(WU),VU=[{name:"borderCollapse",properties:["borderCollapse"],system:"none"},{name:"borderSpacing",properties:["borderSpacing"],system:"none"},{name:"borderStyle",properties:["borderStyle"],system:"none"},{name:"borderTopStyle",properties:["borderTopStyle"],system:"none"},{name:"borderRightStyle",properties:["borderRightStyle"],system:"none"},{name:"borderBottomStyle",properties:["borderBottomStyle"],system:"none"},{name:"borderLeftStyle",properties:["borderLeftStyle"],system:"none"},{name:"borderInlineStartStyle",properties:["borderInlineStartStyle"],system:"none"},{name:"borderInlineEndStyle",properties:["borderInlineEndStyle"],system:"none"}],Jee=ht(VU),ZU=[{name:"borderRadius",properties:["borderRadius"],system:"shape"},{name:"borderTopLeftRadius",properties:["borderTopLeftRadius"],system:"shape"},{name:"borderTopRightRadius",properties:["borderTopRightRadius"],system:"shape"},{name:"borderBottomLeftRadius",properties:["borderBottomLeftRadius"],system:"shape"},{name:"borderBottomRightRadius",properties:["borderBottomRightRadius"],system:"shape"}],Qee=ht(ZU),YU=[{name:"border",properties:["border"],system:"none"},{name:"borderTop",properties:["borderTop"],system:"none"},{name:"borderRight",properties:["borderRight"],system:"none"},{name:"borderBottom",properties:["borderBottom"],system:"none"},{name:"borderLeft",properties:["borderLeft"],system:"none"},{name:"borderInlineStart",properties:["borderInlineStart"],system:"none"},{name:"borderInlineEnd",properties:["borderInlineEnd"],system:"none"}],ete=ht(YU),KU=[{name:"borderWidth",properties:["borderWidth"],system:"none"},{name:"borderTopWidth",properties:["borderTopWidth"],system:"none"},{name:"borderRightWidth",properties:["borderRightWidth"],system:"none"},{name:"borderBottomWidth",properties:["borderBottomWidth"],system:"none"},{name:"borderLeftWidth",properties:["borderLeftWidth"],system:"none"},{name:"borderInlineStartWidth",properties:["borderInlineStartWidth"],system:"none"},{name:"borderInlineEndWidth",properties:["borderInlineEndWidth"],system:"none"}],tte=ht(KU),nte=on({...Xee,...Jee,...Qee,...ete,...tte}),rte=[...WU,...VU,...ZU,...YU,...KU],XU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],ate=ht(XU),ite=on(ate),JU=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],ote=ht(JU),ste=on(ote),QU=[{name:"flex",properties:["flex"],system:"none"},{name:"flexGrow",properties:["flexGrow"],system:"none"},{name:"flexShrink",properties:["flexShrink"],system:"none"},{name:"flexBasis",properties:["flexBasis"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"order",properties:["order"],system:"none"}],lte=ht(QU),ute=on(lte),ez=[{name:"gridColumnStart",properties:["gridColumnStart"],system:"none"},{name:"gridColumnEnd",properties:["gridColumnEnd"],system:"none"},{name:"gridRowStart",properties:["gridRowStart"],system:"none"},{name:"gridRowEnd",properties:["gridRowEnd"],system:"none"},{name:"gridColumn",properties:["gridColumn"],system:"none"},{name:"gridRow",properties:["gridRow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"placeSelf",properties:["placeSelf"],system:"none"}],cte=ht(ez),dte=on(cte),tz=[{name:"display",properties:["display"],system:"none"},{name:"height",properties:["height"],system:"space"},{name:"listStyle",properties:["listStyle"],system:"none"},{name:"maxHeight",properties:["maxHeight"],system:"space"},{name:"maxWidth",properties:["maxWidth"],system:"space"},{name:"minHeight",properties:["minHeight"],system:"space"},{name:"minWidth",properties:["minWidth"],system:"space"},{name:"overflow",properties:["overflow"],system:"none"},{name:"overflowX",properties:["overflowX"],system:"none"},{name:"overflowY",properties:["overflowY"],system:"none"},{name:"verticalAlign",properties:["verticalAlign"],system:"none"},{name:"width",properties:["width"],system:"space"}],pte=ht(tz),fte=on(pte),nz=[{name:"animation",properties:["animation"],system:"none"},{name:"appearance",properties:["appearance"],system:"none"},{name:"boxSizing",properties:["boxSizing"],system:"none"},{name:"content",properties:["content"],system:"none"},{name:"cursor",properties:["cursor"],system:"none"},{name:"fill",properties:["fill"],system:"none"},{name:"float",properties:["float"],system:"none"},{name:"objectFit",properties:["objectFit"],system:"none"},{name:"objectPosition",properties:["objectPosition"],system:"none"},{name:"outline",properties:["outline"],system:"none"},{name:"outlineOffset",properties:["outlineOffset"],system:"none"},{name:"overflowWrap",properties:["overflowWrap"],system:"none"},{name:"pointerEvents",properties:["pointerEvents"],system:"none"},{name:"resize",properties:["resize"],system:"none"},{name:"stroke",properties:["stroke"],system:"none"},{name:"transform",properties:["transform"],system:"none"},{name:"transition",properties:["transition"],system:"none"},{name:"userSelect",properties:["userSelect"],system:"none"},{name:"visibility",properties:["visibility"],system:"none"}],mte=ht(nz),gte=on(mte),rz=[{name:"position",properties:["position"],system:"none"},{name:"zIndex",properties:["zIndex"],system:"none"},{name:"top",properties:["top"],system:"none"},{name:"right",properties:["right"],system:"none"},{name:"bottom",properties:["bottom"],system:"none"},{name:"left",properties:["left"],system:"none"},{name:"inset",properties:["inset"],system:"none"},{name:"insetInlineStart",properties:["insetInlineStart"],system:"none"},{name:"insetInlineEnd",properties:["insetInlineEnd"],system:"none"}],hte=ht(rz),bte=on(hte),az=[{name:"marginInlineStart",properties:["marginInlineStart"],system:"space"},{name:"marginInlineEnd",properties:["marginInlineEnd"],system:"space"},{name:"paddingInlineStart",properties:["paddingInlineStart"],system:"space"},{name:"paddingInlineEnd",properties:["paddingInlineEnd"],system:"space"},{name:"margin",properties:["margin"],system:"space"},{name:"marginX",properties:["marginInline"],system:"space"},{name:"marginY",properties:["marginBlock"],system:"space"},{name:"marginTop",properties:["marginTop"],system:"space"},{name:"marginRight",properties:["marginRight"],system:"space"},{name:"marginBottom",properties:["marginBottom"],system:"space"},{name:"marginLeft",properties:["marginLeft"],system:"space"},{name:"padding",properties:["padding"],system:"space"},{name:"paddingX",properties:["paddingInline"],system:"space"},{name:"paddingY",properties:["paddingBlock"],system:"space"},{name:"paddingTop",properties:["paddingTop"],system:"space"},{name:"paddingRight",properties:["paddingRight"],system:"space"},{name:"paddingBottom",properties:["paddingBottom"],system:"space"},{name:"paddingLeft",properties:["paddingLeft"],system:"space"}],vte=ht(az),yte=on(vte),iz=[{name:"fontFamily",properties:["fontFamily"],system:"font"},{name:"fontSize",properties:["fontSize"],system:"fontSize"},{name:"fontStyle",properties:["fontStyle"],system:"none"},{name:"fontWeight",properties:["fontWeight"],system:"fontWeight"},{name:"lineHeight",properties:["lineHeight"],system:"none"},{name:"letterSpacing",properties:["letterSpacing"],system:"none"},{name:"textAlign",properties:["textAlign"],system:"none"},{name:"textDecoration",properties:["textDecoration"],system:"none"},{name:"textOverflow",properties:["textOverflow"],system:"none"},{name:"textTransform",properties:["textTransform"],system:"none"},{name:"textShadow",properties:["textShadow"],system:"none"},{name:"whiteSpace",properties:["whiteSpace"],system:"none"},{name:"wordBreak",properties:["wordBreak"],system:"none"}],Ste=ht(iz),Ete=on(Ste),_te=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],wte=e=>MM(e)&&!_te.includes(e),kw=e=>[{boxSizing:"border-box"},Kee,nte,ite,ste,ute,dte,fte,gte,bte,yte,Ete].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),kte=mc("div",{shouldForwardProp:wte})(kw),Tte=mc("div")(kw),Tw=Ge("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=$U(()=>typeof a=="string"?kte:Tte);return v.jsx(r,{as:a,ref:n,...Wt(t),children:e})}}),oz=[{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"flexDirection",properties:["flexDirection"],system:"none"},{name:"flexWrap",properties:["flexWrap"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gap",properties:["gap"],system:"space"},{name:"columnGap",properties:["columnGap"],system:"space"},{name:"rowGap",properties:["rowGap"],system:"space"}],Ite=ht(oz),xte=on(Ite),sz=[{name:"gridGap",properties:["gridGap"],system:"space"},{name:"gridRowGap",properties:["gridRowGap"],system:"space"},{name:"gridColumnGap",properties:["gridColumnGap"],system:"space"},{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gridTemplateAreas",properties:["gridTemplateAreas"],system:"none"},{name:"gridTemplate",properties:["gridTemplate"],system:"none"},{name:"gridTemplateColumns",properties:["gridTemplateColumns"],system:"none"},{name:"gridTemplateRows",properties:["gridTemplateRows"],system:"none"},{name:"gridPlaceItems",properties:["gridPlaceItems"],system:"none"},{name:"gridAutoColumns",properties:["gridAutoColumns"],system:"none"},{name:"gridAutoRows",properties:["gridAutoRows"],system:"none"},{name:"gridAutoFlow",properties:["gridAutoFlow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"grid",properties:["grid"],system:"none"}],Rte=ht(sz),Ate=on(Rte),Nte=[...HU,...rte,...XU,...JU,...oz,...QU,...sz,...ez,...tz,...nz,...rz,...az,...iz].reduce((e,t)=>(e[t.name]=!0,e),{});function Cte(e){return Nte[e]||!1}function kt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Cte(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...kw(n),...xte(n),...Ate(n)}),Wt(r,[t,i])}const Ote=Ye("li")({displayName:"Item",modelHook:On,elemPropsHook:oo})((e,t)=>v.jsx(t,{...kt(e)})),$te=ue()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),IN=Ze({parts:{listBoxContainer:"list-box-container"},base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlock:0}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),Lte=ao("ul")({displayName:"ListBox",modelHook:On,elemPropsHook:$te,subComponents:{Item:Ote}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>v.jsx("div",{ref:l.state.containerRef,...IN.parts.listBoxContainer,...Wt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},IN({orientation:l.state.orientation})),children:v.jsx(s,{...kt(o),"data-part":"list",children:op(l,o.children)})})),Iw=Ze({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.title.lg,lineHeight:k.lineHeight.title.lg,color:$.fg.strong},"title.medium":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.title.md,lineHeight:k.lineHeight.title.md,color:$.fg.strong},"title.small":{fontFamily:Ke.default,fontWeight:We.bold,lineHeight:k.lineHeight.title.sm,fontSize:k.fontSize.title.sm,color:$.fg.strong},"heading.large":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.lg,lineHeight:k.lineHeight.heading.lg,color:$.fg.strong},"heading.medium":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.md,lineHeight:k.lineHeight.heading.md,color:$.fg.strong},"heading.small":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.sm,lineHeight:k.lineHeight.heading.sm,color:$.fg.strong},"body.large":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.lg,lineHeight:k.lineHeight.body.lg,color:$.fg.default},"body.medium":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.md,lineHeight:k.lineHeight.body.md,color:$.fg.default},"body.small":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.sm,lineHeight:k.lineHeight.body.sm,letterSpacing:k.letterSpacing.body.sm,color:$.fg.default},"subtext.large":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,color:$.fg.default},"subtext.medium":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,color:$.fg.default},"subtext.small":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.sm,lineHeight:k.lineHeight.subtext.sm,letterSpacing:k.letterSpacing.subtext.sm,color:$.fg.default}},variant:{error:{color:k.color.brand.fg.critical.default},hint:{color:$.fg.muted.default},inverse:{color:$.fg.inverse}}}}),Dte=Ge("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>v.jsx(i,{ref:r,...kt(a,Iw({typeLevel:t,variant:n})),children:e})}),Pte=Ze({extends:Iw,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Mte=Ge("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Pte()),children:e})}),Ute=Ze({extends:Iw,base:{color:$.fg.strong,fontWeight:We.bold,marginBlock:k.padding.none},defaultModifiers:{typeLevel:"body.large"}}),zte=Ge("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Ute()),children:e})}),Fte=Ze({base:{display:"flex",flexDirection:"column",gap:k.gap.lg,padding:k.padding.xl,backgroundColor:k.color.surface.default,borderRadius:k.shape.xxl,border:`${Oe(1)} solid ${k.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:k.color.surface.alt.default,borderColor:$.border.transparent}}}}),jte=Ge("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>v.jsx(r,{ref:a,...kt(n,Fte({variant:t})),children:e}),subComponents:{Heading:zte,Body:Mte}});function Bte(e){return e.length?e[e.length-1]:null}function lz(e,t){const{min:n,max:a}=xw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function Wb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(lz(a,t))})}function qte(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Gte(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:qte(a.owner,t)})).filter(a=>a.parent===e.element)}function uz(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?uz(e[a],n.join(".")):e[a]}function cz(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),cz(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const dz=e=>{if(typeof window<"u")return uz(window,e)},pz=(e,t)=>{typeof window<"u"&&cz(window,e,t)},xN=(e,t)=>{var a;let n=(a=e.container)==null?void 0:a.call(e);return n===document.body&&(n=t==null?void 0:t.ownerDocument.body),n||document.body},xw=dz("workday.__popupStack")||{description:"Global popup stack from @workday/canvas-kit/popup-stack",container:e=>(e==null?void 0:e.ownerDocument.body)||document.body,items:[],zIndex:{min:30,max:50,getValue:lz},_adapter:{}};pz("workday.__popupStack",xw);const fr=dz("workday.__popupStackOfStacks")||[xw];fr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";pz("workday.__popupStackOfStacks",fr);function ur(){return fr[fr.length-1]}const Et={createContainer(){var n;const e=ur();if((n=e._adapter)!=null&&n.createContainer)return e._adapter.createContainer();const t=document.createElement("div");return t.style.position="relative",t},add(e){var n;const t=ur();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),xN(t,e.owner).appendChild(e.element),Wb(Et.getElements())},remove(e){var n;const t=fr.find(a=>!!Et.getElements(a).find(r=>r===e));if(t){if((n=t._adapter)!=null&&n.remove){t._adapter.remove(e);return}const a=t.items.find(r=>r.element===e);t.items=t.items.filter(r=>r.element!==e),xN(t,a==null?void 0:a.owner).removeChild(e),Wb(Et.getElements(t))}},isTopmost(e){var a;const t=ur();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Bte(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||ur();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=ur();if((a=t._adapter)!=null&&a.bringToTop){t._adapter.bringToTop(e);return}const n=t.items.find(r=>r.element===e);if(n)t.items=[...t.items.filter(r=>r!==n),n],Gte(n,t.items).forEach(r=>{Et.bringToTop(r.element)}),Wb(Et.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=ur();if((i=n._adapter)!=null&&i.contains)return n._adapter.contains(e,t);const a=n.items.find(o=>o.element===e);if(a)return r(a,t);return!1;function r(o,s,l=0){var c;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(c=o.owner)!=null&&c.contains(s))return!0;const u=n.items.find(d=>d.owner&&o.element.contains(d.owner));return u?r(u,s,l+1):!1}},pushStackContext(e){var a,r;const t=ur();if((a=t._adapter)!=null&&a.pushStackContext)return t._adapter.pushStackContext(e);if(((r=t.container)==null?void 0:r.call(t))===e)return;const n={items:[],zIndex:t.zIndex,container:()=>e,_adapter:{}};fr.push(n)},popStackContext(e){var n,a;const t=ur();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&fr.length>1&&fr.pop()},transferToCurrentContext(e){var a;const t=ur();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;fr.find(r=>!!r.items.find(i=>i.element===e.element))&&Et.remove(e.element),Et.add(e)}};let mu=null;pr.isEnabled&&pr.on("change",()=>{pr.isFullscreen?pr.element&&(mu=pr.element,Et.pushStackContext(mu)):mu&&Et.popStackContext(mu)});const Vb=zn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=rp(e.id),[n,a]=P.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),RN=()=>{},oa=zn({defaultContext:{state:{},events:{show:RN,hide:RN}},defaultConfig:{...Vb.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Vb.requiredConfig})(e=>{const t=H.useRef(null),n=H.useRef(null),[a,r]=H.useState("bottom"),i=Vb(e),o={...i.state,stackRef:t,targetRef:n,initialFocusRef:e.initialFocusRef,returnFocusRef:e.returnFocusRef,placement:a},s={...i.events,updatePlacement(l){r(l.placement)}};return{state:o,events:s}});oa.Context;const fz=ue()(e=>{const t=P.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!Et.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{var a;if(n)return document.addEventListener("mousedown",t),(a=e.state.stackRef.current)==null||a.setAttribute("data-behavior-click-outside-close","always"),()=>{document.removeEventListener("mousedown",t)}},[e.state.stackRef,n,t]),{}}),mz=ue()(e=>{const t=P.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&Et.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),Hte=ue()(e=>{const t=P.useCallback(a=>{pr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return P.useEffect(()=>{if(n&&pr.isEnabled)return pr.on("change",t),()=>{pr.off("change",t)}},[t,n]),{}});function gz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"||t.overflowX==="scroll"||t.overflowX==="auto"?e:gz(e.parentElement)}const Wte=ue()(e=>{const t=e.state.visibility!=="hidden",n=P.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return P.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=gz(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),Vte=ue()(e=>{const t=P.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=YQ(e.state.stackRef.current),i=KQ(e.state.stackRef.current);a.getModifierState("Shift")&&document.activeElement===r?(a.preventDefault(),e.events.hide(a)):!a.getModifierState("Shift")&&(Array.isArray(i)&&document.activeElement&&i.includes(document.activeElement)||document.activeElement===i)&&e.events.hide(a)}},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),hz=ue()(({state:e,events:t},n)=>{const a=io(n,e.stackRef),r=P.useRef(e.placement);r.current=e.placement;const i=P.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),Zte=(e,t)=>{const{elementRef:n,localRef:a}=Rr(e),r=P.useContext(bs),{style:i}=jU(r,{}),o=P.useRef(!0),[s]=P.useState(()=>{if(o.current){const l=Et.createContainer();return n(l),o.current=!1,l}return a.current});return P.useLayoutEffect(()=>{const l=a.current;if(!l)return;const u=Object.keys(i);if(u.length!==0)for(const c of u)l.style.setProperty(c,i[c])},[a,i]),P.useLayoutEffect(()=>{if(s!==a.current)throw Error("The 'ref' passed to usePopupStack should not be applied to a React element. This will cause a runtime error where the PopupStack and React compete for the element. Instead use ReactDOM.createPortal(<YourComponent />, ref.current)");const l=t?"current"in t?t.current||void 0:t:void 0,u=a.current;return Et.add({element:u,owner:l}),()=>{Et.remove(u)}},[a,t,s]),P.useLayoutEffect(()=>{var c,d;let u=(t?"current"in t?t.current:t:void 0)??void 0;if(u==null&&typeof document<"u"){const p=document.activeElement,g=a.current;u=(p&&g&&!g.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":OU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},Yte=ue()(({events:e,state:t},n)=>({ref:io(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),Kte=ue()(({events:e,state:t},n)=>({ref:io(n,t.targetRef),onContextMenu:r=>{t.targetRef.current||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r),r.preventDefault()}}));function bz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:bz(e.parentElement)}function vz(e){return e===null||e===document.body||!e.parentElement?null:ZQ(e)?e:vz(e.parentElement)}function AN(e,t){const n=e.getBoundingClientRect();return n.top+n.height/2<t.top||n.bottom-n.height/2>t.bottom||n.left+n.width/2<t.left||n.right-n.width/2>t.right}const Xte=ue()(e=>{const t=e.state.visibility!=="hidden",n=P.useRef(null),a=P.useRef(!1),r=P.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=P.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(Et.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return P.useLayoutEffect(()=>{if(!t)return;const o=(e.state.returnFocusRef||e.state.targetRef).current;return document.addEventListener("mousedown",i,!0),document.addEventListener("keydown",r,!0),()=>{if(document.removeEventListener("mousedown",i,!0),document.removeEventListener("keydown",r,!0),!o)return;const l=bz(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&vz(n.current)||AN(o,l)||AN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!Et.contains(e.state.stackRef.current,document.activeElement)||a.current?dN(o):requestAnimationFrame(()=>{dN(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),Rw=e=>{const[t,n]=e.split("-");return{vertical:t==="top"?"bottom":t==="bottom"||n==="end"?"top":n==="start"?"bottom":"center",horizontal:t==="left"?"right":t==="right"||n==="end"?"left":n==="start"?"right":"center"}},yz=Ze({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:G(n,t),height:G(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),Jte=(e,t)=>e?e in t?t[e]:typeof e=="number"?Oe(e):e:"",Qte=Ge("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>(n==null?void 0:n.type)!==a?(console.error(`Icon type "${n.type}" does not match expected type "${a}"`),null):v.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Wt(r,yz({shouldMirror:e,shouldMirrorInRTL:t}))})}),ea={System:"system"},ene={name:"check-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-check-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.44 7.646a.5.5 0 0 1 .706 0l.707.707a.5.5 0 0 1 0 .707l-.646.645v.001l-6 6a1 1 0 0 1-1.413 0l-1.35-1.35-.005-.003-1.793-1.793a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0l2.44 2.44z" class="wd-icon-fill"/></svg>',filename:"wd-icon-check-small.svg",category:"Notification",tags:["success","complete","check mark","check box"]},tne={name:"chevron-down-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-down-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.41 9.112a.5.5 0 0 1 .703.07l.633.775a.5.5 0 0 1-.071.704l-5.113 4.184a1 1 0 0 1-1.266 0l-3.129-2.56-.009-.007-1.975-1.617a.5.5 0 0 1-.07-.704l.632-.773a.5.5 0 0 1 .703-.07l.988.808v-.001l3.493 2.857z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-down-small.svg",category:"Navigation",tags:["navigation","arrow"]},nne={name:"chevron-right-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-right-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.958 6.112a.5.5 0 0 1 .704.07l1.617 1.976.007.01 2.56 3.128a1 1 0 0 1 0 1.266l-4.184 5.113a.5.5 0 0 1-.704.071l-.775-.633a.5.5 0 0 1-.07-.704l3.666-4.48L9.92 8.437l.001-.001-.808-.988a.5.5 0 0 1 .07-.703z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Navigation",tags:["navigation","arrow"]},rne={name:"search",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-search" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M11 2a9 9 0 0 1 7.03 14.616l4.323 4.323a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0l-4.323-4.323A9 9 0 1 1 11 2m0 2a7 7 0 1 0 0 14 7 7 0 0 0 0-14" class="wd-icon-fill"/></svg>',filename:"wd-icon-search.svg",category:"Core",tags:["magnifying","glass","mag","refine","look","hunt","seek","explore"]},ane={name:"select",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-select" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M4.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM8.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM12.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 15a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 7a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 7a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM8.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM12.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM16.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M12.976 13.63a.5.5 0 0 1 .654-.654l7.211 3.036a.5.5 0 0 1-.018.929l-1.796.672 1.826 1.826a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0l-1.826-1.826-.672 1.796a.5.5 0 0 1-.929.018z" class="wd-icon-accent"/></svg>',filename:"wd-icon-select.svg",category:"Core",tags:["cursor"]},ine={name:"share",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-share" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M18 2a4 4 0 1 1-3.098 6.53l-5.967 2.754q.064.349.065.716-.002.366-.065.714l5.967 2.755a4 4 0 1 1-.838 1.815L8.098 14.53a4 4 0 1 1 0-5.063l5.968-2.754A4 4 0 0 1 18 2m0 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4M5 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4m13-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4" class="wd-icon-fill"/></svg>',filename:"wd-icon-share.svg",category:"Core",tags:["social media","link"]},one={name:"star",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-star" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M11.552 3.408a.5.5 0 0 1 .896 0l2.492 5.047 5.568.81a.5.5 0 0 1 .277.852l-4.03 3.928.952 5.547a.5.5 0 0 1-.726.527l-4.98-2.619-4.982 2.62a.5.5 0 0 1-.725-.528l.951-5.547-4.03-3.928a.5.5 0 0 1 .277-.852l5.57-.81z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M10.655 2.965c.534-1.08 2.041-1.112 2.635-.1l.055.1 2.258 4.576 5.048.734c1.23.179 1.723 1.69.832 2.558l-3.653 3.56.863 5.03.015.114c.114 1.168-1.126 2.027-2.191 1.468l-.001-.001L12 18.629l-4.515 2.375h-.001c-1.102.578-2.385-.357-2.175-1.581l.861-5.03-3.653-3.56c-.89-.869-.397-2.379.832-2.558l5.049-.734zm-.697 5.932a1 1 0 0 1-.753.547l-4.567.663 3.305 3.222a1 1 0 0 1 .288.885l-.78 4.548 4.083-2.147.113-.05c.265-.101.564-.084.819.05l4.084 2.148-.78-4.55a1 1 0 0 1 .288-.884l3.303-3.222-4.565-.663a1 1 0 0 1-.753-.547L12 4.76z" class="wd-icon-fill"/></svg>',filename:"wd-icon-star.svg",category:"Core",tags:["favorite","favourite","bookmark","rate","rank"]},de=Ze({extends:yz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:G(e,Kn.systemIcon.size.lg),height:G(e,Kn.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:G(a,Kn.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:G(t,G(a,Kn.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:G(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),$l=Ge("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>v.jsx(Qte,{as:s,src:a,type:ea.System,ref:o,...Wt(i,de({size:Jte(r,Kn.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),sne=di({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),lne=Ge("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>v.jsx(Tw,{as:a,ref:n,...Wt(t,sne),children:e})}),une=Ze({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[de.vars.size]:Kn.systemIcon.size.xs},small:{[de.vars.size]:Kn.systemIcon.size.md},medium:{[de.vars.size]:Kn.systemIcon.size.md},large:{[de.vars.size]:Kn.systemIcon.size.lg}}}}),cne=Ge("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:v.jsx($l,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Wt(r,une({size:t}))})}),oe={default:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},K=Ze({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.bold,backgroundColor:G(oe.default.background,G(e,"transparent")),color:G(oe.default.label,G(r,$.fg.strong)),borderWidth:Oe(1),borderStyle:"solid",gap:k.gap.sm,borderColor:G(oe.default.border,G(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${Oe(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:G(oe.default.borderRadius,G(o,k.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[de.vars.color]:G(oe.default.icon,$.fg.strong),transition:"box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear","&:disabled, &:disabled:active, &.disabled":{cursor:"default",boxShadow:"none",opacity:G(oe.default.opacity,G(i,fn.full))},"&:focus-visible, &.focus":{backgroundColor:G(oe.focus.background,G(e,"transparent")),borderColor:G(oe.focus.border,G(t,"transparent")),color:G(oe.focus.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.focus.icon,$.fg.strong),outline:`${Oe(2)} solid transparent`,outlineOffset:Oe(2),boxShadow:`0 0 0 ${Oe(2)} ${G(oe.focus.boxShadowInner,G(n,k.color.border.inverse.default))},0 0 0 ${Oe(4)} ${G(oe.focus.boxShadowOuter,G(a,k.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:G(oe.hover.background,G(e,k.color.surface.contrast.strong)),borderColor:G(oe.hover.border,G(t,"transparent")),color:G(oe.hover.label,G(r,$.fg.stronger)),[de.vars.color]:G(oe.hover.icon,$.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:G(oe.active.background,G(e,"transparent")),borderColor:G(oe.active.border,G(t,"transparent")),color:G(oe.active.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.active.icon,$.fg.strong)},"&:disabled, &.disabled":{backgroundColor:G(oe.disabled.background,G(e,"transparent")),borderColor:G(oe.disabled.border,G(t,"transparent")),color:G(oe.disabled.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${Oe(2)} solid transparent`,outlineOffset:`-${Oe(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${Oe(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:k.fontSize.body.sm,lineHeight:k.lineHeight.body.sm,letterSpacing:k.letterSpacing.body.sm,height:k.size.lg,paddingInline:k.padding.xxl,minWidth:Zn.size1400},medium:{fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,minWidth:Zn.size1200,paddingInline:k.padding.xl,height:k.size.md},small:{fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,height:k.size.sm,minWidth:Zn.size1000,paddingInline:k.padding.md,gap:k.gap.xs},extraSmall:{fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,height:k.size.xs,minWidth:"auto",paddingInline:k.padding.sm,gap:k.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:k.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:k.padding.xl,paddingInlineEnd:k.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:k.padding.xxl,paddingInlineEnd:k.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:k.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:k.padding.lg,paddingInlineEnd:k.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:k.padding.xl,paddingInlineEnd:k.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:k.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:k.padding.sm,paddingInlineEnd:k.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:k.padding.md,paddingInlineEnd:k.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:k.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:k.padding.xs,paddingInlineEnd:k.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:k.padding.sm,paddingInlineEnd:k.padding.xs}}]}),ni=Ge("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>v.jsx(u,{ref:l,type:"button",...kt(s,[K({size:t,iconPosition:r,grow:a}),oe.default((o==null?void 0:o.default)||{}),oe.focus((o==null?void 0:o.focus)||{}),oe.hover((o==null?void 0:o.hover)||{}),oe.active((o==null?void 0:o.active)||{}),oe.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:cne,Label:lne}}),dne=Ge("button")({displayName:"Button",Component:({children:e,icon:t,colors:n,iconPosition:a,shouldMirrorIcon:r,shouldMirrorIconInRTL:i,size:o="medium",...s},l,u)=>{const c=a||(t?e?"start":"only":void 0);return v.jsxs(ni,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&v.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&v.jsx(ni.Label,{children:e}),t&&c&&["only","end"].includes(c)&&v.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),pne=Ze({extends:K,base:{[K.vars.background]:k.color.surface.transparent,[K.vars.borderRadius]:k.shape.full,[K.vars.border]:$.border.input.default,[K.vars.label]:$.fg.default,[de.vars.color]:G(oe.default.icon,"currentColor"),"&:focus-visible, &.focus":{[K.vars.background]:k.color.surface.default,[K.vars.label]:$.fg.strong,[K.vars.boxShadowInner]:k.color.focus.inverse,[K.vars.boxShadowOuter]:k.color.brand.focus.primary,[de.vars.color]:G(oe.focus.icon,"currentColor")},"&:hover, &.hover":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.hover}),[K.vars.label]:$.fg.strong,[K.vars.border]:k.color.border.input.hover,[de.vars.color]:G(oe.hover.icon,"currentColor")},"&:active, &.active":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.pressed}),[K.vars.label]:$.fg.strong,[K.vars.border]:k.color.border.input.hover,[de.vars.color]:G(oe.active.icon,"currentColor")},"&:disabled, &.disabled":{[K.vars.opacity]:fn.disabled,[K.vars.background]:k.color.surface.transparent,[K.vars.label]:$.fg.default,[de.vars.color]:G(oe.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[K.vars.background]:k.color.surface.transparent,[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.default.icon,"currentColor"),"&:hover, &.hover":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.hover}),[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[K.vars.background]:k.color.surface.inverse,[K.vars.border]:$.border.transparent,[K.vars.label]:$.fg.contrast.default,[K.vars.boxShadowInner]:$.border.contrast.default,[K.vars.boxShadowOuter]:k.color.focus.inverse,[de.vars.color]:G(oe.focus.icon,"currentColor")},"&:active, &.active":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.pressed}),[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.active.icon,"currentColor")},"&:disabled, &.disabled":{[K.vars.opacity]:fn.disabled,[K.vars.background]:k.color.surface.transparent,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.default.icon,"currentColor")}}}}}),Aw=Ge("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>v.jsx(dne,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[pne({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})});var yn="top",Mn="bottom",Un="right",Sn="left",Nw="auto",Ll=[yn,Mn,Un,Sn],Di="start",Cw="end",fne="clippingParents",Sz="viewport",ko="popper",mne="reference",NN=Ll.reduce(function(e,t){return e.concat([t+"-"+Di,t+"-"+Cw])},[]),Ez=[].concat(Ll,[Nw]).reduce(function(e,t){return e.concat([t,t+"-"+Di,t+"-"+Cw])},[]),gne="beforeRead",hne="read",bne="afterRead",vne="beforeMain",yne="main",Sne="afterMain",Ene="beforeWrite",_ne="write",wne="afterWrite",kne=[gne,hne,bne,vne,yne,Sne,Ene,_ne,wne];function Fn(e){return e?(e.nodeName||"").toLowerCase():null}function jn(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function vs(e){var t=jn(e).Element;return e instanceof t||e instanceof Element}function nr(e){var t=jn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Tne(e){var t=jn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ine(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!nr(i)||!Fn(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var s=r[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function xne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],i=t.attributes[a]||{},o=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=o.reduce(function(l,u){return l[u]="",l},{});!nr(r)||!Fn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Rne={name:"applyStyles",enabled:!0,phase:"write",fn:Ine,effect:xne,requires:["computeStyles"]};function er(e){return e.split("-")[0]}function Ow(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function _z(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Tne(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function vr(e){return jn(e).getComputedStyle(e)}function Ane(e){return["table","td","th"].indexOf(Fn(e))>=0}function Ar(e){return((vs(e)?e.ownerDocument:e.document)||window.document).documentElement}function sp(e){return Fn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Ar(e)}function CN(e){if(!nr(e)||vr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Ar(t);if(Fn(t)==="body"&&vr(t).position==="static"&&vr(n).position!=="static")return n}return t}function Nne(e){for(var t=sp(e);nr(t)&&["html","body"].indexOf(Fn(t))<0;){var n=vr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Dl(e){for(var t=jn(e),n=CN(e);n&&Ane(n)&&vr(n).position==="static";)n=CN(n);return n&&Fn(n)==="body"&&vr(n).position==="static"?t:n||Nne(e)||t}function $w(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cu(e,t,n){return Math.max(e,Math.min(t,n))}function wz(){return{top:0,right:0,bottom:0,left:0}}function kz(e){return Object.assign(Object.assign({},wz()),e)}function Tz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function Cne(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=er(n.placement),s=$w(o),l=[Sn,Un].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=Ow(r),p=s==="y"?yn:Sn,g=s==="y"?Mn:Un,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],S=i[s]-n.rects.reference[s],T=Dl(r),h=T?s==="y"?T.clientHeight||0:T.clientWidth||0:0,f=b/2-S/2,m=c[p],y=h-d[u]-c[g],_=h/2-d[u]/2+f,w=Cu(m,_,y),I=s;n.modifiersData[a]=(t={},t[I]=w,t.centerOffset=w-_,t)}}function One(e){var t=e.state,n=e.options,a=e.name,r=n.element,i=r===void 0?"[data-popper-arrow]":r,o=n.padding,s=o===void 0?0:o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||_z(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:kz(typeof s!="number"?s:Tz(s,Ll))}))}const $ne={name:"arrow",enabled:!0,phase:"main",fn:Cne,effect:One,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Lne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dne(e){var t=e.x,n=e.y,a=window,r=a.devicePixelRatio||1;return{x:Math.round(t*r)/r||0,y:Math.round(n*r)/r||0}}function ON(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,u=Dne(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=Sn,S=yn,T=window;if(l){var h=Dl(n);h===jn(n)&&(h=Ar(n)),r===yn&&(S=Mn,d-=h.clientHeight-a.height,d*=s?1:-1),r===Sn&&(b=Un,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Lne);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[S]=g?"0":"",m[b]=p?"0":"",m.transform=(T.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[S]=g?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function Pne(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,s={placement:er(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),ON(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),ON(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})}const Mne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pne,data:{}};var gu={passive:!0};function Une(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,s=o===void 0?!0:o,l=jn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,gu)}),s&&l.addEventListener("resize",n.update,gu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,gu)}),s&&l.removeEventListener("resize",n.update,gu)}}const zne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Une,data:{}};var Fne={left:"right",right:"left",bottom:"top",top:"bottom"};function Ou(e){return e.replace(/left|right|bottom|top/g,function(t){return Fne[t]})}var jne={start:"end",end:"start"};function $N(e){return e.replace(/start|end/g,function(t){return jne[t]})}function ys(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Lw(e){var t=jn(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Dw(e){return ys(Ar(e)).left+Lw(e).scrollLeft}function Bne(e){var t=jn(e),n=Ar(e),a=t.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,s=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:r,height:i,x:o+Dw(e),y:s}}function qne(e){var t=Ar(e),n=Lw(e),a=e.ownerDocument.body,r=Math.max(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Math.max(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+Dw(e),s=-n.scrollTop;return vr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Pw(e){var t=vr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Iz(e){return["html","body","#document"].indexOf(Fn(e))>=0?e.ownerDocument.body:nr(e)&&Pw(e)?e:Iz(sp(e))}function Ho(e,t){t===void 0&&(t=[]);var n=Iz(e),a=Fn(n)==="body",r=jn(n),i=a?[r].concat(r.visualViewport||[],Pw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Ho(sp(i)))}function ty(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gne(e){var t=ys(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function LN(e,t){return t===Sz?ty(Bne(e)):nr(t)?Gne(t):ty(qne(Ar(e)))}function Hne(e){var t=Ho(sp(e)),n=["absolute","fixed"].indexOf(vr(e).position)>=0,a=n&&nr(e)?Dl(e):e;return vs(a)?t.filter(function(r){return vs(r)&&_z(r,a)&&Fn(r)!=="body"}):[]}function Wne(e,t,n){var a=t==="clippingParents"?Hne(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=LN(e,l);return s.top=Math.max(u.top,s.top),s.right=Math.min(u.right,s.right),s.bottom=Math.min(u.bottom,s.bottom),s.left=Math.max(u.left,s.left),s},LN(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Ss(e){return e.split("-")[1]}function xz(e){var t=e.reference,n=e.element,a=e.placement,r=a?er(a):null,i=a?Ss(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case yn:l={x:o,y:t.y-n.height};break;case Mn:l={x:o,y:t.y+t.height};break;case Un:l={x:t.x+t.width,y:s};break;case Sn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?$w(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Di:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case Cw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function Pi(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,i=n.boundary,o=i===void 0?fne:i,s=n.rootBoundary,l=s===void 0?Sz:s,u=n.elementContext,c=u===void 0?ko:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,S=kz(typeof b!="number"?b:Tz(b,Ll)),T=c===ko?mne:ko,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?T:c],y=Wne(vs(m)?m:m.contextElement||Ar(e.elements.popper),o,l),_=ys(h),w=xz({reference:_,element:f,placement:r}),I=ty(Object.assign(Object.assign({},f),w)),C=c===ko?I:_,O={top:y.top-C.top+S.top,bottom:C.bottom-y.bottom+S.bottom,left:y.left-C.left+S.left,right:C.right-y.right+S.right},U=e.modifiersData.offset;if(c===ko&&U){var W=U[r];Object.keys(O).forEach(function(ee){var te=[Un,Mn].indexOf(ee)>=0?1:-1,ye=[yn,Mn].indexOf(ee)>=0?"y":"x";O[ee]+=W[ye]*te})}return O}function Vne(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Ez:l,c=Ss(a),d=c?s?NN:NN.filter(function(b){return Ss(b)===c}):Ll,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,S){return b[S]=Pi(e,{placement:S,boundary:r,rootBoundary:i,padding:o})[er(S)],b},{});return Object.keys(g).sort(function(b,S){return g[b]-g[S]})}function Zne(e){if(er(e)===Nw)return[];var t=Ou(e);return[$N(e),t,$N(t)]}function Yne(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,S=n.allowedAutoPlacements,T=t.options.placement,h=er(T),f=h===T,m=l||(f||!b?[Ou(T)]:Zne(T)),y=[T].concat(m).reduce(function(he,Ce){return he.concat(er(Ce)===Nw?Vne(t,{placement:Ce,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:S}):Ce)},[]),_=t.rects.reference,w=t.rects.popper,I=new Map,C=!0,O=y[0],U=0;U<y.length;U++){var W=y[U],ee=er(W),te=Ss(W)===Di,ye=[yn,Mn].indexOf(ee)>=0,we=ye?"width":"height",ge=Pi(t,{placement:W,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),ke=ye?te?Un:Sn:te?Mn:yn;_[we]>w[we]&&(ke=Ou(ke));var D=Ou(ke),j=[];if(i&&j.push(ge[ee]<=0),s&&j.push(ge[ke]<=0,ge[D]<=0),j.every(function(he){return he})){O=W,C=!1;break}I.set(W,j)}if(C)for(var B=b?3:1,V=function(Ce){var Le=y.find(function(et){var sn=I.get(et);if(sn)return sn.slice(0,Ce).every(function(Ca){return Ca})});if(Le)return O=Le,"break"},Y=B;Y>0;Y--){var He=V(Y);if(He==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const Kne={name:"flip",enabled:!0,phase:"main",fn:Yne,requiresIfExists:["offset"],data:{_skip:!1}};function DN(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function PN(e){return[yn,Un,Mn,Sn].some(function(t){return e[t]>=0})}function Xne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=Pi(t,{elementContext:"reference"}),s=Pi(t,{altBoundary:!0}),l=DN(o,a),u=DN(s,r,i),c=PN(l),d=PN(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const Jne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xne};function Qne(e,t,n){var a=er(e),r=[Sn,yn].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign(Object.assign({},t),{},{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[Sn,Un].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function ere(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=Ez.reduce(function(c,d){return c[d]=Qne(d,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=o}const tre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ere};function nre(e){var t=e.state,n=e.name;t.modifiersData[n]=xz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const rre={name:"popperOffsets",enabled:!0,phase:"read",fn:nre,data:{}};function are(e){return e==="x"?"y":"x"}function ire(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,b=n.tetherOffset,S=b===void 0?0:b,T=Pi(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=er(t.placement),f=Ss(t.placement),m=!f,y=$w(h),_=are(y),w=t.modifiersData.popperOffsets,I=t.rects.reference,C=t.rects.popper,O=typeof S=="function"?S(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):S,U={x:0,y:0};if(w){if(i){var W=y==="y"?yn:Sn,ee=y==="y"?Mn:Un,te=y==="y"?"height":"width",ye=w[y],we=w[y]+T[W],ge=w[y]-T[ee],ke=g?-C[te]/2:0,D=f===Di?I[te]:C[te],j=f===Di?-C[te]:-I[te],B=t.elements.arrow,V=g&&B?Ow(B):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wz(),He=Y[W],he=Y[ee],Ce=Cu(0,I[te],V[te]),Le=m?I[te]/2-ke-Ce-He-O:D-Ce-He-O,et=m?-I[te]/2+ke+Ce+he+O:j+Ce+he+O,sn=t.elements.arrow&&Dl(t.elements.arrow),Ca=sn?y==="y"?sn.clientTop||0:sn.clientLeft||0:0,Oa=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,$a=w[y]+Le-Oa-Ca,up=w[y]+et-Oa,La=Cu(g?Math.min(we,$a):we,ye,g?Math.max(ge,up):ge);w[y]=La,U[y]=La-ye}if(s){var lF=y==="x"?yn:Sn,uF=y==="x"?Mn:Un,Ul=w[_],cF=Ul+T[lF],dF=Ul-T[uF],zw=Cu(cF,Ul,dF);w[_]=zw,U[_]=zw-Ul}t.modifiersData[a]=U}}const ore={name:"preventOverflow",enabled:!0,phase:"main",fn:ire,requiresIfExists:["offset"]};function sre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lre(e){return e===jn(e)||!nr(e)?Lw(e):sre(e)}function ure(e,t,n){n===void 0&&(n=!1);var a=Ar(t),r=ys(e),i=nr(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((Fn(t)!=="body"||Pw(a))&&(o=lre(t)),nr(t)?(s=ys(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Dw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function cre(e){var t=new Map,n=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&r(l)}}),a.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),a}function dre(e){var t=cre(e);return kne.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function pre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fre(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign(Object.assign(Object.assign({},r),a),{},{options:Object.assign(Object.assign({},r.options),a.options),data:Object.assign(Object.assign({},r.data),a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var MN={placement:"bottom",modifiers:[],strategy:"absolute"};function UN(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function mre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?MN:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},MN),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){S(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:vs(s)?Ho(s):s.contextElement?Ho(s.contextElement):[],popper:Ho(l)};var f=dre(fre([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(UN(f,m)){c.rects={reference:ure(f,Dl(m),c.options.strategy==="fixed"),popper:Ow(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(U){return c.modifiersData[U.name]=Object.assign({},U.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var _=c.orderedModifiers[y],w=_.fn,I=_.options,C=I===void 0?{}:I,O=_.name;typeof w=="function"&&(c=w({state:c,options:C,name:O,instance:g})||c)}}}},update:pre(function(){return new Promise(function(T){g.forceUpdate(),T(c)})}),destroy:function(){S(),p=!0}};if(!UN(s,l))return g;g.setOptions(u).then(function(T){!p&&u.onFirstUpdate&&u.onFirstUpdate(T)});function b(){c.orderedModifiers.forEach(function(T){var h=T.name,f=T.options,m=f===void 0?{}:f,y=T.effect;if(typeof y=="function"){var _=y({state:c,name:h,instance:g,options:m}),w=function(){};d.push(_||w)}})}function S(){d.forEach(function(T){return T()}),d=[]}return g}}var gre=[zne,rre,Mne,Rne,tre,Kne,ore,$ne,Jne],hre=mre({defaultModifiers:gre});const bre=["top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","auto","auto-start","auto-end"],vre=e=>{const[t,n]=e.split("-");let a;switch(t){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left";break;default:a="auto"}return n&&(a=bre.find(r=>r.includes(`${a}-${n}`))??a),a},Rz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=Pi({...t,placement:e[0]}),o=/left|right/.test(e[0].split("-")[0])?"horizontal":"vertical",s=(i.top>0||i.bottom>0||i.left>0||i.right>0)&&(o==="horizontal"?r.height/2-i.top<a.height||r.height/2-i.bottom<a.height:r.width-i.left<a.width||r.width-i.right<a.width),l=e[0].split("-")[0];return!s&&i[l]<=0?e[0]:Rz(e.slice(1),t,n)},zN="fallbackModifier",FN={name:zN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,vre(n),...a||[]],i=Rz(r,e,n);e.placement!==i&&(e.modifiersData[zN]._skip=!0,e.placement=i,e.reset=!0)}},Mw=["top","right","bottom","left"],Pl=H.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?v.jsx(Ere,{ref:a,portal:e,...n}):null),yre=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Sre={},Ere=H.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Sre,placement:a="bottom",fallbackPlacements:r=Mw,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=H.useRef(!0),{localRef:d,elementRef:p}=Rr(l),[g,b]=H.useState(a),S=Zte(u,e),T=H.useRef(a);T.current=g;const h=H.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){b(m.placement),i==null||i(m.placement)}}),[b,i]);H.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:yre(e??null);if(!m){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(S.current){const y=hre(m,S.current,{placement:a,...n,modifiers:[h,{...FN,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(y),()=>{y==null||y.destroy()}}},[e,t,S]),H.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{...FN,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=v.jsx(v.Fragment,{children:_re(o)?o({placement:g}):o});return s?Ky.createPortal(f,S.current):f});function _re(e){return typeof e=="function"}const ct=zn({defaultConfig:{...On.defaultConfig,...oa.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...On.requiredConfig,...oa.requiredConfig},contextOverride:oa.Context})(e=>{const t=On(On.mergeConfig(e,{selection:e.mode==="single"?qU:Cee})),n=oa(oa.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));fz(n),mz(n);const a={mode:e.mode,...t.state,...n.state},r={...t.events,...n.events};return{...t,...n,state:a,events:r,UNSTABLE_parentModel:e.UNSTABLE_parentModel}}),wre=Ze({vars:{minWidth:Oe(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,color:$.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:k.padding.xxs,borderRadius:k.shape.xxl,maxWidth:dn.subtract("100vw",k.size.sm),boxShadow:xU[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),kre=ue()(()=>({})),Az=Ye("div")({displayName:"Menu.Card",modelHook:ct,elemPropsHook:kre})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=H.useMemo(()=>Rw(r.state.placement||"bottom"),[r.state.placement]);return v.jsx(jte,{as:a,...kt(n,wre({minWidth:typeof e=="number"?Oe(e):e,maxHeight:typeof t=="number"?Oe(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Tre=Ze({base:{display:"block",height:Oe(1),border:"none",borderBlockStart:`${Oe(1)} solid ${k.color.border.default}`,margin:`${k.gap.sm} ${k.gap.md}`}}),Nz=Ge("hr")({displayName:"Menu.Divider",Component({...e},t,n){return v.jsx(n,{ref:t,...Wt(e,Tre())})}});var Ire=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},xre=function(e,t){return e+Es(t)},Es=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(xre,""):Ire(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?Es(e.props.children):""};Es.default=Es;var Rre=Es;const Are=Ec(Rre),jN={vertical:"bottom",horizontal:"center"},ny=ja("positionX","positionY"),Nre=pQ({"0%":{opacity:0,transform:`translate(${ny.positionX}, ${ny.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),Cre=Ze({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:k.padding.sm,color:$.fg.inverse,animationName:Nre,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:$.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:k.shape.md,outline:`${Oe(1)} solid transparent`,outlineOffset:`-${Oe(1)}`,zIndex:-1,margin:k.gap.xs,backgroundColor:k.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:xU[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:dn.negate(Zn.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:dn.negate(Zn.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:dn.negate(Zn.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:dn.negate(Zn.size50)}}),modifiers:{elementHasFocus:{true:{padding:dn.subtract(k.padding.md,dn.divide(k.padding.xxs,2)),"&:before":{margin:Zn.size75}}}}}),Cz=Ge("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=jN,elementHasFocus:n=!1,...a},r,i)=>{const o=DQ(t||jN,k.gap.sm);return v.jsx(i,{ref:r,...kt(a,[Cre({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),ny({positionX:o.x,positionY:o.y})]),children:e})}}),BN=(e,t=0)=>{const n=H.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return H.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Ore=e=>{const t=e.tagName.toLowerCase(),n=e.getAttribute("tabindex");switch(t){case"button":case"input":case"select":case"textarea":case"details":return!0;default:return n?Number(n)>=0:!1}};function Oz({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=H.useRef(!1),i=oa(),[o,s]=H.useState(null),l=rp(),u=BN(i.events.hide,a),c=BN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},b=f=>{r.current||g(f),r.current=!1},S=f=>{r.current=!0,Ore(f.currentTarget)&&i.events.hide()};mz(i),fz(i),Hte(i),Wte(i);const T=i.state.visibility!=="hidden",h={"aria-describedby":e==="describe"&&T?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:S,onFocus:b,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:T,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&T?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}function $re(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=vw(t[r],e[r]):a[r]=t[r],a),{})}const Lre=Ge("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=Mw,...s}){const l=Are(n),{targetProps:u,popperProps:c,tooltipProps:d}=Oz({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,g]=H.useState(!1),{localRef:b}=Rr();return H.useEffect(()=>{const S=b.current;if(!S)return;const T=()=>{g(S.matches(":focus-visible")||S.classList.contains("focus"))};return T(),S.addEventListener("focus",T),S.addEventListener("blur",T),()=>{S.removeEventListener("focus",T),S.removeEventListener("blur",T)}},[b]),v.jsxs(H.Fragment,{children:[H.cloneElement(a,{...u,...$re(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),v.jsx(Pl,{placement:t,fallbackPlacements:o,...c,children:({placement:S})=>{const T=Rw(S);return v.jsx(Cz,{transformOrigin:T,...Wt(s),...d,elementHasFocus:p,children:n})}})]})}}),$z=e=>{const t=getComputedStyle(e);if(t.overflow==="auto"||t.overflow==="scroll"||t.overflow==="clip"||t.overflow==="hidden")return e;if(e.children){for(let n=0;n<e.children.length;n++){const a=$z(e.children[n]);if(a)return a}return null}return null},Lz=e=>{const t=getComputedStyle(e);if(t.textOverflow==="ellipsis"||Number(t.webkitLineClamp)>0)return e;for(let n=0;n<e.children.length;n++){const a=Lz(e.children[n]);if(a)return a}return null},qN=e=>{const t=Lz(e)||$z(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Dre(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=vw(t[r],e[r]):a[r]=t[r],a),{})}const lp=({placement:e="top",fallbackPlacements:t=Mw,children:n,...a})=>{const[r,i]=H.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Oz({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),qN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),qN(p)&&o.onFocus(d)};return v.jsxs(H.Fragment,{children:[H.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Dre({...o,onMouseEnter:u,onFocus:c},n.props)}),v.jsx(Pl,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=Rw(d);return v.jsx(Cz,{transformOrigin:p,...l,...a,children:r})}})]})},Dz=zn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:rp(e.id)},events:{}})),Pre=Ze({base:{fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.bold,display:"flex",alignItems:"center",width:"100%",gap:k.gap.md,padding:`${k.padding.xs} ${k.padding.md}`}}),Mre=ue()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Ure=ue()(e=>({id:e.state.id})),GN=Ye("div")({modelHook:Dz,elemPropsHook:Ure})(({children:e,...t},n)=>v.jsx(lp,{children:v.jsx(n,{...kt(t,Pre()),children:e})})),Pz=ao("div")({displayName:"Menu.Group",modelHook:Dz,elemPropsHook:Mre,subComponents:{Heading:GN}})(({children:e,title:t,...n},a)=>v.jsxs(a,{...kt(n),children:[t?v.jsx(GN,{children:t}):null,e]})),Ml=Ze({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:k.gap.md,padding:`${k.padding.sm} ${k.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:$.fg.default,borderWidth:0,borderRadius:k.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:k.size.md,overflowWrap:"anywhere",[de.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:fn.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:k.color.brand.fg.primary.strong,backgroundColor:k.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:fn.full},"&:where(.focus, :focus-visible)":{[de.vars.color]:"currentColor",outline:"none",backgroundColor:k.color.brand.accent.primary,color:$.fg.inverse}},"&:is(.hover, :hover)":{color:$.fg.strong,backgroundColor:k.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:$.fg.inverse,backgroundColor:k.color.brand.accent.primary,outline:`${Oe(2)} solid transparent`,outlineOffset:`-${Oe(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:fn.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:k.color.brand.accent.primary,opacity:fn.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),zre=e=>v.jsx($l,{...Ml.parts.icon,...e}),Mz=Ge("span")({Component:({...e},t,n)=>v.jsx(n,{ref:t,...Ml.parts.text,...Wt(e)})}),Uz=Ge("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>v.jsx(r,{ref:a,"aria-disabled":t,...kt(n,Ml({})),children:typeof e=="string"?v.jsx(Mz,{children:e}):e})}),zz=ue()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),Fz=ue()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Rr(t),i=n["data-id"];return H.useLayoutEffect(()=>{e.state.mode==="single"&&wa(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:wa(e.state,n["data-id"])?"focus":void 0}});function jz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),jz(e.UNSTABLE_parentModel))}const Fre=sr(ue()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),jz(e))}:void 0})),Fz,zz,ww,_w,oo),Mi=Ye("button")({displayName:"Menu.Item",modelHook:ct,elemPropsHook:Fre,subComponents:{Icon:zre,Text:Mz}})(({children:e,...t},n)=>v.jsx(lp,{placement:"left",children:v.jsx(Uz,{as:n,...t,children:e})})),jre=sr(ue()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),Xte,Vte),Bre=Ze({base:{background:k.color.surface.popover,borderRadius:k.shape.xxl,padding:0,gap:k.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Bz=Ye("div")({displayName:"Menu.List",modelHook:ct,elemPropsHook:jre})(({children:e,...t},n,a)=>v.jsx(Lte,{as:n,model:a,marginY:k.gap.none,...Wt(t,Bre({orientation:a.state.orientation})),children:e})),qz=Ge("span")({Component:({...e},t,n)=>v.jsxs(v.Fragment,{children:[v.jsx(Mi.Text,{ref:t,as:n,...e}),v.jsx($l,{...Ml.parts.selected,icon:ene})]})}),qre=Ge("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Ml()),children:typeof e=="string"?v.jsx(qz,{children:e}):e})}),Gre=sr(ue()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Ew(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.goTo({id:a}),e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),jee,oo),Gz=Ye("li")({displayName:"Menu.Item",modelHook:ct,elemPropsHook:Gre,subComponents:{Icon:Mi.Icon,Text:qz}})(({children:e,...t},n)=>v.jsx(lp,{placement:"left",children:v.jsx(qre,{as:n,...t,children:e})})),Hz=hz,Wz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Hre=Ye("div")({modelHook:ct,elemPropsHook:Hz})(({children:e,...t})=>v.jsx(Pl,{placement:"bottom-start",popperOptions:Wz,...t,children:e})),Vz=ue()(e=>({id:e.state.id,"aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":e.events.show(t)}}})),Zz=sr(Vz,Yte),Wre=sr(Vz,Kte),Vre=Ye(Aw)({displayName:"Menu.Target",modelHook:ct,elemPropsHook:Zz})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),Zre=Ye(Aw)({displayName:"Menu.Target",modelHook:ct,elemPropsHook:Wre})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),Yre=Ye("div")({modelHook:ct,elemPropsHook:Hz})(({children:e,...t})=>v.jsx(Pl,{placement:"right-start",popperOptions:Wz,...t,children:e})),Kre=(e,t=0)=>{const n=P.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return P.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Xre=sr(du(e=>e.UNSTABLE_parentModel,Fz),du(e=>e.UNSTABLE_parentModel,zz),du(e=>e.UNSTABLE_parentModel,_w),ue()((e,t)=>({ref:io(t,e.state.targetRef)})),du(e=>e.UNSTABLE_parentModel,oo),ue()(e=>{const t=P.useRef(),n=Kre(()=>{e.UNSTABLE_parentModel.events.goTo({id:t.current||""}),e.events.show(event)},300);return{id:e.state.id,role:"menuitem","aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onMouseDown(a){e.UNSTABLE_parentModel.events.goTo({id:a.currentTarget.getAttribute("data-id")})},onMouseEnter(a){t.current=a.currentTarget.getAttribute("data-id"),n.start()},onMouseLeave(){n.clear()},onClick(a){e.state.targetRef.current instanceof Element||(e.state.targetRef.current=a.currentTarget),e.state.visibility!=="hidden"?e.events.hide(a):e.events.show(a)},"data-has-children":!0,onKeyDown(a){if(e.state.orientation==="vertical")switch(a.key){case"ArrowRight":case"Enter":case" ":e.events.show(a);break}}}})),Jre=Ye("button")({modelHook:ct,elemPropsHook:Xre})(({children:e,...t},n)=>v.jsxs(Uz,{as:n,...t,children:[typeof e=="string"?v.jsx(Mi.Text,{children:e}):e,v.jsx(Mi.Icon,{icon:nne})]})),Qre=Ye()({modelHook:ct,subComponents:{Card:Az,List:Bz,Item:Mi,TargetItem:Jre,Group:Pz,Option:Gz,Divider:Nz,Popper:Yre}})(({children:e,model:t,...n},a,r)=>{const i=ct(ct.mergeConfig(n,{getId:r.getId,getTextValue:r.getTextValue,UNSTABLE_parentModel:r,mode:r.state.mode,orientation:r.state.orientation,onSelect(s){r.events.select(s)},onSelectAll(){r.events.selectAll()}})),o=ct.Context;return v.jsx(o.Provider,{value:i,children:e})}),HN=ao()({displayName:"Menu",modelHook:ct,subComponents:{Target:Vre,Card:Az,List:Bz,Item:Mi,Group:Pz,Option:Gz,Divider:Nz,TargetContext:Zre,Popper:Hre,Submenu:Qre}})(({children:e})=>v.jsx(v.Fragment,{children:e})),lr=zn({defaultConfig:{...wo.defaultConfig,id:"",initialTab:"",orientation:"horizontal",menuConfig:{}},requiredConfig:wo.requiredConfig,contextOverride:wo.Context})(e=>{var c;const t=P.useRef(e.initialTab),n=e.getId||qo,a=Sw(),r=wo(wo.mergeConfig(e,{shouldCalculateOverflow:a!=="touch",orientation:e.orientation||"horizontal",onRegisterItem(d){t.current||(t.current=d.id,l.select({id:t.current}))},initialSelectedIds:e.initialTab?[e.initialTab]:(c=e.items)!=null&&c.length?[n(e.items[0])]:[],shouldVirtualize:!1})),i=On(),o={...r.state,getId:n,orientation:e.orientation||"horizontal",panels:i.state.items,panelIndexRef:i.state.indexRef},s=P.useMemo(()=>e.items?e.items.filter(d=>o.hiddenIds.includes(n(d))):void 0,[o.hiddenIds,e.items]),l={...r.events,registerPanel:i.events.registerItem,unregisterPanel:i.events.unregisterItem},u=ct(ct.mergeConfig(e.menuConfig,{id:`menu-${r.state.id}`,items:s,nonInteractiveIds:o.nonInteractiveIds.filter(d=>!o.hiddenIds.includes(d)),onSelect(d){u.events.hide(),l.select(d)},onShow(){u.events.goToFirst()}}));return{...r,state:o,events:l,menu:u}}),eae=Ze({base:{fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.medium,border:"none",backgroundColor:k.color.surface.transparent,flex:"0 0 auto",minWidth:0,alignItems:"center",padding:`0 ${k.padding.md}`,height:k.size.lg,cursor:"pointer",color:$.fg.muted.default,position:"relative",borderRadius:`${k.shape.md} ${k.shape.md} ${k.shape.none} ${k.shape.none}`,transition:"background 150ms ease, color 150ms ease",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",[de.vars.color]:"currentColor",[de.vars.size]:Kn.systemIcon.size.md,"&:has(span)":{display:"flex",gap:k.gap.sm},"&:hover, &.hover, &:focus-visible, &.focus":{backgroundColor:k.color.surface.overlay.hover.default,color:$.fg.muted.strong,[de.vars.color]:$.fg.muted.strong},"&:focus-visible, &.focus":{outline:`${Oe(2)} solid transparent`,...wQ({inset:"outer",width:0,separation:2}),[K.vars.boxShadowInner]:k.color.focus.inverse,[K.vars.boxShadowOuter]:k.color.brand.focus.primary,color:$.fg.strong,[de.vars.color]:$.fg.strong},"&:disabled, &.disabled, &[aria-disabled]":{opacity:fn.disabled,"&:hover":{cursor:"auto",backgroundColor:k.color.surface.transparent,[de.vars.color]:$.fg.muted.default}},"&[aria-selected=true]":{color:k.color.brand.fg.primary.default,cursor:"default",[de.vars.color]:k.color.brand.fg.primary.default,"&:after":{position:"absolute",borderBlockEnd:`${Zn.size50} solid transparent`,borderRadius:`${k.shape.md} ${k.shape.md} ${k.shape.none} ${k.shape.none}`,backgroundColor:k.color.brand.fg.primary.default,bottom:0,content:"''",left:0,marginBlockStart:`${dn.negate(dn.divide(k.padding.xs,k.padding.xxs))}`,width:"100%"},"&:hover, &.hover, &:focus-visible, &.focus":{backgroundColor:k.color.surface.transparent,color:k.color.brand.fg.primary.default}}}}),Yz=Ge("button")({displayName:"StyledTabItem",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,eae()),children:e})}),tae=sr(ue()(({state:e},t,n={})=>{const a=n["data-id"]||"";return{type:"button",role:"tab","aria-selected":!!n["data-id"]&&Ew(a,e),"aria-controls":Li(`tabpanel-${e.id}-${a}`)}}),ww,Lee,_w,oo),nae=Ye("button")({displayName:"Tabs.Item",modelHook:lr,elemPropsHook:tae,subComponents:{Icon:$l,Text:uee}})(({children:e,...t},n)=>{const a=Sw();return v.jsx(lp,{children:v.jsx(Yz,{as:n,maxWidth:a==="touch"?void 0:280,...t,children:e})})});function rae(e,t){return t==="vertical"?e.scrollHeight>e.clientHeight?e.scrollTop/(e.scrollHeight-e.clientHeight):-1:e.scrollWidth>e.clientWidth?e.scrollLeft/(e.scrollWidth-e.clientWidth):-1}function WN(e,t){const n=rae(e,t);return n<=-1?void 0:n>.99?"end":n>.01?"middle":"start"}function VN(e,t){t?e.setAttribute("data-scroll-position",t):e.removeAttribute("data-scroll-position")}const aae=ue()((e,t,n={})=>{const a=n["aria-orientation"]||"vertical",{localRef:r,elementRef:i}=Rr(t);return H.useLayoutEffect(()=>{r.current&&VN(r.current,WN(r.current,a))},[r,a]),{ref:i,onScroll:o=>{const s=o.currentTarget;VN(s,WN(s,a))}}}),iae=sr(aae,ue()(e=>({role:"tablist","aria-orientation":e.state.orientation})),Oee,zee),oae=Ze({base:{display:"flex",position:"relative",borderBlockEnd:`${Oe(1)} solid ${k.color.border.default}`,gap:k.gap.xs,paddingInline:Zn.size500,"@media screen and (max-width: 768px)":{paddingInline:k.padding.md}},modifiers:{modality:{touch:{overflowX:"auto",paddingInline:0,'&[data-scroll-position="start"]':{maskImage:"linear-gradient(to right, white 80%, transparent)"},'&[data-scroll-position="middle"]':{maskImage:"linear-gradient(to left, white 80%, transparent), linear-gradient(to right, white 80%, transparent)",maskComposite:"intersect"},'&[data-scroll-position="end"]':{maskImage:"linear-gradient(to left, white 80%, transparent)"}},mouse:{},pen:{}},isDragging:{true:{},false:{}},direction:{left:{},right:{}}}}),sae=Ye("div")({displayName:"Tabs.List",modelHook:lr,elemPropsHook:iae})(({children:e,overflowButton:t,...n},a,r)=>{const i=Sw();return v.jsxs(a,{...kt(n,oae({modality:i})),children:[op(r,e),t]})}),lae=hz,uae=Ye("div")({displayName:"Tabs.MenuPopper",modelHook:ct,elemPropsHook:lae})(({children:e,...t})=>v.jsx(Pl,{...t,children:e})),cae=Ze({base:{'&:has([data-part="tabs-overflow-button-icon"])':{display:"flex",gap:0}}}),dae=sr(ue()(()=>({"aria-haspopup":!0})),Pee,GQ()(e=>e.menu,Zz)),pae=Ye("button")({displayName:"Tabs.OverflowButton",modelHook:lr,elemPropsHook:dae})(({children:e,...t},n)=>v.jsxs(Yz,{type:"button",as:n,...kt(t,cae()),children:[v.jsx("span",{children:e}),v.jsx($l,{"data-part":"tabs-overflow-button-icon",icon:tne})]})),fae=ue()(({state:e,events:t},n,a={})=>{const{item:r}=P.useContext(Go),[i,o]=P.useState(a["data-id"]||(r==null?void 0:r.id)||"");return ro(()=>{if(r)return;const s=e.panelIndexRef.current,l=i||String(s);return t.registerPanel({id:l,textValue:""}),o(l),()=>{t.unregisterPanel({id:l})}}),{role:"tabpanel","aria-labelledby":Li(`${e.id}-${i}`),hidden:!!i&&i!==e.selectedIds[0],id:Li(`tabpanel-${e.id}-${i}`),tabIndex:0}}),mae=Ye("div")({displayName:"Tabs.Panel",modelHook:lr,elemPropsHook:fae})(({children:e,...t},n)=>v.jsx(Tw,{as:n,...t,children:e})),gae=Ye()({displayName:"Tabs.Panels",modelHook:lr})(({children:e},t,n)=>v.jsx(v.Fragment,{children:op(n,e)})),M=ao()({displayName:"Tabs",modelHook:lr,subComponents:{List:sae,Item:nae,Panel:mae,Panels:gae,OverflowButton:pae,MenuPopper:uae,Menu:HN}})(({children:e},t,n)=>v.jsx(HN,{model:n.menu,children:e})),Kz=()=>v.jsxs(M,{children:[v.jsxs(M.List,{children:[v.jsx(M.Item,{children:"First Tab"}),v.jsx(M.Item,{children:"Second Tab"}),v.jsx(M.Item,{children:"Third Tab"})]}),v.jsxs("div",{style:{marginBlockStart:G(Pn.lg)},children:[v.jsxs(M.Panel,{tabIndex:void 0,children:[v.jsx("button",{children:"Focusable button"}),v.jsx("br",{}),"Contents of First Tab. The tab panel is no longer focusable, but the button is. It may be desirable to disable focus on the tab panel and allow focus to flow into the tab panel to the first focusable element."]}),v.jsx(M.Panel,{children:"Contents of Second Tab"}),v.jsx(M.Panel,{children:"Contents of Third Tab"})]})]});Kz.__RAW__=`import {Tabs} from '@workday/canvas-kit-react/tabs';
293
+ color: hsl(${Math.max(0,Math.min(120-120*T,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,r),r}return i.updateDeps=o=>{a=o},i}function yN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cee=(e,t)=>Math.abs(e-t)<=1,dee=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},SN=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},pee=e=>e,fee=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},mee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(SN(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(SN(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},EN={passive:!0},_N=typeof window>"u"?!0:"onscrollend"in window,gee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&_N?()=>{}:dee(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:d,isRtl:p}=e.options;r=d?n.scrollLeft*(p&&-1||1):n.scrollTop,i(),t(r,c)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,EN);const u=e.options.useScrollendEvent&&_N;return u&&n.addEventListener("scrollend",l,EN),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},hee=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},bee=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class vee{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pee,rangeExtractor:fee,onChange:()=>{},measureElement:hee,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Ua(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Ua(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Ua(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=i(c),p=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),g=p?p.end+this.options.gap:a+r,b=s.get(d),S=typeof b=="number"?b:this.options.estimateSize(c),T=g+S,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:g,size:S,end:T,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ua(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?yee({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ua(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ua(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return yN(a[BU(0,a.length-1,r=>yN(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const u=this.getOffsetForIndex(n,s);if(!u)return;const[c]=u,d=this.getScrollOffset();cee(c,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const BU=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function yee({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=BU(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(c=>c<n+t);){const c=e[s];l[c.lane]=c.end,s++}const u=Array(a).fill(n+t);for(;o>=0&&u.some(c=>c>=n);){const c=e[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const wN=typeof document<"u"?H.useLayoutEffect:H.useEffect;function See(e){const t=H.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Ky.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=H.useState(()=>new vee(n));return a.setOptions(n),wN(()=>a._didMount(),[]),wN(()=>a._willUpdate()),a}function Eee(e){return See({observeElementRect:mee,observeElementOffset:gee,scrollToFn:bee,...e})}const qo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Gb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",_ee={items:[]},pu=zn({defaultConfig:{..._ee,id:"",getId:qo,getTextValue:Gb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=rp(e.id),n=P.useRef(qo),a=P.useRef(Gb);n.current=e.getId||qo,a.current=e.getTextValue||e.getId||Gb;const[r]=P.useState(e.orientation||"vertical"),[i,o]=P.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=P.useRef(0),u=P.useRef(null),c=P.useMemo(()=>(e.items||[]).map((f,m)=>({id:n.current(f),index:m,value:f,textValue:a.current(f)})),[e.items]),[d,p]=P.useState([]),g=Eee({count:c.length,getScrollElement:()=>u.current,estimateSize:P.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:g,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(m=>m.concat({...f,value:f,index:m.length}))},unregisterItem(f){p(m=>m.find(y=>y.id===f.id)?m.filter(y=>y.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),wee=e=>e,ap=()=>0,ip=(e,{state:t})=>t.items.length-1,kee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return ap()},Tee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount-t.columnCount+1;let a=e-n;return a>=t.items.length&&(a=t.items.length-1),a}return ip(e,{state:t})},Iee=(e,{state:t})=>t.columnCount?e%t.columnCount:ap(),xee=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:ip(e,{state:t}),Ree=(e,{state:t})=>t.items.find(n=>n.id===e),Aee=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",wa=(e,t)=>{const{cursorId:n}=e;return n==null||n===""?!1:typeof n=="string"?n===t:n.includes(t)},Oo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return ap();if(e===-1)return ip(t,{state:n})}const r=n.items;let i=t+e;const s=Math.ceil(r.length/n.columnCount)*n.columnCount;return i<0?e===-1?i=r.length-1:(s+i>=r.length&&(i-=n.columnCount),i=s+i):i>=r.length&&(e===1?i=0:(i-s<0&&(i+=n.columnCount),i=i-s)),r.length>1&&n.nonInteractiveIds.includes(r[i].id)&&a>0?Oo(e)(i,{state:n},a-1):i},Nee=wee({getFirst:ap,getLast:ip,getItem:Ree,getNext:Oo(1),getNextRow:(e,{state:t})=>Oo(t.columnCount)(e,{state:t}),getPrevious:Oo(-1),getPreviousRow:(e,{state:t})=>Oo(-t.columnCount)(e,{state:t}),getPreviousPage:Iee,getNextPage:xee,getFirstOfRow:kee,getLastOfRow:Tee}),fu=zn({defaultConfig:{...pu.defaultConfig,initialCursorId:"",columnCount:0,navigation:Nee,pageSize:0},requiredConfig:pu.requiredConfig,contextOverride:pu.Context})(e=>{var d;const[t,n]=P.useState(e.initialCursorId),a=P.useRef(e.pageSize),r=e.columnCount||0,i=pu(e),o=e.navigation,s=P.useRef(-1),l=p=>{var b;const g=((b=u.items[p])==null?void 0:b.id)||"";n(g)};t&&((d=i.state.items[s.current])==null?void 0:d.id)!==t?s.current=i.state.items.findIndex(p=>p.id===t):t||(s.current=-1);const u={...i.state,cursorId:t,columnCount:r,pageSizeRef:a,cursorIndexRef:s},c={...i.events,goTo(p){const g=u.items.findIndex(b=>b.id===p.id);l(g)},goToNext(){const p=o.getNext(s.current,{state:u});l(p)},goToPrevious(){const p=o.getPrevious(s.current,{state:u});l(p)},goToPreviousRow(){const p=o.getPreviousRow(s.current,{state:u});l(p)},goToNextRow(){const p=o.getNextRow(s.current,{state:u});l(p)},goToFirst(){const p=o.getFirst(s.current,{state:u});l(p)},goToLast(){const p=o.getLast(s.current,{state:u});l(p)},goToFirstOfRow(){const p=o.getFirstOfRow(s.current,{state:u});l(p)},goToLastOfRow(){const p=o.getLastOfRow(s.current,{state:u});l(p)},goToNextPage(){const p=o.getNextPage(s.current,{state:u});l(p)},goToPreviousPage(){const p=o.getPreviousPage(s.current,{state:u});l(p)}};return{...i,state:u,events:c,navigation:o}}),Ew=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),qU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Cee={select(e,{selectedIds:t,unselectedIds:n}){return t==="all"?{selectedIds:"all",unselectedIds:n.includes(e)?n.filter(r=>r!==e):n.concat(e)}:{selectedIds:t.includes(e)?t.filter(r=>r!==e):t.concat(e),unselectedIds:[]}}},ca=zn({defaultConfig:{...fu.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:qU},requiredConfig:fu.requiredConfig,contextOverride:fu.Context})(e=>{const t=fu(e),[n,a]=P.useState(e.initialSelectedIds),[r,i]=P.useState(e.initialUnselectedIds),o=e.selection,s={...t.state,selectedIds:n,unselectedIds:r},l={...t.events,select(u){const{selectedIds:c,unselectedIds:d}=o.select(u.id,s);a(c),i(d)},selectAll(){a("all")},unselectAll(){a([])},setSelectedIds(u){a(u)},remove(u){}};return{...t,state:s,events:l,selection:o}}),On=zn({defaultConfig:{UNSTABLE_parentModel:void 0,...ca.defaultConfig},requiredConfig:ca.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...ca(e)})),Go=P.createContext({});function op(e,t){return typeof t=="function"?e.state.isVirtualized?e.state.UNSTABLE_virtual.getVirtualItems().map(a=>{const r=e.state.items[a.index],i=t(r.value,a.index);return v.jsx(Go.Provider,{value:{item:r,virtual:a},children:i},r.id||r.index)}):e.state.items.map(a=>{const r=t(a.value,a.index);return v.jsx(Go.Provider,{value:{item:a},children:r},a.id||a.index)}):v.jsx(Go.Provider,{value:{},children:t})}const oo=ue()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=P.useContext(Go),[s,l]=P.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Rr(io(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return ro(()=>{var S;if((o==null?void 0:o.index)===0&&((S=u.current)!=null&&S.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(T=>T.id===g))return;const b={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(g),()=>{r.unregisterItem({id:g})}}),{ref:c,"data-id":s,disabled:n.disabled||a.nonInteractiveIds.includes(s)?!0:void 0,"aria-setsize":o?a.UNSTABLE_virtual.options.count:void 0,"aria-posinset":o?i.index+1:void 0,"data-index":o?i.index:void 0,style:d,id:Li(`${a.id}-${s}`)}});function _o(e,t,n,a,r,i){let o,s=0;const l=[];let u=!1;if(r!=="all"&&r.length&&i.length&&(o=i.find(c=>c.id===r[0])?r[0]:i[0].id),Object.keys(a).reduce((c,d,p)=>c+a[d]+(p>0?t:0),0)<=e)return[];if(o){if(a[o]+n>e)return Object.keys(a);s+=a[o]+n,u=!0}else s+=n;for(const c in a)c!==o&&(s+=a[c]+(u?t:0),u=!0,s>e&&l.push(c));return l}const wo=zn({defaultConfig:{...ca.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:ca.requiredConfig,contextOverride:ca.Context})(e=>{const t=e.shouldCalculateOverflow===void 0?!0:e.shouldCalculateOverflow,[n,a]=P.useState(e.initialHiddenIds),[r,i]=P.useState({}),[o,s]=P.useState(0),[l,u]=P.useState(0),c=P.useRef(0),d=P.useRef(r),[p,g]=P.useState(0),b=P.useRef(0),S=t?n:[],T=(e.nonInteractiveIds||[]).concat(S),h=ca({...e,nonInteractiveIds:T}),f={...h.state,hiddenIds:S,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},m={...h.events,select(y){const{selectedIds:_}=h.selection.select(y.id,f),w=_o(c.current,l,b.current,d.current,_,e.items);h.events.select(y),a(w)},setContainerSize(y){c.current=h.state.orientation==="horizontal"?y.width||0:y.height||0,s(c.current);const _=_o(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},setContainerWidth(y){m.setContainerSize({width:y.width,height:0})},setContainerGap(y){u(y.size);const _=_o(c.current,y.size,b.current,d.current,f.selectedIds,e.items);a(_)},setOverflowTargetSize(y){b.current=h.state.orientation==="horizontal"?y.width||0:y.height||0,g(b.current)},setOverflowTargetWidth(y){b.current=y.width,m.setOverflowTargetSize({width:b.current,height:0})},addItemWidth(y){m.addItemSize({id:y.id,width:y.width,height:0})},addItemSize(y){d.current={...d.current,[y.id]:h.state.orientation==="horizontal"?y.width:y.height},i(d.current);const _=_o(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},removeItemSize(y){const _={...d.current};delete _[y.id],d.current=_,i(d.current);const w=_o(c.current,l,b.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(I=>y.id!==I):f.selectedIds,e.items);a(w)},removeItemWidth(y){m.removeItemSize({id:y.id})},addHiddenKey(y){a(_=>_.concat(y.id))},removeHiddenKey(y){a(_=>_.filter(w=>w!==y.id))}};return{...h,state:f,events:m}}),Oee=ue()((e,t)=>{const{elementRef:n,localRef:a}=Rr(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return nee({ref:a,onResize:e.events.setContainerSize}),ro(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),$ee={position:"absolute",left:-99999},Lee=ue()((e,t,n={})=>{const{elementRef:a,localRef:r}=Rr(t),i=n["data-id"]||"";ro(()=>{if(r.current){const s=getComputedStyle(r.current);e.events.addItemSize({id:i,width:r.current.offsetWidth+parseFloat(s.marginLeft)+parseFloat(s.marginRight),height:r.current.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom)})}return()=>{e.events.removeItemSize({id:i})}});const o=e.state.hiddenIds.includes(i);return{ref:a,"aria-hidden":o||void 0,style:o?$ee:{},inert:P.use?o:o?"":void 0}}),Dee={position:"absolute",left:-99999},Pee=ue()((e,t)=>{const{elementRef:n,localRef:a}=Rr(t),r=P.useRef(!0);ro(()=>{if(r.current=!1,a.current){const o=getComputedStyle(a.current);e.events.setOverflowTargetSize({width:a.current.offsetWidth+parseFloat(o.marginLeft)+parseFloat(o.marginRight),height:a.current.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom)})}});const i=!e.state.hiddenIds.length;return{ref:n,"aria-hidden":i,tabIndex:i?-1:0,style:i?Dee:void 0}}),yc={horizontal:{ArrowLeft:"goToPrevious",Left:"goToPrevious",ArrowRight:"goToNext",Right:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"},vertical:{ArrowUp:"goToPrevious",Up:"goToPrevious",ArrowDown:"goToNext",Down:"goToNext",Home:"goToFirst",End:"goToLast",PageDown:"goToNextPage",PageUp:"goToPreviousPage"}},Mee={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},kN={...yc.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},Hb={Home:"goToFirst",End:"goToLast"},TN=(e,t)=>e.hasOwnProperty(t);function Uee(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in Hb)if(TN(Hb,l)&&e.key===l)return(i=(r=t.events)[Hb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?kN:yc[t.state.orientation],a=OU(e.currentTarget);for(const l in n)if(TN(n,l)&&(a?e.key===Mee[l]:e.key===l)){const u=t.state.columnCount>0?kN[l]:yc[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const zee=ue()(({state:e,events:t})=>{const n=P.useRef(!1),a=P.useRef(0);return ro(()=>()=>{cancelAnimationFrame(a.current)}),{onKeyDown(r){Object.keys(yc[e.orientation]).indexOf(r.key)!==-1&&(n.current=!0)},onFocus(){n.current=!1},onBlur(){n.current||(a.current=requestAnimationFrame(()=>{wa(e,e.selectedIds[0])||t.goTo({id:e.selectedIds[0]})}))}}}),GU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>GU(e,t-1)),n==null||n("Retry timeout")},Fee=(e,t,n)=>new Promise((a,r)=>{var s;const i=(((s=n==null?void 0:n.dataset)==null?void 0:s.focusId)||"").split("-")[0]||e.state.id,o=e.navigation.getItem(t,e);if(o){e.state.isVirtualized&&e.state.UNSTABLE_virtual.scrollToIndex(o.index);const l=u=>document.querySelector(`[data-focus-id="${CU(`${u}-${o.id}`)}"]`);GU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),_w=ue()((e,t,n={})=>{const a=P.useRef(e.state);a.current=e.state;const r=P.useRef(null);return P.useEffect(()=>{r.current&&Fee(e,Aee(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),P.useEffect(()=>{!e.state.cursorId&&e.state.items.length&&e.events.goTo({id:e.state.items[0].id})},[e.state.cursorId,e.state.items,e.events]),{onKeyDown(i){Uee(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":Li(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&wa(e.state,n["data-id"])?0:-1:0}}),ww=ue()(({state:e,events:t},n,a={})=>{const r=a["data-id"]||"";return{onClick:o=>{!e.nonInteractiveIds.includes(r)&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&t.select({id:r})}}}),jee=ue()((e,t,n={})=>{const a=n["data-id"]||"";return{className:wa(e.state,a)?"focus":""}}),Bee=e=>kQ[e]||tr(e),qee=e=>TQ[e],Gee=e=>IQ[e]||tr(e),Hee=e=>xQ[e]||tr(e),Wee=e=>bw.properties.fontFamilies[e]||tr(e),Vee=e=>bw.properties.fontSizes[e]||tr(e),Zee=e=>bw.properties.fontWeights[e]||tr(e);function ht(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:Bee(r)};if(n.system==="depth"){const s=qee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:Wee(r)}:n.system==="fontSize"?{...i,[o]:Vee(r)}:n.system==="fontWeight"?{...i,[o]:Zee(r)}:n.system==="shape"?{...i,[o]:Gee(r)}:n.system==="space"?{...i,[o]:Hee(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function on(e){return t=>{let n={};for(const a in t)if(a in t&&a in e){const r=e[a],i=t[a],o=r(i);n={...n,...o};continue}return n}}const HU=[{name:"background",properties:["background"],system:"color"},{name:"backgroundAttachment",properties:["backgroundAttachment"],system:"none"},{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"backgroundImage",properties:["backgroundImage"],system:"none"},{name:"backgroundPosition",properties:["backgroundPosition"],system:"none"},{name:"backgroundRepeat",properties:["backgroundRepeat"],system:"none"},{name:"backgroundSize",properties:["backgroundSize"],system:"none"}],Yee=ht(HU),Kee=on(Yee),WU=[{name:"borderColor",properties:["borderColor"],system:"color"},{name:"borderTopColor",properties:["borderTopColor"],system:"color"},{name:"borderRightColor",properties:["borderRightColor"],system:"color"},{name:"borderBottomColor",properties:["borderBottomColor"],system:"color"},{name:"borderLeftColor",properties:["borderLeftColor"],system:"color"},{name:"borderInlineStartColor",properties:["borderInlineStartColor"],system:"color"},{name:"borderInlineEndColor",properties:["borderInlineEndColor"],system:"color"}],Xee=ht(WU),VU=[{name:"borderCollapse",properties:["borderCollapse"],system:"none"},{name:"borderSpacing",properties:["borderSpacing"],system:"none"},{name:"borderStyle",properties:["borderStyle"],system:"none"},{name:"borderTopStyle",properties:["borderTopStyle"],system:"none"},{name:"borderRightStyle",properties:["borderRightStyle"],system:"none"},{name:"borderBottomStyle",properties:["borderBottomStyle"],system:"none"},{name:"borderLeftStyle",properties:["borderLeftStyle"],system:"none"},{name:"borderInlineStartStyle",properties:["borderInlineStartStyle"],system:"none"},{name:"borderInlineEndStyle",properties:["borderInlineEndStyle"],system:"none"}],Jee=ht(VU),ZU=[{name:"borderRadius",properties:["borderRadius"],system:"shape"},{name:"borderTopLeftRadius",properties:["borderTopLeftRadius"],system:"shape"},{name:"borderTopRightRadius",properties:["borderTopRightRadius"],system:"shape"},{name:"borderBottomLeftRadius",properties:["borderBottomLeftRadius"],system:"shape"},{name:"borderBottomRightRadius",properties:["borderBottomRightRadius"],system:"shape"}],Qee=ht(ZU),YU=[{name:"border",properties:["border"],system:"none"},{name:"borderTop",properties:["borderTop"],system:"none"},{name:"borderRight",properties:["borderRight"],system:"none"},{name:"borderBottom",properties:["borderBottom"],system:"none"},{name:"borderLeft",properties:["borderLeft"],system:"none"},{name:"borderInlineStart",properties:["borderInlineStart"],system:"none"},{name:"borderInlineEnd",properties:["borderInlineEnd"],system:"none"}],ete=ht(YU),KU=[{name:"borderWidth",properties:["borderWidth"],system:"none"},{name:"borderTopWidth",properties:["borderTopWidth"],system:"none"},{name:"borderRightWidth",properties:["borderRightWidth"],system:"none"},{name:"borderBottomWidth",properties:["borderBottomWidth"],system:"none"},{name:"borderLeftWidth",properties:["borderLeftWidth"],system:"none"},{name:"borderInlineStartWidth",properties:["borderInlineStartWidth"],system:"none"},{name:"borderInlineEndWidth",properties:["borderInlineEndWidth"],system:"none"}],tte=ht(KU),nte=on({...Xee,...Jee,...Qee,...ete,...tte}),rte=[...WU,...VU,...ZU,...YU,...KU],XU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],ate=ht(XU),ite=on(ate),JU=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],ote=ht(JU),ste=on(ote),QU=[{name:"flex",properties:["flex"],system:"none"},{name:"flexGrow",properties:["flexGrow"],system:"none"},{name:"flexShrink",properties:["flexShrink"],system:"none"},{name:"flexBasis",properties:["flexBasis"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"order",properties:["order"],system:"none"}],lte=ht(QU),ute=on(lte),ez=[{name:"gridColumnStart",properties:["gridColumnStart"],system:"none"},{name:"gridColumnEnd",properties:["gridColumnEnd"],system:"none"},{name:"gridRowStart",properties:["gridRowStart"],system:"none"},{name:"gridRowEnd",properties:["gridRowEnd"],system:"none"},{name:"gridColumn",properties:["gridColumn"],system:"none"},{name:"gridRow",properties:["gridRow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"justifySelf",properties:["justifySelf"],system:"none"},{name:"alignSelf",properties:["alignSelf"],system:"none"},{name:"placeSelf",properties:["placeSelf"],system:"none"}],cte=ht(ez),dte=on(cte),tz=[{name:"display",properties:["display"],system:"none"},{name:"height",properties:["height"],system:"space"},{name:"listStyle",properties:["listStyle"],system:"none"},{name:"maxHeight",properties:["maxHeight"],system:"space"},{name:"maxWidth",properties:["maxWidth"],system:"space"},{name:"minHeight",properties:["minHeight"],system:"space"},{name:"minWidth",properties:["minWidth"],system:"space"},{name:"overflow",properties:["overflow"],system:"none"},{name:"overflowX",properties:["overflowX"],system:"none"},{name:"overflowY",properties:["overflowY"],system:"none"},{name:"verticalAlign",properties:["verticalAlign"],system:"none"},{name:"width",properties:["width"],system:"space"}],pte=ht(tz),fte=on(pte),nz=[{name:"animation",properties:["animation"],system:"none"},{name:"appearance",properties:["appearance"],system:"none"},{name:"boxSizing",properties:["boxSizing"],system:"none"},{name:"content",properties:["content"],system:"none"},{name:"cursor",properties:["cursor"],system:"none"},{name:"fill",properties:["fill"],system:"none"},{name:"float",properties:["float"],system:"none"},{name:"objectFit",properties:["objectFit"],system:"none"},{name:"objectPosition",properties:["objectPosition"],system:"none"},{name:"outline",properties:["outline"],system:"none"},{name:"outlineOffset",properties:["outlineOffset"],system:"none"},{name:"overflowWrap",properties:["overflowWrap"],system:"none"},{name:"pointerEvents",properties:["pointerEvents"],system:"none"},{name:"resize",properties:["resize"],system:"none"},{name:"stroke",properties:["stroke"],system:"none"},{name:"transform",properties:["transform"],system:"none"},{name:"transition",properties:["transition"],system:"none"},{name:"userSelect",properties:["userSelect"],system:"none"},{name:"visibility",properties:["visibility"],system:"none"}],mte=ht(nz),gte=on(mte),rz=[{name:"position",properties:["position"],system:"none"},{name:"zIndex",properties:["zIndex"],system:"none"},{name:"top",properties:["top"],system:"none"},{name:"right",properties:["right"],system:"none"},{name:"bottom",properties:["bottom"],system:"none"},{name:"left",properties:["left"],system:"none"},{name:"inset",properties:["inset"],system:"none"},{name:"insetInlineStart",properties:["insetInlineStart"],system:"none"},{name:"insetInlineEnd",properties:["insetInlineEnd"],system:"none"}],hte=ht(rz),bte=on(hte),az=[{name:"marginInlineStart",properties:["marginInlineStart"],system:"space"},{name:"marginInlineEnd",properties:["marginInlineEnd"],system:"space"},{name:"paddingInlineStart",properties:["paddingInlineStart"],system:"space"},{name:"paddingInlineEnd",properties:["paddingInlineEnd"],system:"space"},{name:"margin",properties:["margin"],system:"space"},{name:"marginX",properties:["marginInline"],system:"space"},{name:"marginY",properties:["marginBlock"],system:"space"},{name:"marginTop",properties:["marginTop"],system:"space"},{name:"marginRight",properties:["marginRight"],system:"space"},{name:"marginBottom",properties:["marginBottom"],system:"space"},{name:"marginLeft",properties:["marginLeft"],system:"space"},{name:"padding",properties:["padding"],system:"space"},{name:"paddingX",properties:["paddingInline"],system:"space"},{name:"paddingY",properties:["paddingBlock"],system:"space"},{name:"paddingTop",properties:["paddingTop"],system:"space"},{name:"paddingRight",properties:["paddingRight"],system:"space"},{name:"paddingBottom",properties:["paddingBottom"],system:"space"},{name:"paddingLeft",properties:["paddingLeft"],system:"space"}],vte=ht(az),yte=on(vte),iz=[{name:"fontFamily",properties:["fontFamily"],system:"font"},{name:"fontSize",properties:["fontSize"],system:"fontSize"},{name:"fontStyle",properties:["fontStyle"],system:"none"},{name:"fontWeight",properties:["fontWeight"],system:"fontWeight"},{name:"lineHeight",properties:["lineHeight"],system:"none"},{name:"letterSpacing",properties:["letterSpacing"],system:"none"},{name:"textAlign",properties:["textAlign"],system:"none"},{name:"textDecoration",properties:["textDecoration"],system:"none"},{name:"textOverflow",properties:["textOverflow"],system:"none"},{name:"textTransform",properties:["textTransform"],system:"none"},{name:"textShadow",properties:["textShadow"],system:"none"},{name:"whiteSpace",properties:["whiteSpace"],system:"none"},{name:"wordBreak",properties:["wordBreak"],system:"none"}],Ste=ht(iz),Ete=on(Ste),_te=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],wte=e=>MM(e)&&!_te.includes(e),kw=e=>[{boxSizing:"border-box"},Kee,nte,ite,ste,ute,dte,fte,gte,bte,yte,Ete].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),kte=mc("div",{shouldForwardProp:wte})(kw),Tte=mc("div")(kw),Tw=Ge("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=$U(()=>typeof a=="string"?kte:Tte);return v.jsx(r,{as:a,ref:n,...Wt(t),children:e})}}),oz=[{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"flexDirection",properties:["flexDirection"],system:"none"},{name:"flexWrap",properties:["flexWrap"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gap",properties:["gap"],system:"space"},{name:"columnGap",properties:["columnGap"],system:"space"},{name:"rowGap",properties:["rowGap"],system:"space"}],Ite=ht(oz),xte=on(Ite),sz=[{name:"gridGap",properties:["gridGap"],system:"space"},{name:"gridRowGap",properties:["gridRowGap"],system:"space"},{name:"gridColumnGap",properties:["gridColumnGap"],system:"space"},{name:"alignContent",properties:["alignContent"],system:"none"},{name:"alignItems",properties:["alignItems"],system:"none"},{name:"display",properties:["display"],system:"none"},{name:"justifyContent",properties:["justifyContent"],system:"none"},{name:"justifyItems",properties:["justifyItems"],system:"none"},{name:"gridTemplateAreas",properties:["gridTemplateAreas"],system:"none"},{name:"gridTemplate",properties:["gridTemplate"],system:"none"},{name:"gridTemplateColumns",properties:["gridTemplateColumns"],system:"none"},{name:"gridTemplateRows",properties:["gridTemplateRows"],system:"none"},{name:"gridPlaceItems",properties:["gridPlaceItems"],system:"none"},{name:"gridAutoColumns",properties:["gridAutoColumns"],system:"none"},{name:"gridAutoRows",properties:["gridAutoRows"],system:"none"},{name:"gridAutoFlow",properties:["gridAutoFlow"],system:"none"},{name:"gridArea",properties:["gridArea"],system:"none"},{name:"grid",properties:["grid"],system:"none"}],Rte=ht(sz),Ate=on(Rte),Nte=[...HU,...rte,...XU,...JU,...oz,...QU,...sz,...ez,...tz,...nz,...rz,...az,...iz].reduce((e,t)=>(e[t.name]=!0,e),{});function Cte(e){return Nte[e]||!1}function kt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Cte(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...kw(n),...xte(n),...Ate(n)}),Wt(r,[t,i])}const Ote=Ye("li")({displayName:"Item",modelHook:On,elemPropsHook:oo})((e,t)=>v.jsx(t,{...kt(e)})),$te=ue()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),IN=Ze({parts:{listBoxContainer:"list-box-container"},base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlock:0}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),Lte=ao("ul")({displayName:"ListBox",modelHook:On,elemPropsHook:$te,subComponents:{Item:Ote}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>v.jsx("div",{ref:l.state.containerRef,...IN.parts.listBoxContainer,...Wt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},IN({orientation:l.state.orientation})),children:v.jsx(s,{...kt(o),"data-part":"list",children:op(l,o.children)})})),Iw=Ze({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.title.lg,lineHeight:k.lineHeight.title.lg,color:$.fg.strong},"title.medium":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.title.md,lineHeight:k.lineHeight.title.md,color:$.fg.strong},"title.small":{fontFamily:Ke.default,fontWeight:We.bold,lineHeight:k.lineHeight.title.sm,fontSize:k.fontSize.title.sm,color:$.fg.strong},"heading.large":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.lg,lineHeight:k.lineHeight.heading.lg,color:$.fg.strong},"heading.medium":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.md,lineHeight:k.lineHeight.heading.md,color:$.fg.strong},"heading.small":{fontFamily:Ke.default,fontWeight:We.bold,fontSize:k.fontSize.heading.sm,lineHeight:k.lineHeight.heading.sm,color:$.fg.strong},"body.large":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.lg,lineHeight:k.lineHeight.body.lg,color:$.fg.default},"body.medium":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.md,lineHeight:k.lineHeight.body.md,color:$.fg.default},"body.small":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.body.sm,lineHeight:k.lineHeight.body.sm,letterSpacing:k.letterSpacing.body.sm,color:$.fg.default},"subtext.large":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,color:$.fg.default},"subtext.medium":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,color:$.fg.default},"subtext.small":{fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.sm,lineHeight:k.lineHeight.subtext.sm,letterSpacing:k.letterSpacing.subtext.sm,color:$.fg.default}},variant:{error:{color:k.color.brand.fg.critical.default},hint:{color:$.fg.muted.default},inverse:{color:$.fg.inverse}}}}),Dte=Ge("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>v.jsx(i,{ref:r,...kt(a,Iw({typeLevel:t,variant:n})),children:e})}),Pte=Ze({extends:Iw,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Mte=Ge("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Pte()),children:e})}),Ute=Ze({extends:Iw,base:{color:$.fg.strong,fontWeight:We.bold,marginBlock:k.padding.none},defaultModifiers:{typeLevel:"body.large"}}),zte=Ge("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Ute()),children:e})}),Fte=Ze({base:{display:"flex",flexDirection:"column",gap:k.gap.lg,padding:k.padding.xl,backgroundColor:k.color.surface.default,borderRadius:k.shape.xxl,border:`${Oe(1)} solid ${k.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:k.color.surface.alt.default,borderColor:$.border.transparent}}}}),jte=Ge("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>v.jsx(r,{ref:a,...kt(n,Fte({variant:t})),children:e}),subComponents:{Heading:zte,Body:Mte}});function Bte(e){return e.length?e[e.length-1]:null}function lz(e,t){const{min:n,max:a}=xw.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function Wb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(lz(a,t))})}function qte(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Gte(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:qte(a.owner,t)})).filter(a=>a.parent===e.element)}function uz(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?uz(e[a],n.join(".")):e[a]}function cz(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),cz(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const dz=e=>{if(typeof window<"u")return uz(window,e)},pz=(e,t)=>{typeof window<"u"&&cz(window,e,t)},xN=(e,t)=>{var a;let n=(a=e.container)==null?void 0:a.call(e);return n===document.body&&(n=t==null?void 0:t.ownerDocument.body),n||document.body},xw=dz("workday.__popupStack")||{description:"Global popup stack from @workday/canvas-kit/popup-stack",container:e=>(e==null?void 0:e.ownerDocument.body)||document.body,items:[],zIndex:{min:30,max:50,getValue:lz},_adapter:{}};pz("workday.__popupStack",xw);const fr=dz("workday.__popupStackOfStacks")||[xw];fr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";pz("workday.__popupStackOfStacks",fr);function ur(){return fr[fr.length-1]}const Et={createContainer(){var n;const e=ur();if((n=e._adapter)!=null&&n.createContainer)return e._adapter.createContainer();const t=document.createElement("div");return t.style.position="relative",t},add(e){var n;const t=ur();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),xN(t,e.owner).appendChild(e.element),Wb(Et.getElements())},remove(e){var n;const t=fr.find(a=>!!Et.getElements(a).find(r=>r===e));if(t){if((n=t._adapter)!=null&&n.remove){t._adapter.remove(e);return}const a=t.items.find(r=>r.element===e);t.items=t.items.filter(r=>r.element!==e),xN(t,a==null?void 0:a.owner).removeChild(e),Wb(Et.getElements(t))}},isTopmost(e){var a;const t=ur();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Bte(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||ur();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=ur();if((a=t._adapter)!=null&&a.bringToTop){t._adapter.bringToTop(e);return}const n=t.items.find(r=>r.element===e);if(n)t.items=[...t.items.filter(r=>r!==n),n],Gte(n,t.items).forEach(r=>{Et.bringToTop(r.element)}),Wb(Et.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=ur();if((i=n._adapter)!=null&&i.contains)return n._adapter.contains(e,t);const a=n.items.find(o=>o.element===e);if(a)return r(a,t);return!1;function r(o,s,l=0){var c;if(l>30)return!1;if(o.element===s||o.owner===s||o.element.contains(s)||(c=o.owner)!=null&&c.contains(s))return!0;const u=n.items.find(d=>d.owner&&o.element.contains(d.owner));return u?r(u,s,l+1):!1}},pushStackContext(e){var a,r;const t=ur();if((a=t._adapter)!=null&&a.pushStackContext)return t._adapter.pushStackContext(e);if(((r=t.container)==null?void 0:r.call(t))===e)return;const n={items:[],zIndex:t.zIndex,container:()=>e,_adapter:{}};fr.push(n)},popStackContext(e){var n,a;const t=ur();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&fr.length>1&&fr.pop()},transferToCurrentContext(e){var a;const t=ur();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;fr.find(r=>!!r.items.find(i=>i.element===e.element))&&Et.remove(e.element),Et.add(e)}};let mu=null;pr.isEnabled&&pr.on("change",()=>{pr.isFullscreen?pr.element&&(mu=pr.element,Et.pushStackContext(mu)):mu&&Et.popStackContext(mu)});const Vb=zn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=rp(e.id),[n,a]=P.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),RN=()=>{},oa=zn({defaultContext:{state:{},events:{show:RN,hide:RN}},defaultConfig:{...Vb.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Vb.requiredConfig})(e=>{const t=H.useRef(null),n=H.useRef(null),[a,r]=H.useState("bottom"),i=Vb(e),o={...i.state,stackRef:t,targetRef:n,initialFocusRef:e.initialFocusRef,returnFocusRef:e.returnFocusRef,placement:a},s={...i.events,updatePlacement(l){r(l.placement)}};return{state:o,events:s}});oa.Context;const fz=ue()(e=>{const t=P.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!Et.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{var a;if(n)return document.addEventListener("mousedown",t),(a=e.state.stackRef.current)==null||a.setAttribute("data-behavior-click-outside-close","always"),()=>{document.removeEventListener("mousedown",t)}},[e.state.stackRef,n,t]),{}}),mz=ue()(e=>{const t=P.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&Et.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),Hte=ue()(e=>{const t=P.useCallback(a=>{pr.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return P.useEffect(()=>{if(n&&pr.isEnabled)return pr.on("change",t),()=>{pr.off("change",t)}},[t,n]),{}});function gz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"||t.overflowX==="scroll"||t.overflowX==="auto"?e:gz(e.parentElement)}const Wte=ue()(e=>{const t=e.state.visibility!=="hidden",n=P.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return P.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=gz(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),Vte=ue()(e=>{const t=P.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=YQ(e.state.stackRef.current),i=KQ(e.state.stackRef.current);a.getModifierState("Shift")&&document.activeElement===r?(a.preventDefault(),e.events.hide(a)):!a.getModifierState("Shift")&&(Array.isArray(i)&&document.activeElement&&i.includes(document.activeElement)||document.activeElement===i)&&e.events.hide(a)}},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return P.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),hz=ue()(({state:e,events:t},n)=>{const a=io(n,e.stackRef),r=P.useRef(e.placement);r.current=e.placement;const i=P.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),Zte=(e,t)=>{const{elementRef:n,localRef:a}=Rr(e),r=P.useContext(bs),{style:i}=jU(r,{}),o=P.useRef(!0),[s]=P.useState(()=>{if(o.current){const l=Et.createContainer();return n(l),o.current=!1,l}return a.current});return P.useLayoutEffect(()=>{const l=a.current;if(!l)return;const u=Object.keys(i);if(u.length!==0)for(const c of u)l.style.setProperty(c,i[c])},[a,i]),P.useLayoutEffect(()=>{if(s!==a.current)throw Error("The 'ref' passed to usePopupStack should not be applied to a React element. This will cause a runtime error where the PopupStack and React compete for the element. Instead use ReactDOM.createPortal(<YourComponent />, ref.current)");const l=t?"current"in t?t.current||void 0:t:void 0,u=a.current;return Et.add({element:u,owner:l}),()=>{Et.remove(u)}},[a,t,s]),P.useLayoutEffect(()=>{var c,d;let u=(t?"current"in t?t.current:t:void 0)??void 0;if(u==null&&typeof document<"u"){const p=document.activeElement,g=a.current;u=(p&&g&&!g.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":OU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},Yte=ue()(({events:e,state:t},n)=>({ref:io(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),Kte=ue()(({events:e,state:t},n)=>({ref:io(n,t.targetRef),onContextMenu:r=>{t.targetRef.current||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r),r.preventDefault()}}));function bz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:bz(e.parentElement)}function vz(e){return e===null||e===document.body||!e.parentElement?null:ZQ(e)?e:vz(e.parentElement)}function AN(e,t){const n=e.getBoundingClientRect();return n.top+n.height/2<t.top||n.bottom-n.height/2>t.bottom||n.left+n.width/2<t.left||n.right-n.width/2>t.right}const Xte=ue()(e=>{const t=e.state.visibility!=="hidden",n=P.useRef(null),a=P.useRef(!1),r=P.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=P.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(Et.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return P.useLayoutEffect(()=>{if(!t)return;const o=(e.state.returnFocusRef||e.state.targetRef).current;return document.addEventListener("mousedown",i,!0),document.addEventListener("keydown",r,!0),()=>{if(document.removeEventListener("mousedown",i,!0),document.removeEventListener("keydown",r,!0),!o)return;const l=bz(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&vz(n.current)||AN(o,l)||AN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!Et.contains(e.state.stackRef.current,document.activeElement)||a.current?dN(o):requestAnimationFrame(()=>{dN(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),Rw=e=>{const[t,n]=e.split("-");return{vertical:t==="top"?"bottom":t==="bottom"||n==="end"?"top":n==="start"?"bottom":"center",horizontal:t==="left"?"right":t==="right"||n==="end"?"left":n==="start"?"right":"center"}},yz=Ze({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:G(n,t),height:G(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),Jte=(e,t)=>e?e in t?t[e]:typeof e=="number"?Oe(e):e:"",Qte=Ge("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>(n==null?void 0:n.type)!==a?(console.error(`Icon type "${n.type}" does not match expected type "${a}"`),null):v.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Wt(r,yz({shouldMirror:e,shouldMirrorInRTL:t}))})}),ea={System:"system"},ene={name:"check-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-check-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.44 7.646a.5.5 0 0 1 .706 0l.707.707a.5.5 0 0 1 0 .707l-.646.645v.001l-6 6a1 1 0 0 1-1.413 0l-1.35-1.35-.005-.003-1.793-1.793a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0l2.44 2.44z" class="wd-icon-fill"/></svg>',filename:"wd-icon-check-small.svg",category:"Notification",tags:["success","complete","check mark","check box"]},tne={name:"chevron-down-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-down-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M16.41 9.112a.5.5 0 0 1 .703.07l.633.775a.5.5 0 0 1-.071.704l-5.113 4.184a1 1 0 0 1-1.266 0l-3.129-2.56-.009-.007-1.975-1.617a.5.5 0 0 1-.07-.704l.632-.773a.5.5 0 0 1 .703-.07l.988.808v-.001l3.493 2.857z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-down-small.svg",category:"Navigation",tags:["navigation","arrow"]},nne={name:"chevron-right-small",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-chevron-right-small" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M9.958 6.112a.5.5 0 0 1 .704.07l1.617 1.976.007.01 2.56 3.128a1 1 0 0 1 0 1.266l-4.184 5.113a.5.5 0 0 1-.704.071l-.775-.633a.5.5 0 0 1-.07-.704l3.666-4.48L9.92 8.437l.001-.001-.808-.988a.5.5 0 0 1 .07-.703z" class="wd-icon-fill"/></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Navigation",tags:["navigation","arrow"]},rne={name:"search",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-search" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M11 2a9 9 0 0 1 7.03 14.616l4.323 4.323a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0l-4.323-4.323A9 9 0 1 1 11 2m0 2a7 7 0 1 0 0 14 7 7 0 0 0 0-14" class="wd-icon-fill"/></svg>',filename:"wd-icon-search.svg",category:"Core",tags:["magnifying","glass","mag","refine","look","hunt","seek","explore"]},ane={name:"select",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-select" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M4.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM8.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM12.5 19a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 15a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 7a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 7a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM4.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM8.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM12.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM16.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zM20.5 3a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5z" class="wd-icon-fill"/><path fill="oklch(0.3523 0 0 / 1)" d="M12.976 13.63a.5.5 0 0 1 .654-.654l7.211 3.036a.5.5 0 0 1-.018.929l-1.796.672 1.826 1.826a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0l-1.826-1.826-.672 1.796a.5.5 0 0 1-.929.018z" class="wd-icon-accent"/></svg>',filename:"wd-icon-select.svg",category:"Core",tags:["cursor"]},ine={name:"share",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-share" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M18 2a4 4 0 1 1-3.098 6.53l-5.967 2.754q.064.349.065.716-.002.366-.065.714l5.967 2.755a4 4 0 1 1-.838 1.815L8.098 14.53a4 4 0 1 1 0-5.063l5.968-2.754A4 4 0 0 1 18 2m0 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4M5 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4m13-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4" class="wd-icon-fill"/></svg>',filename:"wd-icon-share.svg",category:"Core",tags:["social media","link"]},one={name:"star",type:ea.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-star" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="transparent" d="M11.552 3.408a.5.5 0 0 1 .896 0l2.492 5.047 5.568.81a.5.5 0 0 1 .277.852l-4.03 3.928.952 5.547a.5.5 0 0 1-.726.527l-4.98-2.619-4.982 2.62a.5.5 0 0 1-.725-.528l.951-5.547-4.03-3.928a.5.5 0 0 1 .277-.852l5.57-.81z" class="wd-icon-background"/><path fill="oklch(0.3523 0 0 / 1)" d="M10.655 2.965c.534-1.08 2.041-1.112 2.635-.1l.055.1 2.258 4.576 5.048.734c1.23.179 1.723 1.69.832 2.558l-3.653 3.56.863 5.03.015.114c.114 1.168-1.126 2.027-2.191 1.468l-.001-.001L12 18.629l-4.515 2.375h-.001c-1.102.578-2.385-.357-2.175-1.581l.861-5.03-3.653-3.56c-.89-.869-.397-2.379.832-2.558l5.049-.734zm-.697 5.932a1 1 0 0 1-.753.547l-4.567.663 3.305 3.222a1 1 0 0 1 .288.885l-.78 4.548 4.083-2.147.113-.05c.265-.101.564-.084.819.05l4.084 2.148-.78-4.55a1 1 0 0 1 .288-.884l3.303-3.222-4.565-.663a1 1 0 0 1-.753-.547L12 4.76z" class="wd-icon-fill"/></svg>',filename:"wd-icon-star.svg",category:"Core",tags:["favorite","favourite","bookmark","rate","rank"]},de=Ze({extends:yz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:G(e,Kn.systemIcon.size.lg),height:G(e,Kn.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:G(a,Kn.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:G(t,G(a,Kn.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:G(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),$l=Ge("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>v.jsx(Qte,{as:s,src:a,type:ea.System,ref:o,...Wt(i,de({size:Jte(r,Kn.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),sne=di({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),lne=Ge("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>v.jsx(Tw,{as:a,ref:n,...Wt(t,sne),children:e})}),une=Ze({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[de.vars.size]:Kn.systemIcon.size.xs},small:{[de.vars.size]:Kn.systemIcon.size.md},medium:{[de.vars.size]:Kn.systemIcon.size.md},large:{[de.vars.size]:Kn.systemIcon.size.lg}}}}),cne=Ge("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:v.jsx($l,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Wt(r,une({size:t}))})}),oe={default:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:ja("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},K=Ze({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.bold,backgroundColor:G(oe.default.background,G(e,"transparent")),color:G(oe.default.label,G(r,$.fg.strong)),borderWidth:Oe(1),borderStyle:"solid",gap:k.gap.sm,borderColor:G(oe.default.border,G(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${Oe(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:G(oe.default.borderRadius,G(o,k.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[de.vars.color]:G(oe.default.icon,$.fg.strong),transition:"box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear","&:disabled, &:disabled:active, &.disabled":{cursor:"default",boxShadow:"none",opacity:G(oe.default.opacity,G(i,fn.full))},"&:focus-visible, &.focus":{backgroundColor:G(oe.focus.background,G(e,"transparent")),borderColor:G(oe.focus.border,G(t,"transparent")),color:G(oe.focus.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.focus.icon,$.fg.strong),outline:`${Oe(2)} solid transparent`,outlineOffset:Oe(2),boxShadow:`0 0 0 ${Oe(2)} ${G(oe.focus.boxShadowInner,G(n,k.color.border.inverse.default))},0 0 0 ${Oe(4)} ${G(oe.focus.boxShadowOuter,G(a,k.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:G(oe.hover.background,G(e,k.color.surface.contrast.strong)),borderColor:G(oe.hover.border,G(t,"transparent")),color:G(oe.hover.label,G(r,$.fg.stronger)),[de.vars.color]:G(oe.hover.icon,$.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:G(oe.active.background,G(e,"transparent")),borderColor:G(oe.active.border,G(t,"transparent")),color:G(oe.active.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.active.icon,$.fg.strong)},"&:disabled, &.disabled":{backgroundColor:G(oe.disabled.background,G(e,"transparent")),borderColor:G(oe.disabled.border,G(t,"transparent")),color:G(oe.disabled.label,G(r,$.fg.strong)),[de.vars.color]:G(oe.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${Oe(2)} solid transparent`,outlineOffset:`-${Oe(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${Oe(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:k.fontSize.body.sm,lineHeight:k.lineHeight.body.sm,letterSpacing:k.letterSpacing.body.sm,height:k.size.lg,paddingInline:k.padding.xxl,minWidth:Zn.size1400},medium:{fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,minWidth:Zn.size1200,paddingInline:k.padding.xl,height:k.size.md},small:{fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,height:k.size.sm,minWidth:Zn.size1000,paddingInline:k.padding.md,gap:k.gap.xs},extraSmall:{fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,height:k.size.xs,minWidth:"auto",paddingInline:k.padding.sm,gap:k.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:k.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:k.padding.xl,paddingInlineEnd:k.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:k.padding.xxl,paddingInlineEnd:k.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:k.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:k.padding.lg,paddingInlineEnd:k.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:k.padding.xl,paddingInlineEnd:k.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:k.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:k.padding.sm,paddingInlineEnd:k.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:k.padding.md,paddingInlineEnd:k.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:k.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:k.padding.xs,paddingInlineEnd:k.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:k.padding.sm,paddingInlineEnd:k.padding.xs}}]}),ni=Ge("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>v.jsx(u,{ref:l,type:"button",...kt(s,[K({size:t,iconPosition:r,grow:a}),oe.default((o==null?void 0:o.default)||{}),oe.focus((o==null?void 0:o.focus)||{}),oe.hover((o==null?void 0:o.hover)||{}),oe.active((o==null?void 0:o.active)||{}),oe.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:cne,Label:lne}}),dne=Ge("button")({displayName:"Button",Component:({children:e,icon:t,colors:n,iconPosition:a,shouldMirrorIcon:r,shouldMirrorIconInRTL:i,size:o="medium",...s},l,u)=>{const c=a||(t?e?"start":"only":void 0);return v.jsxs(ni,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&v.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&v.jsx(ni.Label,{children:e}),t&&c&&["only","end"].includes(c)&&v.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),pne=Ze({extends:K,base:{[K.vars.background]:k.color.surface.transparent,[K.vars.borderRadius]:k.shape.full,[K.vars.border]:$.border.input.default,[K.vars.label]:$.fg.default,[de.vars.color]:G(oe.default.icon,"currentColor"),"&:focus-visible, &.focus":{[K.vars.background]:k.color.surface.default,[K.vars.label]:$.fg.strong,[K.vars.boxShadowInner]:k.color.focus.inverse,[K.vars.boxShadowOuter]:k.color.brand.focus.primary,[de.vars.color]:G(oe.focus.icon,"currentColor")},"&:hover, &.hover":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.hover}),[K.vars.label]:$.fg.strong,[K.vars.border]:k.color.border.input.hover,[de.vars.color]:G(oe.hover.icon,"currentColor")},"&:active, &.active":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.pressed}),[K.vars.label]:$.fg.strong,[K.vars.border]:k.color.border.input.hover,[de.vars.color]:G(oe.active.icon,"currentColor")},"&:disabled, &.disabled":{[K.vars.opacity]:fn.disabled,[K.vars.background]:k.color.surface.transparent,[K.vars.label]:$.fg.default,[de.vars.color]:G(oe.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[K.vars.background]:k.color.surface.transparent,[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.default.icon,"currentColor"),"&:hover, &.hover":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.hover}),[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[K.vars.background]:k.color.surface.inverse,[K.vars.border]:$.border.transparent,[K.vars.label]:$.fg.contrast.default,[K.vars.boxShadowInner]:$.border.contrast.default,[K.vars.boxShadowOuter]:k.color.focus.inverse,[de.vars.color]:G(oe.focus.icon,"currentColor")},"&:active, &.active":{[K.vars.background]:ti.darken({color:k.color.surface.transparent,mixinColor:k.color.surface.overlay.mixin,mixinValue:k.opacity.surface.pressed}),[K.vars.border]:k.color.border.inverse.default,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.active.icon,"currentColor")},"&:disabled, &.disabled":{[K.vars.opacity]:fn.disabled,[K.vars.background]:k.color.surface.transparent,[K.vars.label]:$.fg.inverse,[de.vars.color]:G(oe.default.icon,"currentColor")}}}}}),Aw=Ge("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>v.jsx(dne,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[pne({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})});var yn="top",Mn="bottom",Un="right",Sn="left",Nw="auto",Ll=[yn,Mn,Un,Sn],Di="start",Cw="end",fne="clippingParents",Sz="viewport",ko="popper",mne="reference",NN=Ll.reduce(function(e,t){return e.concat([t+"-"+Di,t+"-"+Cw])},[]),Ez=[].concat(Ll,[Nw]).reduce(function(e,t){return e.concat([t,t+"-"+Di,t+"-"+Cw])},[]),gne="beforeRead",hne="read",bne="afterRead",vne="beforeMain",yne="main",Sne="afterMain",Ene="beforeWrite",_ne="write",wne="afterWrite",kne=[gne,hne,bne,vne,yne,Sne,Ene,_ne,wne];function Fn(e){return e?(e.nodeName||"").toLowerCase():null}function jn(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function vs(e){var t=jn(e).Element;return e instanceof t||e instanceof Element}function nr(e){var t=jn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Tne(e){var t=jn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ine(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!nr(i)||!Fn(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var s=r[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function xne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],i=t.attributes[a]||{},o=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=o.reduce(function(l,u){return l[u]="",l},{});!nr(r)||!Fn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Rne={name:"applyStyles",enabled:!0,phase:"write",fn:Ine,effect:xne,requires:["computeStyles"]};function er(e){return e.split("-")[0]}function Ow(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function _z(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Tne(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function vr(e){return jn(e).getComputedStyle(e)}function Ane(e){return["table","td","th"].indexOf(Fn(e))>=0}function Ar(e){return((vs(e)?e.ownerDocument:e.document)||window.document).documentElement}function sp(e){return Fn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Ar(e)}function CN(e){if(!nr(e)||vr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Ar(t);if(Fn(t)==="body"&&vr(t).position==="static"&&vr(n).position!=="static")return n}return t}function Nne(e){for(var t=sp(e);nr(t)&&["html","body"].indexOf(Fn(t))<0;){var n=vr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Dl(e){for(var t=jn(e),n=CN(e);n&&Ane(n)&&vr(n).position==="static";)n=CN(n);return n&&Fn(n)==="body"&&vr(n).position==="static"?t:n||Nne(e)||t}function $w(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cu(e,t,n){return Math.max(e,Math.min(t,n))}function wz(){return{top:0,right:0,bottom:0,left:0}}function kz(e){return Object.assign(Object.assign({},wz()),e)}function Tz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function Cne(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=er(n.placement),s=$w(o),l=[Sn,Un].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=Ow(r),p=s==="y"?yn:Sn,g=s==="y"?Mn:Un,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],S=i[s]-n.rects.reference[s],T=Dl(r),h=T?s==="y"?T.clientHeight||0:T.clientWidth||0:0,f=b/2-S/2,m=c[p],y=h-d[u]-c[g],_=h/2-d[u]/2+f,w=Cu(m,_,y),I=s;n.modifiersData[a]=(t={},t[I]=w,t.centerOffset=w-_,t)}}function One(e){var t=e.state,n=e.options,a=e.name,r=n.element,i=r===void 0?"[data-popper-arrow]":r,o=n.padding,s=o===void 0?0:o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||_z(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:kz(typeof s!="number"?s:Tz(s,Ll))}))}const $ne={name:"arrow",enabled:!0,phase:"main",fn:Cne,effect:One,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Lne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dne(e){var t=e.x,n=e.y,a=window,r=a.devicePixelRatio||1;return{x:Math.round(t*r)/r||0,y:Math.round(n*r)/r||0}}function ON(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,u=Dne(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=Sn,S=yn,T=window;if(l){var h=Dl(n);h===jn(n)&&(h=Ar(n)),r===yn&&(S=Mn,d-=h.clientHeight-a.height,d*=s?1:-1),r===Sn&&(b=Un,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Lne);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[S]=g?"0":"",m[b]=p?"0":"",m.transform=(T.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[S]=g?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function Pne(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,s={placement:er(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),ON(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),ON(Object.assign(Object.assign({},s),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})}const Mne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pne,data:{}};var gu={passive:!0};function Une(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,s=o===void 0?!0:o,l=jn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,gu)}),s&&l.addEventListener("resize",n.update,gu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,gu)}),s&&l.removeEventListener("resize",n.update,gu)}}const zne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Une,data:{}};var Fne={left:"right",right:"left",bottom:"top",top:"bottom"};function Ou(e){return e.replace(/left|right|bottom|top/g,function(t){return Fne[t]})}var jne={start:"end",end:"start"};function $N(e){return e.replace(/start|end/g,function(t){return jne[t]})}function ys(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Lw(e){var t=jn(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Dw(e){return ys(Ar(e)).left+Lw(e).scrollLeft}function Bne(e){var t=jn(e),n=Ar(e),a=t.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,s=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:r,height:i,x:o+Dw(e),y:s}}function qne(e){var t=Ar(e),n=Lw(e),a=e.ownerDocument.body,r=Math.max(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Math.max(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),o=-n.scrollLeft+Dw(e),s=-n.scrollTop;return vr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Pw(e){var t=vr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Iz(e){return["html","body","#document"].indexOf(Fn(e))>=0?e.ownerDocument.body:nr(e)&&Pw(e)?e:Iz(sp(e))}function Ho(e,t){t===void 0&&(t=[]);var n=Iz(e),a=Fn(n)==="body",r=jn(n),i=a?[r].concat(r.visualViewport||[],Pw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Ho(sp(i)))}function ty(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gne(e){var t=ys(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function LN(e,t){return t===Sz?ty(Bne(e)):nr(t)?Gne(t):ty(qne(Ar(e)))}function Hne(e){var t=Ho(sp(e)),n=["absolute","fixed"].indexOf(vr(e).position)>=0,a=n&&nr(e)?Dl(e):e;return vs(a)?t.filter(function(r){return vs(r)&&_z(r,a)&&Fn(r)!=="body"}):[]}function Wne(e,t,n){var a=t==="clippingParents"?Hne(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=LN(e,l);return s.top=Math.max(u.top,s.top),s.right=Math.min(u.right,s.right),s.bottom=Math.min(u.bottom,s.bottom),s.left=Math.max(u.left,s.left),s},LN(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Ss(e){return e.split("-")[1]}function xz(e){var t=e.reference,n=e.element,a=e.placement,r=a?er(a):null,i=a?Ss(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case yn:l={x:o,y:t.y-n.height};break;case Mn:l={x:o,y:t.y+t.height};break;case Un:l={x:t.x+t.width,y:s};break;case Sn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?$w(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Di:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case Cw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function Pi(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,i=n.boundary,o=i===void 0?fne:i,s=n.rootBoundary,l=s===void 0?Sz:s,u=n.elementContext,c=u===void 0?ko:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,b=g===void 0?0:g,S=kz(typeof b!="number"?b:Tz(b,Ll)),T=c===ko?mne:ko,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?T:c],y=Wne(vs(m)?m:m.contextElement||Ar(e.elements.popper),o,l),_=ys(h),w=xz({reference:_,element:f,placement:r}),I=ty(Object.assign(Object.assign({},f),w)),C=c===ko?I:_,O={top:y.top-C.top+S.top,bottom:C.bottom-y.bottom+S.bottom,left:y.left-C.left+S.left,right:C.right-y.right+S.right},U=e.modifiersData.offset;if(c===ko&&U){var W=U[r];Object.keys(O).forEach(function(ee){var te=[Un,Mn].indexOf(ee)>=0?1:-1,ye=[yn,Mn].indexOf(ee)>=0?"y":"x";O[ee]+=W[ye]*te})}return O}function Vne(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Ez:l,c=Ss(a),d=c?s?NN:NN.filter(function(b){return Ss(b)===c}):Ll,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,S){return b[S]=Pi(e,{placement:S,boundary:r,rootBoundary:i,padding:o})[er(S)],b},{});return Object.keys(g).sort(function(b,S){return g[b]-g[S]})}function Zne(e){if(er(e)===Nw)return[];var t=Ou(e);return[$N(e),t,$N(t)]}function Yne(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,S=n.allowedAutoPlacements,T=t.options.placement,h=er(T),f=h===T,m=l||(f||!b?[Ou(T)]:Zne(T)),y=[T].concat(m).reduce(function(he,Ce){return he.concat(er(Ce)===Nw?Vne(t,{placement:Ce,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:S}):Ce)},[]),_=t.rects.reference,w=t.rects.popper,I=new Map,C=!0,O=y[0],U=0;U<y.length;U++){var W=y[U],ee=er(W),te=Ss(W)===Di,ye=[yn,Mn].indexOf(ee)>=0,we=ye?"width":"height",ge=Pi(t,{placement:W,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),ke=ye?te?Un:Sn:te?Mn:yn;_[we]>w[we]&&(ke=Ou(ke));var D=Ou(ke),j=[];if(i&&j.push(ge[ee]<=0),s&&j.push(ge[ke]<=0,ge[D]<=0),j.every(function(he){return he})){O=W,C=!1;break}I.set(W,j)}if(C)for(var B=b?3:1,V=function(Ce){var Le=y.find(function(et){var sn=I.get(et);if(sn)return sn.slice(0,Ce).every(function(Ca){return Ca})});if(Le)return O=Le,"break"},Y=B;Y>0;Y--){var He=V(Y);if(He==="break")break}t.placement!==O&&(t.modifiersData[a]._skip=!0,t.placement=O,t.reset=!0)}}const Kne={name:"flip",enabled:!0,phase:"main",fn:Yne,requiresIfExists:["offset"],data:{_skip:!1}};function DN(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function PN(e){return[yn,Un,Mn,Sn].some(function(t){return e[t]>=0})}function Xne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=Pi(t,{elementContext:"reference"}),s=Pi(t,{altBoundary:!0}),l=DN(o,a),u=DN(s,r,i),c=PN(l),d=PN(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const Jne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xne};function Qne(e,t,n){var a=er(e),r=[Sn,yn].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign(Object.assign({},t),{},{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[Sn,Un].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function ere(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=Ez.reduce(function(c,d){return c[d]=Qne(d,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=o}const tre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ere};function nre(e){var t=e.state,n=e.name;t.modifiersData[n]=xz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const rre={name:"popperOffsets",enabled:!0,phase:"read",fn:nre,data:{}};function are(e){return e==="x"?"y":"x"}function ire(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,b=n.tetherOffset,S=b===void 0?0:b,T=Pi(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=er(t.placement),f=Ss(t.placement),m=!f,y=$w(h),_=are(y),w=t.modifiersData.popperOffsets,I=t.rects.reference,C=t.rects.popper,O=typeof S=="function"?S(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):S,U={x:0,y:0};if(w){if(i){var W=y==="y"?yn:Sn,ee=y==="y"?Mn:Un,te=y==="y"?"height":"width",ye=w[y],we=w[y]+T[W],ge=w[y]-T[ee],ke=g?-C[te]/2:0,D=f===Di?I[te]:C[te],j=f===Di?-C[te]:-I[te],B=t.elements.arrow,V=g&&B?Ow(B):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wz(),He=Y[W],he=Y[ee],Ce=Cu(0,I[te],V[te]),Le=m?I[te]/2-ke-Ce-He-O:D-Ce-He-O,et=m?-I[te]/2+ke+Ce+he+O:j+Ce+he+O,sn=t.elements.arrow&&Dl(t.elements.arrow),Ca=sn?y==="y"?sn.clientTop||0:sn.clientLeft||0:0,Oa=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,$a=w[y]+Le-Oa-Ca,up=w[y]+et-Oa,La=Cu(g?Math.min(we,$a):we,ye,g?Math.max(ge,up):ge);w[y]=La,U[y]=La-ye}if(s){var lF=y==="x"?yn:Sn,uF=y==="x"?Mn:Un,Ul=w[_],cF=Ul+T[lF],dF=Ul-T[uF],zw=Cu(cF,Ul,dF);w[_]=zw,U[_]=zw-Ul}t.modifiersData[a]=U}}const ore={name:"preventOverflow",enabled:!0,phase:"main",fn:ire,requiresIfExists:["offset"]};function sre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lre(e){return e===jn(e)||!nr(e)?Lw(e):sre(e)}function ure(e,t,n){n===void 0&&(n=!1);var a=Ar(t),r=ys(e),i=nr(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((Fn(t)!=="body"||Pw(a))&&(o=lre(t)),nr(t)?(s=ys(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Dw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function cre(e){var t=new Map,n=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&r(l)}}),a.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),a}function dre(e){var t=cre(e);return kne.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function pre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fre(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign(Object.assign(Object.assign({},r),a),{},{options:Object.assign(Object.assign({},r.options),a.options),data:Object.assign(Object.assign({},r.data),a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var MN={placement:"bottom",modifiers:[],strategy:"absolute"};function UN(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function mre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?MN:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},MN),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){S(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:vs(s)?Ho(s):s.contextElement?Ho(s.contextElement):[],popper:Ho(l)};var f=dre(fre([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(UN(f,m)){c.rects={reference:ure(f,Dl(m),c.options.strategy==="fixed"),popper:Ow(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(U){return c.modifiersData[U.name]=Object.assign({},U.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var _=c.orderedModifiers[y],w=_.fn,I=_.options,C=I===void 0?{}:I,O=_.name;typeof w=="function"&&(c=w({state:c,options:C,name:O,instance:g})||c)}}}},update:pre(function(){return new Promise(function(T){g.forceUpdate(),T(c)})}),destroy:function(){S(),p=!0}};if(!UN(s,l))return g;g.setOptions(u).then(function(T){!p&&u.onFirstUpdate&&u.onFirstUpdate(T)});function b(){c.orderedModifiers.forEach(function(T){var h=T.name,f=T.options,m=f===void 0?{}:f,y=T.effect;if(typeof y=="function"){var _=y({state:c,name:h,instance:g,options:m}),w=function(){};d.push(_||w)}})}function S(){d.forEach(function(T){return T()}),d=[]}return g}}var gre=[zne,rre,Mne,Rne,tre,Kne,ore,$ne,Jne],hre=mre({defaultModifiers:gre});const bre=["top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","auto","auto-start","auto-end"],vre=e=>{const[t,n]=e.split("-");let a;switch(t){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left";break;default:a="auto"}return n&&(a=bre.find(r=>r.includes(`${a}-${n}`))??a),a},Rz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=Pi({...t,placement:e[0]}),o=/left|right/.test(e[0].split("-")[0])?"horizontal":"vertical",s=(i.top>0||i.bottom>0||i.left>0||i.right>0)&&(o==="horizontal"?r.height/2-i.top<a.height||r.height/2-i.bottom<a.height:r.width-i.left<a.width||r.width-i.right<a.width),l=e[0].split("-")[0];return!s&&i[l]<=0?e[0]:Rz(e.slice(1),t,n)},zN="fallbackModifier",FN={name:zN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,vre(n),...a||[]],i=Rz(r,e,n);e.placement!==i&&(e.modifiersData[zN]._skip=!0,e.placement=i,e.reset=!0)}},Mw=["top","right","bottom","left"],Pl=H.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?v.jsx(Ere,{ref:a,portal:e,...n}):null),yre=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Sre={},Ere=H.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Sre,placement:a="bottom",fallbackPlacements:r=Mw,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=H.useRef(!0),{localRef:d,elementRef:p}=Rr(l),[g,b]=H.useState(a),S=Zte(u,e),T=H.useRef(a);T.current=g;const h=H.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){b(m.placement),i==null||i(m.placement)}}),[b,i]);H.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:yre(e??null);if(!m){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(S.current){const y=hre(m,S.current,{placement:a,...n,modifiers:[h,{...FN,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(y),()=>{y==null||y.destroy()}}},[e,t,S]),H.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{...FN,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=v.jsx(v.Fragment,{children:_re(o)?o({placement:g}):o});return s?Ky.createPortal(f,S.current):f});function _re(e){return typeof e=="function"}const ct=zn({defaultConfig:{...On.defaultConfig,...oa.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...On.requiredConfig,...oa.requiredConfig},contextOverride:oa.Context})(e=>{const t=On(On.mergeConfig(e,{selection:e.mode==="single"?qU:Cee})),n=oa(oa.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));fz(n),mz(n);const a={mode:e.mode,...t.state,...n.state},r={...t.events,...n.events};return{...t,...n,state:a,events:r,UNSTABLE_parentModel:e.UNSTABLE_parentModel}}),wre=Ze({vars:{minWidth:Oe(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,color:$.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:k.padding.xxs,borderRadius:k.shape.xxl,maxWidth:dn.subtract("100vw",k.size.sm),boxShadow:xU[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),kre=ue()(()=>({})),Az=Ye("div")({displayName:"Menu.Card",modelHook:ct,elemPropsHook:kre})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=H.useMemo(()=>Rw(r.state.placement||"bottom"),[r.state.placement]);return v.jsx(jte,{as:a,...kt(n,wre({minWidth:typeof e=="number"?Oe(e):e,maxHeight:typeof t=="number"?Oe(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Tre=Ze({base:{display:"block",height:Oe(1),border:"none",borderBlockStart:`${Oe(1)} solid ${k.color.border.default}`,margin:`${k.gap.sm} ${k.gap.md}`}}),Nz=Ge("hr")({displayName:"Menu.Divider",Component({...e},t,n){return v.jsx(n,{ref:t,...Wt(e,Tre())})}});var Ire=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},xre=function(e,t){return e+Es(t)},Es=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(xre,""):Ire(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?Es(e.props.children):""};Es.default=Es;var Rre=Es;const Are=Ec(Rre),jN={vertical:"bottom",horizontal:"center"},ny=ja("positionX","positionY"),Nre=pQ({"0%":{opacity:0,transform:`translate(${ny.positionX}, ${ny.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),Cre=Ze({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.md,lineHeight:k.lineHeight.subtext.md,letterSpacing:k.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:k.padding.sm,color:$.fg.inverse,animationName:Nre,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:$.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:k.shape.md,outline:`${Oe(1)} solid transparent`,outlineOffset:`-${Oe(1)}`,zIndex:-1,margin:k.gap.xs,backgroundColor:k.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:xU[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:dn.negate(Zn.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:dn.negate(Zn.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:dn.negate(Zn.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:dn.negate(Zn.size50)}}),modifiers:{elementHasFocus:{true:{padding:dn.subtract(k.padding.md,dn.divide(k.padding.xxs,2)),"&:before":{margin:Zn.size75}}}}}),Cz=Ge("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=jN,elementHasFocus:n=!1,...a},r,i)=>{const o=DQ(t||jN,k.gap.sm);return v.jsx(i,{ref:r,...kt(a,[Cre({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),ny({positionX:o.x,positionY:o.y})]),children:e})}}),BN=(e,t=0)=>{const n=H.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return H.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Ore=e=>{const t=e.tagName.toLowerCase(),n=e.getAttribute("tabindex");switch(t){case"button":case"input":case"select":case"textarea":case"details":return!0;default:return n?Number(n)>=0:!1}};function Oz({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=H.useRef(!1),i=oa(),[o,s]=H.useState(null),l=rp(),u=BN(i.events.hide,a),c=BN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},b=f=>{r.current||g(f),r.current=!1},S=f=>{r.current=!0,Ore(f.currentTarget)&&i.events.hide()};mz(i),fz(i),Hte(i),Wte(i);const T=i.state.visibility!=="hidden",h={"aria-describedby":e==="describe"&&T?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:S,onFocus:b,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:T,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&T?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}function $re(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=vw(t[r],e[r]):a[r]=t[r],a),{})}const Lre=Ge("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=Mw,...s}){const l=Are(n),{targetProps:u,popperProps:c,tooltipProps:d}=Oz({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,g]=H.useState(!1),{localRef:b}=Rr();return H.useEffect(()=>{const S=b.current;if(!S)return;const T=()=>{g(S.matches(":focus-visible")||S.classList.contains("focus"))};return T(),S.addEventListener("focus",T),S.addEventListener("blur",T),()=>{S.removeEventListener("focus",T),S.removeEventListener("blur",T)}},[b]),v.jsxs(H.Fragment,{children:[H.cloneElement(a,{...u,...$re(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),v.jsx(Pl,{placement:t,fallbackPlacements:o,...c,children:({placement:S})=>{const T=Rw(S);return v.jsx(Cz,{transformOrigin:T,...Wt(s),...d,elementHasFocus:p,children:n})}})]})}}),$z=e=>{const t=getComputedStyle(e);if(t.overflow==="auto"||t.overflow==="scroll"||t.overflow==="clip"||t.overflow==="hidden")return e;if(e.children){for(let n=0;n<e.children.length;n++){const a=$z(e.children[n]);if(a)return a}return null}return null},Lz=e=>{const t=getComputedStyle(e);if(t.textOverflow==="ellipsis"||Number(t.webkitLineClamp)>0)return e;for(let n=0;n<e.children.length;n++){const a=Lz(e.children[n]);if(a)return a}return null},qN=e=>{const t=Lz(e)||$z(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Dre(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=vw(t[r],e[r]):a[r]=t[r],a),{})}const lp=({placement:e="top",fallbackPlacements:t=Mw,children:n,...a})=>{const[r,i]=H.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=Oz({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),qN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),qN(p)&&o.onFocus(d)};return v.jsxs(H.Fragment,{children:[H.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Dre({...o,onMouseEnter:u,onFocus:c},n.props)}),v.jsx(Pl,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=Rw(d);return v.jsx(Cz,{transformOrigin:p,...l,...a,children:r})}})]})},Dz=zn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:rp(e.id)},events:{}})),Pre=Ze({base:{fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.bold,display:"flex",alignItems:"center",width:"100%",gap:k.gap.md,padding:`${k.padding.xs} ${k.padding.md}`}}),Mre=ue()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Ure=ue()(e=>({id:e.state.id})),GN=Ye("div")({modelHook:Dz,elemPropsHook:Ure})(({children:e,...t},n)=>v.jsx(lp,{children:v.jsx(n,{...kt(t,Pre()),children:e})})),Pz=ao("div")({displayName:"Menu.Group",modelHook:Dz,elemPropsHook:Mre,subComponents:{Heading:GN}})(({children:e,title:t,...n},a)=>v.jsxs(a,{...kt(n),children:[t?v.jsx(GN,{children:t}):null,e]})),Ml=Ze({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:Ke.default,fontWeight:We.normal,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:k.gap.md,padding:`${k.padding.sm} ${k.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:$.fg.default,borderWidth:0,borderRadius:k.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:k.size.md,overflowWrap:"anywhere",[de.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:fn.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:k.color.brand.fg.primary.strong,backgroundColor:k.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:fn.full},"&:where(.focus, :focus-visible)":{[de.vars.color]:"currentColor",outline:"none",backgroundColor:k.color.brand.accent.primary,color:$.fg.inverse}},"&:is(.hover, :hover)":{color:$.fg.strong,backgroundColor:k.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:$.fg.inverse,backgroundColor:k.color.brand.accent.primary,outline:`${Oe(2)} solid transparent`,outlineOffset:`-${Oe(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:fn.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:k.color.brand.accent.primary,opacity:fn.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),zre=e=>v.jsx($l,{...Ml.parts.icon,...e}),Mz=Ge("span")({Component:({...e},t,n)=>v.jsx(n,{ref:t,...Ml.parts.text,...Wt(e)})}),Uz=Ge("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>v.jsx(r,{ref:a,"aria-disabled":t,...kt(n,Ml({})),children:typeof e=="string"?v.jsx(Mz,{children:e}):e})}),zz=ue()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),Fz=ue()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Rr(t),i=n["data-id"];return H.useLayoutEffect(()=>{e.state.mode==="single"&&wa(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:wa(e.state,n["data-id"])?"focus":void 0}});function jz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),jz(e.UNSTABLE_parentModel))}const Fre=sr(ue()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),jz(e))}:void 0})),Fz,zz,ww,_w,oo),Mi=Ye("button")({displayName:"Menu.Item",modelHook:ct,elemPropsHook:Fre,subComponents:{Icon:zre,Text:Mz}})(({children:e,...t},n)=>v.jsx(lp,{placement:"left",children:v.jsx(Uz,{as:n,...t,children:e})})),jre=sr(ue()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),Xte,Vte),Bre=Ze({base:{background:k.color.surface.popover,borderRadius:k.shape.xxl,padding:0,gap:k.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Bz=Ye("div")({displayName:"Menu.List",modelHook:ct,elemPropsHook:jre})(({children:e,...t},n,a)=>v.jsx(Lte,{as:n,model:a,marginY:k.gap.none,...Wt(t,Bre({orientation:a.state.orientation})),children:e})),qz=Ge("span")({Component:({...e},t,n)=>v.jsxs(v.Fragment,{children:[v.jsx(Mi.Text,{ref:t,as:n,...e}),v.jsx($l,{...Ml.parts.selected,icon:ene})]})}),qre=Ge("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,Ml()),children:typeof e=="string"?v.jsx(qz,{children:e}):e})}),Gre=sr(ue()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Ew(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.goTo({id:a}),e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),jee,oo),Gz=Ye("li")({displayName:"Menu.Item",modelHook:ct,elemPropsHook:Gre,subComponents:{Icon:Mi.Icon,Text:qz}})(({children:e,...t},n)=>v.jsx(lp,{placement:"left",children:v.jsx(qre,{as:n,...t,children:e})})),Hz=hz,Wz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Hre=Ye("div")({modelHook:ct,elemPropsHook:Hz})(({children:e,...t})=>v.jsx(Pl,{placement:"bottom-start",popperOptions:Wz,...t,children:e})),Vz=ue()(e=>({id:e.state.id,"aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":e.events.show(t)}}})),Zz=sr(Vz,Yte),Wre=sr(Vz,Kte),Vre=Ye(Aw)({displayName:"Menu.Target",modelHook:ct,elemPropsHook:Zz})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),Zre=Ye(Aw)({displayName:"Menu.Target",modelHook:ct,elemPropsHook:Wre})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),Yre=Ye("div")({modelHook:ct,elemPropsHook:Hz})(({children:e,...t})=>v.jsx(Pl,{placement:"right-start",popperOptions:Wz,...t,children:e})),Kre=(e,t=0)=>{const n=P.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return P.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Xre=sr(du(e=>e.UNSTABLE_parentModel,Fz),du(e=>e.UNSTABLE_parentModel,zz),du(e=>e.UNSTABLE_parentModel,_w),ue()((e,t)=>({ref:io(t,e.state.targetRef)})),du(e=>e.UNSTABLE_parentModel,oo),ue()(e=>{const t=P.useRef(),n=Kre(()=>{e.UNSTABLE_parentModel.events.goTo({id:t.current||""}),e.events.show(event)},300);return{id:e.state.id,role:"menuitem","aria-haspopup":"true","aria-expanded":e.state.visibility==="visible",onMouseDown(a){e.UNSTABLE_parentModel.events.goTo({id:a.currentTarget.getAttribute("data-id")})},onMouseEnter(a){t.current=a.currentTarget.getAttribute("data-id"),n.start()},onMouseLeave(){n.clear()},onClick(a){e.state.targetRef.current instanceof Element||(e.state.targetRef.current=a.currentTarget),e.state.visibility!=="hidden"?e.events.hide(a):e.events.show(a)},"data-has-children":!0,onKeyDown(a){if(e.state.orientation==="vertical")switch(a.key){case"ArrowRight":case"Enter":case" ":e.events.show(a);break}}}})),Jre=Ye("button")({modelHook:ct,elemPropsHook:Xre})(({children:e,...t},n)=>v.jsxs(Uz,{as:n,...t,children:[typeof e=="string"?v.jsx(Mi.Text,{children:e}):e,v.jsx(Mi.Icon,{icon:nne})]})),Qre=Ye()({modelHook:ct,subComponents:{Card:Az,List:Bz,Item:Mi,TargetItem:Jre,Group:Pz,Option:Gz,Divider:Nz,Popper:Yre}})(({children:e,model:t,...n},a,r)=>{const i=ct(ct.mergeConfig(n,{getId:r.getId,getTextValue:r.getTextValue,UNSTABLE_parentModel:r,mode:r.state.mode,orientation:r.state.orientation,onSelect(s){r.events.select(s)},onSelectAll(){r.events.selectAll()}})),o=ct.Context;return v.jsx(o.Provider,{value:i,children:e})}),HN=ao()({displayName:"Menu",modelHook:ct,subComponents:{Target:Vre,Card:Az,List:Bz,Item:Mi,Group:Pz,Option:Gz,Divider:Nz,TargetContext:Zre,Popper:Hre,Submenu:Qre}})(({children:e})=>v.jsx(v.Fragment,{children:e})),lr=zn({defaultConfig:{...wo.defaultConfig,id:"",initialTab:"",orientation:"horizontal",menuConfig:{}},requiredConfig:wo.requiredConfig,contextOverride:wo.Context})(e=>{var c;const t=P.useRef(e.initialTab),n=e.getId||qo,a=Sw(),r=wo(wo.mergeConfig(e,{shouldCalculateOverflow:a!=="touch",orientation:e.orientation||"horizontal",onRegisterItem(d){t.current||(t.current=d.id,l.select({id:t.current}))},initialSelectedIds:e.initialTab?[e.initialTab]:(c=e.items)!=null&&c.length?[n(e.items[0])]:[],shouldVirtualize:!1})),i=On(),o={...r.state,getId:n,orientation:e.orientation||"horizontal",panels:i.state.items,panelIndexRef:i.state.indexRef},s=P.useMemo(()=>e.items?e.items.filter(d=>o.hiddenIds.includes(n(d))):void 0,[o.hiddenIds,e.items]),l={...r.events,registerPanel:i.events.registerItem,unregisterPanel:i.events.unregisterItem},u=ct(ct.mergeConfig(e.menuConfig,{id:`menu-${r.state.id}`,items:s,nonInteractiveIds:o.nonInteractiveIds.filter(d=>!o.hiddenIds.includes(d)),onSelect(d){u.events.hide(),l.select(d)},onShow(){u.events.goToFirst()}}));return{...r,state:o,events:l,menu:u}}),eae=Ze({base:{fontFamily:Ke.default,fontSize:k.fontSize.subtext.lg,lineHeight:k.lineHeight.subtext.lg,letterSpacing:k.letterSpacing.subtext.lg,fontWeight:We.medium,border:"none",backgroundColor:k.color.surface.transparent,flex:"0 0 auto",minWidth:0,alignItems:"center",padding:`0 ${k.padding.md}`,height:k.size.lg,cursor:"pointer",color:$.fg.muted.default,position:"relative",borderRadius:`${k.shape.md} ${k.shape.md} ${k.shape.none} ${k.shape.none}`,transition:"background 150ms ease, color 150ms ease",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",[de.vars.color]:"currentColor",[de.vars.size]:Kn.systemIcon.size.md,"&:has(span)":{display:"flex",gap:k.gap.sm},"&:hover, &.hover, &:focus-visible, &.focus":{backgroundColor:k.color.surface.overlay.hover.default,color:$.fg.muted.strong,[de.vars.color]:$.fg.muted.strong},"&:focus-visible, &.focus":{outline:`${Oe(2)} solid transparent`,...wQ({inset:"outer",width:0,separation:2}),[K.vars.boxShadowInner]:k.color.focus.inverse,[K.vars.boxShadowOuter]:k.color.brand.focus.primary,color:$.fg.strong,[de.vars.color]:$.fg.strong},"&:disabled, &.disabled, &[aria-disabled]":{opacity:fn.disabled,"&:hover":{cursor:"auto",backgroundColor:k.color.surface.transparent,[de.vars.color]:$.fg.muted.default}},"&[aria-selected=true]":{color:k.color.brand.fg.primary.default,cursor:"default",[de.vars.color]:k.color.brand.fg.primary.default,"&:after":{position:"absolute",borderBlockEnd:`${Zn.size50} solid transparent`,borderRadius:`${k.shape.md} ${k.shape.md} ${k.shape.none} ${k.shape.none}`,backgroundColor:k.color.brand.fg.primary.default,bottom:0,content:"''",left:0,marginBlockStart:`${dn.negate(dn.divide(k.padding.xs,k.padding.xxs))}`,width:"100%"},"&:hover, &.hover, &:focus-visible, &.focus":{backgroundColor:k.color.surface.transparent,color:k.color.brand.fg.primary.default}}}}),Yz=Ge("button")({displayName:"StyledTabItem",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...kt(t,eae()),children:e})}),tae=sr(ue()(({state:e},t,n={})=>{const a=n["data-id"]||"";return{type:"button",role:"tab","aria-selected":!!n["data-id"]&&Ew(a,e),"aria-controls":Li(`tabpanel-${e.id}-${a}`)}}),ww,Lee,_w,oo),nae=Ye("button")({displayName:"Tabs.Item",modelHook:lr,elemPropsHook:tae,subComponents:{Icon:$l,Text:uee}})(({children:e,...t},n)=>{const a=Sw();return v.jsx(lp,{children:v.jsx(Yz,{as:n,maxWidth:a==="touch"?void 0:280,...t,children:e})})});function rae(e,t){return t==="vertical"?e.scrollHeight>e.clientHeight?e.scrollTop/(e.scrollHeight-e.clientHeight):-1:e.scrollWidth>e.clientWidth?e.scrollLeft/(e.scrollWidth-e.clientWidth):-1}function WN(e,t){const n=rae(e,t);return n<=-1?void 0:n>.99?"end":n>.01?"middle":"start"}function VN(e,t){t?e.setAttribute("data-scroll-position",t):e.removeAttribute("data-scroll-position")}const aae=ue()((e,t,n={})=>{const a=n["aria-orientation"]||"vertical",{localRef:r,elementRef:i}=Rr(t);return H.useLayoutEffect(()=>{r.current&&VN(r.current,WN(r.current,a))},[r,a]),{ref:i,onScroll:o=>{const s=o.currentTarget;VN(s,WN(s,a))}}}),iae=sr(aae,ue()(e=>({role:"tablist","aria-orientation":e.state.orientation})),Oee,zee),oae=Ze({base:{display:"flex",position:"relative",borderBlockEnd:`${Oe(1)} solid ${k.color.border.default}`,gap:k.gap.xs,paddingInline:Zn.size500,"@media screen and (max-width: 768px)":{paddingInline:k.padding.md}},modifiers:{modality:{touch:{overflowX:"auto",paddingInline:0,'&[data-scroll-position="start"]':{maskImage:"linear-gradient(to right, white 80%, transparent)"},'&[data-scroll-position="middle"]':{maskImage:"linear-gradient(to left, white 80%, transparent), linear-gradient(to right, white 80%, transparent)",maskComposite:"intersect"},'&[data-scroll-position="end"]':{maskImage:"linear-gradient(to left, white 80%, transparent)"}},mouse:{},pen:{}},isDragging:{true:{},false:{}},direction:{left:{},right:{}}}}),sae=Ye("div")({displayName:"Tabs.List",modelHook:lr,elemPropsHook:iae})(({children:e,overflowButton:t,...n},a,r)=>{const i=Sw();return v.jsxs(a,{...kt(n,oae({modality:i})),children:[op(r,e),t]})}),lae=hz,uae=Ye("div")({displayName:"Tabs.MenuPopper",modelHook:ct,elemPropsHook:lae})(({children:e,...t})=>v.jsx(Pl,{...t,children:e})),cae=Ze({base:{'&:has([data-part="tabs-overflow-button-icon"])':{display:"flex",gap:0}}}),dae=sr(ue()(()=>({"aria-haspopup":!0})),Pee,GQ()(e=>e.menu,Zz)),pae=Ye("button")({displayName:"Tabs.OverflowButton",modelHook:lr,elemPropsHook:dae})(({children:e,...t},n)=>v.jsxs(Yz,{type:"button",as:n,...kt(t,cae()),children:[v.jsx("span",{children:e}),v.jsx($l,{"data-part":"tabs-overflow-button-icon",icon:tne})]})),fae=ue()(({state:e,events:t},n,a={})=>{const{item:r}=P.useContext(Go),[i,o]=P.useState(a["data-id"]||(r==null?void 0:r.id)||"");return ro(()=>{if(r)return;const s=e.panelIndexRef.current,l=i||String(s);return t.registerPanel({id:l,textValue:""}),o(l),()=>{t.unregisterPanel({id:l})}}),{role:"tabpanel","aria-labelledby":Li(`${e.id}-${i}`),hidden:!!i&&i!==e.selectedIds[0],id:Li(`tabpanel-${e.id}-${i}`),tabIndex:0}}),mae=Ye("div")({displayName:"Tabs.Panel",modelHook:lr,elemPropsHook:fae})(({children:e,...t},n)=>v.jsx(Tw,{as:n,...t,children:e})),gae=Ye()({displayName:"Tabs.Panels",modelHook:lr})(({children:e},t,n)=>v.jsx(v.Fragment,{children:op(n,e)})),M=ao()({displayName:"Tabs",modelHook:lr,subComponents:{List:sae,Item:nae,Panel:mae,Panels:gae,OverflowButton:pae,MenuPopper:uae,Menu:HN}})(({children:e},t,n)=>v.jsx(HN,{model:n.menu,children:e})),Kz=()=>v.jsxs(M,{children:[v.jsxs(M.List,{children:[v.jsx(M.Item,{children:"First Tab"}),v.jsx(M.Item,{children:"Second Tab"}),v.jsx(M.Item,{children:"Third Tab"})]}),v.jsxs("div",{style:{marginBlockStart:G(Pn.lg)},children:[v.jsxs(M.Panel,{tabIndex:void 0,children:[v.jsx("button",{children:"Focusable button"}),v.jsx("br",{}),"Contents of First Tab. The tab panel is no longer focusable, but the button is. It may be desirable to disable focus on the tab panel and allow focus to flow into the tab panel to the first focusable element."]}),v.jsx(M.Panel,{children:"Contents of Second Tab"}),v.jsx(M.Panel,{children:"Contents of Third Tab"})]})]});Kz.__RAW__=`import {Tabs} from '@workday/canvas-kit-react/tabs';
294
294
  import {cssVar} from '@workday/canvas-kit-styling';
295
295
  import {system} from '@workday/canvas-tokens-web';
296
296