@workday/canvas-kit-mcp 14.3.16 → 14.3.17
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.
- package/dist/apps/action-bar.html +1 -1
- package/dist/apps/breadcrumbs.html +1 -1
- package/dist/apps/form-field.html +1 -1
- package/dist/apps/menu.html +1 -1
- package/dist/apps/modal.html +1 -1
- package/dist/apps/multiselect.html +1 -1
- package/dist/apps/select.html +1 -1
- package/dist/apps/tabs.html +1 -1
- package/dist/cli.js +67 -67
- package/dist/cli.js.map +2 -2
- package/dist/index.js +67 -67
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
|
@@ -315,7 +315,7 @@ ${s}
|
|
|
315
315
|
*/(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})()})(rz);var gie=rz.exports;const ir=_c(gie);function hie(e,t){var n=W.useRef(null),a=W.useRef(null);a.current=t;var r=W.useRef(null);W.useEffect(function(){i()});var i=W.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 W.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),W.useCallback(function(o){r.current=o,i()},[i])}function dC(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 bie(e){e===void 0&&(e={});var t=e.onResize,n=W.useRef(void 0);n.current=t;var a=e.round||Math.round,r=W.useRef(),i=W.useState({width:void 0,height:void 0}),o=i[0],s=i[1],l=W.useRef(!1);W.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=W.useRef({width:void 0,height:void 0}),c=hie(W.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 m=p[0],b=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",y=dC(m,b,"inlineSize"),I=dC(m,b,"blockSize"),h=y?a(y):void 0,f=I?a(I):void 0;if(u.current.width!==h||u.current.height!==f){var g={width:h,height:f};u.current.width=h,u.current.height=f,n.current?n.current(g):l.current||s(g)}})}),r.current.instance.observe(d,{box:e.box}),function(){r.current&&r.current.instance.unobserve(d)}},[e.box,a]),e.ref);return W.useMemo(function(){return{ref:c,width:o.width,height:o.height}},[c,o.width,o.height])}const vie={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},yie=Lu({[Ft.alertInner]:vs,[Ft.alertOuter]:ys,[Ft.errorInner]:qw,[Ft.focusOutline]:Aw,[rr.accent]:Je,[rr.darkest]:Qw,[rr.dark]:Jw,[rr.base]:Xw,[rr.light]:Kw,[rr.lighter]:Zw,[rr.lightest]:Vw,[Rr.accent]:Je,[Rr.darkest]:Uw,[Rr.dark]:Mw,[Rr.base]:Pw,[Rr.light]:Dw,[Rr.lighter]:Lw,[Rr.lightest]:$w,[Tr.accent]:Je,[Tr.darkest]:Ww,[Tr.dark]:Hw,[Tr.base]:Gw,[Tr.light]:jw,[Tr.lighter]:Bw,[Tr.lightest]:Fw,[xr.accent]:zw,[xr.darkest]:Iw,[xr.dark]:ys,[xr.base]:vs,[xr.light]:kw,[xr.lighter]:ww,[xr.lightest]:_w,[Ze.accent]:Je,[Ze.darkest]:Ow,[Ze.dark]:Cw,[Ze.base]:Nw,[Ze.light]:Rw,[Ze.lighter]:xw,[Ze.lightest]:Tw,[jU.primary]:`linear-gradient(90deg, ${Ze.base} 0%, ${Ze.dark} 100%)`}),az=(e,t)=>{const n=VU(e),a=(t.className||"").split(" ").concat(yie).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=>{i.common[s]!==Wn.palette.common[s]&&(r[Ft.focusOutline]=Ga(i.common.focusOutline),r[Ft.alertInner]=Ga(i.common.alertInner),r[Ft.alertOuter]=Ga(i.common.alertOuter),r[Ft.errorInner]=Ga(i.common.errorInner))}),["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{i[o][s]!==Wn.palette[o][s]&&(r[uae[o][vie[s]]]=Ga(i[o][s]))})}),{...t,className:a,style:r}},Sie=({children:e,theme:t={canvas:{}},...n})=>{var s;const{className:a,...r}=az(t,n),i=Lae(),o={...r,...n};return w.jsx(l7,{value:i,children:w.jsx(f7,{theme:t,children:w.jsx("div",{dir:((s=t==null?void 0:t.canvas)==null?void 0:s.direction)||Wn.direction,...o,children:e})})})};function Eie(e){return e.length?e[e.length-1]:null}function iz(e,t){const{min:n,max:a}=ak.zIndex;return t<=a-n?e+n:Math.max(n,a-(t-e)+1)}function Wb(e){const t=e.length;e.forEach((n,a)=>{n.style.zIndex=String(iz(a,t))})}function _ie(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function wie(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:_ie(a.owner,t)})).filter(a=>a.parent===e.element)}function oz(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?oz(e[a],n.join(".")):e[a]}function sz(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),sz(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const lz=e=>{if(typeof window<"u")return oz(window,e)},uz=(e,t)=>{typeof window<"u"&&sz(window,e,t)},pC=(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},ak=lz("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:iz},_adapter:{}};uz("workday.__popupStack",ak);const or=lz("workday.__popupStackOfStacks")||[ak];or.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";uz("workday.__popupStackOfStacks",or);function tr(){return or[or.length-1]}const wt={createContainer(){var n;const e=tr();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=tr();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),pC(t,e.owner).appendChild(e.element),Wb(wt.getElements())},remove(e){var n;const t=or.find(a=>!!wt.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),pC(t,a==null?void 0:a.owner).removeChild(e),Wb(wt.getElements(t))}},isTopmost(e){var a;const t=tr();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Eie(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||tr();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=tr();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],wie(n,t.items).forEach(r=>{wt.bringToTop(r.element)}),Wb(wt.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=tr();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=tr();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:{}};or.push(n)},popStackContext(e){var n,a;const t=tr();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&or.length>1&&or.pop()},transferToCurrentContext(e){var a;const t=tr();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;or.find(r=>!!r.items.find(i=>i.element===e.element))&&wt.remove(e.element),wt.add(e)}};let pu=null;ir.isEnabled&&ir.on("change",()=>{ir.isFullscreen?ir.element&&(pu=ir.element,wt.pushStackContext(pu)):pu&&wt.popStackContext(pu)});const Vb=On({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=ip(e.id),[n,a]=F.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),fC=()=>{},ia=On({defaultContext:{state:{},events:{show:fC,hide:fC}},defaultConfig:{...Vb.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Vb.requiredConfig})(e=>{const t=W.useRef(null),n=W.useRef(null),[a,r]=W.useState("bottom"),i=Vb(e),o={...i.state,stackRef:t,targetRef:n,initialFocusRef:e.initialFocusRef,returnFocusRef:e.returnFocusRef,placement:a},s={...i.events,updatePlacement(l){r(l.placement)}};return{state:o,events:s}});ia.Context;const cz=ye()(e=>{const t=F.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!wt.contains(e.state.stackRef.current,a.target)&&e.events.hide(a)},[e.events,e.state.stackRef]),n=e.state.visibility!=="hidden";return F.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]),{}}),dz=ye()(e=>{const t=F.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&wt.isTopmost(e.state.stackRef.current)&&e.events.hide(a)},[e.state.stackRef,e.events]),n=e.state.visibility!=="hidden";return F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[t,n]),{}}),kie=ye()(e=>{const t=F.useCallback(a=>{ir.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return F.useEffect(()=>{if(n&&ir.isEnabled)return ir.on("change",t),()=>{ir.off("change",t)}},[t,n]),{}});function pz(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:pz(e.parentElement)}const Iie=ye()(e=>{const t=e.state.visibility!=="hidden",n=F.useCallback(a=>{a[0].intersectionRatio<.5&&e.events.hide()},[e.events]);return F.useLayoutEffect(()=>{if(!t||!e.state.targetRef.current)return;const a=e.state.targetRef.current,r=pz(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),Tie=ye()(e=>{const t=F.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=fie(e.state.stackRef.current),i=mie(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 F.useLayoutEffect(()=>{if(n)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[n,t]),{}}),xie=ye()(({state:e,events:t},n)=>{const a=Ca(n,e.stackRef),r=F.useRef(e.placement);r.current=e.placement;const i=F.useCallback(o=>{o!==r.current&&t.updatePlacement({placement:o})},[t]);return{open:e.visibility!=="hidden",anchorElement:e.targetRef,ref:a,onPlacementChange:i}}),Rie=(e,t)=>{const{elementRef:n,localRef:a}=wr(e),r=F.useContext(hs),{style:i}=az(r,{}),o=F.useRef(!0),[s]=F.useState(()=>{if(o.current){const l=wt.createContainer();return n(l),o.current=!1,l}return a.current});return F.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 wt.add({element:u,owner:l}),()=>{wt.remove(u)}},[a,t,s]),F.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,m=a.current;u=(p&&m&&!m.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":ZU(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),F.useLayoutEffect(()=>{const l=a.current,u=Object.keys(i);if(l&&r){for(const c of u)l.style.setProperty(c,i[c]);return()=>{for(const c of u)l.style.removeProperty(c)}}},[a,i,r]),a},Aie=ye()(({events:e,state:t},n)=>({ref:Ca(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),Nie=ye()(({events:e,state:t},n)=>({ref:Ca(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 fz(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:fz(e.parentElement)}function mz(e){return e===null||e===document.body||!e.parentElement?null:pie(e)?e:mz(e.parentElement)}function mC(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 Cie=ye()(e=>{const t=e.state.visibility!=="hidden",n=F.useRef(null),a=F.useRef(!1),r=F.useCallback(o=>{o.key==="Tab"&&(a.current=!0)},[]),i=F.useCallback(o=>{e.state.stackRef.current&&o.target instanceof Element&&(wt.contains(e.state.stackRef.current,o.target)||(n.current=o.target))},[e.state.stackRef]);return F.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=fz(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&mz(n.current)||mC(o,l)||mC(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!wt.contains(e.state.stackRef.current,document.activeElement)||a.current?iC(o):requestAnimationFrame(()=>{iC(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),Oie=e=>qae[e]||Zn(e),$ie=e=>Hae[e],Lie=e=>Gae[e]||Zn(e),Die=e=>Wae[e]||Zn(e),Pie=e=>tk.properties.fontFamilies[e]||Zn(e),Mie=e=>tk.properties.fontSizes[e]||Zn(e),Uie=e=>tk.properties.fontWeights[e]||Zn(e);function vt(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:Oie(r)};if(n.system==="depth"){const s=$ie(r);return{...i,...s}}return n.system==="font"?{...i,[o]:Pie(r)}:n.system==="fontSize"?{...i,[o]:Mie(r)}:n.system==="fontWeight"?{...i,[o]:Uie(r)}:n.system==="shape"?{...i,[o]:Lie(r)}:n.system==="space"?{...i,[o]:Die(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function on(e){return t=>{let n={};for(const a in t)if(a in t&&a in e){const r=e[a],i=t[a],o=r(i);n={...n,...o};continue}return n}}const gz=[{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"}],zie=vt(gz),Fie=on(zie),hz=[{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"}],Bie=vt(hz),bz=[{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"}],jie=vt(bz),vz=[{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"}],qie=vt(vz),yz=[{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"}],Gie=vt(yz),Sz=[{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"}],Hie=vt(Sz),Wie=on({...Bie,...jie,...qie,...Gie,...Hie}),Vie=[...hz,...bz,...vz,...yz,...Sz],Ez=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],Zie=vt(Ez),Yie=on(Zie),_z=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],Kie=vt(_z),Xie=on(Kie),wz=[{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"}],Jie=vt(wz),Qie=on(Jie),kz=[{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"}],eoe=vt(kz),toe=on(eoe),Iz=[{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"}],noe=vt(Iz),roe=on(noe),Tz=[{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"}],aoe=vt(Tz),ioe=on(aoe),xz=[{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"}],ooe=vt(xz),soe=on(ooe),Rz=[{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"}],loe=vt(Rz),uoe=on(loe),Az=[{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"}],coe=vt(Az),doe=on(coe),poe=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],foe=e=>TU(e)&&!poe.includes(e),ik=e=>[{boxSizing:"border-box"},Fie,Wie,Yie,Xie,Qie,toe,roe,ioe,soe,uoe,doe].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),moe=bs("div",{shouldForwardProp:foe})(ik),goe=bs("div")(ik),ok=qe("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=YU(()=>typeof a=="string"?moe:goe);return w.jsx(r,{as:a,ref:n,...bt(t),children:e})}}),Nz=[{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"}],hoe=vt(Nz),boe=on(hoe),Cz=[{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"}],voe=vt(Cz),yoe=on(voe),Soe=[...gz,...Vie,...Ez,..._z,...Nz,...wz,...Cz,...kz,...Iz,...Tz,...xz,...Rz,...Az].reduce((e,t)=>(e[t.name]=!0,e),{});function Eoe(e){return Soe[e]||!1}function Lt(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Eoe(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...ik(n),...boe(n),...yoe(n)}),bt(r,[t,i])}const sk=De({base:{},modifiers:{typeLevel:{"title.large":{...Fe.title.large,color:O.text.strong},"title.medium":{...Fe.title.medium,color:O.text.strong},"title.small":{...Fe.title.small,color:O.text.strong},"heading.large":{...Fe.heading.large,color:O.text.strong},"heading.medium":{...Fe.heading.medium,color:O.text.strong},"heading.small":{...Fe.heading.small,color:O.text.strong},"body.large":{...Fe.body.large,color:O.text.default},"body.medium":{...Fe.body.medium,color:O.text.default},"body.small":{...Fe.body.small,color:O.text.default},"subtext.large":{...Fe.subtext.large,color:O.text.default},"subtext.medium":{...Fe.subtext.medium,color:O.text.default},"subtext.small":{...Fe.subtext.small,color:O.text.default}},variant:{error:{color:O.text.critical.default},hint:{color:O.text.hint},inverse:{color:O.text.inverse}}}}),Oz=qe("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>w.jsx(i,{ref:r,...Lt(a,sk({typeLevel:t,variant:n})),children:e})}),_oe=De({extends:sk,base:{color:O.fg.strong,fontWeight:Bn.bold,marginBlock:P.zero},defaultModifiers:{typeLevel:"body.large"}}),woe=qe("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>w.jsx(a,{ref:n,...Lt(t,_oe()),children:e})}),koe=De({extends:sk,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),Ioe=qe("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>w.jsx(a,{ref:n,...Lt(t,koe()),children:e})}),Toe=De({base:{display:"flex",flexDirection:"column",gap:P.x6,padding:P.x8,backgroundColor:O.bg.default,borderRadius:_r.x2,border:`${se(1)} solid ${O.border.container}`},modifiers:{variant:{borderless:{borderColor:"transparent"},filled:{backgroundColor:O.bg.alt.soft,borderColor:O.border.transparent}}}}),xoe=qe("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>w.jsx(r,{ref:a,...Lt(n,Toe({variant:t})),children:e}),subComponents:{Heading:woe,Body:Ioe}}),lk=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"}};var $z={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.Accent="accent",t.Applet="applet",t.Expressive="expressive",t.System="system",t.Graphic="graphic"}(e.CanvasIconTypes||(e.CanvasIconTypes={}))})($z);function Roe(e,t){if(e.type!==t)throw`${e.name}: Icon type "${e.type}" does not match expected type "${t}"`}const Lz=De({vars:{width:"",height:"",size:""},base:({width:e,height:t,size:n})=>({display:"inline-block","> svg":{display:"block",width:D(e,n),height:D(t,n)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),ea=e=>e&&e in eC?D(eC[e]):e!=null&&e.startsWith("--")?D(e):e,Aoe=qe("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>{try{Roe(n,a)}catch(s){return console.error(s),null}return w.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...Lt(r,Lz({shouldMirror:e,shouldMirrorInRTL:t}))})}}),sr=aa("colorHover","fillHover","accentHover","backgroundHover"),ne=De({extends:Lz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,width:t,height:n,accentColor:a,backgroundColor:r,color:i})=>({"& svg":{width:D(t,D(e,P.x6)),height:D(n,D(e,P.x6))},"& .wd-icon-fill":{fill:D(i,O.icon.default)},"& .wd-icon-accent, & .wd-icon-accent2":{fill:D(a,D(i,O.fg.default))},"& .wd-icon-background":{fill:D(r,"transparent")},"&:where(:hover, .hover) .wd-icon-fill":{fill:D(sr.fillHover,D(sr.colorHover,D(i,O.fg.default)))},"&:where(:hover, .hover) .wd-icon-accent, & .wd-icon-accent2":{fill:D(sr.accentHover,D(sr.colorHover,D(a,D(i,O.fg.default))))},"&:where(:hover, .hover) .wd-icon-background":{fill:D(sr.backgroundHover,D(r,"transparent"))},"@media (prefers-contrast: more)":{".wd-icon-fill, .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),Ll=qe("span")({displayName:"SystemIcon",Component:({size:e,background:t,backgroundHover:n,color:a,colorHover:r,icon:i,accent:o,accentHover:s,fill:l,fillHover:u,...c},d,p)=>w.jsx(Aoe,{as:p,src:i,type:$z.CanvasIconTypes.System,ref:d,...bt(c,[ne({size:typeof e=="number"?se(e):e,color:ea(l||a),accentColor:ea(o||a),backgroundColor:ea(t)}),{[sr.colorHover]:r&&ea(r),[sr.fillHover]:u&&ea(u),[sr.accentHover]:s&&ea(s),[sr.backgroundHover]:n&&ea(n)}])})}),Noe={extraSmall:18,small:20,medium:20,large:24},Coe=qe("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>{if(e===void 0)return null;const s=Noe[t];return w.jsx(Ll,{ref:i,as:o,size:s,icon:e,width:se(s),height:se(s),display:"inline-block",shouldMirror:n,shouldMirrorInRTL:a,...r})}}),Ooe=O7(ok.as("span"))({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),$oe=qe("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>w.jsx(Ooe,{as:a,ref:n,...t,children:e})}),X={default:aa("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:aa("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:aa("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:aa("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:aa("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},H=De({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:'"Roboto", "Helvetica Neue", "Helvetica", Arial, sans-serif',fontSize:"0.875rem",lineHeight:"normal",letterSpacing:"0.015rem",fontWeight:Bn.bold,backgroundColor:D(X.default.background,D(e,"transparent")),color:D(X.default.label,D(r,O.fg.strong)),borderWidth:se(1),borderStyle:"solid",gap:P.x2,borderColor:D(X.default.border,D(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",boxSizing:"border-box",outline:`${se(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:D(X.default.borderRadius,D(o,_r.round)),position:"relative",verticalAlign:"middle",overflow:"hidden",[ne.vars.color]:D(X.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:D(X.default.opacity,D(i,$i.full))},"&:focus-visible, &.focus":{backgroundColor:D(X.focus.background,D(e,"transparent")),borderColor:D(X.focus.border,D(t,"transparent")),color:D(X.focus.label,D(r,O.fg.strong)),[ne.vars.color]:D(X.focus.icon,O.fg.strong),outline:`${se(2)} solid transparent`,outlineOffset:se(2),...ny({width:2,separation:2,innerColor:D(X.focus.boxShadowInner,D(n,D(O.border.inverse,Je))),outerColor:D(X.focus.boxShadowOuter,D(a,Ft.focusOutline))})},"&:hover, &.hover":{backgroundColor:D(X.hover.background,D(e,O.bg.contrast.strong)),borderColor:D(X.hover.border,D(t,"transparent")),color:D(X.hover.label,D(r,O.fg.stronger)),[ne.vars.color]:D(X.hover.icon,O.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:D(X.active.background,D(e,"transparent")),borderColor:D(X.active.border,D(t,"transparent")),color:D(X.active.label,D(r,O.fg.strong)),[ne.vars.color]:D(X.active.icon,O.fg.strong)},"&:disabled, &.disabled":{backgroundColor:D(X.disabled.background,D(e,"transparent")),borderColor:D(X.disabled.border,D(t,"transparent")),color:D(X.disabled.label,D(r,O.fg.strong)),[ne.vars.color]:D(X.disabled.icon,O.fg.strong)},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${se(2)} solid transparent`,outlineOffset:`-${se(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${se(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{...Fe.body.small,fontWeight:Bn.bold,height:se(48),paddingInline:P.x8,minWidth:se(112)},medium:{...Fe.subtext.large,fontWeight:Bn.bold,minWidth:se(96),paddingInline:P.x6,height:P.x10},small:{...Fe.subtext.large,fontWeight:Bn.bold,height:P.x8,minWidth:P.x20,paddingInline:P.x4,gap:P.x1},extraSmall:{...Fe.subtext.medium,fontWeight:Bn.bold,height:P.x6,minWidth:"auto",paddingInline:P.x3,gap:P.x1}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:P.zero},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:At.multiply(P.x4,3)}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:P.x6,paddingInlineEnd:P.x8}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:P.x8,paddingInlineEnd:P.x6}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:P.x10}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:At.multiply(P.x1,5),paddingInlineEnd:P.x6}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:P.x6,paddingInlineEnd:At.multiply(P.x1,5)}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:P.x8}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:P.x3,paddingInlineEnd:P.x4}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:P.x4,paddingInlineEnd:P.x3}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:P.x6}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:P.x2,paddingInlineEnd:P.x3}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:P.x3,paddingInlineEnd:P.x2}}]}),ai=qe("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>w.jsx(u,{ref:l,type:"button",...Lt(s,[H({size:t,iconPosition:r,grow:a}),X.default((o==null?void 0:o.default)||{}),X.focus((o==null?void 0:o.focus)||{}),X.hover((o==null?void 0:o.hover)||{}),X.active((o==null?void 0:o.active)||{}),X.disabled((o==null?void 0:o.disabled)||{})]),children:e}),subComponents:{Icon:Coe,Label:$oe}});var sp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.Accent="accent",t.Applet="applet",t.System="system",t.Graphic="graphic"}(e.CanvasIconTypes||(e.CanvasIconTypes={}))})(sp);var Loe={name:"checkSmall",type:sp.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-check-small wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="m10.34 14.043 5.101-5.936a.287.287 0 0 1 .432-.017l.974.827a.344.344 0 0 1 .03.463l-6.13 7.237a.285.285 0 0 1-.407.04l-3.237-2.614a.344.344 0 0 1-.021-.469l.853-1.03a.296.296 0 0 1 .436-.026z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-check-small.svg",category:"Core",tags:["success","complete","check mark","check box"]},uk={name:"chevronRightSmall",type:sp.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-chevron-right-small wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="M13.703 12 9.128 7.39a.44.44 0 0 1 0-.62l.635-.64a.44.44 0 0 1 .622-.002l.002.002 5.482 5.523a.44.44 0 0 1 .127.347.44.44 0 0 1-.127.347l-5.482 5.523a.44.44 0 0 1-.622.002l-.002-.002-.635-.64a.44.44 0 0 1 0-.62z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Core",tags:["navigation","arrow"]},Doe={name:"relatedActions",type:sp.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-related-actions wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="M3 12c0-1.105.888-2 2-2 1.105 0 2 .888 2 2 0 1.105-.888 2-2 2-1.105 0-2-.888-2-2zm7 0c0-1.105.888-2 2-2 1.105 0 2 .888 2 2 0 1.105-.888 2-2 2-1.105 0-2-.888-2-2zm7 0c0-1.105.888-2 2-2 1.105 0 2 .888 2 2 0 1.105-.888 2-2 2-1.105 0-2-.888-2-2z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-related-actions.svg",category:"Core",tags:["three","dots","twinkie","more","kebob","menu","dropdown","select","meatballs"]};const Poe=De({base:{fontFamily:sae.default,textDecoration:"underline",color:O.text.primary.default,cursor:"pointer",borderRadius:_r.half,padding:`0 ${se(2)} `,margin:"0 -2px",transition:"color 0.15s,background-color 0.15s",wordBreak:"break-word","&:hover, &.hover":{color:O.text.primary.strong,background:O.bg.alt.soft},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${se(2)} ${D(Ft.focusOutline)}`,outline:"none"},"&:active, &.active":{color:O.text.primary.stronger,background:O.bg.alt.default}},modifiers:{variant:{inverse:{color:O.text.inverse,"&:hover, &.hover":{color:O.text.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${se(2)} ${D(O.text.inverse)}`},"&:active, &.active":{color:O.text.primary.stronger,background:O.bg.alt.soft}},standalone:{textDecoration:"none"},standaloneInverse:{textDecoration:"none",color:O.text.inverse,"&:hover, &.hover":{color:O.text.inverse,background:"rgba(255, 255, 255, 0.1)"},"&:focus, &.focus, &:focus-visible":{boxShadow:`0 0 0 ${se(2)} ${D(O.text.inverse)}`},"&:active, &.active":{color:O.text.primary.stronger,background:O.bg.alt.soft}}}}}),Moe=qe("a")({displayName:"Hyperlink",Component:({children:e,variant:t,...n},a,r)=>w.jsx(r,{ref:a,...bt(n,Poe({variant:t})),children:e})}),Dz=qe("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 w.jsxs(ai,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&w.jsx(ai.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&w.jsx(ai.Label,{children:e}),t&&c&&["only","end"].includes(c)&&w.jsx(ai.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),Uoe=De({extends:H,base:{[H.vars.background]:O.bg.transparent.default,[H.vars.borderRadius]:_r.round,[H.vars.border]:O.border.input.default,[H.vars.label]:O.fg.strong,[ne.vars.color]:D(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[H.vars.background]:O.bg.default,[H.vars.label]:O.fg.stronger,[H.vars.boxShadowInner]:D(O.border.inverse,Je),[H.vars.boxShadowOuter]:Ft.focusOutline,[ne.vars.color]:D(X.focus.icon,"currentColor")},"&:hover, &.hover":{[H.vars.background]:Yw,[H.vars.label]:O.fg.stronger,[H.vars.border]:O.border.input.strong,[ne.vars.color]:D(X.hover.icon,"currentColor")},"&:active, &.active":{[H.vars.background]:O.bg.alt.strong,[H.vars.label]:O.fg.stronger,[H.vars.border]:O.border.input.strong,[ne.vars.color]:D(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[H.vars.background]:O.bg.transparent.default,[H.vars.label]:O.fg.stronger,[H.vars.opacity]:$i.disabled,[ne.vars.color]:D(X.disabled.icon,"currentColor")}},modifiers:{variant:{inverse:{[H.vars.background]:"transparent",[H.vars.border]:D(O.border.inverse,Je),[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.default.icon,"currentColor"),"&:hover, &.hover":{[H.vars.background]:O.bg.transparent.strong,[H.vars.border]:D(O.border.inverse,Je),[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[H.vars.background]:O.bg.translucent,[H.vars.border]:"transparent",[H.vars.label]:O.fg.inverse,[H.vars.boxShadowInner]:O.border.contrast.default,[H.vars.boxShadowOuter]:D(O.border.inverse,Je),[ne.vars.color]:D(X.focus.icon,"currentColor")},"&:active, &.active":{[H.vars.background]:O.bg.transparent.stronger,[H.vars.border]:D(O.border.inverse,Je),[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[H.vars.background]:"transparent",[H.vars.border]:D(O.border.inverse,Je),[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.disabled.icon,"currentColor")}}}}}),Pz=qe("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>w.jsx(Dz,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[Uoe({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})}),zoe=De({extends:H,base:{paddingInline:P.x2,minWidth:"auto",borderWidth:se(2),[H.vars.borderRadius]:_r.round,[H.vars.background]:O.bg.transparent.default,[H.vars.label]:Ze.base,[ne.vars.color]:D(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[H.vars.background]:O.bg.transparent.default,[H.vars.label]:Ze.base,[ne.vars.color]:D(X.focus.icon,"currentColor"),...ny({width:2,separation:0,innerColor:D(O.border.inverse,Je),outerColor:Ft.focusOutline})},"&:hover, &.hover":{[H.vars.background]:O.bg.alt.soft,[H.vars.label]:Ze.dark,[ne.vars.color]:D(X.hover.icon,"currentColor"),textDecoration:"underline"},"&:active, &.active":{[H.vars.background]:Yw,[H.vars.label]:Ze.darkest,[ne.vars.color]:D(X.active.icon,"currentColor"),textDecoration:"underline"},"&:disabled, &.disabled":{[H.vars.background]:O.bg.transparent.default,[H.vars.label]:Ze.base,[H.vars.opacity]:$i.disabled,[ne.vars.color]:D(X.disabled.icon,"currentColor")}},modifiers:{iconPosition:{only:{padding:0,[ne.vars.color]:O.fg.default,[ne.vars.color]:D(X.default.icon,O.fg.strong),"&:focus-visible, &.focus":{[ne.vars.color]:D(X.focus.icon,O.fg.strong)},"&:hover, &.hover":{[ne.vars.color]:D(X.hover.icon,O.fg.strong)},"&:active, &.active":{[ne.vars.color]:D(X.active.icon,O.fg.strong)},"&:disabled, &.disabled":{[ne.vars.color]:D(X.disabled.icon,O.fg.strong)}},start:{},end:{}},variant:{inverse:{[H.vars.background]:"transparent",[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.default.icon,"currentColor"),"&:focus-visible, &.focus":{[H.vars.background]:O.bg.translucent,[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.focus.icon,"currentColor"),...ny({width:2,separation:0,outerColor:D(O.border.inverse,Je)})},"&:hover, &.hover":{[H.vars.background]:O.bg.transparent.strong,[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.hover.icon,"currentColor")},"&:active, &.active":{[H.vars.background]:O.bg.transparent.stronger,[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.active.icon,"currentColor")},"&:disabled, &.disabled":{[H.vars.background]:"transparent",[H.vars.label]:O.fg.inverse,[ne.vars.color]:D(X.disabled.icon,"currentColor")}}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:At.multiply(P.x4,3)}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:P.x2,paddingInlineEnd:P.x3}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:P.x3,paddingInlineEnd:P.x2}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:P.x10}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:P.x2,paddingInlineEnd:P.x3}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:P.x3,paddingInlineEnd:P.x2}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:P.x8}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:P.x2,paddingInlineEnd:P.x3}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:P.x3,paddingInlineEnd:P.x2}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:P.x6}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:P.x1,paddingInlineEnd:P.x2}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:P.x2,paddingInlineEnd:P.x1}}]}),Foe=qe("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 w.jsx(Dz,{as:u,ref:l,icon:t,size:n,iconPosition:r,grow:i,cs:[zoe({size:n,variant:a,grow:i,iconPosition:c}),o],...s,children:e})}});var bn="top",Nn="bottom",Cn="right",vn="left",ck="auto",Dl=[bn,Nn,Cn,vn],Di="start",dk="end",Boe="clippingParents",Mz="viewport",So="popper",joe="reference",gC=Dl.reduce(function(e,t){return e.concat([t+"-"+Di,t+"-"+dk])},[]),Uz=[].concat(Dl,[ck]).reduce(function(e,t){return e.concat([t,t+"-"+Di,t+"-"+dk])},[]),qoe="beforeRead",Goe="read",Hoe="afterRead",Woe="beforeMain",Voe="main",Zoe="afterMain",Yoe="beforeWrite",Koe="write",Xoe="afterWrite",Joe=[qoe,Goe,Hoe,Woe,Voe,Zoe,Yoe,Koe,Xoe];function $n(e){return e?(e.nodeName||"").toLowerCase():null}function Ln(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ss(e){var t=Ln(e).Element;return e instanceof t||e instanceof Element}function Yn(e){var t=Ln(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Qoe(e){var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ese(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];!Yn(i)||!$n(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 tse(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},{});!Yn(r)||!$n(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const nse={name:"applyStyles",enabled:!0,phase:"write",fn:ese,effect:tse,requires:["computeStyles"]};function Vn(e){return e.split("-")[0]}function pk(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function zz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Qoe(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function pr(e){return Ln(e).getComputedStyle(e)}function rse(e){return["table","td","th"].indexOf($n(e))>=0}function kr(e){return((Ss(e)?e.ownerDocument:e.document)||window.document).documentElement}function lp(e){return $n(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||kr(e)}function hC(e){if(!Yn(e)||pr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=kr(t);if($n(t)==="body"&&pr(t).position==="static"&&pr(n).position!=="static")return n}return t}function ase(e){for(var t=lp(e);Yn(t)&&["html","body"].indexOf($n(t))<0;){var n=pr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function Pl(e){for(var t=Ln(e),n=hC(e);n&&rse(n)&&pr(n).position==="static";)n=hC(n);return n&&$n(n)==="body"&&pr(n).position==="static"?t:n||ase(e)||t}function fk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Du(e,t,n){return Math.max(e,Math.min(t,n))}function Fz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign(Object.assign({},Fz()),e)}function jz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function ise(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Vn(n.placement),s=fk(o),l=[vn,Cn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=pk(r),p=s==="y"?bn:vn,m=s==="y"?Nn:Cn,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],y=i[s]-n.rects.reference[s],I=Pl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=b/2-y/2,g=c[p],v=h-d[u]-c[m],_=h/2-d[u]/2+f,E=Du(g,_,v),k=s;n.modifiersData[a]=(t={},t[k]=E,t.centerOffset=E-_,t)}}function ose(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)||zz(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:Bz(typeof s!="number"?s:jz(s,Dl))}))}const sse={name:"arrow",enabled:!0,phase:"main",fn:ise,effect:ose,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var lse={top:"auto",right:"auto",bottom:"auto",left:"auto"};function use(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 bC(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=use(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),m=i.hasOwnProperty("y"),b=vn,y=bn,I=window;if(l){var h=Pl(n);h===Ln(n)&&(h=kr(n)),r===bn&&(y=Nn,d-=h.clientHeight-a.height,d*=s?1:-1),r===vn&&(b=Cn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&lse);if(s){var g;return Object.assign(Object.assign({},f),{},(g={},g[y]=m?"0":"",g[b]=p?"0":"",g.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",g))}return Object.assign(Object.assign({},f),{},(t={},t[y]=m?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function cse(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:Vn(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),bC(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),bC(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 dse={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cse,data:{}};var fu={passive:!0};function pse(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=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,fu)}),s&&l.addEventListener("resize",n.update,fu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,fu)}),s&&l.removeEventListener("resize",n.update,fu)}}const fse={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pse,data:{}};var mse={left:"right",right:"left",bottom:"top",top:"bottom"};function Pu(e){return e.replace(/left|right|bottom|top/g,function(t){return mse[t]})}var gse={start:"end",end:"start"};function vC(e){return e.replace(/start|end/g,function(t){return gse[t]})}function Es(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 mk(e){var t=Ln(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function gk(e){return Es(kr(e)).left+mk(e).scrollLeft}function hse(e){var t=Ln(e),n=kr(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+gk(e),y:s}}function bse(e){var t=kr(e),n=mk(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+gk(e),s=-n.scrollTop;return pr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function hk(e){var t=pr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function qz(e){return["html","body","#document"].indexOf($n(e))>=0?e.ownerDocument.body:Yn(e)&&hk(e)?e:qz(lp(e))}function Bo(e,t){t===void 0&&(t=[]);var n=qz(e),a=$n(n)==="body",r=Ln(n),i=a?[r].concat(r.visualViewport||[],hk(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Bo(lp(i)))}function ry(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vse(e){var t=Es(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 yC(e,t){return t===Mz?ry(hse(e)):Yn(t)?vse(t):ry(bse(kr(e)))}function yse(e){var t=Bo(lp(e)),n=["absolute","fixed"].indexOf(pr(e).position)>=0,a=n&&Yn(e)?Pl(e):e;return Ss(a)?t.filter(function(r){return Ss(r)&&zz(r,a)&&$n(r)!=="body"}):[]}function Sse(e,t,n){var a=t==="clippingParents"?yse(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=yC(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},yC(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 _s(e){return e.split("-")[1]}function Gz(e){var t=e.reference,n=e.element,a=e.placement,r=a?Vn(a):null,i=a?_s(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 Nn:l={x:o,y:t.y+t.height};break;case Cn:l={x:t.x+t.width,y:s};break;case vn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=r?fk(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Di:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case dk:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function Pi(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,i=n.boundary,o=i===void 0?Boe:i,s=n.rootBoundary,l=s===void 0?Mz:s,u=n.elementContext,c=u===void 0?So:u,d=n.altBoundary,p=d===void 0?!1:d,m=n.padding,b=m===void 0?0:m,y=Bz(typeof b!="number"?b:jz(b,Dl)),I=c===So?joe:So,h=e.elements.reference,f=e.rects.popper,g=e.elements[p?I:c],v=Sse(Ss(g)?g:g.contextElement||kr(e.elements.popper),o,l),_=Es(h),E=Gz({reference:_,element:f,placement:r}),k=ry(Object.assign(Object.assign({},f),E)),A=c===So?k:_,C={top:v.top-A.top+y.top,bottom:A.bottom-v.bottom+y.bottom,left:v.left-A.left+y.left,right:A.right-v.right+y.right},M=e.modifiersData.offset;if(c===So&&M){var V=M[r];Object.keys(C).forEach(function(te){var re=[Cn,Nn].indexOf(te)>=0?1:-1,Ee=[bn,Nn].indexOf(te)>=0?"y":"x";C[te]+=V[Ee]*re})}return C}function Ese(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?Uz:l,c=_s(a),d=c?s?gC:gC.filter(function(b){return _s(b)===c}):Dl,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var m=p.reduce(function(b,y){return b[y]=Pi(e,{placement:y,boundary:r,rootBoundary:i,padding:o})[Vn(y)],b},{});return Object.keys(m).sort(function(b,y){return m[b]-m[y]})}function _se(e){if(Vn(e)===ck)return[];var t=Pu(e);return[vC(e),t,vC(t)]}function wse(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,m=n.flipVariations,b=m===void 0?!0:m,y=n.allowedAutoPlacements,I=t.options.placement,h=Vn(I),f=h===I,g=l||(f||!b?[Pu(I)]:_se(I)),v=[I].concat(g).reduce(function(be,$e){return be.concat(Vn($e)===ck?Ese(t,{placement:$e,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:y}):$e)},[]),_=t.rects.reference,E=t.rects.popper,k=new Map,A=!0,C=v[0],M=0;M<v.length;M++){var V=v[M],te=Vn(V),re=_s(V)===Di,Ee=[bn,Nn].indexOf(te)>=0,Ie=Ee?"width":"height",he=Pi(t,{placement:V,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),Te=Ee?re?Cn:vn:re?Nn:bn;_[Ie]>E[Ie]&&(Te=Pu(Te));var L=Pu(Te),j=[];if(i&&j.push(he[te]<=0),s&&j.push(he[Te]<=0,he[L]<=0),j.every(function(be){return be})){C=V,A=!1;break}k.set(V,j)}if(A)for(var q=b?3:1,Z=function($e){var Pe=v.find(function(tt){var sn=k.get(tt);if(sn)return sn.slice(0,$e).every(function($a){return $a})});if(Pe)return C=Pe,"break"},K=q;K>0;K--){var Ye=Z(K);if(Ye==="break")break}t.placement!==C&&(t.modifiersData[a]._skip=!0,t.placement=C,t.reset=!0)}}const kse={name:"flip",enabled:!0,phase:"main",fn:wse,requiresIfExists:["offset"],data:{_skip:!1}};function SC(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 EC(e){return[bn,Cn,Nn,vn].some(function(t){return e[t]>=0})}function Ise(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=Pi(t,{elementContext:"reference"}),s=Pi(t,{altBoundary:!0}),l=SC(o,a),u=SC(s,r,i),c=EC(l),d=EC(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 Tse={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ise};function xse(e,t,n){var a=Vn(e),r=[vn,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,[vn,Cn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function Rse(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=Uz.reduce(function(c,d){return c[d]=xse(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 Ase={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Rse};function Nse(e){var t=e.state,n=e.name;t.modifiersData[n]=Gz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Cse={name:"popperOffsets",enabled:!0,phase:"read",fn:Nse,data:{}};function Ose(e){return e==="x"?"y":"x"}function $se(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,m=p===void 0?!0:p,b=n.tetherOffset,y=b===void 0?0:b,I=Pi(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Vn(t.placement),f=_s(t.placement),g=!f,v=fk(h),_=Ose(v),E=t.modifiersData.popperOffsets,k=t.rects.reference,A=t.rects.popper,C=typeof y=="function"?y(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):y,M={x:0,y:0};if(E){if(i){var V=v==="y"?bn:vn,te=v==="y"?Nn:Cn,re=v==="y"?"height":"width",Ee=E[v],Ie=E[v]+I[V],he=E[v]-I[te],Te=m?-A[re]/2:0,L=f===Di?k[re]:A[re],j=f===Di?-A[re]:-k[re],q=t.elements.arrow,Z=m&&q?pk(q):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Fz(),Ye=K[V],be=K[te],$e=Du(0,k[re],Z[re]),Pe=g?k[re]/2-Te-$e-Ye-C:L-$e-Ye-C,tt=g?-k[re]/2+Te+$e+be+C:j+$e+be+C,sn=t.elements.arrow&&Pl(t.elements.arrow),$a=sn?v==="y"?sn.clientTop||0:sn.clientLeft||0:0,La=t.modifiersData.offset?t.modifiersData.offset[t.placement][v]:0,Da=E[v]+Pe-La-$a,pp=E[v]+tt-La,Pa=Du(m?Math.min(Ie,Da):Ie,Ee,m?Math.max(he,pp):he);E[v]=Pa,M[v]=Pa-Ee}if(s){var _F=v==="x"?bn:vn,wF=v==="x"?Nn:Cn,zl=E[_],kF=zl+I[_F],IF=zl-I[wF],Ik=Du(kF,zl,IF);E[_]=Ik,M[_]=Ik-zl}t.modifiersData[a]=M}}const Lse={name:"preventOverflow",enabled:!0,phase:"main",fn:$se,requiresIfExists:["offset"]};function Dse(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Pse(e){return e===Ln(e)||!Yn(e)?mk(e):Dse(e)}function Mse(e,t,n){n===void 0&&(n=!1);var a=kr(t),r=Es(e),i=Yn(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&(($n(t)!=="body"||hk(a))&&(o=Pse(t)),Yn(t)?(s=Es(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=gk(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function Use(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 zse(e){var t=Use(e);return Joe.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function Fse(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Bse(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 _C={placement:"bottom",modifiers:[],strategy:"absolute"};function wC(){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 jse(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?_C:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},_C),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,m={state:c,setOptions:function(h){y(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:Ss(s)?Bo(s):s.contextElement?Bo(s.contextElement):[],popper:Bo(l)};var f=zse(Bse([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(g){return g.enabled}),b(),m.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,g=h.popper;if(wC(f,g)){c.rects={reference:Mse(f,Pl(g),c.options.strategy==="fixed"),popper:pk(g)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var _=c.orderedModifiers[v],E=_.fn,k=_.options,A=k===void 0?{}:k,C=_.name;typeof E=="function"&&(c=E({state:c,options:A,name:C,instance:m})||c)}}}},update:Fse(function(){return new Promise(function(I){m.forceUpdate(),I(c)})}),destroy:function(){y(),p=!0}};if(!wC(s,l))return m;m.setOptions(u).then(function(I){!p&&u.onFirstUpdate&&u.onFirstUpdate(I)});function b(){c.orderedModifiers.forEach(function(I){var h=I.name,f=I.options,g=f===void 0?{}:f,v=I.effect;if(typeof v=="function"){var _=v({state:c,name:h,instance:m,options:g}),E=function(){};d.push(_||E)}})}function y(){d.forEach(function(I){return I()}),d=[]}return m}}var qse=[fse,Cse,dse,nse,Ase,kse,Lse,sse,Tse],Gse=jse({defaultModifiers:qse});const Hse=["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"],Wse=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=Hse.find(r=>r.includes(`${a}-${n}`))??a),a},Hz=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=Pi({...t,placement:e[0]}),o=/left|right/.test(e[0].split("-")[0])?"horizontal":"vertical",s=(i.top>0||i.bottom>0||i.left>0||i.right>0)&&(o==="horizontal"?r.height/2-i.top<a.height||r.height/2-i.bottom<a.height:r.width-i.left<a.width||r.width-i.right<a.width),l=e[0].split("-")[0];return!s&&i[l]<=0?e[0]:Hz(e.slice(1),t,n)},kC="fallbackModifier",IC={name:kC,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,Wse(n),...a||[]],i=Hz(r,e,n);e.placement!==i&&(e.modifiersData[kC]._skip=!0,e.placement=i,e.reset=!0)}},bk=["top","right","bottom","left"],up=W.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?w.jsx(Yse,{ref:a,portal:e,...n}):null),Vse=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Zse={},Yse=W.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Zse,placement:a="bottom",fallbackPlacements:r=bk,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=W.useRef(!0),{localRef:d,elementRef:p}=wr(l),[m,b]=W.useState(a),y=Rie(u,e),I=W.useRef(a);I.current=m;const h=W.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:g}){b(g.placement),i==null||i(g.placement)}}),[b,i]);W.useLayoutEffect(()=>{const g=t?{getBoundingClientRect:t}:Vse(e??null);if(!g){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 v=Gse(g,y.current,{placement:a,...n,modifiers:[h,{...IC,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(v),()=>{v==null||v.destroy()}}},[e,t,y]),W.useLayoutEffect(()=>{var g;c.current||(g=d.current)==null||g.setOptions({placement:a,...n,modifiers:[h,{...IC,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=w.jsx(w.Fragment,{children:Kse(o)?o({placement:m}):o});return s?Qy.createPortal(f,y.current):f});function Kse(e){return typeof e=="function"}function Fa(e,t,n){let a=n.initialDeps??[],r;function i(){var o,s,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const d=e();if(!(d.length!==a.length||d.some((b,y)=>a[y]!==b)))return r;a=d;let m;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(m=Date.now()),r=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-c)*100)/100,y=Math.round((Date.now()-m)*100)/100,I=y/16,h=(f,g)=>{for(f=String(f);f.length<g;)f=" "+f;return f};console.info(`%c⏱ ${h(y,5)} /${h(b,5)} ms`,`
|
|
316
316
|
font-size: .6rem;
|
|
317
317
|
font-weight: bold;
|
|
318
|
-
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 TC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xse=(e,t)=>Math.abs(e-t)<=1,Jse=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},xC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Qse=e=>e,ele=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},tle=(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(xC(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(xC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},RC={passive:!0},AC=typeof window>"u"?!0:"onscrollend"in window,nle=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&AC?()=>{}:Jse(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,RC);const u=e.options.useScrollendEvent&&AC;return u&&n.addEventListener("scrollend",l,RC),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},rle=(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"]},ale=(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 ile{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:Qse,rangeExtractor:ele,onChange:()=>{},measureElement:rle,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=Fa(()=>(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=Fa(()=>[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=Fa(()=>[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),m=p?p.end+this.options.gap:a+r,b=s.get(d),y=typeof b=="number"?b:this.options.estimateSize(c),I=m+y,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:m,size:y,end:I,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Fa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?ole({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Fa(()=>{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=Fa(()=>[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 TC(a[Wz(0,a.length-1,r=>TC(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();Xse(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 Wz=(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 ole({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=Wz(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 NC=typeof document<"u"?W.useLayoutEffect:W.useEffect;function sle(e){const t=W.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Qy.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=W.useState(()=>new ile(n));return a.setOptions(n),NC(()=>a._didMount(),[]),NC(()=>a._willUpdate()),a}function lle(e){return sle({observeElementRect:tle,observeElementOffset:nle,scrollToFn:ale,...e})}const jo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Zb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",ule={items:[]},mu=On({defaultConfig:{...ule,id:"",getId:jo,getTextValue:Zb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=ip(e.id),n=F.useRef(jo),a=F.useRef(Zb);n.current=e.getId||jo,a.current=e.getTextValue||e.getId||Zb;const[r]=F.useState(e.orientation||"vertical"),[i,o]=F.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=F.useRef(0),u=F.useRef(null),c=F.useMemo(()=>(e.items||[]).map((f,g)=>({id:n.current(f),index:g,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),m=lle({count:c.length,getScrollElement:()=>u.current,estimateSize:F.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:m,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(g=>g.concat({...f,value:f,index:g.length}))},unregisterItem(f){p(g=>g.find(v=>v.id===f.id)?g.filter(v=>v.id!==f.id):g)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),cle=e=>e,cp=()=>0,dp=(e,{state:t})=>t.items.length-1,dle=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return cp()},ple=(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 dp(e,{state:t})},fle=(e,{state:t})=>t.columnCount?e%t.columnCount:cp(),mle=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:dp(e,{state:t}),gle=(e,{state:t})=>t.items.find(n=>n.id===e),hle=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",Sc=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),No=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return cp();if(e===-1)return dp(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?No(e)(i,{state:n},a-1):i},ble=cle({getFirst:cp,getLast:dp,getItem:gle,getNext:No(1),getNextRow:(e,{state:t})=>No(t.columnCount)(e,{state:t}),getPrevious:No(-1),getPreviousRow:(e,{state:t})=>No(-t.columnCount)(e,{state:t}),getPreviousPage:fle,getNextPage:mle,getFirstOfRow:dle,getLastOfRow:ple}),gu=On({defaultConfig:{...mu.defaultConfig,initialCursorId:"",columnCount:0,navigation:ble,pageSize:0},requiredConfig:mu.requiredConfig,contextOverride:mu.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=mu(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const m=((b=u.items[p])==null?void 0:b.id)||"";n(m)};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 m=u.items.findIndex(b=>b.id===p.id);l(m)},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}}),Vz=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),Zz={select(e){return{selectedIds:[e],unselectedIds:[]}}},vle={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:[]}}},ua=On({defaultConfig:{...gu.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:Zz},requiredConfig:gu.requiredConfig,contextOverride:gu.Context})(e=>{const t=gu(e),[n,a]=F.useState(e.initialSelectedIds),[r,i]=F.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}}),jn=On({defaultConfig:{UNSTABLE_parentModel:void 0,...ua.defaultConfig},requiredConfig:ua.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...ua(e)})),Mu=F.createContext({});function vk(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 w.jsx(Mu.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 w.jsx(Mu.Provider,{value:{item:a},children:r},a.id||a.index)}):w.jsx(Mu.Provider,{value:{},children:t})}const Oa=ye()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(Mu),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=wr(Ca(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return op(()=>{var y;if((o==null?void 0:o.index)===0&&((y=u.current)!=null&&y.clientHeight),i)return;const p=a.indexRef.current,m=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===m))return;const b={id:m,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(m),()=>{r.unregisterItem({id:m})}}),{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:JU(`${a.id}-${s}`)}});function Eo(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 hu=On({defaultConfig:{...ua.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:ua.requiredConfig,contextOverride:ua.Context})(e=>{const t=e.shouldCalculateOverflow===void 0?!0:e.shouldCalculateOverflow,[n,a]=F.useState(e.initialHiddenIds),[r,i]=F.useState({}),[o,s]=F.useState(0),[l,u]=F.useState(0),c=F.useRef(0),d=F.useRef(r),[p,m]=F.useState(0),b=F.useRef(0),y=t?n:[],I=(e.nonInteractiveIds||[]).concat(y),h=ua({...e,nonInteractiveIds:I}),f={...h.state,hiddenIds:y,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},g={...h.events,select(v){const{selectedIds:_}=h.selection.select(v.id,f),E=Eo(c.current,l,b.current,d.current,_,e.items);h.events.select(v),a(E)},setContainerSize(v){c.current=h.state.orientation==="horizontal"?v.width||0:v.height||0,s(c.current);const _=Eo(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},setContainerWidth(v){g.setContainerSize({width:v.width,height:0})},setContainerGap(v){u(v.size);const _=Eo(c.current,v.size,b.current,d.current,f.selectedIds,e.items);a(_)},setOverflowTargetSize(v){b.current=h.state.orientation==="horizontal"?v.width||0:v.height||0,m(b.current)},setOverflowTargetWidth(v){b.current=v.width,g.setOverflowTargetSize({width:b.current,height:0})},addItemWidth(v){g.addItemSize({id:v.id,width:v.width,height:0})},addItemSize(v){d.current={...d.current,[v.id]:h.state.orientation==="horizontal"?v.width:v.height},i(d.current);const _=Eo(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},removeItemSize(v){const _={...d.current};delete _[v.id],d.current=_,i(d.current);const E=Eo(c.current,l,b.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(k=>v.id!==k):f.selectedIds,e.items);a(E)},removeItemWidth(v){g.removeItemSize({id:v.id})},addHiddenKey(v){a(_=>_.concat(v.id))},removeHiddenKey(v){a(_=>_.filter(E=>E!==v.id))}};return{...h,state:f,events:g}}),yle=ye()((e,t)=>{const{elementRef:n,localRef:a}=wr(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return bie({ref:a,onResize:e.events.setContainerSize}),op(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),Sle={position:"absolute",left:-99999},Yz=ye()((e,t,n={})=>{const{elementRef:a,localRef:r}=wr(t),i=n["data-id"]||"";op(()=>{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?Sle:{},inert:F.use?o:o?"":void 0}}),Ele={position:"absolute",left:-99999},_le=ye()((e,t)=>{const{elementRef:n,localRef:a}=wr(t),r=F.useRef(!0);op(()=>{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?Ele:void 0}}),ay={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"}},wle={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},CC={...ay.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},Yb={Home:"goToFirst",End:"goToLast"},OC=(e,t)=>e.hasOwnProperty(t);function kle(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in Yb)if(OC(Yb,l)&&e.key===l)return(i=(r=t.events)[Yb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?CC:ay[t.state.orientation],a=ZU(e.currentTarget);for(const l in n)if(OC(n,l)&&(a?e.key===wle[l]:e.key===l)){const u=t.state.columnCount>0?CC[l]:ay[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const Kz=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>Kz(e,t-1)),n==null||n("Retry timeout")},Ile=(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="${WU(`${u}-${o.id}`)}"]`);Kz(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),Xz=ye()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&Ile(e,hle(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),F.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){kle(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":JU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&Sc(e.state,n["data-id"])?0:-1:0}}),Jz=ye()(({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})}}}),Tle=ye()((e,t,n={})=>{const a=n["data-id"]||"";return{className:Sc(e.state,a)?"focus":""}}),xle=st("li")({displayName:"Item",modelHook:jn,elemPropsHook:Oa})((e,t)=>w.jsx(t,{...Lt(e)})),Rle=ye()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),Ale=De({base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlockStart:P.zero,marginBlockEnd:P.zero}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),Nle=Na("ul")({displayName:"ListBox",modelHook:jn,elemPropsHook:Rle,subComponents:{Item:xle}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>w.jsx("div",{ref:l.state.containerRef,...bt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},Ale({orientation:l.state.orientation})),children:w.jsx(s,{...Lt(o),"data-part":"list",children:vk(l,o.children)})})),dt=On({defaultConfig:{...jn.defaultConfig,...ia.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...jn.requiredConfig,...ia.requiredConfig},contextOverride:ia.Context})(e=>{const t=jn(jn.mergeConfig(e,{selection:e.mode==="single"?Zz:vle})),n=ia(ia.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));cz(n),dz(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}}),Qz=xie,eF={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Cle=st("div")({modelHook:dt,elemPropsHook:Qz})(({children:e,...t})=>w.jsx(up,{placement:"bottom-start",popperOptions:eF,...t,children:e})),tF=ye()(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)}}})),nF=er(tF,Aie),Ole=er(tF,Nie),$le=st(Pz)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:nF})(({children:e,...t},n)=>w.jsx(n,{...t,children:e})),Lle=st(Pz)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Ole})(({children:e,...t},n)=>w.jsx(n,{...t,children:e}));var Dle=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},Ple=function(e,t){return e+ws(t)},ws=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(Ple,""):Dle(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?ws(e.props.children):""};ws.default=ws;var Mle=ws;const Ule=_c(Mle),$C={vertical:"bottom",horizontal:"center"},iy=aa("positionX","positionY"),zle=Dae({"0%":{opacity:0,transform:`translate(${iy.positionX}, ${iy.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),Fle=De({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({...Fe.subtext.medium,display:"inline-flex",position:"relative",padding:P.x3,color:O.text.inverse,animationName:zle,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:O.text.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_r.x1,outline:`${se(1)} solid transparent`,outlineOffset:`-${se(1)}`,zIndex:-1,margin:P.x1,backgroundColor:O.bg.translucent,position:"absolute",top:0,left:0,right:0,bottom:0},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:At.negate(P.x1)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:At.negate(P.x1)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:At.negate(P.x1)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:At.negate(P.x1)}}),modifiers:{elementHasFocus:{true:{padding:At.subtract(P.x4,At.divide(P.x1,2)),"&:before":{margin:At.add(P.x1,At.divide(P.x1,2))}}}}}),rF=qe("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=$C,elementHasFocus:n=!1,...a},r,i)=>{const o=eie(t||$C,D(P.x2));return w.jsx(i,{ref:r,...Lt(a,[Fle({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),iy({positionX:o.x,positionY:o.y})]),children:e})}}),LC=(e,t=0)=>{const n=W.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return W.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Ble=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 aF({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=W.useRef(!1),i=ia(),[o,s]=W.useState(null),l=ip(),u=LC(i.events.hide,a),c=LC(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},m=f=>{s(f.currentTarget),p()},b=f=>{r.current||m(f),r.current=!1},y=f=>{r.current=!0,Ble(f.currentTarget)&&i.events.hide()};dz(i),cz(i),kie(i),Iie(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:m,onMouseLeave:d,onMouseDown:y,onFocus:b,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 jle(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=nk(t[r],e[r]):a[r]=t[r],a),{})}const qle=qe("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=bk,...s}){const l=Ule(n),{targetProps:u,popperProps:c,tooltipProps:d}=aF({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,m]=W.useState(!1),{localRef:b}=wr();return W.useEffect(()=>{const y=b.current;if(!y)return;const I=()=>{m(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)}},[b]),w.jsxs(W.Fragment,{children:[W.cloneElement(a,{...u,...jle(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),w.jsx(up,{placement:t,fallbackPlacements:o,...c,children:({placement:y})=>{const I=lk(y);return w.jsx(rF,{transformOrigin:I,...s,...d,elementHasFocus:p,children:n})}})]})}}),iF=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=iF(e.children[n]);if(a)return a}return null}return null},oF=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=oF(e.children[n]);if(a)return a}return null},DC=e=>{const t=oF(e)||iF(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Gle(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=nk(t[r],e[r]):a[r]=t[r],a),{})}const Ml=({placement:e="top",fallbackPlacements:t=bk,children:n,...a})=>{const[r,i]=W.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=aF({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),DC(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),DC(p)&&o.onFocus(d)};return w.jsxs(W.Fragment,{children:[W.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Gle({...o,onMouseEnter:u,onFocus:c},n.props)}),w.jsx(up,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=lk(d);return w.jsx(rF,{transformOrigin:p,...l,...a,children:r})}})]})},Ul=De({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({...Fe.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:P.x4,padding:`${P.x2} ${P.x4}`,boxSizing:"border-box",cursor:"pointer",color:O.fg.default,borderWidth:0,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:P.x10,overflowWrap:"anywhere",[ne.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:$i.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:Ze.dark,backgroundColor:Ze.lightest,[`& :where(${n})`]:{opacity:$i.full},"&:where(.focus, :focus-visible)":{[ne.vars.color]:Ze.accent,outline:"none",backgroundColor:Ze.base,color:ne.vars.color}},"&:is(.hover, :hover)":{color:O.fg.strong,backgroundColor:rr.lightest},"&:is(.focus, :focus-visible)":{color:Ze.accent,backgroundColor:Ze.base,outline:`${se(2)} solid transparent`,outlineOffset:`-${se(2)}`},"&:is(:disabled, [aria-disabled=true])":{color:O.fg.disabled,cursor:"default","&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:Ze.light}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Hle=e=>w.jsx(Ll,{...Ul.parts.icon,...e}),sF=qe("span")({Component:({...e},t,n)=>w.jsx(n,{ref:t,...Ul.parts.text,...bt(e)})}),lF=qe("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>w.jsx(r,{ref:a,"aria-disabled":t,...Lt(n,Ul({})),children:typeof e=="string"?w.jsx(sF,{children:e}):e})}),uF=ye()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),cF=ye()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=wr(t),i=n["data-id"];return W.useLayoutEffect(()=>{e.state.mode==="single"&&Sc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:Sc(e.state,n["data-id"])?"focus":void 0}});function dF(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),dF(e.UNSTABLE_parentModel))}const Wle=er(ye()(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),dF(e))}:void 0})),cF,uF,Jz,Xz,Oa),Mi=st("button")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Wle,subComponents:{Icon:Hle,Text:sF}})(({children:e,...t},n)=>w.jsx(Ml,{placement:"left",children:w.jsx(lF,{as:n,...t,children:e})})),Vle=De({vars:{minWidth:se(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({...Fe.subtext.large,color:O.text.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:P.zero,maxWidth:At.subtract("100vw",P.x8),boxShadow:oae[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Zle=ye()(()=>({})),pF=st("div")({displayName:"Menu.Card",modelHook:dt,elemPropsHook:Zle})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=W.useMemo(()=>lk(r.state.placement||"bottom"),[r.state.placement]);return w.jsx(xoe,{as:a,...Lt(n,Vle({minWidth:typeof e=="number"?se(e):e,maxHeight:typeof t=="number"?se(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Yle=er(ye()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),Cie,Tie),Kle=De({base:{background:O.bg.default,borderRadius:_r.zero,padding:P.zero,gap:P.zero},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),fF=st("div")({displayName:"Menu.List",modelHook:dt,elemPropsHook:Yle})(({children:e,...t},n,a)=>w.jsx(Nle,{as:n,model:a,marginY:D(P.x2),...bt(t,Kle({orientation:a.state.orientation})),children:e})),Xle=De({base:{display:"block",height:se(1),border:P.zero,borderTop:`${se(1)} solid ${O.border.divider}`,margin:`${P.x2} ${P.zero}`}}),mF=qe("hr")({displayName:"Menu.Divider",Component({...e},t,n){return w.jsx(n,{ref:t,...bt(e,Xle())})}}),gF=qe("span")({Component:({...e},t,n)=>w.jsxs(w.Fragment,{children:[w.jsx(Mi.Text,{ref:t,as:n,...e}),w.jsx(Ll,{...Ul.parts.selected,icon:Loe})]})}),Jle=qe("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>w.jsx(a,{ref:n,...Lt(t,Ul()),children:typeof e=="string"?w.jsx(gF,{children:e}):e})}),Qle=er(ye()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Vz(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),Tle,Oa),hF=st("li")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Qle,subComponents:{Icon:Mi.Icon,Text:gF}})(({children:e,...t},n)=>w.jsx(Ml,{placement:"left",children:w.jsx(Jle,{as:n,...t,children:e})})),bF=On({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:ip(e.id)},events:{}})),eue=De({base:{...Fe.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:P.x4,padding:`${P.x2} ${P.x4}`,boxSizing:"border-box",fontWeight:Bn.bold}}),tue=ye()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),nue=ye()(e=>({id:e.state.id})),PC=st("div")({modelHook:bF,elemPropsHook:nue})(({children:e,...t},n)=>w.jsx(Ml,{children:w.jsx(n,{...Lt(t,eue()),children:e})})),vF=Na("div")({displayName:"Menu.Group",modelHook:bF,elemPropsHook:tue,subComponents:{Heading:PC}})(({children:e,title:t,...n},a)=>w.jsxs(a,{...Lt(n),children:[t?w.jsx(PC,{children:t}):null,e]})),rue=st("div")({modelHook:dt,elemPropsHook:Qz})(({children:e,...t})=>w.jsx(up,{placement:"right-start",popperOptions:eF,...t,children:e})),aue=(e,t=0)=>{const n=F.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return F.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},iue=er(Ao(e=>e.UNSTABLE_parentModel,cF),Ao(e=>e.UNSTABLE_parentModel,uF),Ao(e=>e.UNSTABLE_parentModel,Xz),ye()((e,t)=>({ref:Ca(t,e.state.targetRef)})),Ao(e=>e.UNSTABLE_parentModel,Oa),ye()(e=>{const t=F.useRef(),n=aue(()=>{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}}}})),oue=st("button")({modelHook:dt,elemPropsHook:iue})(({children:e,...t},n)=>w.jsxs(lF,{as:n,...t,children:[typeof e=="string"?w.jsx(Mi.Text,{children:e}):e,w.jsx(Mi.Icon,{icon:uk})]})),sue=st()({modelHook:dt,subComponents:{Card:pF,List:fF,Item:Mi,TargetItem:oue,Group:vF,Option:hF,Divider:mF,Popper:rue}})(({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 w.jsx(o.Provider,{value:i,children:e})}),$r=Na()({displayName:"Menu",modelHook:dt,subComponents:{Target:$le,Card:pF,List:fF,Item:Mi,Group:vF,Option:hF,Divider:mF,TargetContext:Lle,Popper:Cle,Submenu:sue}})(({children:e})=>w.jsx(w.Fragment,{children:e})),lue=(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},ao=On({defaultConfig:{...hu.defaultConfig,id:"",orientation:"horizontal",menuConfig:{}},requiredConfig:hu.requiredConfig})(e=>{const t=e.getId||jo,n=e.items,a=hu(hu.mergeConfig(e,{orientation:e.orientation||"horizontal",items:n,shouldVirtualize:!1}));let r=a.state.hiddenIds,i=a.state.nonInteractiveIds;r=lue(n,r,t),i=r;const o={...a.state,hiddenIds:r,nonInteractiveIds:i,orientation:e.orientation||"horizontal"},s=F.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}}),uue=De({base:{padding:0,margin:0,display:"inline-flex",alignItems:"center",minHeight:P.x10,listStyle:"none",width:"100%"}}),cue=st("ul")({displayName:"Breadcrumbs.List",modelHook:ao,elemPropsHook:yle})(({overflowButton:e,children:t,...n},a,r)=>{const i=vk(r,t),o=i.length-2;return w.jsxs(a,{role:"list",...bt(n,uue()),children:[i.length?i.slice(0,o):i,e,i.length?i.slice(o,i.length):null]})}),Kb=De({parts:{overflowButton:"breadcrumbs-overflow-button",chevronRightIcon:"breadcrumbs-overflow-button-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"flex",[ne.vars.color]:O.icon.default,[ne.vars.size]:se(20),[e]:{height:P.x8,width:P.x8,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),due=er(ye()(()=>({"aria-haspopup":!0,"aria-controls":"menu"})),_le,Ao(e=>e.menu,nF)),pue=st("button")({displayName:"Breadcrumbs.OverflowButton",modelHook:ao,elemPropsHook:due})(({style:e,...t},n)=>w.jsxs("li",{...Kb(),...e,children:[w.jsx(Foe,{as:n,icon:Doe,...Kb.parts.overflowButton,...bt(t)}),w.jsx(Ll,{icon:uk,...Kb.parts.chevronRightIcon,"aria-hidden":!0})]})),fue=De({vars:{maxWidth:""},base:({maxWidth:e})=>({...Fe.subtext.large,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:e})}),yF=qe("a")({displayName:"Breadcrumbs.Link",Component:({maxWidth:e=350,href:t,tooltipProps:n={},children:a,...r},i,o)=>w.jsx(Ml,{...n,children:w.jsx(Moe,{href:t,ref:i,as:o,role:"link",variant:"standalone",...bt(r,fue({maxWidth:typeof e=="number"?se(e):e})),children:a})})}),MC=De({parts:{chevronRightIcon:"breadcrumbs-item-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"inline-flex",whiteSpace:"nowrap",[ne.vars.size]:se(20),[ne.vars.color]:O.icon.default,[e]:{height:P.x8,width:P.x8,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),mue=er(Yz,Oa),gue=st("li")({displayName:"Breadcrumbs.Item",modelHook:ao,elemPropsHook:mue,subComponents:{Link:yF}})(({children:e,...t},n)=>w.jsxs(n,{...Lt(t,MC()),children:[e,w.jsx(Ll,{icon:uk,...MC.parts.chevronRightIcon,"aria-hidden":!0})]})),hue=De({vars:{maxWidth:""},base:({maxWidth:e})=>({...Fe.subtext.large,fontWeight:Bn.medium,color:O.text.default,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:e})}),bue=er(ye()((e,t,n)=>{const{localRef:a}=wr(Ca(t));let r=!1;const i=a.current;if(i){const{scrollWidth:o,clientWidth:s}=i;r=o>s}return{tabIndex:r?0:void 0,ref:a}}),Yz,Oa),vue=st("li")({displayName:"Breadcrumbs.Item",modelHook:ao,elemPropsHook:bue})(({children:e,tooltipProps:t={},maxWidth:n="350px",...a},r)=>w.jsx(Ml,{...t,children:w.jsx(Oz,{as:r,...bt(a,hue({maxWidth:typeof n=="number"?se(n):n})),children:e})})),yue=De({base:{textDecoration:"none"}}),Sue=qe("a")({displayName:"Breadcrumbs.Menu.Item",Component:(e,t,n)=>w.jsx($r.Item,{as:n,...bt(e,yue()),ref:t})}),Eue=De({base:{width:se(280),maxWidth:se(280),maxHeight:se(296)}}),_ue=e=>w.jsx($r.Card,{...bt(e,Eue())}),wue=Na()({displayName:"Breadcrumbs.Menu",modelHook:dt,subComponents:{Card:_ue,List:$r.List,Item:Sue,Divider:$r.Divider,Target:$r.Target,TargetContext:$r.TargetContext,Popper:$r.Popper}})(({children:e})=>w.jsx(w.Fragment,{children:e})),pe=Na("nav")({displayName:"Breadcrumbs",modelHook:ao,subComponents:{List:cue,Item:gue,Link:yF,CurrentItem:vue,OverflowButton:pue,Menu:wue}})(({children:e,...t},n,a)=>w.jsx($r,{model:a.menu,children:w.jsx("nav",{role:"navigation",...bt(t),children:e})})),yk=()=>w.jsx(pe,{"aria-label":"Breadcrumbs",children:w.jsxs(pe.List,{children:[w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/",children:"Home"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/menus",children:"Menus"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/lunch",children:"Lunch"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/house-specialty-pies",maxWidth:100,children:"House Specialty Pies"})}),w.jsx(pe.CurrentItem,{maxWidth:100,children:"Canvas Supreme"})]})});yk.__RAW__=`import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs';
|
|
318
|
+
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 TC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xse=(e,t)=>Math.abs(e-t)<=1,Jse=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},xC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Qse=e=>e,ele=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},tle=(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(xC(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(xC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},RC={passive:!0},AC=typeof window>"u"?!0:"onscrollend"in window,nle=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&AC?()=>{}:Jse(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,RC);const u=e.options.useScrollendEvent&&AC;return u&&n.addEventListener("scrollend",l,RC),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},rle=(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"]},ale=(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 ile{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:Qse,rangeExtractor:ele,onChange:()=>{},measureElement:rle,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=Fa(()=>(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=Fa(()=>[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=Fa(()=>[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),m=p?p.end+this.options.gap:a+r,b=s.get(d),y=typeof b=="number"?b:this.options.estimateSize(c),I=m+y,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:m,size:y,end:I,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Fa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?ole({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Fa(()=>{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=Fa(()=>[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 TC(a[Wz(0,a.length-1,r=>TC(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();Xse(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 Wz=(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 ole({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=Wz(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 NC=typeof document<"u"?W.useLayoutEffect:W.useEffect;function sle(e){const t=W.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Qy.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=W.useState(()=>new ile(n));return a.setOptions(n),NC(()=>a._didMount(),[]),NC(()=>a._willUpdate()),a}function lle(e){return sle({observeElementRect:tle,observeElementOffset:nle,scrollToFn:ale,...e})}const jo=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Zb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",ule={items:[]},mu=On({defaultConfig:{...ule,id:"",getId:jo,getTextValue:Zb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=ip(e.id),n=F.useRef(jo),a=F.useRef(Zb);n.current=e.getId||jo,a.current=e.getTextValue||e.getId||Zb;const[r]=F.useState(e.orientation||"vertical"),[i,o]=F.useState(e.defaultItemHeight),s=e.shouldVirtualize&&!!((h=e.items)!=null&&h.length),l=F.useRef(0),u=F.useRef(null),c=F.useMemo(()=>(e.items||[]).map((f,g)=>({id:n.current(f),index:g,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),m=lle({count:c.length,getScrollElement:()=>u.current,estimateSize:F.useCallback(()=>i,[i]),horizontal:e.orientation==="horizontal",overscan:3});return{state:{...{items:c.length?c:d},UNSTABLE_virtual:m,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(g=>g.concat({...f,value:f,index:g.length}))},unregisterItem(f){p(g=>g.find(v=>v.id===f.id)?g.filter(v=>v.id!==f.id):g)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),cle=e=>e,cp=()=>0,dp=(e,{state:t})=>t.items.length-1,dle=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return cp()},ple=(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 dp(e,{state:t})},fle=(e,{state:t})=>t.columnCount?e%t.columnCount:cp(),mle=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:dp(e,{state:t}),gle=(e,{state:t})=>t.items.find(n=>n.id===e),hle=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",Sc=(e,t)=>{const{cursorId:n}=e;return n==null||n===""?!1:typeof n=="string"?n===t:n.includes(t)},No=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return cp();if(e===-1)return dp(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?No(e)(i,{state:n},a-1):i},ble=cle({getFirst:cp,getLast:dp,getItem:gle,getNext:No(1),getNextRow:(e,{state:t})=>No(t.columnCount)(e,{state:t}),getPrevious:No(-1),getPreviousRow:(e,{state:t})=>No(-t.columnCount)(e,{state:t}),getPreviousPage:fle,getNextPage:mle,getFirstOfRow:dle,getLastOfRow:ple}),gu=On({defaultConfig:{...mu.defaultConfig,initialCursorId:"",columnCount:0,navigation:ble,pageSize:0},requiredConfig:mu.requiredConfig,contextOverride:mu.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=mu(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const m=((b=u.items[p])==null?void 0:b.id)||"";n(m)};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 m=u.items.findIndex(b=>b.id===p.id);l(m)},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}}),Vz=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),Zz={select(e){return{selectedIds:[e],unselectedIds:[]}}},vle={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:[]}}},ua=On({defaultConfig:{...gu.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:Zz},requiredConfig:gu.requiredConfig,contextOverride:gu.Context})(e=>{const t=gu(e),[n,a]=F.useState(e.initialSelectedIds),[r,i]=F.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}}),jn=On({defaultConfig:{UNSTABLE_parentModel:void 0,...ua.defaultConfig},requiredConfig:ua.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...ua(e)})),Mu=F.createContext({});function vk(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 w.jsx(Mu.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 w.jsx(Mu.Provider,{value:{item:a},children:r},a.id||a.index)}):w.jsx(Mu.Provider,{value:{},children:t})}const Oa=ye()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(Mu),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=wr(Ca(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return op(()=>{var y;if((o==null?void 0:o.index)===0&&((y=u.current)!=null&&y.clientHeight),i)return;const p=a.indexRef.current,m=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===m))return;const b={id:m,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(m),()=>{r.unregisterItem({id:m})}}),{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:JU(`${a.id}-${s}`)}});function Eo(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 hu=On({defaultConfig:{...ua.defaultConfig,initialHiddenIds:[],containerWidth:0,shouldCalculateOverflow:!0},requiredConfig:ua.requiredConfig,contextOverride:ua.Context})(e=>{const t=e.shouldCalculateOverflow===void 0?!0:e.shouldCalculateOverflow,[n,a]=F.useState(e.initialHiddenIds),[r,i]=F.useState({}),[o,s]=F.useState(0),[l,u]=F.useState(0),c=F.useRef(0),d=F.useRef(r),[p,m]=F.useState(0),b=F.useRef(0),y=t?n:[],I=(e.nonInteractiveIds||[]).concat(y),h=ua({...e,nonInteractiveIds:I}),f={...h.state,hiddenIds:y,itemSizeCache:r,itemWidthCache:r,containerSize:o,containerWidth:o,containerGap:l,overflowTargetWidth:p},g={...h.events,select(v){const{selectedIds:_}=h.selection.select(v.id,f),E=Eo(c.current,l,b.current,d.current,_,e.items);h.events.select(v),a(E)},setContainerSize(v){c.current=h.state.orientation==="horizontal"?v.width||0:v.height||0,s(c.current);const _=Eo(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},setContainerWidth(v){g.setContainerSize({width:v.width,height:0})},setContainerGap(v){u(v.size);const _=Eo(c.current,v.size,b.current,d.current,f.selectedIds,e.items);a(_)},setOverflowTargetSize(v){b.current=h.state.orientation==="horizontal"?v.width||0:v.height||0,m(b.current)},setOverflowTargetWidth(v){b.current=v.width,g.setOverflowTargetSize({width:b.current,height:0})},addItemWidth(v){g.addItemSize({id:v.id,width:v.width,height:0})},addItemSize(v){d.current={...d.current,[v.id]:h.state.orientation==="horizontal"?v.width:v.height},i(d.current);const _=Eo(c.current,l,b.current,d.current,f.selectedIds,e.items);a(_)},removeItemSize(v){const _={...d.current};delete _[v.id],d.current=_,i(d.current);const E=Eo(c.current,l,b.current,d.current,f.selectedIds!=="all"?f.selectedIds.filter(k=>v.id!==k):f.selectedIds,e.items);a(E)},removeItemWidth(v){g.removeItemSize({id:v.id})},addHiddenKey(v){a(_=>_.concat(v.id))},removeHiddenKey(v){a(_=>_.filter(E=>E!==v.id))}};return{...h,state:f,events:g}}),yle=ye()((e,t)=>{const{elementRef:n,localRef:a}=wr(t),r=e.state.orientation==="horizontal"?"columnGap":"rowGap";return bie({ref:a,onResize:e.events.setContainerSize}),op(()=>{if(a.current){const i=getComputedStyle(a.current);e.events.setContainerGap({size:i.gap==="normal"?0:Number(i[r].replace("px",""))})}}),{ref:n}}),Sle={position:"absolute",left:-99999},Yz=ye()((e,t,n={})=>{const{elementRef:a,localRef:r}=wr(t),i=n["data-id"]||"";op(()=>{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?Sle:{},inert:F.use?o:o?"":void 0}}),Ele={position:"absolute",left:-99999},_le=ye()((e,t)=>{const{elementRef:n,localRef:a}=wr(t),r=F.useRef(!0);op(()=>{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?Ele:void 0}}),ay={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"}},wle={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},CC={...ay.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},Yb={Home:"goToFirst",End:"goToLast"},OC=(e,t)=>e.hasOwnProperty(t);function kle(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in Yb)if(OC(Yb,l)&&e.key===l)return(i=(r=t.events)[Yb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?CC:ay[t.state.orientation],a=ZU(e.currentTarget);for(const l in n)if(OC(n,l)&&(a?e.key===wle[l]:e.key===l)){const u=t.state.columnCount>0?CC[l]:ay[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const Kz=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>Kz(e,t-1)),n==null||n("Retry timeout")},Ile=(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="${WU(`${u}-${o.id}`)}"]`);Kz(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),Xz=ye()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&Ile(e,hle(e.state),r.current).then(()=>{r.current=null})},[e.state.cursorId]),F.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){kle(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":JU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&Sc(e.state,n["data-id"])?0:-1:0}}),Jz=ye()(({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})}}}),Tle=ye()((e,t,n={})=>{const a=n["data-id"]||"";return{className:Sc(e.state,a)?"focus":""}}),xle=st("li")({displayName:"Item",modelHook:jn,elemPropsHook:Oa})((e,t)=>w.jsx(t,{...Lt(e)})),Rle=ye()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),Ale=De({base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlockStart:P.zero,marginBlockEnd:P.zero}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),Nle=Na("ul")({displayName:"ListBox",modelHook:jn,elemPropsHook:Rle,subComponents:{Item:xle}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>w.jsx("div",{ref:l.state.containerRef,...bt({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},Ale({orientation:l.state.orientation})),children:w.jsx(s,{...Lt(o),"data-part":"list",children:vk(l,o.children)})})),dt=On({defaultConfig:{...jn.defaultConfig,...ia.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...jn.requiredConfig,...ia.requiredConfig},contextOverride:ia.Context})(e=>{const t=jn(jn.mergeConfig(e,{selection:e.mode==="single"?Zz:vle})),n=ia(ia.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));cz(n),dz(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}}),Qz=xie,eF={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},Cle=st("div")({modelHook:dt,elemPropsHook:Qz})(({children:e,...t})=>w.jsx(up,{placement:"bottom-start",popperOptions:eF,...t,children:e})),tF=ye()(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)}}})),nF=er(tF,Aie),Ole=er(tF,Nie),$le=st(Pz)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:nF})(({children:e,...t},n)=>w.jsx(n,{...t,children:e})),Lle=st(Pz)({displayName:"Menu.Target",modelHook:dt,elemPropsHook:Ole})(({children:e,...t},n)=>w.jsx(n,{...t,children:e}));var Dle=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},Ple=function(e,t){return e+ws(t)},ws=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(Ple,""):Dle(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?ws(e.props.children):""};ws.default=ws;var Mle=ws;const Ule=_c(Mle),$C={vertical:"bottom",horizontal:"center"},iy=aa("positionX","positionY"),zle=Dae({"0%":{opacity:0,transform:`translate(${iy.positionX}, ${iy.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),Fle=De({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({...Fe.subtext.medium,display:"inline-flex",position:"relative",padding:P.x3,color:O.text.inverse,animationName:zle,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:O.text.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:_r.x1,outline:`${se(1)} solid transparent`,outlineOffset:`-${se(1)}`,zIndex:-1,margin:P.x1,backgroundColor:O.bg.translucent,position:"absolute",top:0,left:0,right:0,bottom:0},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:At.negate(P.x1)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:At.negate(P.x1)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:At.negate(P.x1)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:At.negate(P.x1)}}),modifiers:{elementHasFocus:{true:{padding:At.subtract(P.x4,At.divide(P.x1,2)),"&:before":{margin:At.add(P.x1,At.divide(P.x1,2))}}}}}),rF=qe("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=$C,elementHasFocus:n=!1,...a},r,i)=>{const o=eie(t||$C,D(P.x2));return w.jsx(i,{ref:r,...Lt(a,[Fle({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),iy({positionX:o.x,positionY:o.y})]),children:e})}}),LC=(e,t=0)=>{const n=W.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return W.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},Ble=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 aF({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=W.useRef(!1),i=ia(),[o,s]=W.useState(null),l=ip(),u=LC(i.events.hide,a),c=LC(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},m=f=>{s(f.currentTarget),p()},b=f=>{r.current||m(f),r.current=!1},y=f=>{r.current=!0,Ble(f.currentTarget)&&i.events.hide()};dz(i),cz(i),kie(i),Iie(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:m,onMouseLeave:d,onMouseDown:y,onFocus:b,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 jle(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=nk(t[r],e[r]):a[r]=t[r],a),{})}const qle=qe("div")({displayName:"Tooltip",Component({type:e="label",placement:t="top",title:n,children:a,showDelay:r=300,hideDelay:i=100,fallbackPlacements:o=bk,...s}){const l=Ule(n),{targetProps:u,popperProps:c,tooltipProps:d}=aF({type:e,titleText:l,showDelay:r,hideDelay:i}),[p,m]=W.useState(!1),{localRef:b}=wr();return W.useEffect(()=>{const y=b.current;if(!y)return;const I=()=>{m(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)}},[b]),w.jsxs(W.Fragment,{children:[W.cloneElement(a,{...u,...jle(a.props,u),.../^(muted|describe)$/.test(e)&&a.props["aria-label"]?{"aria-label":a.props["aria-label"]}:{}}),w.jsx(up,{placement:t,fallbackPlacements:o,...c,children:({placement:y})=>{const I=lk(y);return w.jsx(rF,{transformOrigin:I,...s,...d,elementHasFocus:p,children:n})}})]})}}),iF=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=iF(e.children[n]);if(a)return a}return null}return null},oF=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=oF(e.children[n]);if(a)return a}return null},DC=e=>{const t=oF(e)||iF(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function Gle(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=nk(t[r],e[r]):a[r]=t[r],a),{})}const Ml=({placement:e="top",fallbackPlacements:t=bk,children:n,...a})=>{const[r,i]=W.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=aF({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),DC(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),DC(p)&&o.onFocus(d)};return w.jsxs(W.Fragment,{children:[W.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...Gle({...o,onMouseEnter:u,onFocus:c},n.props)}),w.jsx(up,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=lk(d);return w.jsx(rF,{transformOrigin:p,...l,...a,children:r})}})]})},Ul=De({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({...Fe.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:P.x4,padding:`${P.x2} ${P.x4}`,boxSizing:"border-box",cursor:"pointer",color:O.fg.default,borderWidth:0,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:P.x10,overflowWrap:"anywhere",[ne.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:$i.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:Ze.dark,backgroundColor:Ze.lightest,[`& :where(${n})`]:{opacity:$i.full},"&:where(.focus, :focus-visible)":{[ne.vars.color]:Ze.accent,outline:"none",backgroundColor:Ze.base,color:ne.vars.color}},"&:is(.hover, :hover)":{color:O.fg.strong,backgroundColor:rr.lightest},"&:is(.focus, :focus-visible)":{color:Ze.accent,backgroundColor:Ze.base,outline:`${se(2)} solid transparent`,outlineOffset:`-${se(2)}`},"&:is(:disabled, [aria-disabled=true])":{color:O.fg.disabled,cursor:"default","&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:Ze.light}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),Hle=e=>w.jsx(Ll,{...Ul.parts.icon,...e}),sF=qe("span")({Component:({...e},t,n)=>w.jsx(n,{ref:t,...Ul.parts.text,...bt(e)})}),lF=qe("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>w.jsx(r,{ref:a,"aria-disabled":t,...Lt(n,Ul({})),children:typeof e=="string"?w.jsx(sF,{children:e}):e})}),uF=ye()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),cF=ye()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=wr(t),i=n["data-id"];return W.useLayoutEffect(()=>{e.state.mode==="single"&&Sc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:Sc(e.state,n["data-id"])?"focus":void 0}});function dF(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),dF(e.UNSTABLE_parentModel))}const Wle=er(ye()(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),dF(e))}:void 0})),cF,uF,Jz,Xz,Oa),Mi=st("button")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Wle,subComponents:{Icon:Hle,Text:sF}})(({children:e,...t},n)=>w.jsx(Ml,{placement:"left",children:w.jsx(lF,{as:n,...t,children:e})})),Vle=De({vars:{minWidth:se(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({...Fe.subtext.large,color:O.text.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:P.zero,maxWidth:At.subtract("100vw",P.x8),boxShadow:oae[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Zle=ye()(()=>({})),pF=st("div")({displayName:"Menu.Card",modelHook:dt,elemPropsHook:Zle})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=W.useMemo(()=>lk(r.state.placement||"bottom"),[r.state.placement]);return w.jsx(xoe,{as:a,...Lt(n,Vle({minWidth:typeof e=="number"?se(e):e,maxHeight:typeof t=="number"?se(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),Yle=er(ye()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),Cie,Tie),Kle=De({base:{background:O.bg.default,borderRadius:_r.zero,padding:P.zero,gap:P.zero},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),fF=st("div")({displayName:"Menu.List",modelHook:dt,elemPropsHook:Yle})(({children:e,...t},n,a)=>w.jsx(Nle,{as:n,model:a,marginY:D(P.x2),...bt(t,Kle({orientation:a.state.orientation})),children:e})),Xle=De({base:{display:"block",height:se(1),border:P.zero,borderTop:`${se(1)} solid ${O.border.divider}`,margin:`${P.x2} ${P.zero}`}}),mF=qe("hr")({displayName:"Menu.Divider",Component({...e},t,n){return w.jsx(n,{ref:t,...bt(e,Xle())})}}),gF=qe("span")({Component:({...e},t,n)=>w.jsxs(w.Fragment,{children:[w.jsx(Mi.Text,{ref:t,as:n,...e}),w.jsx(Ll,{...Ul.parts.selected,icon:Loe})]})}),Jle=qe("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>w.jsx(a,{ref:n,...Lt(t,Ul()),children:typeof e=="string"?w.jsx(gF,{children:e}):e})}),Qle=er(ye()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Vz(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),Tle,Oa),hF=st("li")({displayName:"Menu.Item",modelHook:dt,elemPropsHook:Qle,subComponents:{Icon:Mi.Icon,Text:gF}})(({children:e,...t},n)=>w.jsx(Ml,{placement:"left",children:w.jsx(Jle,{as:n,...t,children:e})})),bF=On({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:ip(e.id)},events:{}})),eue=De({base:{...Fe.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:P.x4,padding:`${P.x2} ${P.x4}`,boxSizing:"border-box",fontWeight:Bn.bold}}),tue=ye()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),nue=ye()(e=>({id:e.state.id})),PC=st("div")({modelHook:bF,elemPropsHook:nue})(({children:e,...t},n)=>w.jsx(Ml,{children:w.jsx(n,{...Lt(t,eue()),children:e})})),vF=Na("div")({displayName:"Menu.Group",modelHook:bF,elemPropsHook:tue,subComponents:{Heading:PC}})(({children:e,title:t,...n},a)=>w.jsxs(a,{...Lt(n),children:[t?w.jsx(PC,{children:t}):null,e]})),rue=st("div")({modelHook:dt,elemPropsHook:Qz})(({children:e,...t})=>w.jsx(up,{placement:"right-start",popperOptions:eF,...t,children:e})),aue=(e,t=0)=>{const n=F.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return F.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},iue=er(Ao(e=>e.UNSTABLE_parentModel,cF),Ao(e=>e.UNSTABLE_parentModel,uF),Ao(e=>e.UNSTABLE_parentModel,Xz),ye()((e,t)=>({ref:Ca(t,e.state.targetRef)})),Ao(e=>e.UNSTABLE_parentModel,Oa),ye()(e=>{const t=F.useRef(),n=aue(()=>{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}}}})),oue=st("button")({modelHook:dt,elemPropsHook:iue})(({children:e,...t},n)=>w.jsxs(lF,{as:n,...t,children:[typeof e=="string"?w.jsx(Mi.Text,{children:e}):e,w.jsx(Mi.Icon,{icon:uk})]})),sue=st()({modelHook:dt,subComponents:{Card:pF,List:fF,Item:Mi,TargetItem:oue,Group:vF,Option:hF,Divider:mF,Popper:rue}})(({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 w.jsx(o.Provider,{value:i,children:e})}),$r=Na()({displayName:"Menu",modelHook:dt,subComponents:{Target:$le,Card:pF,List:fF,Item:Mi,Group:vF,Option:hF,Divider:mF,TargetContext:Lle,Popper:Cle,Submenu:sue}})(({children:e})=>w.jsx(w.Fragment,{children:e})),lue=(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},ao=On({defaultConfig:{...hu.defaultConfig,id:"",orientation:"horizontal",menuConfig:{}},requiredConfig:hu.requiredConfig})(e=>{const t=e.getId||jo,n=e.items,a=hu(hu.mergeConfig(e,{orientation:e.orientation||"horizontal",items:n,shouldVirtualize:!1}));let r=a.state.hiddenIds,i=a.state.nonInteractiveIds;r=lue(n,r,t),i=r;const o={...a.state,hiddenIds:r,nonInteractiveIds:i,orientation:e.orientation||"horizontal"},s=F.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}}),uue=De({base:{padding:0,margin:0,display:"inline-flex",alignItems:"center",minHeight:P.x10,listStyle:"none",width:"100%"}}),cue=st("ul")({displayName:"Breadcrumbs.List",modelHook:ao,elemPropsHook:yle})(({overflowButton:e,children:t,...n},a,r)=>{const i=vk(r,t),o=i.length-2;return w.jsxs(a,{role:"list",...bt(n,uue()),children:[i.length?i.slice(0,o):i,e,i.length?i.slice(o,i.length):null]})}),Kb=De({parts:{overflowButton:"breadcrumbs-overflow-button",chevronRightIcon:"breadcrumbs-overflow-button-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"flex",[ne.vars.color]:O.icon.default,[ne.vars.size]:se(20),[e]:{height:P.x8,width:P.x8,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),due=er(ye()(()=>({"aria-haspopup":!0,"aria-controls":"menu"})),_le,Ao(e=>e.menu,nF)),pue=st("button")({displayName:"Breadcrumbs.OverflowButton",modelHook:ao,elemPropsHook:due})(({style:e,...t},n)=>w.jsxs("li",{...Kb(),...e,children:[w.jsx(Foe,{as:n,icon:Doe,...Kb.parts.overflowButton,...bt(t)}),w.jsx(Ll,{icon:uk,...Kb.parts.chevronRightIcon,"aria-hidden":!0})]})),fue=De({vars:{maxWidth:""},base:({maxWidth:e})=>({...Fe.subtext.large,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:e})}),yF=qe("a")({displayName:"Breadcrumbs.Link",Component:({maxWidth:e=350,href:t,tooltipProps:n={},children:a,...r},i,o)=>w.jsx(Ml,{...n,children:w.jsx(Moe,{href:t,ref:i,as:o,role:"link",variant:"standalone",...bt(r,fue({maxWidth:typeof e=="number"?se(e):e})),children:a})})}),MC=De({parts:{chevronRightIcon:"breadcrumbs-item-chevron-right-icon"},base:({chevronRightIconPart:e})=>({alignItems:"center",display:"inline-flex",whiteSpace:"nowrap",[ne.vars.size]:se(20),[ne.vars.color]:O.icon.default,[e]:{height:P.x8,width:P.x8,justifyContent:"center",alignItems:"center",display:"inline-flex",":dir(rtl)":{transform:"scaleX(-1)"}}})}),mue=er(Yz,Oa),gue=st("li")({displayName:"Breadcrumbs.Item",modelHook:ao,elemPropsHook:mue,subComponents:{Link:yF}})(({children:e,...t},n)=>w.jsxs(n,{...Lt(t,MC()),children:[e,w.jsx(Ll,{icon:uk,...MC.parts.chevronRightIcon,"aria-hidden":!0})]})),hue=De({vars:{maxWidth:""},base:({maxWidth:e})=>({...Fe.subtext.large,fontWeight:Bn.medium,color:O.text.default,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:e})}),bue=er(ye()((e,t,n)=>{const{localRef:a}=wr(Ca(t));let r=!1;const i=a.current;if(i){const{scrollWidth:o,clientWidth:s}=i;r=o>s}return{tabIndex:r?0:void 0,ref:a}}),Yz,Oa),vue=st("li")({displayName:"Breadcrumbs.Item",modelHook:ao,elemPropsHook:bue})(({children:e,tooltipProps:t={},maxWidth:n="350px",...a},r)=>w.jsx(Ml,{...t,children:w.jsx(Oz,{as:r,...bt(a,hue({maxWidth:typeof n=="number"?se(n):n})),children:e})})),yue=De({base:{textDecoration:"none"}}),Sue=qe("a")({displayName:"Breadcrumbs.Menu.Item",Component:(e,t,n)=>w.jsx($r.Item,{as:n,...bt(e,yue()),ref:t})}),Eue=De({base:{width:se(280),maxWidth:se(280),maxHeight:se(296)}}),_ue=e=>w.jsx($r.Card,{...bt(e,Eue())}),wue=Na()({displayName:"Breadcrumbs.Menu",modelHook:dt,subComponents:{Card:_ue,List:$r.List,Item:Sue,Divider:$r.Divider,Target:$r.Target,TargetContext:$r.TargetContext,Popper:$r.Popper}})(({children:e})=>w.jsx(w.Fragment,{children:e})),pe=Na("nav")({displayName:"Breadcrumbs",modelHook:ao,subComponents:{List:cue,Item:gue,Link:yF,CurrentItem:vue,OverflowButton:pue,Menu:wue}})(({children:e,...t},n,a)=>w.jsx($r,{model:a.menu,children:w.jsx("nav",{role:"navigation",...bt(t),children:e})})),yk=()=>w.jsx(pe,{"aria-label":"Breadcrumbs",children:w.jsxs(pe.List,{children:[w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/",children:"Home"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/menus",children:"Menus"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/lunch",children:"Lunch"})}),w.jsx(pe.Item,{children:w.jsx(pe.Link,{href:"/house-specialty-pies",maxWidth:100,children:"House Specialty Pies"})}),w.jsx(pe.CurrentItem,{maxWidth:100,children:"Canvas Supreme"})]})});yk.__RAW__=`import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs';
|
|
319
319
|
|
|
320
320
|
export const Basic = () => {
|
|
321
321
|
return (
|