@workday/canvas-kit-mcp 15.0.20 → 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})()})(MU);var WQ=MU.exports;const ur=vc(WQ);function VQ(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 mN(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 ZQ(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=VQ(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],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",y=mN(g,v,"inlineSize"),I=mN(g,v,"blockSize"),h=y?a(y):void 0,f=I?a(I):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 YQ={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},gN={lightest:"25",lighter:"50",light:"200",main:"600",dark:"700",darkest:"800"},KQ={primary:"primary",error:"critical",success:"positive",alert:"caution",neutral:"neutral"},XQ={focusOutline:Mt.focus,alertInner:Mt.caution.inner,alertOuter:Mt.caution.outer,errorInner:Mt.critical},JQ=Uo({[Mt.alertInner]:dc,[Mt.alertOuter]:pc,[Mt.errorInner]:dU,[Mt.focusOutline]:XP,[Rr.accent]:Wn,[Rr.darkest]:SU,[Rr.dark]:yU,[Rr.base]:bU,[Rr.light]:vU,[Rr.lighter]:hU,[Rr.lightest]:gU,[Zt.accent]:Wn,[Zt.darkest]:oU,[Zt.dark]:iU,[Zt.base]:aU,[Zt.light]:rU,[Zt.lighter]:nU,[Zt.lightest]:tU,[xt.accent]:Wn,[xt.darkest]:mU,[xt.dark]:fU,[xt.base]:pU,[xt.light]:cU,[xt.lighter]:uU,[xt.lightest]:lU,[Rt.accent]:sU,[Rt.darkest]:VP,[Rt.dark]:pc,[Rt.base]:dc,[Rt.light]:WP,[Rt.lighter]:HP,[Rt.lightest]:GP,[ot.accent]:Wn,[ot.darkest]:eU,[ot.dark]:QP,[ot.base]:JP,[ot.light]:KP,[ot.lighter]:YP,[ot.lightest]:ZP,[EU.primary]:`linear-gradient(90deg, ${ot.base} 0%, ${ot.dark} 100%)`,[O.brand.focus.primary]:Mt.focusOutline,[O.brand.border.primary]:Mt.focusOutline,[O.brand.accent.primary]:ot.base,[O.brand.accent.action]:ot.base,[O.brand.accent.critical]:xt.base,[O.brand.accent.caution]:Rt.base,[O.brand.accent.positive]:Zt.base,[O.brand.fg.primary.default]:ot.base,[O.brand.fg.primary.strong]:ot.dark,[O.brand.fg.critical.default]:xt.base,[O.brand.fg.critical.strong]:xt.dark,[O.brand.fg.caution.default]:Rt.darkest,[O.brand.fg.caution.strong]:Rt.darkest,[O.brand.fg.positive.default]:Zt.base,[O.brand.fg.positive.strong]:Zt.dark,[O.brand.fg.selected]:ot.dark,[O.brand.focus.critical]:xt.dark,[O.brand.border.critical]:xt.base,...O.brand.focus.caution?{[O.brand.focus.caution.inner]:Mt.alertInner,[O.brand.focus.caution.outer]:Rt.dark}:{},[O.brand.border.caution]:Rt.dark,[O.brand.surface.primary.default]:ot.lightest,[O.brand.surface.primary.strong]:ot.lighter,[O.brand.surface.critical.default]:xt.lightest,[O.brand.surface.critical.strong]:xt.lighter,[O.brand.surface.caution.default]:Rt.lightest,[O.brand.surface.caution.strong]:Rt.lighter,[O.brand.surface.positive.default]:Zt.lightest,[O.brand.surface.positive.strong]:Zt.lighter,[O.brand.surface.selected]:ot.lighter}),PU=(e,t)=>{const n=bQ(e),a=(t.className||"").split(" ").concat(JQ).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]!==On.palette.common[s]){const l=Kb(i.common[s]);r[Mt[s]]=l,r[XQ[s]]=l,s==="focusOutline"&&(r[O.brand.focus.primary]=l,r[O.brand.border.primary]=l),s==="alertInner"&&(r[O.brand.focus.caution.inner]=l),s==="alertOuter"&&(r[O.brand.border.caution]=l),s==="errorInner"&&(r[O.brand.focus.critical]=l,r[O.brand.border.critical]=l)}}):["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{var l,u,c,d,p;if(i[o][s]!==On.palette[o][s]){const g=Kb(i[o][s]);if(r[tN[o][YQ[s]]]=g,s!=="contrast"&&s in gN){const v=KQ[o],y=gN[s],I=tN[v+y];if(I&&(r[I]=g),s==="main"){const h=O.brand.accent[v];h&&(r[h]=g);const f=(l=O.brand.fg[v])==null?void 0:l.default;if(f&&(r[f]=g),v==="primary"&&!(i.common.focusOutline!==On.palette.common.focusOutline)){const b=O.brand.focus.primary;r[b]=g}}else if(s==="dark"){const h=(u=O.brand.fg[v])==null?void 0:u.strong;if(h&&(r[h]=g),v==="primary"){const f=O.brand.fg.selected;r[f]=g}if(v==="critical"){const f=O.brand.focus.critical;r[f]=g;const m=O.brand.border.critical;r[m]=g}if(v==="caution"){const f=(c=O.brand.focus.caution)==null?void 0:c.outer;r[f]=g;const m=O.brand.border.caution;r[m]=g}}else if(s==="lighter"){const h=(d=O.brand.surface[v])==null?void 0:d.strong;if(h&&(r[h]=g),v==="primary"){const f=O.brand.surface.selected;r[f]=g}}else if(s==="lightest"){const h=(p=O.brand.surface[v])==null?void 0:p.default;h&&(r[h]=g)}}}})}),{...t,className:a,style:r}},QQ=({children:e,theme:t={canvas:{}},...n})=>{var s;const{className:a,...r}=PU(t,n),i=lQ(),o={...r,...n};return k.jsx(z7,{value:i,children:k.jsx(G7,{theme:t,children:k.jsx("div",{dir:((s=t==null?void 0:t.canvas)==null?void 0:s.direction)||On.direction,...o,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((v,y)=>a[y]!==v)))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 v=Math.round((Date.now()-c)*100)/100,y=Math.round((Date.now()-g)*100)/100,I=y/16,h=(f,m)=>{for(f=String(f);f.length<m;)f=" "+f;return f};console.info(`%c⏱ ${h(y,5)} /${h(v,5)} ms`,`
291
291
  font-size: .6rem;
292
292
  font-weight: bold;
293
- color: hsl(${Math.max(0,Math.min(120-120*I,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 hN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const eee=(e,t)=>Math.abs(e-t)<=1,tee=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},vN=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},nee=e=>e,ree=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},aee=(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(vN(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(vN(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},bN={passive:!0},yN=typeof window>"u"?!0:"onscrollend"in window,iee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&yN?()=>{}:tee(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,bN);const u=e.options.useScrollendEvent&&yN;return u&&n.addEventListener("scrollend",l,bN),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},oee=(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"]},see=(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 lee{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:nee,rangeExtractor:ree,onChange:()=>{},measureElement:oee,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,v=s.get(d),y=typeof v=="number"?v:this.options.estimateSize(c),I=g+y,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:g,size:y,end:I,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?uee({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 hN(a[UU(0,a.length-1,r=>hN(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();eee(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 UU=(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 uee({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=UU(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 SN=typeof document<"u"?H.useLayoutEffect:H.useEffect;function cee(e){const t=H.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Zy.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=H.useState(()=>new lee(n));return a.setOptions(n),SN(()=>a._didMount(),[]),SN(()=>a._willUpdate()),a}function dee(e){return cee({observeElementRect:aee,observeElementOffset:iee,scrollToFn:see,...e})}const zo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Bv=e=>typeof e=="string"?e:e===void 0?"":e.text||"",pee={items:[]},ou=Mn({defaultConfig:{...pee,id:"",getId:zo,getTextValue:Bv,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Qd(e.id),n=P.useRef(zo),a=P.useRef(Bv);n.current=e.getId||zo,a.current=e.getTextValue||e.getId||Bv;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=dee({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(b=>b.id===f.id)?m.filter(b=>b.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),fee=e=>e,tp=()=>0,np=(e,{state:t})=>t.items.length-1,mee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return tp()},gee=(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 np(e,{state:t})},hee=(e,{state:t})=>t.columnCount?e%t.columnCount:tp(),vee=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:np(e,{state:t}),bee=(e,{state:t})=>t.items.find(n=>n.id===e),yee=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",gc=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),xo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return tp();if(e===-1)return np(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?xo(e)(i,{state:n},a-1):i},See=fee({getFirst:tp,getLast:np,getItem:bee,getNext:xo(1),getNextRow:(e,{state:t})=>xo(t.columnCount)(e,{state:t}),getPrevious:xo(-1),getPreviousRow:(e,{state:t})=>xo(-t.columnCount)(e,{state:t}),getPreviousPage:hee,getNextPage:vee,getFirstOfRow:mee,getLastOfRow:gee}),su=Mn({defaultConfig:{...ou.defaultConfig,initialCursorId:"",columnCount:0,navigation:See,pageSize:0},requiredConfig:ou.requiredConfig,contextOverride:ou.Context})(e=>{var d;const[t,n]=P.useState(e.initialCursorId),a=P.useRef(e.pageSize),r=e.columnCount||0,i=ou(e),o=e.navigation,s=P.useRef(-1),l=p=>{var v;const g=((v=u.items[p])==null?void 0:v.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(v=>v.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}}),zU=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),FU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Eee={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:[]}}},la=Mn({defaultConfig:{...su.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:FU},requiredConfig:su.requiredConfig,contextOverride:su.Context})(e=>{const t=su(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}}),Zn=Mn({defaultConfig:{UNSTABLE_parentModel:void 0,...la.defaultConfig},requiredConfig:la.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...la(e)})),Tu=P.createContext({});function bw(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 k.jsx(Tu.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 k.jsx(Tu.Provider,{value:{item:a},children:r},a.id||a.index)}):k.jsx(Tu.Provider,{value:{},children:t})}const Na=be()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=P.useContext(Tu),[s,l]=P.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Ir(Aa(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return ep(()=>{var y;if((o==null?void 0:o.index)===0&&((y=u.current)!=null&&y.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===g))return;const v={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(v),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:CU(`${a.id}-${s}`)}});function vo(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 lu=Mn({defaultConfig:{...la.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:la.requiredConfig,contextOverride:la.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),v=P.useRef(0),y=t?n:[],I=(e.nonInteractiveIds||[]).concat(y),h=la({...e,nonInteractiveIds:I}),f={...h.state,hiddenIds:y,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},m={...h.events,select(b){const{selectedIds:E}=h.selection.select(b.id,f),w=vo(c.current,l,v.current,d.current,E,e.items);h.events.select(b),a(w)},setContainerSize(b){c.current=h.state.orientation==="horizontal"?b.width||0:b.height||0,s(c.current);const E=vo(c.current,l,v.current,d.current,f.selectedIds,e.items);a(E)},setContainerWidth(b){m.setContainerSize({width:b.width,height:0})},setContainerGap(b){u(b.size);const E=vo(c.current,b.size,v.current,d.current,f.selectedIds,e.items);a(E)},setOverflowTargetSize(b){v.current=h.state.orientation==="horizontal"?b.width||0:b.height||0,g(v.current)},setOverflowTargetWidth(b){v.current=b.width,m.setOverflowTargetSize({width:v.current,height:0})},addItemWidth(b){m.addItemSize({id:b.id,width:b.width,height:0})},addItemSize(b){d.current={...d.current,[b.id]:h.state.orientation==="horizontal"?b.width:b.height},i(d.current);const E=vo(c.current,l,v.current,d.current,f.selectedIds,e.items);a(E)},removeItemSize(b){const E={...d.current};delete E[b.id],d.current=E,i(d.current);const w=vo(c.current,l,v.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(T=>b.id!==T):f.selectedIds,e.items);a(w)},removeItemWidth(b){m.removeItemSize({id:b.id})},addHiddenKey(b){a(E=>E.concat(b.id))},removeHiddenKey(b){a(E=>E.filter(w=>w!==b.id))}};return{...h,state:f,events:m}}),_ee=be()((e,t)=>{const{elementRef:n,localRef:a}=Ir(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return ZQ({ref:a,onResize:e.events.setContainerSize}),ep(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),wee={position:"absolute",left:-99999},BU=be()((e,t,n={})=>{const{elementRef:a,localRef:r}=Ir(t),i=n["data-id"]||"";ep(()=>{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?wee:{},inert:P.use?o:o?"":void 0}}),kee={position:"absolute",left:-99999},Iee=be()((e,t)=>{const{elementRef:n,localRef:a}=Ir(t),r=P.useRef(!0);ep(()=>{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?kee:void 0}}),Jb={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"}},Tee={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},EN={...Jb.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},jv={Home:"goToFirst",End:"goToLast"},_N=(e,t)=>e.hasOwnProperty(t);function xee(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in jv)if(_N(jv,l)&&e.key===l)return(i=(r=t.events)[jv[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?EN:Jb[t.state.orientation],a=xU(e.currentTarget);for(const l in n)if(_N(n,l)&&(a?e.key===Tee[l]:e.key===l)){const u=t.state.columnCount>0?EN[l]:Jb[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const jU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>jU(e,t-1)),n==null||n("Retry timeout")},Ree=(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="${TU(`${u}-${o.id}`)}"]`);jU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),qU=be()((e,t,n={})=>{const a=P.useRef(e.state);a.current=e.state;const r=P.useRef(null);return P.useEffect(()=>{r.current&&Ree(e,yee(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){xee(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":CU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&gc(e.state,n["data-id"])?0:-1:0}}),GU=be()(({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})}}}),Aee=be()((e,t,n={})=>{const a=n["data-id"]||"";return{className:gc(e.state,a)?"focus":""}}),Nee=e=>SQ[e]||Qn(e),Cee=e=>EQ[e],Oee=e=>_Q[e]||Qn(e),Lee=e=>wQ[e]||Qn(e),$ee=e=>gw.properties.fontFamilies[e]||Qn(e),Dee=e=>gw.properties.fontSizes[e]||Qn(e),Mee=e=>gw.properties.fontWeights[e]||Qn(e);function vt(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:Nee(r)};if(n.system==="depth"){const s=Cee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:$ee(r)}:n.system==="fontSize"?{...i,[o]:Dee(r)}:n.system==="fontWeight"?{...i,[o]:Mee(r)}:n.system==="shape"?{...i,[o]:Oee(r)}:n.system==="space"?{...i,[o]:Lee(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function sn(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"}],Pee=vt(HU),Uee=sn(Pee),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"}],zee=vt(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"}],Fee=vt(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"}],Bee=vt(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"}],jee=vt(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"}],qee=vt(KU),Gee=sn({...zee,...Fee,...Bee,...jee,...qee}),Hee=[...WU,...VU,...ZU,...YU,...KU],XU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],Wee=vt(XU),Vee=sn(Wee),JU=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],Zee=vt(JU),Yee=sn(Zee),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"}],Kee=vt(QU),Xee=sn(Kee),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"}],Jee=vt(ez),Qee=sn(Jee),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"}],ete=vt(tz),tte=sn(ete),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"}],nte=vt(nz),rte=sn(nte),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"}],ate=vt(rz),ite=sn(ate),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"}],ote=vt(az),ste=sn(ote),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"}],lte=vt(iz),ute=sn(lte),cte=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],dte=e=>OP(e)&&!cte.includes(e),yw=e=>[{boxSizing:"border-box"},Uee,Gee,Vee,Yee,Xee,Qee,tte,rte,ite,ste,ute].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),pte=cc("div",{shouldForwardProp:dte})(yw),fte=cc("div")(yw),Sw=Be("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=RU(()=>typeof a=="string"?pte:fte);return k.jsx(r,{as:a,ref:n,...Ke(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"}],mte=vt(oz),gte=sn(mte),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"}],hte=vt(sz),vte=sn(hte),bte=[...HU,...Hee,...XU,...JU,...oz,...QU,...sz,...ez,...tz,...nz,...rz,...az,...iz].reduce((e,t)=>(e[t.name]=!0,e),{});function yte(e){return bte[e]||!1}function Vt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(yte(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...yw(n),...gte(n),...vte(n)}),Ke(r,[t,i])}const Ste=it("li")({displayName:"Item",modelHook:Zn,elemPropsHook:Na})((e,t)=>k.jsx(t,{...Vt(e)})),Ete=be()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),wN=Oe({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"}}}}}),_te=Ra("ul")({displayName:"ListBox",modelHook:Zn,elemPropsHook:Ete,subComponents:{Item:Ste}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>k.jsx("div",{ref:l.state.containerRef,...wN.parts.listBoxContainer,...Ke({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},wN({orientation:l.state.orientation})),children:k.jsx(s,{...Vt(o),"data-part":"list",children:bw(l,o.children)})})),Ew=Oe({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.title.lg,lineHeight:_.lineHeight.title.lg,color:O.fg.strong},"title.medium":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.title.md,lineHeight:_.lineHeight.title.md,color:O.fg.strong},"title.small":{fontFamily:He.default,fontWeight:We.bold,lineHeight:_.lineHeight.title.sm,fontSize:_.fontSize.title.sm,color:O.fg.strong},"heading.large":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.lg,lineHeight:_.lineHeight.heading.lg,color:O.fg.strong},"heading.medium":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.md,lineHeight:_.lineHeight.heading.md,color:O.fg.strong},"heading.small":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.sm,lineHeight:_.lineHeight.heading.sm,color:O.fg.strong},"body.large":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.lg,lineHeight:_.lineHeight.body.lg,color:O.fg.default},"body.medium":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.md,lineHeight:_.lineHeight.body.md,color:O.fg.default},"body.small":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,color:O.fg.default},"subtext.large":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:O.fg.default},"subtext.medium":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,color:O.fg.default},"subtext.small":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.sm,lineHeight:_.lineHeight.subtext.sm,letterSpacing:_.letterSpacing.subtext.sm,color:O.fg.default}},variant:{error:{color:_.color.brand.fg.critical.default},hint:{color:O.fg.muted.default},inverse:{color:O.fg.inverse}}}}),lz=Be("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>k.jsx(i,{ref:r,...Vt(a,Ew({typeLevel:t,variant:n})),children:e})}),wte=Oe({extends:Ew,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),kte=Be("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,wte()),children:e})}),Ite=Oe({extends:Ew,base:{color:O.fg.strong,fontWeight:We.bold,marginBlock:_.padding.none},defaultModifiers:{typeLevel:"body.large"}}),Tte=Be("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,Ite()),children:e})}),xte=Oe({base:{display:"flex",flexDirection:"column",gap:_.gap.lg,padding:_.padding.xl,backgroundColor:_.color.surface.default,borderRadius:_.shape.xxl,border:`${ue(1)} solid ${_.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:_.color.surface.alt.default,borderColor:O.border.transparent}}}}),Rte=Be("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>k.jsx(r,{ref:a,...Vt(n,xte({variant:t})),children:e}),subComponents:{Heading:Tte,Body:kte}});function Ate(e){return e.length?e[e.length-1]:null}function uz(e,t){const{min:n,max:a}=_w.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function qv(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(uz(a,t))})}function Nte(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Cte(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:Nte(a.owner,t)})).filter(a=>a.parent===e.element)}function cz(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?cz(e[a],n.join(".")):e[a]}function dz(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),dz(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const pz=e=>{if(typeof window<"u")return cz(window,e)},fz=(e,t)=>{typeof window<"u"&&dz(window,e,t)},kN=(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},_w=pz("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:uz},_adapter:{}};fz("workday.__popupStack",_w);const cr=pz("workday.__popupStackOfStacks")||[_w];cr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";fz("workday.__popupStackOfStacks",cr);function or(){return cr[cr.length-1]}const _t={createContainer(){var n;const e=or();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=or();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),kN(t,e.owner).appendChild(e.element),qv(_t.getElements())},remove(e){var n;const t=cr.find(a=>!!_t.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),kN(t,a==null?void 0:a.owner).removeChild(e),qv(_t.getElements(t))}},isTopmost(e){var a;const t=or();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Ate(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||or();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=or();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],Cte(n,t.items).forEach(r=>{_t.bringToTop(r.element)}),qv(_t.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=or();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=or();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:{}};cr.push(n)},popStackContext(e){var n,a;const t=or();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&cr.length>1&&cr.pop()},transferToCurrentContext(e){var a;const t=or();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;cr.find(r=>!!r.items.find(i=>i.element===e.element))&&_t.remove(e.element),_t.add(e)}};let uu=null;ur.isEnabled&&ur.on("change",()=>{ur.isFullscreen?ur.element&&(uu=ur.element,_t.pushStackContext(uu)):uu&&_t.popStackContext(uu)});const Gv=Mn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Qd(e.id),[n,a]=P.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),IN=()=>{},aa=Mn({defaultContext:{state:{},events:{show:IN,hide:IN}},defaultConfig:{...Gv.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Gv.requiredConfig})(e=>{const t=H.useRef(null),n=H.useRef(null),[a,r]=H.useState("bottom"),i=Gv(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}});aa.Context;const mz=be()(e=>{const t=P.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!_t.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]),{}}),gz=be()(e=>{const t=P.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&_t.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]),{}}),Ote=be()(e=>{const t=P.useCallback(a=>{ur.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return P.useEffect(()=>{if(n&&ur.isEnabled)return ur.on("change",t),()=>{ur.off("change",t)}},[t,n]),{}});function hz(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:hz(e.parentElement)}const Lte=be()(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=hz(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),$te=be()(e=>{const t=P.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=GQ(e.state.stackRef.current),i=HQ(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]),{}}),Dte=be()(({state:e,events:t},n)=>{const a=Aa(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}}),Mte=(e,t)=>{const{elementRef:n,localRef:a}=Ir(e),r=P.useContext(ps),{style:i}=PU(r,{}),o=P.useRef(!0),[s]=P.useState(()=>{if(o.current){const l=_t.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 _t.add({element:u,owner:l}),()=>{_t.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":xU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},Pte=be()(({events:e,state:t},n)=>({ref:Aa(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),Ute=be()(({events:e,state:t},n)=>({ref:Aa(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 vz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:vz(e.parentElement)}function bz(e){return e===null||e===document.body||!e.parentElement?null:qQ(e)?e:bz(e.parentElement)}function TN(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 zte=be()(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&&(_t.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=vz(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&bz(n.current)||TN(o,l)||TN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!_t.contains(e.state.stackRef.current,document.activeElement)||a.current?lN(o):requestAnimationFrame(()=>{lN(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),ww=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=Oe({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:F(n,t),height:F(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),Fte=(e,t)=>e?e in t?t[e]:typeof e=="number"?ue(e):e:"",Bte=Be("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):k.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Ke(r,yz({shouldMirror:e,shouldMirrorInRTL:t}))})}),rp={System:"system"},jte={name:"check-small",type:rp.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"]},kw={name:"chevron-right-small",type:rp.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"]},qte={name:"related-actions",type:rp.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-related-actions" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M4 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5M12 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5M20 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5" class="wd-icon-fill"/></svg>',filename:"wd-icon-related-actions.svg",category:"Core",tags:["three","dots","twinkie","more","kebob","menu","dropdown","select","meatballs"]},Q=Oe({extends:yz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:F(e,Nn.systemIcon.size.lg),height:F(e,Nn.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:F(a,Nn.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:F(t,F(a,Nn.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:F(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),Rl=Be("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>k.jsx(Bte,{as:s,src:a,type:rp.System,ref:o,...Ke(i,Q({size:Fte(r,Nn.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),Gte=Uo({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),Hte=Be("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>k.jsx(Sw,{as:a,ref:n,...Ke(t,Gte),children:e})}),Wte=Oe({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[Q.vars.size]:Nn.systemIcon.size.xs},small:{[Q.vars.size]:Nn.systemIcon.size.md},medium:{[Q.vars.size]:Nn.systemIcon.size.md},large:{[Q.vars.size]:Nn.systemIcon.size.lg}}}}),Vte=Be("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:k.jsx(Rl,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Ke(r,Wte({size:t}))})}),K={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")},B=Oe({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:We.bold,backgroundColor:F(K.default.background,F(e,"transparent")),color:F(K.default.label,F(r,O.fg.strong)),borderWidth:ue(1),borderStyle:"solid",gap:_.gap.sm,borderColor:F(K.default.border,F(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${ue(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:F(K.default.borderRadius,F(o,_.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[Q.vars.color]:F(K.default.icon,O.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:F(K.default.opacity,F(i,Ft.full))},"&:focus-visible, &.focus":{backgroundColor:F(K.focus.background,F(e,"transparent")),borderColor:F(K.focus.border,F(t,"transparent")),color:F(K.focus.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.focus.icon,O.fg.strong),outline:`${ue(2)} solid transparent`,outlineOffset:ue(2),boxShadow:`0 0 0 ${ue(2)} ${F(K.focus.boxShadowInner,F(n,_.color.border.inverse.default))},0 0 0 ${ue(4)} ${F(K.focus.boxShadowOuter,F(a,_.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:F(K.hover.background,F(e,_.color.surface.contrast.strong)),borderColor:F(K.hover.border,F(t,"transparent")),color:F(K.hover.label,F(r,O.fg.stronger)),[Q.vars.color]:F(K.hover.icon,O.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:F(K.active.background,F(e,"transparent")),borderColor:F(K.active.border,F(t,"transparent")),color:F(K.active.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.active.icon,O.fg.strong)},"&:disabled, &.disabled":{backgroundColor:F(K.disabled.background,F(e,"transparent")),borderColor:F(K.disabled.border,F(t,"transparent")),color:F(K.disabled.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${ue(2)} solid transparent`,outlineOffset:`-${ue(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${ue(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,height:_.size.lg,paddingInline:_.padding.xxl,minWidth:Lr.size1400},medium:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,minWidth:Lr.size1200,paddingInline:_.padding.xl,height:_.size.md},small:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,height:_.size.sm,minWidth:Lr.size1000,paddingInline:_.padding.md,gap:_.gap.xs},extraSmall:{fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,height:_.size.xs,minWidth:"auto",paddingInline:_.padding.sm,gap:_.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xxl,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.lg,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.md,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}}]}),ni=Be("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>k.jsx(u,{ref:l,type:"button",...Vt(s,[B({size:t,iconPosition:r,grow:a}),K.default((o==null?void 0:o.default)||{}),K.focus((o==null?void 0:o.focus)||{}),K.hover((o==null?void 0:o.hover)||{}),K.active((o==null?void 0:o.active)||{}),K.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:Vte,Label:Hte}}),Zte=Oe({base:{fontFamily:He.default,textDecoration:"underline",color:_.color.fg.info.default,cursor:"pointer",borderRadius:ue(2),padding:`0 ${ue(2)} `,margin:"0 -2px",transition:"color 0.15s,background-color 0.15s",wordBreak:"break-word","&:hover, &.hover":{color:_.color.fg.info.strong,background:_.color.surface.alt.default},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${_.color.brand.focus.primary}`,outline:"none"},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.alt.default}},modifiers:{variant:{inverse:{color:O.fg.inverse,"&:hover, &.hover":{color:O.fg.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${O.fg.inverse}`},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.navigation}},standalone:{textDecoration:"none"},standaloneInverse:{textDecoration:"none",color:O.fg.inverse,"&:hover, &.hover":{color:O.fg.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${_.color.focus.inverse}`},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.navigation}}}}}),Yte=Be("a")({displayName:"Hyperlink",Component:({children:e,variant:t,...n},a,r)=>k.jsx(r,{ref:a,...Ke(n,Zte({variant:t})),children:e})}),Sz=Be("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 k.jsxs(ni,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&k.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&k.jsx(ni.Label,{children:e}),t&&c&&["only","end"].includes(c)&&k.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),Kte=Oe({extends:B,base:{[B.vars.background]:_.color.surface.transparent,[B.vars.borderRadius]:_.shape.full,[B.vars.border]:O.border.input.default,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.default,[B.vars.label]:O.fg.strong,[B.vars.boxShadowInner]:_.color.focus.inverse,[B.vars.boxShadowOuter]:_.color.brand.focus.primary,[Q.vars.color]:F(K.focus.icon,"currentColor")},"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.strong,[B.vars.border]:_.color.border.input.hover,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.strong,[B.vars.border]:_.color.border.input.hover,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[B.vars.background]:_.color.surface.transparent,[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.inverse,[B.vars.border]:O.border.transparent,[B.vars.label]:O.fg.contrast.default,[B.vars.boxShadowInner]:O.border.contrast.default,[B.vars.boxShadowOuter]:_.color.focus.inverse,[Q.vars.color]:F(K.focus.icon,"currentColor")},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor")}}}}}),Ez=Be("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>k.jsx(Sz,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[Kte({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})}),Xte=Oe({extends:B,base:{paddingInline:_.padding.xs,minWidth:"auto",borderWidth:ue(2),[B.vars.borderRadius]:_.shape.full,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.focus.icon,"currentColor"),[B.vars.border]:O.border.transparent,[B.vars.label]:O.fg.contrast.default,...iN({width:2,separation:0,innerColor:_.color.focus.inverse,outerColor:_.color.brand.focus.primary})},"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.strong,[Q.vars.color]:O.fg.strong,textDecoration:"underline"},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.strong,[Q.vars.color]:F(K.active.icon,"currentColor"),textDecoration:"underline"},"&:disabled, &.disabled":{textDecoration:"none",[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor")}},modifiers:{iconPosition:{only:{padding:0,[Q.vars.color]:F(K.default.icon,O.fg.default),"&:focus-visible, &.focus":{[Q.vars.color]:F(K.focus.icon,O.fg.strong)},"&:hover, &.hover":{[Q.vars.color]:F(K.hover.icon,O.fg.strong)},"&:active, &.active":{[Q.vars.color]:F(K.active.icon,O.fg.strong)},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[Q.vars.color]:F(K.disabled.icon,O.fg.default)}},start:{},end:{}},variant:{inverse:{[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.inverse,[B.vars.label]:O.fg.contrast.default,[Q.vars.color]:F(K.focus.icon,"currentColor"),...iN({width:2,separation:2,innerColor:O.border.contrast.default,outerColor:_.color.focus.inverse})},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor")}}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xxs,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.xxs}}]}),Jte=Be("button")({displayName:"TertiaryButton",Component:({children:e,icon:t,size:n="medium",variant:a,iconPosition:r,grow:i,cs:o,...s},l,u)=>{const c=r||(t?e?"start":"only":void 0);return k.jsx(Sz,{as:u,ref:l,icon:t,size:n,iconPosition:r,grow:i,cs:[Xte({size:n,variant:a,grow:i,iconPosition:c}),o],...s,children:e})}});var bn="top",$n="bottom",Dn="right",yn="left",Iw="auto",Al=[bn,$n,Dn,yn],Li="start",Tw="end",Qte="clippingParents",_z="viewport",bo="popper",ene="reference",xN=Al.reduce(function(e,t){return e.concat([t+"-"+Li,t+"-"+Tw])},[]),wz=[].concat(Al,[Iw]).reduce(function(e,t){return e.concat([t,t+"-"+Li,t+"-"+Tw])},[]),tne="beforeRead",nne="read",rne="afterRead",ane="beforeMain",ine="main",one="afterMain",sne="beforeWrite",lne="write",une="afterWrite",cne=[tne,nne,rne,ane,ine,one,sne,lne,une];function Pn(e){return e?(e.nodeName||"").toLowerCase():null}function Un(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fs(e){var t=Un(e).Element;return e instanceof t||e instanceof Element}function er(e){var t=Un(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dne(e){var t=Un(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pne(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];!er(i)||!Pn(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 fne(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},{});!er(r)||!Pn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const mne={name:"applyStyles",enabled:!0,phase:"write",fn:pne,effect:fne,requires:["computeStyles"]};function Jn(e){return e.split("-")[0]}function xw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function kz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dne(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function gr(e){return Un(e).getComputedStyle(e)}function gne(e){return["table","td","th"].indexOf(Pn(e))>=0}function Tr(e){return((fs(e)?e.ownerDocument:e.document)||window.document).documentElement}function ap(e){return Pn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Tr(e)}function RN(e){if(!er(e)||gr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Tr(t);if(Pn(t)==="body"&&gr(t).position==="static"&&gr(n).position!=="static")return n}return t}function hne(e){for(var t=ap(e);er(t)&&["html","body"].indexOf(Pn(t))<0;){var n=gr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Nl(e){for(var t=Un(e),n=RN(e);n&&gne(n)&&gr(n).position==="static";)n=RN(n);return n&&Pn(n)==="body"&&gr(n).position==="static"?t:n||hne(e)||t}function Rw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xu(e,t,n){return Math.max(e,Math.min(t,n))}function Iz(){return{top:0,right:0,bottom:0,left:0}}function Tz(e){return Object.assign(Object.assign({},Iz()),e)}function xz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function vne(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Jn(n.placement),s=Rw(o),l=[yn,Dn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=xw(r),p=s==="y"?bn:yn,g=s==="y"?$n:Dn,v=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],y=i[s]-n.rects.reference[s],I=Nl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=v/2-y/2,m=c[p],b=h-d[u]-c[g],E=h/2-d[u]/2+f,w=xu(m,E,b),T=s;n.modifiersData[a]=(t={},t[T]=w,t.centerOffset=w-E,t)}}function bne(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)||kz(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:Tz(typeof s!="number"?s:xz(s,Al))}))}const yne={name:"arrow",enabled:!0,phase:"main",fn:vne,effect:bne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Sne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ene(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 AN(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=Ene(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),v=yn,y=bn,I=window;if(l){var h=Nl(n);h===Un(n)&&(h=Tr(n)),r===bn&&(y=$n,d-=h.clientHeight-a.height,d*=s?1:-1),r===yn&&(v=Dn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Sne);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[y]=g?"0":"",m[v]=p?"0":"",m.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[y]=g?d+"px":"",t[v]=p?c+"px":"",t.transform="",t))}function _ne(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:Jn(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),AN(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),AN(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 wne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_ne,data:{}};var cu={passive:!0};function kne(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=Un(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,cu)}),s&&l.addEventListener("resize",n.update,cu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,cu)}),s&&l.removeEventListener("resize",n.update,cu)}}const Ine={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kne,data:{}};var Tne={left:"right",right:"left",bottom:"top",top:"bottom"};function Ru(e){return e.replace(/left|right|bottom|top/g,function(t){return Tne[t]})}var xne={start:"end",end:"start"};function NN(e){return e.replace(/start|end/g,function(t){return xne[t]})}function ms(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 Aw(e){var t=Un(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Nw(e){return ms(Tr(e)).left+Aw(e).scrollLeft}function Rne(e){var t=Un(e),n=Tr(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+Nw(e),y:s}}function Ane(e){var t=Tr(e),n=Aw(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+Nw(e),s=-n.scrollTop;return gr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Cw(e){var t=gr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Rz(e){return["html","body","#document"].indexOf(Pn(e))>=0?e.ownerDocument.body:er(e)&&Cw(e)?e:Rz(ap(e))}function Fo(e,t){t===void 0&&(t=[]);var n=Rz(e),a=Pn(n)==="body",r=Un(n),i=a?[r].concat(r.visualViewport||[],Cw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Fo(ap(i)))}function Qb(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nne(e){var t=ms(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 CN(e,t){return t===_z?Qb(Rne(e)):er(t)?Nne(t):Qb(Ane(Tr(e)))}function Cne(e){var t=Fo(ap(e)),n=["absolute","fixed"].indexOf(gr(e).position)>=0,a=n&&er(e)?Nl(e):e;return fs(a)?t.filter(function(r){return fs(r)&&kz(r,a)&&Pn(r)!=="body"}):[]}function One(e,t,n){var a=t==="clippingParents"?Cne(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=CN(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},CN(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 gs(e){return e.split("-")[1]}function Az(e){var t=e.reference,n=e.element,a=e.placement,r=a?Jn(a):null,i=a?gs(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case bn:l={x:o,y:t.y-n.height};break;case $n:l={x:o,y:t.y+t.height};break;case Dn:l={x:t.x+t.width,y:s};break;case yn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?Rw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Li:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case Tw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function $i(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?Qte:i,s=n.rootBoundary,l=s===void 0?_z:s,u=n.elementContext,c=u===void 0?bo:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,v=g===void 0?0:g,y=Tz(typeof v!="number"?v:xz(v,Al)),I=c===bo?ene:bo,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?I:c],b=One(fs(m)?m:m.contextElement||Tr(e.elements.popper),o,l),E=ms(h),w=Az({reference:E,element:f,placement:r}),T=Qb(Object.assign(Object.assign({},f),w)),C=c===bo?T:E,L={top:b.top-C.top+y.top,bottom:C.bottom-b.bottom+y.bottom,left:b.left-C.left+y.left,right:C.right-b.right+y.right},M=e.modifiersData.offset;if(c===bo&&M){var W=M[r];Object.keys(L).forEach(function(te){var ne=[Dn,$n].indexOf(te)>=0?1:-1,Se=[bn,$n].indexOf(te)>=0?"y":"x";L[te]+=W[Se]*ne})}return L}function Lne(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?wz:l,c=gs(a),d=c?s?xN:xN.filter(function(v){return gs(v)===c}):Al,p=d.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=d);var g=p.reduce(function(v,y){return v[y]=$i(e,{placement:y,boundary:r,rootBoundary:i,padding:o})[Jn(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function $ne(e){if(Jn(e)===Iw)return[];var t=Ru(e);return[NN(e),t,NN(t)]}function Dne(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,v=g===void 0?!0:g,y=n.allowedAutoPlacements,I=t.options.placement,h=Jn(I),f=h===I,m=l||(f||!v?[Ru(I)]:$ne(I)),b=[I].concat(m).reduce(function(he,Le){return he.concat(Jn(Le)===Iw?Lne(t,{placement:Le,boundary:c,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:y}):Le)},[]),E=t.rects.reference,w=t.rects.popper,T=new Map,C=!0,L=b[0],M=0;M<b.length;M++){var W=b[M],te=Jn(W),ne=gs(W)===Li,Se=[bn,$n].indexOf(te)>=0,ke=Se?"width":"height",ge=$i(t,{placement:W,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),Ie=Se?ne?Dn:yn:ne?$n:bn;E[ke]>w[ke]&&(Ie=Ru(Ie));var D=Ru(Ie),j=[];if(i&&j.push(ge[te]<=0),s&&j.push(ge[Ie]<=0,ge[D]<=0),j.every(function(he){return he})){L=W,C=!1;break}T.set(W,j)}if(C)for(var q=v?3:1,V=function(Le){var De=b.find(function(et){var ln=T.get(et);if(ln)return ln.slice(0,Le).every(function(Ca){return Ca})});if(De)return L=De,"break"},Y=q;Y>0;Y--){var Ze=V(Y);if(Ze==="break")break}t.placement!==L&&(t.modifiersData[a]._skip=!0,t.placement=L,t.reset=!0)}}const Mne={name:"flip",enabled:!0,phase:"main",fn:Dne,requiresIfExists:["offset"],data:{_skip:!1}};function ON(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 LN(e){return[bn,Dn,$n,yn].some(function(t){return e[t]>=0})}function Pne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=$i(t,{elementContext:"reference"}),s=$i(t,{altBoundary:!0}),l=ON(o,a),u=ON(s,r,i),c=LN(l),d=LN(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 Une={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pne};function zne(e,t,n){var a=Jn(e),r=[yn,bn].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,[yn,Dn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Fne(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=wz.reduce(function(c,d){return c[d]=zne(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 Bne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fne};function jne(e){var t=e.state,n=e.name;t.modifiersData[n]=Az({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const qne={name:"popperOffsets",enabled:!0,phase:"read",fn:jne,data:{}};function Gne(e){return e==="x"?"y":"x"}function Hne(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,v=n.tetherOffset,y=v===void 0?0:v,I=$i(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Jn(t.placement),f=gs(t.placement),m=!f,b=Rw(h),E=Gne(b),w=t.modifiersData.popperOffsets,T=t.rects.reference,C=t.rects.popper,L=typeof y=="function"?y(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):y,M={x:0,y:0};if(w){if(i){var W=b==="y"?bn:yn,te=b==="y"?$n:Dn,ne=b==="y"?"height":"width",Se=w[b],ke=w[b]+I[W],ge=w[b]-I[te],Ie=g?-C[ne]/2:0,D=f===Li?T[ne]:C[ne],j=f===Li?-C[ne]:-T[ne],q=t.elements.arrow,V=g&&q?xw(q):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Iz(),Ze=Y[W],he=Y[te],Le=xu(0,T[ne],V[ne]),De=m?T[ne]/2-Ie-Le-Ze-L:D-Le-Ze-L,et=m?-T[ne]/2+Ie+Le+he+L:j+Le+he+L,ln=t.elements.arrow&&Nl(t.elements.arrow),Ca=ln?b==="y"?ln.clientTop||0:ln.clientLeft||0:0,Oa=t.modifiersData.offset?t.modifiersData.offset[t.placement][b]:0,La=w[b]+De-Oa-Ca,op=w[b]+et-Oa,$a=xu(g?Math.min(ke,La):ke,Se,g?Math.max(ge,op):ge);w[b]=$a,M[b]=$a-Se}if(s){var iF=b==="x"?bn:yn,oF=b==="x"?$n:Dn,Ll=w[E],sF=Ll+I[iF],lF=Ll-I[oF],$w=xu(sF,Ll,lF);w[E]=$w,M[E]=$w-Ll}t.modifiersData[a]=M}}const Wne={name:"preventOverflow",enabled:!0,phase:"main",fn:Hne,requiresIfExists:["offset"]};function Vne(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zne(e){return e===Un(e)||!er(e)?Aw(e):Vne(e)}function Yne(e,t,n){n===void 0&&(n=!1);var a=Tr(t),r=ms(e),i=er(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((Pn(t)!=="body"||Cw(a))&&(o=Zne(t)),er(t)?(s=ms(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Nw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function Kne(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 Xne(e){var t=Kne(e);return cne.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function Jne(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qne(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 $N={placement:"bottom",modifiers:[],strategy:"absolute"};function DN(){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 ere(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?$N:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},$N),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){y(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:fs(s)?Fo(s):s.contextElement?Fo(s.contextElement):[],popper:Fo(l)};var f=Xne(Qne([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),v(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(DN(f,m)){c.rects={reference:Yne(f,Nl(m),c.options.strategy==="fixed"),popper:xw(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var E=c.orderedModifiers[b],w=E.fn,T=E.options,C=T===void 0?{}:T,L=E.name;typeof w=="function"&&(c=w({state:c,options:C,name:L,instance:g})||c)}}}},update:Jne(function(){return new Promise(function(I){g.forceUpdate(),I(c)})}),destroy:function(){y(),p=!0}};if(!DN(s,l))return g;g.setOptions(u).then(function(I){!p&&u.onFirstUpdate&&u.onFirstUpdate(I)});function v(){c.orderedModifiers.forEach(function(I){var h=I.name,f=I.options,m=f===void 0?{}:f,b=I.effect;if(typeof b=="function"){var E=b({state:c,name:h,instance:g,options:m}),w=function(){};d.push(E||w)}})}function y(){d.forEach(function(I){return I()}),d=[]}return g}}var tre=[Ine,qne,wne,mne,Bne,Mne,Wne,yne,Une],nre=ere({defaultModifiers:tre});const rre=["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"],are=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=rre.find(r=>r.includes(`${a}-${n}`))??a),a},Nz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=$i({...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]:Nz(e.slice(1),t,n)},MN="fallbackModifier",PN={name:MN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,are(n),...a||[]],i=Nz(r,e,n);e.placement!==i&&(e.modifiersData[MN]._skip=!0,e.placement=i,e.reset=!0)}},Ow=["top","right","bottom","left"],ip=H.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?k.jsx(sre,{ref:a,portal:e,...n}):null),ire=e=>{if(e!==null)return"current"in e?e.current||void 0:e},ore={},sre=H.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=ore,placement:a="bottom",fallbackPlacements:r=Ow,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=H.useRef(!0),{localRef:d,elementRef:p}=Ir(l),[g,v]=H.useState(a),y=Mte(u,e),I=H.useRef(a);I.current=g;const h=H.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){v(m.placement),i==null||i(m.placement)}}),[v,i]);H.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:ire(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(y.current){const b=nre(m,y.current,{placement:a,...n,modifiers:[h,{...PN,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(b),()=>{b==null||b.destroy()}}},[e,t,y]),H.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{...PN,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=k.jsx(k.Fragment,{children:lre(o)?o({placement:g}):o});return s?Zy.createPortal(f,y.current):f});function lre(e){return typeof e=="function"}const dt=Mn({defaultConfig:{...Zn.defaultConfig,...aa.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Zn.requiredConfig,...aa.requiredConfig},contextOverride:aa.Context})(e=>{const t=Zn(Zn.mergeConfig(e,{selection:e.mode==="single"?FU:Eee})),n=aa(aa.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));mz(n),gz(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}}),ure=Oe({vars:{minWidth:ue(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:O.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:_.padding.xxs,borderRadius:_.shape.xxl,maxWidth:Gn.subtract("100vw",_.size.sm),boxShadow:_U[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),cre=be()(()=>({})),Cz=it("div")({displayName:"Menu.Card",modelHook:dt,elemPropsHook:cre})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=H.useMemo(()=>ww(r.state.placement||"bottom"),[r.state.placement]);return k.jsx(Rte,{as:a,...Vt(n,ure({minWidth:typeof e=="number"?ue(e):e,maxHeight:typeof t=="number"?ue(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),dre=Oe({base:{display:"block",height:ue(1),border:"none",borderBlockStart:`${ue(1)} solid ${_.color.border.default}`,margin:`${_.gap.sm} ${_.gap.md}`}}),Oz=Be("hr")({displayName:"Menu.Divider",Component({...e},t,n){return k.jsx(n,{ref:t,...Ke(e,dre())})}});var pre=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},fre=function(e,t){return e+hs(t)},hs=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(fre,""):pre(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?hs(e.props.children):""};hs.default=hs;var mre=hs;const gre=vc(mre),UN={vertical:"bottom",horizontal:"center"},ey=ja("positionX","positionY"),hre=uQ({"0%":{opacity:0,transform:`translate(${ey.positionX}, ${ey.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),vre=Oe({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:_.padding.sm,color:O.fg.inverse,animationName:hre,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:O.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_.shape.md,outline:`${ue(1)} solid transparent`,outlineOffset:`-${ue(1)}`,zIndex:-1,margin:_.gap.xs,backgroundColor:_.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:_U[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Gn.negate(Lr.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Gn.negate(Lr.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Gn.negate(Lr.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Gn.negate(Lr.size50)}}),modifiers:{elementHasFocus:{true:{padding:Gn.subtract(_.padding.md,Gn.divide(_.padding.xxs,2)),"&:before":{margin:Lr.size75}}}}}),Lz=Be("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=UN,elementHasFocus:n=!1,...a},r,i)=>{const o=CQ(t||UN,_.gap.sm);return k.jsx(i,{ref:r,...Vt(a,[vre({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),ey({positionX:o.x,positionY:o.y})]),children:e})}}),zN=(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}},bre=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 $z({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=H.useRef(!1),i=aa(),[o,s]=H.useState(null),l=Qd(),u=zN(i.events.hide,a),c=zN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},v=f=>{r.current||g(f),r.current=!1},y=f=>{r.current=!0,bre(f.currentTarget)&&i.events.hide()};gz(i),mz(i),Ote(i),Lte(i);const I=i.state.visibility!=="hidden",h={"aria-describedby":e==="describe"&&I?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:y,onFocus:v,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}function yre(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=hw(t[r],e[r]):a[r]=t[r],a),{})}const Sre=Be("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=Ow,...s}){const l=gre(n),{targetProps:u,popperProps:c,tooltipProps:d}=$z({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,g]=H.useState(!1),{localRef:v}=Ir();return H.useEffect(()=>{const y=v.current;if(!y)return;const I=()=>{g(y.matches(":focus-visible")||y.classList.contains("focus"))};return I(),y.addEventListener("focus",I),y.addEventListener("blur",I),()=>{y.removeEventListener("focus",I),y.removeEventListener("blur",I)}},[v]),k.jsxs(H.Fragment,{children:[H.cloneElement(a,{...u,...yre(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),k.jsx(ip,{placement:t,fallbackPlacements:o,...c,children:({placement:y})=>{const I=ww(y);return k.jsx(Lz,{transformOrigin:I,...Ke(s),...d,elementHasFocus:p,children:n})}})]})}}),Dz=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=Dz(e.children[n]);if(a)return a}return null}return null},Mz=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=Mz(e.children[n]);if(a)return a}return null},FN=e=>{const t=Mz(e)||Dz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Ere(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=hw(t[r],e[r]):a[r]=t[r],a),{})}const Cl=({placement:e="top",fallbackPlacements:t=Ow,children:n,...a})=>{const[r,i]=H.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=$z({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),FN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),FN(p)&&o.onFocus(d)};return k.jsxs(H.Fragment,{children:[H.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Ere({...o,onMouseEnter:u,onFocus:c},n.props)}),k.jsx(ip,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=ww(d);return k.jsx(Lz,{transformOrigin:p,...l,...a,children:r})}})]})},Pz=Mn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Qd(e.id)},events:{}})),_re=Oe({base:{fontFamily:He.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:We.bold,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.xs} ${_.padding.md}`}}),wre=be()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),kre=be()(e=>({id:e.state.id})),BN=it("div")({modelHook:Pz,elemPropsHook:kre})(({children:e,...t},n)=>k.jsx(Cl,{children:k.jsx(n,{...Vt(t,_re()),children:e})})),Uz=Ra("div")({displayName:"Menu.Group",modelHook:Pz,elemPropsHook:wre,subComponents:{Heading:BN}})(({children:e,title:t,...n},a)=>k.jsxs(a,{...Vt(n),children:[t?k.jsx(BN,{children:t}):null,e]})),Ol=Oe({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.sm} ${_.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:O.fg.default,borderWidth:0,borderRadius:_.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:_.size.md,overflowWrap:"anywhere",[Q.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:Ft.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:_.color.brand.fg.primary.strong,backgroundColor:_.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:Ft.full},"&:where(.focus, :focus-visible)":{[Q.vars.color]:"currentColor",outline:"none",backgroundColor:_.color.brand.accent.primary,color:O.fg.inverse}},"&:is(.hover, :hover)":{color:O.fg.strong,backgroundColor:_.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:O.fg.inverse,backgroundColor:_.color.brand.accent.primary,outline:`${ue(2)} solid transparent`,outlineOffset:`-${ue(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:Ft.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:_.color.brand.accent.primary,opacity:Ft.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Ire=e=>k.jsx(Rl,{...Ol.parts.icon,...e}),zz=Be("span")({Component:({...e},t,n)=>k.jsx(n,{ref:t,...Ol.parts.text,...Ke(e)})}),Fz=Be("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>k.jsx(r,{ref:a,"aria-disabled":t,...Vt(n,Ol({})),children:typeof e=="string"?k.jsx(zz,{children:e}):e})}),Bz=be()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),jz=be()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Ir(t),i=n["data-id"];return H.useLayoutEffect(()=>{e.state.mode==="single"&&gc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:gc(e.state,n["data-id"])?"focus":void 0}});function qz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),qz(e.UNSTABLE_parentModel))}const Tre=ir(be()(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),qz(e))}:void 0})),jz,Bz,GU,qU,Na),Di=it("button")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Tre,subComponents:{Icon:Ire,Text:zz}})(({children:e,...t},n)=>k.jsx(Cl,{placement:"left",children:k.jsx(Fz,{as:n,...t,children:e})})),xre=ir(be()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),zte,$te),Rre=Oe({base:{background:_.color.surface.popover,borderRadius:_.shape.xxl,padding:0,gap:_.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Gz=it("div")({displayName:"Menu.List",modelHook:dt,elemPropsHook:xre})(({children:e,...t},n,a)=>k.jsx(_te,{as:n,model:a,marginY:_.gap.none,...Ke(t,Rre({orientation:a.state.orientation})),children:e})),Hz=Be("span")({Component:({...e},t,n)=>k.jsxs(k.Fragment,{children:[k.jsx(Di.Text,{ref:t,as:n,...e}),k.jsx(Rl,{...Ol.parts.selected,icon:jte})]})}),Are=Be("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,Ol()),children:typeof e=="string"?k.jsx(Hz,{children:e}):e})}),Nre=ir(be()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":zU(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()}}}),Aee,Na),Wz=it("li")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Nre,subComponents:{Icon:Di.Icon,Text:Hz}})(({children:e,...t},n)=>k.jsx(Cl,{placement:"left",children:k.jsx(Are,{as:n,...t,children:e})})),Vz=Dte,Zz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Cre=it("div")({modelHook:dt,elemPropsHook:Vz})(({children:e,...t})=>k.jsx(ip,{placement:"bottom-start",popperOptions:Zz,...t,children:e})),Yz=be()(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)}}})),Kz=ir(Yz,Pte),Ore=ir(Yz,Ute),Lre=it(Ez)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Kz})(({children:e,...t},n)=>k.jsx(n,{...t,children:e})),$re=it(Ez)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Ore})(({children:e,...t},n)=>k.jsx(n,{...t,children:e})),Dre=it("div")({modelHook:dt,elemPropsHook:Vz})(({children:e,...t})=>k.jsx(ip,{placement:"right-start",popperOptions:Zz,...t,children:e})),Mre=(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}},Pre=ir(To(e=>e.UNSTABLE_parentModel,jz),To(e=>e.UNSTABLE_parentModel,Bz),To(e=>e.UNSTABLE_parentModel,qU),be()((e,t)=>({ref:Aa(t,e.state.targetRef)})),To(e=>e.UNSTABLE_parentModel,Na),be()(e=>{const t=P.useRef(),n=Mre(()=>{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}}}})),Ure=it("button")({modelHook:dt,elemPropsHook:Pre})(({children:e,...t},n)=>k.jsxs(Fz,{as:n,...t,children:[typeof e=="string"?k.jsx(Di.Text,{children:e}):e,k.jsx(Di.Icon,{icon:kw})]})),zre=it()({modelHook:dt,subComponents:{Card:Cz,List:Gz,Item:Di,TargetItem:Ure,Group:Uz,Option:Wz,Divider:Oz,Popper:Dre}})(({children:e,model:t,...n},a,r)=>{const i=dt(dt.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=dt.Context;return k.jsx(o.Provider,{value:i,children:e})}),$r=Ra()({displayName:"Menu",modelHook:dt,subComponents:{Target:Lre,Card:Cz,List:Gz,Item:Di,Group:Uz,Option:Wz,Divider:Oz,TargetContext:$re,Popper:Cre,Submenu:zre}})(({children:e})=>k.jsx(k.Fragment,{children:e})),Fre=(e,t,n)=>{let a=t;const r=e.length,i=r-t.length;return r>2&&i<=2?a=e.slice(0,r-1).map(n):r>3&&i===3?a=e.slice(1,r-1).map(n):i>3&&i<r&&(a=e.slice(1,r-2).map(n)),a},to=Mn({defaultConfig:{...lu.defaultConfig,id:"",orientation:"horizontal",menuConfig:{}},requiredConfig:lu.requiredConfig})(e=>{const t=e.getId||zo,n=e.items,a=lu(lu.mergeConfig(e,{orientation:e.orientation||"horizontal",items:n,shouldVirtualize:!1}));let r=a.state.hiddenIds,i=a.state.nonInteractiveIds;r=Fre(n,r,t),i=r;const o={...a.state,hiddenIds:r,nonInteractiveIds:i,orientation:e.orientation||"horizontal"},s=P.useMemo(()=>n?n.filter(c=>o.hiddenIds.includes(t(c))):void 0,[o.hiddenIds,n]),l={...a.events},u=dt(dt.mergeConfig(e.menuConfig,{id:`breadcrumbs-menu-${a.state.id}`,items:s,nonInteractiveIds:o.nonInteractiveIds.filter(c=>!o.hiddenIds.includes(c)),onShow(){u.events.goToFirst()}}));return{...a,state:o,events:l,menu:u}}),Bre=Oe({vars:{maxWidth:""},base:({maxWidth:e})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,fontWeight:We.medium,letterSpacing:_.letterSpacing.subtext.lg,lineHeight:_.lineHeight.subtext.lg,color:O.fg.default,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:e})}),jre=ir(be()((e,t)=>{const{localRef:n}=Ir(Aa(t));let a=!1;const r=n.current;if(r){const{scrollWidth:i,clientWidth:o}=r;a=i>o}return{tabIndex:a?0:void 0,ref:n}}),BU,Na),qre=it("li")({displayName:"Breadcrumbs.Item",modelHook:to,elemPropsHook:jre})(({children:e,tooltipProps:t={},maxWidth:n="350px",...a},r)=>k.jsx(Cl,{...t,children:k.jsx(lz,{as:r,...Ke(a,Bre({maxWidth:typeof n=="number"?ue(n):n})),children:e})})),Gre=Oe({vars:{maxWidth:""},base:({maxWidth:e})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,fontWeight:We.normal,letterSpacing:_.letterSpacing.subtext.lg,lineHeight:_.lineHeight.subtext.lg,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:e})}),Xz=Be("a")({displayName:"Breadcrumbs.Link",Component:({maxWidth:e=350,href:t,tooltipProps:n={},children:a,...r},i,o)=>k.jsx(Cl,{...n,children:k.jsx(Yte,{href:t,ref:i,as:o,role:"link",variant:"standalone",...Ke(r,Gre({maxWidth:typeof e=="number"?ue(e):e})),children:a})})}),jN=Oe({parts:{chevronRightIcon:"breadcrumbs-item-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"inline-flex",whiteSpace:"nowrap",[Q.vars.size]:Nn.systemIcon.size.md,[Q.vars.color]:O.fg.default,[e]:{height:_.size.sm,width:_.size.sm,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),Hre=ir(BU,Na),Wre=it("li")({displayName:"Breadcrumbs.Item",modelHook:to,elemPropsHook:Hre,subComponents:{Link:Xz}})(({children:e,...t},n)=>k.jsxs(n,{...Vt(t,jN()),children:[e,k.jsx(Rl,{icon:kw,...jN.parts.chevronRightIcon,"aria-hidden":!0})]})),Vre=Oe({base:{padding:`${_.padding.xs} 0`,margin:0,display:"inline-flex",alignItems:"center",minHeight:_.size.lg,listStyle:"none",width:"100%"}}),Zre=it("ul")({displayName:"Breadcrumbs.List",modelHook:to,elemPropsHook:_ee})(({overflowButton:e,children:t,...n},a,r)=>{const i=bw(r,t),o=i.length-2;return k.jsxs(a,{role:"list",...Ke(n,Vre()),children:[i.length?i.slice(0,o):i,e,i.length?i.slice(o,i.length):null]})}),Yre=Oe({base:{textDecoration:"none"}}),Kre=Be("a")({displayName:"Breadcrumbs.Menu.Item",Component:(e,t,n)=>k.jsx($r.Item,{as:n,...Ke(e,Yre()),ref:t})}),Xre=Oe({base:{width:ue(280),maxWidth:ue(280),maxHeight:ue(296)}}),Jre=e=>k.jsx($r.Card,{...Ke(e,Xre())}),Qre=Ra()({displayName:"Breadcrumbs.Menu",modelHook:dt,subComponents:{Card:Jre,List:$r.List,Item:Kre,Divider:$r.Divider,Target:$r.Target,TargetContext:$r.TargetContext,Popper:$r.Popper}})(({children:e})=>k.jsx(k.Fragment,{children:e})),Hv=Oe({parts:{overflowButton:"breadcrumbs-overflow-button",chevronRightIcon:"breadcrumbs-overflow-button-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"flex",[Q.vars.color]:O.fg.default,[Q.vars.size]:Nn.systemIcon.size.md,[e]:{height:_.size.sm,width:_.size.sm,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),eae=ir(be()(()=>({"aria-haspopup":!0,"aria-controls":"menu"})),Iee,To(e=>e.menu,Kz)),tae=it("button")({displayName:"Breadcrumbs.OverflowButton",modelHook:to,elemPropsHook:eae})(({style:e,...t},n)=>k.jsxs("li",{...Hv(),...e,children:[k.jsx(Jte,{as:n,icon:qte,...Hv.parts.overflowButton,...Ke(t)}),k.jsx(Rl,{icon:kw,...Hv.parts.chevronRightIcon,"aria-hidden":!0})]})),de=Ra("nav")({displayName:"Breadcrumbs",modelHook:to,subComponents:{List:Zre,Item:Wre,Link:Xz,CurrentItem:qre,OverflowButton:tae,Menu:Qre}})(({children:e,...t},n,a)=>k.jsx($r,{model:a.menu,children:k.jsx("nav",{role:"navigation",...Ke(t),children:e})})),Jz=()=>k.jsx(de,{"aria-label":"Breadcrumbs",children:k.jsxs(de.List,{children:[k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/",children:"Home"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/menus",children:"Menus"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/lunch",children:"Lunch"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/house-specialty-pies",maxWidth:100,children:"House Specialty Pies"})}),k.jsx(de.CurrentItem,{maxWidth:100,children:"Canvas Supreme"})]})});Jz.__RAW__=`import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs';
293
+ color: hsl(${Math.max(0,Math.min(120-120*I,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 hN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const eee=(e,t)=>Math.abs(e-t)<=1,tee=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},vN=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},nee=e=>e,ree=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},aee=(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(vN(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(vN(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},bN={passive:!0},yN=typeof window>"u"?!0:"onscrollend"in window,iee=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&yN?()=>{}:tee(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,bN);const u=e.options.useScrollendEvent&&yN;return u&&n.addEventListener("scrollend",l,bN),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},oee=(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"]},see=(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 lee{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:nee,rangeExtractor:ree,onChange:()=>{},measureElement:oee,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,v=s.get(d),y=typeof v=="number"?v:this.options.estimateSize(c),I=g+y,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:g,size:y,end:I,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?uee({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 hN(a[UU(0,a.length-1,r=>hN(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();eee(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 UU=(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 uee({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=UU(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 SN=typeof document<"u"?H.useLayoutEffect:H.useEffect;function cee(e){const t=H.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Zy.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=H.useState(()=>new lee(n));return a.setOptions(n),SN(()=>a._didMount(),[]),SN(()=>a._willUpdate()),a}function dee(e){return cee({observeElementRect:aee,observeElementOffset:iee,scrollToFn:see,...e})}const zo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Bv=e=>typeof e=="string"?e:e===void 0?"":e.text||"",pee={items:[]},ou=Mn({defaultConfig:{...pee,id:"",getId:zo,getTextValue:Bv,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Qd(e.id),n=P.useRef(zo),a=P.useRef(Bv);n.current=e.getId||zo,a.current=e.getTextValue||e.getId||Bv;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=dee({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(b=>b.id===f.id)?m.filter(b=>b.id!==f.id):m)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),fee=e=>e,tp=()=>0,np=(e,{state:t})=>t.items.length-1,mee=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return tp()},gee=(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 np(e,{state:t})},hee=(e,{state:t})=>t.columnCount?e%t.columnCount:tp(),vee=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:np(e,{state:t}),bee=(e,{state:t})=>t.items.find(n=>n.id===e),yee=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",gc=(e,t)=>{const{cursorId:n}=e;return n==null||n===""?!1:typeof n=="string"?n===t:n.includes(t)},xo=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return tp();if(e===-1)return np(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?xo(e)(i,{state:n},a-1):i},See=fee({getFirst:tp,getLast:np,getItem:bee,getNext:xo(1),getNextRow:(e,{state:t})=>xo(t.columnCount)(e,{state:t}),getPrevious:xo(-1),getPreviousRow:(e,{state:t})=>xo(-t.columnCount)(e,{state:t}),getPreviousPage:hee,getNextPage:vee,getFirstOfRow:mee,getLastOfRow:gee}),su=Mn({defaultConfig:{...ou.defaultConfig,initialCursorId:"",columnCount:0,navigation:See,pageSize:0},requiredConfig:ou.requiredConfig,contextOverride:ou.Context})(e=>{var d;const[t,n]=P.useState(e.initialCursorId),a=P.useRef(e.pageSize),r=e.columnCount||0,i=ou(e),o=e.navigation,s=P.useRef(-1),l=p=>{var v;const g=((v=u.items[p])==null?void 0:v.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(v=>v.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}}),zU=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),FU={select(e){return{selectedIds:[e],unselectedIds:[]}}},Eee={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:[]}}},la=Mn({defaultConfig:{...su.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:FU},requiredConfig:su.requiredConfig,contextOverride:su.Context})(e=>{const t=su(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}}),Zn=Mn({defaultConfig:{UNSTABLE_parentModel:void 0,...la.defaultConfig},requiredConfig:la.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...la(e)})),Tu=P.createContext({});function bw(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 k.jsx(Tu.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 k.jsx(Tu.Provider,{value:{item:a},children:r},a.id||a.index)}):k.jsx(Tu.Provider,{value:{},children:t})}const Na=be()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=P.useContext(Tu),[s,l]=P.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Ir(Aa(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return ep(()=>{var y;if((o==null?void 0:o.index)===0&&((y=u.current)!=null&&y.clientHeight),i)return;const p=a.indexRef.current,g=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===g))return;const v={id:g,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(v),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:CU(`${a.id}-${s}`)}});function vo(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 lu=Mn({defaultConfig:{...la.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:la.requiredConfig,contextOverride:la.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),v=P.useRef(0),y=t?n:[],I=(e.nonInteractiveIds||[]).concat(y),h=la({...e,nonInteractiveIds:I}),f={...h.state,hiddenIds:y,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},m={...h.events,select(b){const{selectedIds:E}=h.selection.select(b.id,f),w=vo(c.current,l,v.current,d.current,E,e.items);h.events.select(b),a(w)},setContainerSize(b){c.current=h.state.orientation==="horizontal"?b.width||0:b.height||0,s(c.current);const E=vo(c.current,l,v.current,d.current,f.selectedIds,e.items);a(E)},setContainerWidth(b){m.setContainerSize({width:b.width,height:0})},setContainerGap(b){u(b.size);const E=vo(c.current,b.size,v.current,d.current,f.selectedIds,e.items);a(E)},setOverflowTargetSize(b){v.current=h.state.orientation==="horizontal"?b.width||0:b.height||0,g(v.current)},setOverflowTargetWidth(b){v.current=b.width,m.setOverflowTargetSize({width:v.current,height:0})},addItemWidth(b){m.addItemSize({id:b.id,width:b.width,height:0})},addItemSize(b){d.current={...d.current,[b.id]:h.state.orientation==="horizontal"?b.width:b.height},i(d.current);const E=vo(c.current,l,v.current,d.current,f.selectedIds,e.items);a(E)},removeItemSize(b){const E={...d.current};delete E[b.id],d.current=E,i(d.current);const w=vo(c.current,l,v.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(T=>b.id!==T):f.selectedIds,e.items);a(w)},removeItemWidth(b){m.removeItemSize({id:b.id})},addHiddenKey(b){a(E=>E.concat(b.id))},removeHiddenKey(b){a(E=>E.filter(w=>w!==b.id))}};return{...h,state:f,events:m}}),_ee=be()((e,t)=>{const{elementRef:n,localRef:a}=Ir(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return ZQ({ref:a,onResize:e.events.setContainerSize}),ep(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),wee={position:"absolute",left:-99999},BU=be()((e,t,n={})=>{const{elementRef:a,localRef:r}=Ir(t),i=n["data-id"]||"";ep(()=>{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?wee:{},inert:P.use?o:o?"":void 0}}),kee={position:"absolute",left:-99999},Iee=be()((e,t)=>{const{elementRef:n,localRef:a}=Ir(t),r=P.useRef(!0);ep(()=>{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?kee:void 0}}),Jb={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"}},Tee={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},EN={...Jb.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},jv={Home:"goToFirst",End:"goToLast"},_N=(e,t)=>e.hasOwnProperty(t);function xee(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in jv)if(_N(jv,l)&&e.key===l)return(i=(r=t.events)[jv[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?EN:Jb[t.state.orientation],a=xU(e.currentTarget);for(const l in n)if(_N(n,l)&&(a?e.key===Tee[l]:e.key===l)){const u=t.state.columnCount>0?EN[l]:Jb[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const jU=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>jU(e,t-1)),n==null||n("Retry timeout")},Ree=(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="${TU(`${u}-${o.id}`)}"]`);jU(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),qU=be()((e,t,n={})=>{const a=P.useRef(e.state);a.current=e.state;const r=P.useRef(null);return P.useEffect(()=>{r.current&&Ree(e,yee(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){xee(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":CU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&gc(e.state,n["data-id"])?0:-1:0}}),GU=be()(({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})}}}),Aee=be()((e,t,n={})=>{const a=n["data-id"]||"";return{className:gc(e.state,a)?"focus":""}}),Nee=e=>SQ[e]||Qn(e),Cee=e=>EQ[e],Oee=e=>_Q[e]||Qn(e),Lee=e=>wQ[e]||Qn(e),$ee=e=>gw.properties.fontFamilies[e]||Qn(e),Dee=e=>gw.properties.fontSizes[e]||Qn(e),Mee=e=>gw.properties.fontWeights[e]||Qn(e);function vt(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:Nee(r)};if(n.system==="depth"){const s=Cee(r);return{...i,...s}}return n.system==="font"?{...i,[o]:$ee(r)}:n.system==="fontSize"?{...i,[o]:Dee(r)}:n.system==="fontWeight"?{...i,[o]:Mee(r)}:n.system==="shape"?{...i,[o]:Oee(r)}:n.system==="space"?{...i,[o]:Lee(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function sn(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"}],Pee=vt(HU),Uee=sn(Pee),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"}],zee=vt(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"}],Fee=vt(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"}],Bee=vt(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"}],jee=vt(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"}],qee=vt(KU),Gee=sn({...zee,...Fee,...Bee,...jee,...qee}),Hee=[...WU,...VU,...ZU,...YU,...KU],XU=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],Wee=vt(XU),Vee=sn(Wee),JU=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],Zee=vt(JU),Yee=sn(Zee),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"}],Kee=vt(QU),Xee=sn(Kee),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"}],Jee=vt(ez),Qee=sn(Jee),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"}],ete=vt(tz),tte=sn(ete),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"}],nte=vt(nz),rte=sn(nte),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"}],ate=vt(rz),ite=sn(ate),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"}],ote=vt(az),ste=sn(ote),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"}],lte=vt(iz),ute=sn(lte),cte=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],dte=e=>OP(e)&&!cte.includes(e),yw=e=>[{boxSizing:"border-box"},Uee,Gee,Vee,Yee,Xee,Qee,tte,rte,ite,ste,ute].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),pte=cc("div",{shouldForwardProp:dte})(yw),fte=cc("div")(yw),Sw=Be("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=RU(()=>typeof a=="string"?pte:fte);return k.jsx(r,{as:a,ref:n,...Ke(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"}],mte=vt(oz),gte=sn(mte),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"}],hte=vt(sz),vte=sn(hte),bte=[...HU,...Hee,...XU,...JU,...oz,...QU,...sz,...ez,...tz,...nz,...rz,...az,...iz].reduce((e,t)=>(e[t.name]=!0,e),{});function yte(e){return bte[e]||!1}function Vt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(yte(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...yw(n),...gte(n),...vte(n)}),Ke(r,[t,i])}const Ste=it("li")({displayName:"Item",modelHook:Zn,elemPropsHook:Na})((e,t)=>k.jsx(t,{...Vt(e)})),Ete=be()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),wN=Oe({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"}}}}}),_te=Ra("ul")({displayName:"ListBox",modelHook:Zn,elemPropsHook:Ete,subComponents:{Item:Ste}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>k.jsx("div",{ref:l.state.containerRef,...wN.parts.listBoxContainer,...Ke({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},wN({orientation:l.state.orientation})),children:k.jsx(s,{...Vt(o),"data-part":"list",children:bw(l,o.children)})})),Ew=Oe({base:{},modifiers:{typeLevel:{"title.large":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.title.lg,lineHeight:_.lineHeight.title.lg,color:O.fg.strong},"title.medium":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.title.md,lineHeight:_.lineHeight.title.md,color:O.fg.strong},"title.small":{fontFamily:He.default,fontWeight:We.bold,lineHeight:_.lineHeight.title.sm,fontSize:_.fontSize.title.sm,color:O.fg.strong},"heading.large":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.lg,lineHeight:_.lineHeight.heading.lg,color:O.fg.strong},"heading.medium":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.md,lineHeight:_.lineHeight.heading.md,color:O.fg.strong},"heading.small":{fontFamily:He.default,fontWeight:We.bold,fontSize:_.fontSize.heading.sm,lineHeight:_.lineHeight.heading.sm,color:O.fg.strong},"body.large":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.lg,lineHeight:_.lineHeight.body.lg,color:O.fg.default},"body.medium":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.md,lineHeight:_.lineHeight.body.md,color:O.fg.default},"body.small":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,color:O.fg.default},"subtext.large":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:O.fg.default},"subtext.medium":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,color:O.fg.default},"subtext.small":{fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.sm,lineHeight:_.lineHeight.subtext.sm,letterSpacing:_.letterSpacing.subtext.sm,color:O.fg.default}},variant:{error:{color:_.color.brand.fg.critical.default},hint:{color:O.fg.muted.default},inverse:{color:O.fg.inverse}}}}),lz=Be("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>k.jsx(i,{ref:r,...Vt(a,Ew({typeLevel:t,variant:n})),children:e})}),wte=Oe({extends:Ew,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),kte=Be("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,wte()),children:e})}),Ite=Oe({extends:Ew,base:{color:O.fg.strong,fontWeight:We.bold,marginBlock:_.padding.none},defaultModifiers:{typeLevel:"body.large"}}),Tte=Be("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,Ite()),children:e})}),xte=Oe({base:{display:"flex",flexDirection:"column",gap:_.gap.lg,padding:_.padding.xl,backgroundColor:_.color.surface.default,borderRadius:_.shape.xxl,border:`${ue(1)} solid ${_.color.border.default}`},modifiers:{variant:{borderless:{borderColor:"transparent"},tonal:{backgroundColor:_.color.surface.alt.default,borderColor:O.border.transparent}}}}),Rte=Be("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>k.jsx(r,{ref:a,...Vt(n,xte({variant:t})),children:e}),subComponents:{Heading:Tte,Body:kte}});function Ate(e){return e.length?e[e.length-1]:null}function uz(e,t){const{min:n,max:a}=_w.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function qv(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(uz(a,t))})}function Nte(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Cte(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:Nte(a.owner,t)})).filter(a=>a.parent===e.element)}function cz(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?cz(e[a],n.join(".")):e[a]}function dz(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),dz(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const pz=e=>{if(typeof window<"u")return cz(window,e)},fz=(e,t)=>{typeof window<"u"&&dz(window,e,t)},kN=(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},_w=pz("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:uz},_adapter:{}};fz("workday.__popupStack",_w);const cr=pz("workday.__popupStackOfStacks")||[_w];cr.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";fz("workday.__popupStackOfStacks",cr);function or(){return cr[cr.length-1]}const _t={createContainer(){var n;const e=or();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=or();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),kN(t,e.owner).appendChild(e.element),qv(_t.getElements())},remove(e){var n;const t=cr.find(a=>!!_t.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),kN(t,a==null?void 0:a.owner).removeChild(e),qv(_t.getElements(t))}},isTopmost(e){var a;const t=or();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Ate(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||or();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=or();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],Cte(n,t.items).forEach(r=>{_t.bringToTop(r.element)}),qv(_t.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=or();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=or();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:{}};cr.push(n)},popStackContext(e){var n,a;const t=or();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&cr.length>1&&cr.pop()},transferToCurrentContext(e){var a;const t=or();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;cr.find(r=>!!r.items.find(i=>i.element===e.element))&&_t.remove(e.element),_t.add(e)}};let uu=null;ur.isEnabled&&ur.on("change",()=>{ur.isFullscreen?ur.element&&(uu=ur.element,_t.pushStackContext(uu)):uu&&_t.popStackContext(uu)});const Gv=Mn({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Qd(e.id),[n,a]=P.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),IN=()=>{},aa=Mn({defaultContext:{state:{},events:{show:IN,hide:IN}},defaultConfig:{...Gv.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Gv.requiredConfig})(e=>{const t=H.useRef(null),n=H.useRef(null),[a,r]=H.useState("bottom"),i=Gv(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}});aa.Context;const mz=be()(e=>{const t=P.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!_t.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]),{}}),gz=be()(e=>{const t=P.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&_t.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]),{}}),Ote=be()(e=>{const t=P.useCallback(a=>{ur.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return P.useEffect(()=>{if(n&&ur.isEnabled)return ur.on("change",t),()=>{ur.off("change",t)}},[t,n]),{}});function hz(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:hz(e.parentElement)}const Lte=be()(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=hz(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),$te=be()(e=>{const t=P.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=GQ(e.state.stackRef.current),i=HQ(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]),{}}),Dte=be()(({state:e,events:t},n)=>{const a=Aa(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}}),Mte=(e,t)=>{const{elementRef:n,localRef:a}=Ir(e),r=P.useContext(ps),{style:i}=PU(r,{}),o=P.useRef(!0),[s]=P.useState(()=>{if(o.current){const l=_t.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 _t.add({element:u,owner:l}),()=>{_t.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":xU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),a},Pte=be()(({events:e,state:t},n)=>({ref:Aa(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),Ute=be()(({events:e,state:t},n)=>({ref:Aa(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 vz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:vz(e.parentElement)}function bz(e){return e===null||e===document.body||!e.parentElement?null:qQ(e)?e:bz(e.parentElement)}function TN(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 zte=be()(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&&(_t.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=vz(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&bz(n.current)||TN(o,l)||TN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!_t.contains(e.state.stackRef.current,document.activeElement)||a.current?lN(o):requestAnimationFrame(()=>{lN(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),ww=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=Oe({vars:{width:"",height:"",size:""},base:({height:e,size:t,width:n})=>({display:"inline-block","> svg":{display:"block",width:F(n,t),height:F(e,t)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),Fte=(e,t)=>e?e in t?t[e]:typeof e=="number"?ue(e):e:"",Bte=Be("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):k.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Ke(r,yz({shouldMirror:e,shouldMirrorInRTL:t}))})}),rp={System:"system"},jte={name:"check-small",type:rp.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"]},kw={name:"chevron-right-small",type:rp.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"]},qte={name:"related-actions",type:rp.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon wd-icon-related-actions" viewBox="0 0 24 24" role="presentation" focusable="false"><path fill="oklch(0.3523 0 0 / 1)" d="M4 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5M12 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5M20 9.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5" class="wd-icon-fill"/></svg>',filename:"wd-icon-related-actions.svg",category:"Core",tags:["three","dots","twinkie","more","kebob","menu","dropdown","select","meatballs"]},Q=Oe({extends:yz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,accentColor:t,backgroundColor:n,color:a})=>({"& svg":{width:F(e,Nn.systemIcon.size.lg),height:F(e,Nn.systemIcon.size.lg)},".wd-icon .wd-icon-fill":{fill:F(a,Nn.systemIcon.color.fill)},".wd-icon .wd-icon-accent, & .wd-icon-accent2":{fill:F(t,F(a,Nn.systemIcon.color.accent))},".wd-icon .wd-icon-background":{fill:F(n,"transparent")},"@media (prefers-contrast: more)":{".wd-icon .wd-icon-fill, .wd-icon .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),Rl=Be("span")({displayName:"SystemIcon",Component:({accent:e,background:t,color:n,icon:a,size:r,...i},o,s)=>k.jsx(Bte,{as:s,src:a,type:rp.System,ref:o,...Ke(i,Q({size:Fte(r,Nn.systemIcon.size),color:n,accentColor:e,backgroundColor:t}))})}),Gte=Uo({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),Hte=Be("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>k.jsx(Sw,{as:a,ref:n,...Ke(t,Gte),children:e})}),Wte=Oe({base:{display:"inline-block"},modifiers:{size:{extraSmall:{[Q.vars.size]:Nn.systemIcon.size.xs},small:{[Q.vars.size]:Nn.systemIcon.size.md},medium:{[Q.vars.size]:Nn.systemIcon.size.md},large:{[Q.vars.size]:Nn.systemIcon.size.lg}}}}),Vte=Be("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>e===void 0?null:k.jsx(Rl,{ref:i,as:o,icon:e,shouldMirror:n,shouldMirrorInRTL:a,...Ke(r,Wte({size:t}))})}),K={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")},B=Oe({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:We.bold,backgroundColor:F(K.default.background,F(e,"transparent")),color:F(K.default.label,F(r,O.fg.strong)),borderWidth:ue(1),borderStyle:"solid",gap:_.gap.sm,borderColor:F(K.default.border,F(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",outline:`${ue(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:F(K.default.borderRadius,F(o,_.shape.full)),position:"relative",verticalAlign:"middle",overflow:"hidden",[Q.vars.color]:F(K.default.icon,O.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:F(K.default.opacity,F(i,Ft.full))},"&:focus-visible, &.focus":{backgroundColor:F(K.focus.background,F(e,"transparent")),borderColor:F(K.focus.border,F(t,"transparent")),color:F(K.focus.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.focus.icon,O.fg.strong),outline:`${ue(2)} solid transparent`,outlineOffset:ue(2),boxShadow:`0 0 0 ${ue(2)} ${F(K.focus.boxShadowInner,F(n,_.color.border.inverse.default))},0 0 0 ${ue(4)} ${F(K.focus.boxShadowOuter,F(a,_.color.brand.focus.primary))}`},"&:hover, &.hover":{backgroundColor:F(K.hover.background,F(e,_.color.surface.contrast.strong)),borderColor:F(K.hover.border,F(t,"transparent")),color:F(K.hover.label,F(r,O.fg.stronger)),[Q.vars.color]:F(K.hover.icon,O.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:F(K.active.background,F(e,"transparent")),borderColor:F(K.active.border,F(t,"transparent")),color:F(K.active.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.active.icon,O.fg.strong)},"&:disabled, &.disabled":{backgroundColor:F(K.disabled.background,F(e,"transparent")),borderColor:F(K.disabled.border,F(t,"transparent")),color:F(K.disabled.label,F(r,O.fg.strong)),[Q.vars.color]:F(K.disabled.icon,"currentColor")},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${ue(2)} solid transparent`,outlineOffset:`-${ue(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${ue(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{fontSize:_.fontSize.body.sm,lineHeight:_.lineHeight.body.sm,letterSpacing:_.letterSpacing.body.sm,height:_.size.lg,paddingInline:_.padding.xxl,minWidth:Lr.size1400},medium:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,minWidth:Lr.size1200,paddingInline:_.padding.xl,height:_.size.md},small:{fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,height:_.size.sm,minWidth:Lr.size1000,paddingInline:_.padding.md,gap:_.gap.xs},extraSmall:{fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,height:_.size.xs,minWidth:"auto",paddingInline:_.padding.sm,gap:_.gap.xs}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:0},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.xxl}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xxl,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.lg,paddingInlineEnd:_.padding.xl}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xl,paddingInlineEnd:_.padding.lg}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.md}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.md,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}}]}),ni=Be("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>k.jsx(u,{ref:l,type:"button",...Vt(s,[B({size:t,iconPosition:r,grow:a}),K.default((o==null?void 0:o.default)||{}),K.focus((o==null?void 0:o.focus)||{}),K.hover((o==null?void 0:o.hover)||{}),K.active((o==null?void 0:o.active)||{}),K.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:Vte,Label:Hte}}),Zte=Oe({base:{fontFamily:He.default,textDecoration:"underline",color:_.color.fg.info.default,cursor:"pointer",borderRadius:ue(2),padding:`0 ${ue(2)} `,margin:"0 -2px",transition:"color 0.15s,background-color 0.15s",wordBreak:"break-word","&:hover, &.hover":{color:_.color.fg.info.strong,background:_.color.surface.alt.default},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${_.color.brand.focus.primary}`,outline:"none"},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.alt.default}},modifiers:{variant:{inverse:{color:O.fg.inverse,"&:hover, &.hover":{color:O.fg.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${O.fg.inverse}`},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.navigation}},standalone:{textDecoration:"none"},standaloneInverse:{textDecoration:"none",color:O.fg.inverse,"&:hover, &.hover":{color:O.fg.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${ue(2)} ${_.color.focus.inverse}`},"&:active, &.active":{color:_.color.fg.info.strong,background:_.color.surface.navigation}}}}}),Yte=Be("a")({displayName:"Hyperlink",Component:({children:e,variant:t,...n},a,r)=>k.jsx(r,{ref:a,...Ke(n,Zte({variant:t})),children:e})}),Sz=Be("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 k.jsxs(ni,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&k.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&k.jsx(ni.Label,{children:e}),t&&c&&["only","end"].includes(c)&&k.jsx(ni.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),Kte=Oe({extends:B,base:{[B.vars.background]:_.color.surface.transparent,[B.vars.borderRadius]:_.shape.full,[B.vars.border]:O.border.input.default,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.default,[B.vars.label]:O.fg.strong,[B.vars.boxShadowInner]:_.color.focus.inverse,[B.vars.boxShadowOuter]:_.color.brand.focus.primary,[Q.vars.color]:F(K.focus.icon,"currentColor")},"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.strong,[B.vars.border]:_.color.border.input.hover,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.strong,[B.vars.border]:_.color.border.input.hover,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor")}},modifiers:{variant:{inverse:{[B.vars.background]:_.color.surface.transparent,[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.inverse,[B.vars.border]:O.border.transparent,[B.vars.label]:O.fg.contrast.default,[B.vars.boxShadowInner]:O.border.contrast.default,[B.vars.boxShadowOuter]:_.color.focus.inverse,[Q.vars.color]:F(K.focus.icon,"currentColor")},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.border]:_.color.border.inverse.default,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor")}}}}}),Ez=Be("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>k.jsx(Sz,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[Kte({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})}),Xte=Oe({extends:B,base:{paddingInline:_.padding.xs,minWidth:"auto",borderWidth:ue(2),[B.vars.borderRadius]:_.shape.full,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.focus.icon,"currentColor"),[B.vars.border]:O.border.transparent,[B.vars.label]:O.fg.contrast.default,...iN({width:2,separation:0,innerColor:_.color.focus.inverse,outerColor:_.color.brand.focus.primary})},"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.strong,[Q.vars.color]:O.fg.strong,textDecoration:"underline"},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.strong,[Q.vars.color]:F(K.active.icon,"currentColor"),textDecoration:"underline"},"&:disabled, &.disabled":{textDecoration:"none",[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.default,[Q.vars.color]:F(K.default.icon,"currentColor")}},modifiers:{iconPosition:{only:{padding:0,[Q.vars.color]:F(K.default.icon,O.fg.default),"&:focus-visible, &.focus":{[Q.vars.color]:F(K.focus.icon,O.fg.strong)},"&:hover, &.hover":{[Q.vars.color]:F(K.hover.icon,O.fg.strong)},"&:active, &.active":{[Q.vars.color]:F(K.active.icon,O.fg.strong)},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[Q.vars.color]:F(K.disabled.icon,O.fg.default)}},start:{},end:{}},variant:{inverse:{[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor"),"&:hover, &.hover":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.hover}),[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[B.vars.background]:_.color.surface.inverse,[B.vars.label]:O.fg.contrast.default,[Q.vars.color]:F(K.focus.icon,"currentColor"),...iN({width:2,separation:2,innerColor:O.border.contrast.default,outerColor:_.color.focus.inverse})},"&:active, &.active":{[B.vars.background]:Vn.darken({color:_.color.surface.transparent,mixinColor:_.color.surface.overlay.mixin,mixinValue:_.opacity.surface.pressed}),[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.active.icon,"currentColor")},"&:disabled, &.disabled":{[B.vars.opacity]:Ft.disabled,[B.vars.background]:_.color.surface.transparent,[B.vars.label]:O.fg.inverse,[Q.vars.color]:F(K.default.icon,"currentColor")}}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:_.size.lg}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:_.size.md}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:_.size.sm}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.sm}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:_.padding.sm,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:_.size.xs}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:_.padding.xxs,paddingInlineEnd:_.padding.xs}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:_.padding.xs,paddingInlineEnd:_.padding.xxs}}]}),Jte=Be("button")({displayName:"TertiaryButton",Component:({children:e,icon:t,size:n="medium",variant:a,iconPosition:r,grow:i,cs:o,...s},l,u)=>{const c=r||(t?e?"start":"only":void 0);return k.jsx(Sz,{as:u,ref:l,icon:t,size:n,iconPosition:r,grow:i,cs:[Xte({size:n,variant:a,grow:i,iconPosition:c}),o],...s,children:e})}});var bn="top",$n="bottom",Dn="right",yn="left",Iw="auto",Al=[bn,$n,Dn,yn],Li="start",Tw="end",Qte="clippingParents",_z="viewport",bo="popper",ene="reference",xN=Al.reduce(function(e,t){return e.concat([t+"-"+Li,t+"-"+Tw])},[]),wz=[].concat(Al,[Iw]).reduce(function(e,t){return e.concat([t,t+"-"+Li,t+"-"+Tw])},[]),tne="beforeRead",nne="read",rne="afterRead",ane="beforeMain",ine="main",one="afterMain",sne="beforeWrite",lne="write",une="afterWrite",cne=[tne,nne,rne,ane,ine,one,sne,lne,une];function Pn(e){return e?(e.nodeName||"").toLowerCase():null}function Un(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fs(e){var t=Un(e).Element;return e instanceof t||e instanceof Element}function er(e){var t=Un(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dne(e){var t=Un(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pne(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];!er(i)||!Pn(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 fne(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},{});!er(r)||!Pn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const mne={name:"applyStyles",enabled:!0,phase:"write",fn:pne,effect:fne,requires:["computeStyles"]};function Jn(e){return e.split("-")[0]}function xw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function kz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dne(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function gr(e){return Un(e).getComputedStyle(e)}function gne(e){return["table","td","th"].indexOf(Pn(e))>=0}function Tr(e){return((fs(e)?e.ownerDocument:e.document)||window.document).documentElement}function ap(e){return Pn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||Tr(e)}function RN(e){if(!er(e)||gr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=Tr(t);if(Pn(t)==="body"&&gr(t).position==="static"&&gr(n).position!=="static")return n}return t}function hne(e){for(var t=ap(e);er(t)&&["html","body"].indexOf(Pn(t))<0;){var n=gr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Nl(e){for(var t=Un(e),n=RN(e);n&&gne(n)&&gr(n).position==="static";)n=RN(n);return n&&Pn(n)==="body"&&gr(n).position==="static"?t:n||hne(e)||t}function Rw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xu(e,t,n){return Math.max(e,Math.min(t,n))}function Iz(){return{top:0,right:0,bottom:0,left:0}}function Tz(e){return Object.assign(Object.assign({},Iz()),e)}function xz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function vne(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Jn(n.placement),s=Rw(o),l=[yn,Dn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=xw(r),p=s==="y"?bn:yn,g=s==="y"?$n:Dn,v=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],y=i[s]-n.rects.reference[s],I=Nl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=v/2-y/2,m=c[p],b=h-d[u]-c[g],E=h/2-d[u]/2+f,w=xu(m,E,b),T=s;n.modifiersData[a]=(t={},t[T]=w,t.centerOffset=w-E,t)}}function bne(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)||kz(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:Tz(typeof s!="number"?s:xz(s,Al))}))}const yne={name:"arrow",enabled:!0,phase:"main",fn:vne,effect:bne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Sne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ene(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 AN(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=Ene(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),v=yn,y=bn,I=window;if(l){var h=Nl(n);h===Un(n)&&(h=Tr(n)),r===bn&&(y=$n,d-=h.clientHeight-a.height,d*=s?1:-1),r===yn&&(v=Dn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&Sne);if(s){var m;return Object.assign(Object.assign({},f),{},(m={},m[y]=g?"0":"",m[v]=p?"0":"",m.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",m))}return Object.assign(Object.assign({},f),{},(t={},t[y]=g?d+"px":"",t[v]=p?c+"px":"",t.transform="",t))}function _ne(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:Jn(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),AN(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),AN(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 wne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_ne,data:{}};var cu={passive:!0};function kne(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=Un(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,cu)}),s&&l.addEventListener("resize",n.update,cu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,cu)}),s&&l.removeEventListener("resize",n.update,cu)}}const Ine={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kne,data:{}};var Tne={left:"right",right:"left",bottom:"top",top:"bottom"};function Ru(e){return e.replace(/left|right|bottom|top/g,function(t){return Tne[t]})}var xne={start:"end",end:"start"};function NN(e){return e.replace(/start|end/g,function(t){return xne[t]})}function ms(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 Aw(e){var t=Un(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Nw(e){return ms(Tr(e)).left+Aw(e).scrollLeft}function Rne(e){var t=Un(e),n=Tr(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+Nw(e),y:s}}function Ane(e){var t=Tr(e),n=Aw(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+Nw(e),s=-n.scrollTop;return gr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function Cw(e){var t=gr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Rz(e){return["html","body","#document"].indexOf(Pn(e))>=0?e.ownerDocument.body:er(e)&&Cw(e)?e:Rz(ap(e))}function Fo(e,t){t===void 0&&(t=[]);var n=Rz(e),a=Pn(n)==="body",r=Un(n),i=a?[r].concat(r.visualViewport||[],Cw(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Fo(ap(i)))}function Qb(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nne(e){var t=ms(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 CN(e,t){return t===_z?Qb(Rne(e)):er(t)?Nne(t):Qb(Ane(Tr(e)))}function Cne(e){var t=Fo(ap(e)),n=["absolute","fixed"].indexOf(gr(e).position)>=0,a=n&&er(e)?Nl(e):e;return fs(a)?t.filter(function(r){return fs(r)&&kz(r,a)&&Pn(r)!=="body"}):[]}function One(e,t,n){var a=t==="clippingParents"?Cne(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=CN(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},CN(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 gs(e){return e.split("-")[1]}function Az(e){var t=e.reference,n=e.element,a=e.placement,r=a?Jn(a):null,i=a?gs(a):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(r){case bn:l={x:o,y:t.y-n.height};break;case $n:l={x:o,y:t.y+t.height};break;case Dn:l={x:t.x+t.width,y:s};break;case yn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?Rw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Li:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case Tw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function $i(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?Qte:i,s=n.rootBoundary,l=s===void 0?_z:s,u=n.elementContext,c=u===void 0?bo:u,d=n.altBoundary,p=d===void 0?!1:d,g=n.padding,v=g===void 0?0:g,y=Tz(typeof v!="number"?v:xz(v,Al)),I=c===bo?ene:bo,h=e.elements.reference,f=e.rects.popper,m=e.elements[p?I:c],b=One(fs(m)?m:m.contextElement||Tr(e.elements.popper),o,l),E=ms(h),w=Az({reference:E,element:f,placement:r}),T=Qb(Object.assign(Object.assign({},f),w)),C=c===bo?T:E,L={top:b.top-C.top+y.top,bottom:C.bottom-b.bottom+y.bottom,left:b.left-C.left+y.left,right:C.right-b.right+y.right},M=e.modifiersData.offset;if(c===bo&&M){var W=M[r];Object.keys(L).forEach(function(te){var ne=[Dn,$n].indexOf(te)>=0?1:-1,Se=[bn,$n].indexOf(te)>=0?"y":"x";L[te]+=W[Se]*ne})}return L}function Lne(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?wz:l,c=gs(a),d=c?s?xN:xN.filter(function(v){return gs(v)===c}):Al,p=d.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=d);var g=p.reduce(function(v,y){return v[y]=$i(e,{placement:y,boundary:r,rootBoundary:i,padding:o})[Jn(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function $ne(e){if(Jn(e)===Iw)return[];var t=Ru(e);return[NN(e),t,NN(t)]}function Dne(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,v=g===void 0?!0:g,y=n.allowedAutoPlacements,I=t.options.placement,h=Jn(I),f=h===I,m=l||(f||!v?[Ru(I)]:$ne(I)),b=[I].concat(m).reduce(function(he,Le){return he.concat(Jn(Le)===Iw?Lne(t,{placement:Le,boundary:c,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:y}):Le)},[]),E=t.rects.reference,w=t.rects.popper,T=new Map,C=!0,L=b[0],M=0;M<b.length;M++){var W=b[M],te=Jn(W),ne=gs(W)===Li,Se=[bn,$n].indexOf(te)>=0,ke=Se?"width":"height",ge=$i(t,{placement:W,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),Ie=Se?ne?Dn:yn:ne?$n:bn;E[ke]>w[ke]&&(Ie=Ru(Ie));var D=Ru(Ie),j=[];if(i&&j.push(ge[te]<=0),s&&j.push(ge[Ie]<=0,ge[D]<=0),j.every(function(he){return he})){L=W,C=!1;break}T.set(W,j)}if(C)for(var q=v?3:1,V=function(Le){var De=b.find(function(et){var ln=T.get(et);if(ln)return ln.slice(0,Le).every(function(Ca){return Ca})});if(De)return L=De,"break"},Y=q;Y>0;Y--){var Ze=V(Y);if(Ze==="break")break}t.placement!==L&&(t.modifiersData[a]._skip=!0,t.placement=L,t.reset=!0)}}const Mne={name:"flip",enabled:!0,phase:"main",fn:Dne,requiresIfExists:["offset"],data:{_skip:!1}};function ON(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 LN(e){return[bn,Dn,$n,yn].some(function(t){return e[t]>=0})}function Pne(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=$i(t,{elementContext:"reference"}),s=$i(t,{altBoundary:!0}),l=ON(o,a),u=ON(s,r,i),c=LN(l),d=LN(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 Une={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pne};function zne(e,t,n){var a=Jn(e),r=[yn,bn].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,[yn,Dn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Fne(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=wz.reduce(function(c,d){return c[d]=zne(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 Bne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fne};function jne(e){var t=e.state,n=e.name;t.modifiersData[n]=Az({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const qne={name:"popperOffsets",enabled:!0,phase:"read",fn:jne,data:{}};function Gne(e){return e==="x"?"y":"x"}function Hne(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,v=n.tetherOffset,y=v===void 0?0:v,I=$i(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Jn(t.placement),f=gs(t.placement),m=!f,b=Rw(h),E=Gne(b),w=t.modifiersData.popperOffsets,T=t.rects.reference,C=t.rects.popper,L=typeof y=="function"?y(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):y,M={x:0,y:0};if(w){if(i){var W=b==="y"?bn:yn,te=b==="y"?$n:Dn,ne=b==="y"?"height":"width",Se=w[b],ke=w[b]+I[W],ge=w[b]-I[te],Ie=g?-C[ne]/2:0,D=f===Li?T[ne]:C[ne],j=f===Li?-C[ne]:-T[ne],q=t.elements.arrow,V=g&&q?xw(q):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Iz(),Ze=Y[W],he=Y[te],Le=xu(0,T[ne],V[ne]),De=m?T[ne]/2-Ie-Le-Ze-L:D-Le-Ze-L,et=m?-T[ne]/2+Ie+Le+he+L:j+Le+he+L,ln=t.elements.arrow&&Nl(t.elements.arrow),Ca=ln?b==="y"?ln.clientTop||0:ln.clientLeft||0:0,Oa=t.modifiersData.offset?t.modifiersData.offset[t.placement][b]:0,La=w[b]+De-Oa-Ca,op=w[b]+et-Oa,$a=xu(g?Math.min(ke,La):ke,Se,g?Math.max(ge,op):ge);w[b]=$a,M[b]=$a-Se}if(s){var iF=b==="x"?bn:yn,oF=b==="x"?$n:Dn,Ll=w[E],sF=Ll+I[iF],lF=Ll-I[oF],$w=xu(sF,Ll,lF);w[E]=$w,M[E]=$w-Ll}t.modifiersData[a]=M}}const Wne={name:"preventOverflow",enabled:!0,phase:"main",fn:Hne,requiresIfExists:["offset"]};function Vne(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zne(e){return e===Un(e)||!er(e)?Aw(e):Vne(e)}function Yne(e,t,n){n===void 0&&(n=!1);var a=Tr(t),r=ms(e),i=er(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((Pn(t)!=="body"||Cw(a))&&(o=Zne(t)),er(t)?(s=ms(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Nw(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function Kne(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 Xne(e){var t=Kne(e);return cne.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function Jne(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qne(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 $N={placement:"bottom",modifiers:[],strategy:"absolute"};function DN(){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 ere(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?$N:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},$N),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,g={state:c,setOptions:function(h){y(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:fs(s)?Fo(s):s.contextElement?Fo(s.contextElement):[],popper:Fo(l)};var f=Xne(Qne([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(m){return m.enabled}),v(),g.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,m=h.popper;if(DN(f,m)){c.rects={reference:Yne(f,Nl(m),c.options.strategy==="fixed"),popper:xw(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var E=c.orderedModifiers[b],w=E.fn,T=E.options,C=T===void 0?{}:T,L=E.name;typeof w=="function"&&(c=w({state:c,options:C,name:L,instance:g})||c)}}}},update:Jne(function(){return new Promise(function(I){g.forceUpdate(),I(c)})}),destroy:function(){y(),p=!0}};if(!DN(s,l))return g;g.setOptions(u).then(function(I){!p&&u.onFirstUpdate&&u.onFirstUpdate(I)});function v(){c.orderedModifiers.forEach(function(I){var h=I.name,f=I.options,m=f===void 0?{}:f,b=I.effect;if(typeof b=="function"){var E=b({state:c,name:h,instance:g,options:m}),w=function(){};d.push(E||w)}})}function y(){d.forEach(function(I){return I()}),d=[]}return g}}var tre=[Ine,qne,wne,mne,Bne,Mne,Wne,yne,Une],nre=ere({defaultModifiers:tre});const rre=["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"],are=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=rre.find(r=>r.includes(`${a}-${n}`))??a),a},Nz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=$i({...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]:Nz(e.slice(1),t,n)},MN="fallbackModifier",PN={name:MN,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,are(n),...a||[]],i=Nz(r,e,n);e.placement!==i&&(e.modifiersData[MN]._skip=!0,e.placement=i,e.reset=!0)}},Ow=["top","right","bottom","left"],ip=H.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?k.jsx(sre,{ref:a,portal:e,...n}):null),ire=e=>{if(e!==null)return"current"in e?e.current||void 0:e},ore={},sre=H.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=ore,placement:a="bottom",fallbackPlacements:r=Ow,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=H.useRef(!0),{localRef:d,elementRef:p}=Ir(l),[g,v]=H.useState(a),y=Mte(u,e),I=H.useRef(a);I.current=g;const h=H.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:m}){v(m.placement),i==null||i(m.placement)}}),[v,i]);H.useLayoutEffect(()=>{const m=t?{getBoundingClientRect:t}:ire(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(y.current){const b=nre(m,y.current,{placement:a,...n,modifiers:[h,{...PN,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(b),()=>{b==null||b.destroy()}}},[e,t,y]),H.useLayoutEffect(()=>{var m;c.current||(m=d.current)==null||m.setOptions({placement:a,...n,modifiers:[h,{...PN,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=k.jsx(k.Fragment,{children:lre(o)?o({placement:g}):o});return s?Zy.createPortal(f,y.current):f});function lre(e){return typeof e=="function"}const dt=Mn({defaultConfig:{...Zn.defaultConfig,...aa.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Zn.requiredConfig,...aa.requiredConfig},contextOverride:aa.Context})(e=>{const t=Zn(Zn.mergeConfig(e,{selection:e.mode==="single"?FU:Eee})),n=aa(aa.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));mz(n),gz(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}}),ure=Oe({vars:{minWidth:ue(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,color:O.fg.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:_.padding.xxs,borderRadius:_.shape.xxl,maxWidth:Gn.subtract("100vw",_.size.sm),boxShadow:_U[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),cre=be()(()=>({})),Cz=it("div")({displayName:"Menu.Card",modelHook:dt,elemPropsHook:cre})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=H.useMemo(()=>ww(r.state.placement||"bottom"),[r.state.placement]);return k.jsx(Rte,{as:a,...Vt(n,ure({minWidth:typeof e=="number"?ue(e):e,maxHeight:typeof t=="number"?ue(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),dre=Oe({base:{display:"block",height:ue(1),border:"none",borderBlockStart:`${ue(1)} solid ${_.color.border.default}`,margin:`${_.gap.sm} ${_.gap.md}`}}),Oz=Be("hr")({displayName:"Menu.Divider",Component({...e},t,n){return k.jsx(n,{ref:t,...Ke(e,dre())})}});var pre=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},fre=function(e,t){return e+hs(t)},hs=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(fre,""):pre(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?hs(e.props.children):""};hs.default=hs;var mre=hs;const gre=vc(mre),UN={vertical:"bottom",horizontal:"center"},ey=ja("positionX","positionY"),hre=uQ({"0%":{opacity:0,transform:`translate(${ey.positionX}, ${ey.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),vre=Oe({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.md,lineHeight:_.lineHeight.subtext.md,letterSpacing:_.letterSpacing.subtext.md,display:"inline-flex",position:"relative",padding:_.padding.sm,color:O.fg.inverse,animationName:hre,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:O.fg.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_.shape.md,outline:`${ue(1)} solid transparent`,outlineOffset:`-${ue(1)}`,zIndex:-1,margin:_.gap.xs,backgroundColor:_.color.surface.contrast.default,position:"absolute",top:0,left:0,right:0,bottom:0,boxShadow:_U[2]},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Gn.negate(Lr.size50)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Gn.negate(Lr.size50)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Gn.negate(Lr.size50)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Gn.negate(Lr.size50)}}),modifiers:{elementHasFocus:{true:{padding:Gn.subtract(_.padding.md,Gn.divide(_.padding.xxs,2)),"&:before":{margin:Lr.size75}}}}}),Lz=Be("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=UN,elementHasFocus:n=!1,...a},r,i)=>{const o=CQ(t||UN,_.gap.sm);return k.jsx(i,{ref:r,...Vt(a,[vre({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),ey({positionX:o.x,positionY:o.y})]),children:e})}}),zN=(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}},bre=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 $z({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=H.useRef(!1),i=aa(),[o,s]=H.useState(null),l=Qd(),u=zN(i.events.hide,a),c=zN(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},g=f=>{s(f.currentTarget),p()},v=f=>{r.current||g(f),r.current=!1},y=f=>{r.current=!0,bre(f.currentTarget)&&i.events.hide()};gz(i),mz(i),Ote(i),Lte(i);const I=i.state.visibility!=="hidden",h={"aria-describedby":e==="describe"&&I?l:void 0,"aria-description":e==="description"?t:void 0,"aria-label":e==="label"?t:void 0,onMouseEnter:g,onMouseLeave:d,onMouseDown:y,onFocus:v,onBlur:d};return h["aria-describedby"]===void 0&&delete h["aria-describedby"],{targetProps:h,popperProps:{open:I,anchorElement:o,ref:i.state.stackRef},tooltipProps:{id:e==="describe"&&I?l:void 0,role:"tooltip",onMouseEnter:p,onMouseLeave:d}}}function yre(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=hw(t[r],e[r]):a[r]=t[r],a),{})}const Sre=Be("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=Ow,...s}){const l=gre(n),{targetProps:u,popperProps:c,tooltipProps:d}=$z({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,g]=H.useState(!1),{localRef:v}=Ir();return H.useEffect(()=>{const y=v.current;if(!y)return;const I=()=>{g(y.matches(":focus-visible")||y.classList.contains("focus"))};return I(),y.addEventListener("focus",I),y.addEventListener("blur",I),()=>{y.removeEventListener("focus",I),y.removeEventListener("blur",I)}},[v]),k.jsxs(H.Fragment,{children:[H.cloneElement(a,{...u,...yre(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),k.jsx(ip,{placement:t,fallbackPlacements:o,...c,children:({placement:y})=>{const I=ww(y);return k.jsx(Lz,{transformOrigin:I,...Ke(s),...d,elementHasFocus:p,children:n})}})]})}}),Dz=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=Dz(e.children[n]);if(a)return a}return null}return null},Mz=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=Mz(e.children[n]);if(a)return a}return null},FN=e=>{const t=Mz(e)||Dz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Ere(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=hw(t[r],e[r]):a[r]=t[r],a),{})}const Cl=({placement:e="top",fallbackPlacements:t=Ow,children:n,...a})=>{const[r,i]=H.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=$z({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),FN(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),FN(p)&&o.onFocus(d)};return k.jsxs(H.Fragment,{children:[H.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Ere({...o,onMouseEnter:u,onFocus:c},n.props)}),k.jsx(ip,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=ww(d);return k.jsx(Lz,{transformOrigin:p,...l,...a,children:r})}})]})},Pz=Mn({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Qd(e.id)},events:{}})),_re=Oe({base:{fontFamily:He.default,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,fontWeight:We.bold,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.xs} ${_.padding.md}`}}),wre=be()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),kre=be()(e=>({id:e.state.id})),BN=it("div")({modelHook:Pz,elemPropsHook:kre})(({children:e,...t},n)=>k.jsx(Cl,{children:k.jsx(n,{...Vt(t,_re()),children:e})})),Uz=Ra("div")({displayName:"Menu.Group",modelHook:Pz,elemPropsHook:wre,subComponents:{Heading:BN}})(({children:e,title:t,...n},a)=>k.jsxs(a,{...Vt(n),children:[t?k.jsx(BN,{children:t}):null,e]})),Ol=Oe({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({fontFamily:He.default,fontWeight:We.normal,fontSize:_.fontSize.subtext.lg,lineHeight:_.lineHeight.subtext.lg,letterSpacing:_.letterSpacing.subtext.lg,display:"flex",alignItems:"center",width:"100%",gap:_.gap.md,padding:`${_.padding.sm} ${_.padding.md}`,boxSizing:"border-box",cursor:"pointer",color:O.fg.default,borderWidth:0,borderRadius:_.shape.xxl,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:_.size.md,overflowWrap:"anywhere",[Q.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:Ft.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:_.color.brand.fg.primary.strong,backgroundColor:_.color.brand.surface.primary.strong,[`& :where(${n})`]:{opacity:Ft.full},"&:where(.focus, :focus-visible)":{[Q.vars.color]:"currentColor",outline:"none",backgroundColor:_.color.brand.accent.primary,color:O.fg.inverse}},"&:is(.hover, :hover)":{color:O.fg.strong,backgroundColor:_.color.surface.overlay.hover.default},"&:is(.focus, :focus-visible)":{color:O.fg.inverse,backgroundColor:_.color.brand.accent.primary,outline:`${ue(2)} solid transparent`,outlineOffset:`-${ue(2)}`},"&:is(:disabled, [aria-disabled=true])":{cursor:"default",opacity:Ft.disabled,"&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:_.color.brand.accent.primary,opacity:Ft.disabled}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Ire=e=>k.jsx(Rl,{...Ol.parts.icon,...e}),zz=Be("span")({Component:({...e},t,n)=>k.jsx(n,{ref:t,...Ol.parts.text,...Ke(e)})}),Fz=Be("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>k.jsx(r,{ref:a,"aria-disabled":t,...Vt(n,Ol({})),children:typeof e=="string"?k.jsx(zz,{children:e}):e})}),Bz=be()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),jz=be()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Ir(t),i=n["data-id"];return H.useLayoutEffect(()=>{e.state.mode==="single"&&gc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:gc(e.state,n["data-id"])?"focus":void 0}});function qz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),qz(e.UNSTABLE_parentModel))}const Tre=ir(be()(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),qz(e))}:void 0})),jz,Bz,GU,qU,Na),Di=it("button")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Tre,subComponents:{Icon:Ire,Text:zz}})(({children:e,...t},n)=>k.jsx(Cl,{placement:"left",children:k.jsx(Fz,{as:n,...t,children:e})})),xre=ir(be()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),zte,$te),Rre=Oe({base:{background:_.color.surface.popover,borderRadius:_.shape.xxl,padding:0,gap:_.gap.xs},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Gz=it("div")({displayName:"Menu.List",modelHook:dt,elemPropsHook:xre})(({children:e,...t},n,a)=>k.jsx(_te,{as:n,model:a,marginY:_.gap.none,...Ke(t,Rre({orientation:a.state.orientation})),children:e})),Hz=Be("span")({Component:({...e},t,n)=>k.jsxs(k.Fragment,{children:[k.jsx(Di.Text,{ref:t,as:n,...e}),k.jsx(Rl,{...Ol.parts.selected,icon:jte})]})}),Are=Be("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>k.jsx(a,{ref:n,...Vt(t,Ol()),children:typeof e=="string"?k.jsx(Hz,{children:e}):e})}),Nre=ir(be()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":zU(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()}}}),Aee,Na),Wz=it("li")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Nre,subComponents:{Icon:Di.Icon,Text:Hz}})(({children:e,...t},n)=>k.jsx(Cl,{placement:"left",children:k.jsx(Are,{as:n,...t,children:e})})),Vz=Dte,Zz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Cre=it("div")({modelHook:dt,elemPropsHook:Vz})(({children:e,...t})=>k.jsx(ip,{placement:"bottom-start",popperOptions:Zz,...t,children:e})),Yz=be()(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)}}})),Kz=ir(Yz,Pte),Ore=ir(Yz,Ute),Lre=it(Ez)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Kz})(({children:e,...t},n)=>k.jsx(n,{...t,children:e})),$re=it(Ez)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Ore})(({children:e,...t},n)=>k.jsx(n,{...t,children:e})),Dre=it("div")({modelHook:dt,elemPropsHook:Vz})(({children:e,...t})=>k.jsx(ip,{placement:"right-start",popperOptions:Zz,...t,children:e})),Mre=(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}},Pre=ir(To(e=>e.UNSTABLE_parentModel,jz),To(e=>e.UNSTABLE_parentModel,Bz),To(e=>e.UNSTABLE_parentModel,qU),be()((e,t)=>({ref:Aa(t,e.state.targetRef)})),To(e=>e.UNSTABLE_parentModel,Na),be()(e=>{const t=P.useRef(),n=Mre(()=>{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}}}})),Ure=it("button")({modelHook:dt,elemPropsHook:Pre})(({children:e,...t},n)=>k.jsxs(Fz,{as:n,...t,children:[typeof e=="string"?k.jsx(Di.Text,{children:e}):e,k.jsx(Di.Icon,{icon:kw})]})),zre=it()({modelHook:dt,subComponents:{Card:Cz,List:Gz,Item:Di,TargetItem:Ure,Group:Uz,Option:Wz,Divider:Oz,Popper:Dre}})(({children:e,model:t,...n},a,r)=>{const i=dt(dt.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=dt.Context;return k.jsx(o.Provider,{value:i,children:e})}),$r=Ra()({displayName:"Menu",modelHook:dt,subComponents:{Target:Lre,Card:Cz,List:Gz,Item:Di,Group:Uz,Option:Wz,Divider:Oz,TargetContext:$re,Popper:Cre,Submenu:zre}})(({children:e})=>k.jsx(k.Fragment,{children:e})),Fre=(e,t,n)=>{let a=t;const r=e.length,i=r-t.length;return r>2&&i<=2?a=e.slice(0,r-1).map(n):r>3&&i===3?a=e.slice(1,r-1).map(n):i>3&&i<r&&(a=e.slice(1,r-2).map(n)),a},to=Mn({defaultConfig:{...lu.defaultConfig,id:"",orientation:"horizontal",menuConfig:{}},requiredConfig:lu.requiredConfig})(e=>{const t=e.getId||zo,n=e.items,a=lu(lu.mergeConfig(e,{orientation:e.orientation||"horizontal",items:n,shouldVirtualize:!1}));let r=a.state.hiddenIds,i=a.state.nonInteractiveIds;r=Fre(n,r,t),i=r;const o={...a.state,hiddenIds:r,nonInteractiveIds:i,orientation:e.orientation||"horizontal"},s=P.useMemo(()=>n?n.filter(c=>o.hiddenIds.includes(t(c))):void 0,[o.hiddenIds,n]),l={...a.events},u=dt(dt.mergeConfig(e.menuConfig,{id:`breadcrumbs-menu-${a.state.id}`,items:s,nonInteractiveIds:o.nonInteractiveIds.filter(c=>!o.hiddenIds.includes(c)),onShow(){u.events.goToFirst()}}));return{...a,state:o,events:l,menu:u}}),Bre=Oe({vars:{maxWidth:""},base:({maxWidth:e})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,fontWeight:We.medium,letterSpacing:_.letterSpacing.subtext.lg,lineHeight:_.lineHeight.subtext.lg,color:O.fg.default,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:e})}),jre=ir(be()((e,t)=>{const{localRef:n}=Ir(Aa(t));let a=!1;const r=n.current;if(r){const{scrollWidth:i,clientWidth:o}=r;a=i>o}return{tabIndex:a?0:void 0,ref:n}}),BU,Na),qre=it("li")({displayName:"Breadcrumbs.Item",modelHook:to,elemPropsHook:jre})(({children:e,tooltipProps:t={},maxWidth:n="350px",...a},r)=>k.jsx(Cl,{...t,children:k.jsx(lz,{as:r,...Ke(a,Bre({maxWidth:typeof n=="number"?ue(n):n})),children:e})})),Gre=Oe({vars:{maxWidth:""},base:({maxWidth:e})=>({fontFamily:He.default,fontSize:_.fontSize.subtext.lg,fontWeight:We.normal,letterSpacing:_.letterSpacing.subtext.lg,lineHeight:_.lineHeight.subtext.lg,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:e})}),Xz=Be("a")({displayName:"Breadcrumbs.Link",Component:({maxWidth:e=350,href:t,tooltipProps:n={},children:a,...r},i,o)=>k.jsx(Cl,{...n,children:k.jsx(Yte,{href:t,ref:i,as:o,role:"link",variant:"standalone",...Ke(r,Gre({maxWidth:typeof e=="number"?ue(e):e})),children:a})})}),jN=Oe({parts:{chevronRightIcon:"breadcrumbs-item-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"inline-flex",whiteSpace:"nowrap",[Q.vars.size]:Nn.systemIcon.size.md,[Q.vars.color]:O.fg.default,[e]:{height:_.size.sm,width:_.size.sm,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),Hre=ir(BU,Na),Wre=it("li")({displayName:"Breadcrumbs.Item",modelHook:to,elemPropsHook:Hre,subComponents:{Link:Xz}})(({children:e,...t},n)=>k.jsxs(n,{...Vt(t,jN()),children:[e,k.jsx(Rl,{icon:kw,...jN.parts.chevronRightIcon,"aria-hidden":!0})]})),Vre=Oe({base:{padding:`${_.padding.xs} 0`,margin:0,display:"inline-flex",alignItems:"center",minHeight:_.size.lg,listStyle:"none",width:"100%"}}),Zre=it("ul")({displayName:"Breadcrumbs.List",modelHook:to,elemPropsHook:_ee})(({overflowButton:e,children:t,...n},a,r)=>{const i=bw(r,t),o=i.length-2;return k.jsxs(a,{role:"list",...Ke(n,Vre()),children:[i.length?i.slice(0,o):i,e,i.length?i.slice(o,i.length):null]})}),Yre=Oe({base:{textDecoration:"none"}}),Kre=Be("a")({displayName:"Breadcrumbs.Menu.Item",Component:(e,t,n)=>k.jsx($r.Item,{as:n,...Ke(e,Yre()),ref:t})}),Xre=Oe({base:{width:ue(280),maxWidth:ue(280),maxHeight:ue(296)}}),Jre=e=>k.jsx($r.Card,{...Ke(e,Xre())}),Qre=Ra()({displayName:"Breadcrumbs.Menu",modelHook:dt,subComponents:{Card:Jre,List:$r.List,Item:Kre,Divider:$r.Divider,Target:$r.Target,TargetContext:$r.TargetContext,Popper:$r.Popper}})(({children:e})=>k.jsx(k.Fragment,{children:e})),Hv=Oe({parts:{overflowButton:"breadcrumbs-overflow-button",chevronRightIcon:"breadcrumbs-overflow-button-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"flex",[Q.vars.color]:O.fg.default,[Q.vars.size]:Nn.systemIcon.size.md,[e]:{height:_.size.sm,width:_.size.sm,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),eae=ir(be()(()=>({"aria-haspopup":!0,"aria-controls":"menu"})),Iee,To(e=>e.menu,Kz)),tae=it("button")({displayName:"Breadcrumbs.OverflowButton",modelHook:to,elemPropsHook:eae})(({style:e,...t},n)=>k.jsxs("li",{...Hv(),...e,children:[k.jsx(Jte,{as:n,icon:qte,...Hv.parts.overflowButton,...Ke(t)}),k.jsx(Rl,{icon:kw,...Hv.parts.chevronRightIcon,"aria-hidden":!0})]})),de=Ra("nav")({displayName:"Breadcrumbs",modelHook:to,subComponents:{List:Zre,Item:Wre,Link:Xz,CurrentItem:qre,OverflowButton:tae,Menu:Qre}})(({children:e,...t},n,a)=>k.jsx($r,{model:a.menu,children:k.jsx("nav",{role:"navigation",...Ke(t),children:e})})),Jz=()=>k.jsx(de,{"aria-label":"Breadcrumbs",children:k.jsxs(de.List,{children:[k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/",children:"Home"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/menus",children:"Menus"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/lunch",children:"Lunch"})}),k.jsx(de.Item,{children:k.jsx(de.Link,{href:"/house-specialty-pies",maxWidth:100,children:"House Specialty Pies"})}),k.jsx(de.CurrentItem,{maxWidth:100,children:"Canvas Supreme"})]})});Jz.__RAW__=`import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs';
294
294
 
295
295
  export const Basic = () => {
296
296
  return (