@interopio/home-ui-react 5.0.0 → 5.1.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";var ck=Object.defineProperty;var lk=(e,t,n)=>t in e?ck(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vn=(e,t,n)=>(lk(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),v=require("react"),Bo=require("react-dom"),Se=require("@interopio/react-hooks"),Ja=require("@interopio/workspaces-ui-react");function df(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const W=df(v),Xv=df(Bo),uk=df(Ja);function hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Iu,Uv={exports:{}};/*!
1
+ "use strict";var sk=Object.defineProperty;var ck=(e,t,n)=>t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vn=(e,t,n)=>(ck(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),v=require("react"),Bo=require("react-dom"),Se=require("@interopio/react-hooks"),Ja=require("@interopio/workspaces-ui-react");function pf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const W=pf(v),Uv=pf(Bo),lk=pf(Ja);function hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Iu,Jv={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */Iu=Uv,function(){var e={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=o(r,n(a)))}return r}function n(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)e.call(r,a)&&r[a]&&(i=o(i,a));return i}function o(r,i){return i?r?r+" "+i:r+i:r}Iu.exports?(t.default=t,Iu.exports=t):window.classNames=t}();var te=hs(Uv.exports);function wt({className:e,size:t="16",variant:n="workspace",...o}){const r=te("icon",t&&[`icon-size-${t}`],e);return d.jsx("span",{className:r,"aria-label":`icon-${n}`,role:"presentation",...o,children:d.jsx("i",{className:`icon-${n}`})})}const Ue=v.forwardRef(({className:e,variant:t="default",icon:n="workspace",size:o="16",tooltip:r,iconSize:i="16",onClick:a,disabled:s,children:c,...l},u)=>{const p=te("io-btn-icon",t!=="default"&&[`io-btn-icon-${t}`],[`io-btn-icon-size-${o}`],e),f=v.useCallback(h=>{if(!s)return a?a(h):void 0;h.preventDefault()},[a,s]);return d.jsx("button",{className:p,type:"button",ref:u,"aria-label":"icon button","aria-disabled":s,title:r,onClick:f,disabled:s,...l,children:c??(n&&d.jsx(wt,{variant:n,size:i}))})});Ue.displayName="ButtonIcon";const dk={default:void 0,info:"info",success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function pk({className:e,variant:t="default",size:n="normal",text:o,close:r=!1,closeButtonOnClick:i,append:a,...s}){const c=te("io-alert",`io-alert-${t}`,n==="large"&&"io-alert-lg",e),l=dk[t];return d.jsxs("div",{"data-testid":"io-alert",className:c,role:"alert","aria-label":"alert",...s,children:[l&&d.jsx(wt,{"data-testid":"io-alert-icon",variant:l,className:"icon-severity"}),o&&d.jsx("p",{"data-testid":"io-alert-text",className:"io-text-smaller",children:o}),n==="large"&&a,r&&d.jsx(Ue,{"data-testid":"io-alert-close-button",className:"ms-auto",size:"16",iconSize:"10",icon:"close",onClick:i})]})}function Jv({className:e,variant:t="default",children:n,...o}){const r=te("io-badge",t!=="default"&&[`io-badge-${t}`],e);return d.jsx("div",{className:r,...o,children:n})}function bo({className:e,tag:t="h2",size:n="normal",text:o="Title",...r}){const i=t,a=te(n==="small"&&"io-title-semibold",n==="normal"&&"io-title",n==="large"&&"io-title-large",e);return d.jsx(i,{className:a,...r,children:o})}function Je({className:e,title:t,titleSize:n="normal",tag:o,hint:r,children:i,...a}){const s=te("io-block",e),c=t?"block-title":void 0;return d.jsxs("section",{className:s,"aria-label":t?void 0:"Block","aria-labelledby":c,...a,children:[t&&d.jsx(bo,{id:c,tag:o,text:t,size:n}),i,r&&d.jsx("p",{className:"io-text-smaller",children:r})]})}const Wn=e=>e.key==="Enter"||e.key===" ",pf=(e,t)=>e===void 0?{}:{tabIndex:0,onClick:e,onKeyDown:n=>{Wn(n)&&(n.preventDefault(),e==null||e(n)),t==null||t(n)}},ff=({event:e,currentIndex:t,moveFocus:n,min:o,max:r,onClose:i})=>{switch(e.key){case"ArrowUp":n(Math.max(t-1,o));break;case"ArrowDown":n(Math.min(t+1,r));break;case"Home":n(o);break;case"End":n(r);break;case"Escape":if(i){i();break}return;default:return}e.stopPropagation(),e.preventDefault()};var fk=Object.freeze({__proto__:null,isClickKeypress:Wn,keyboardNavigation:ff,onClickA11y:pf});const Ze=v.forwardRef(({className:e,variant:t="default",size:n="normal",icon:o,iconSize:r="12",iconRight:i=!1,text:a,onClick:s,disabled:c,children:l,...u},p)=>{const f=te("io-btn",(t==="primary"||t==="critical"||t==="outline"||t==="link")&&[`io-btn-${t}`],n==="large"&&"io-btn-lg",e),h=v.useCallback(g=>{if(!c)return s?s(g):void 0;g.preventDefault()},[s,c]),m=v.useCallback(g=>{c||Wn(g)&&(g.preventDefault(),h(g))},[h,c]);return d.jsxs("button",{className:f,ref:p,type:"button","aria-disabled":c,onClick:h,onKeyDown:m,disabled:c,tabIndex:0,...u,children:[o&&!i&&d.jsx(wt,{variant:o,size:r}),l??a,o&&i&&d.jsx(wt,{variant:o,size:r})]})});Ze.displayName="Button";const Al=v.createContext({}),Yv=v.forwardRef(({icon:e="chevron-down",onClick:t,onKeyDown:n,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=v.useContext(Al),c=v.useCallback(p=>{s==null||s(p),r&&(typeof r=="function"?r(p):r.current=p)},[r,s]),l=v.useCallback(p=>{p.stopPropagation(),t==null||t(p),p.defaultPrevented||(i==null||i())},[t,i]),u=v.useCallback(p=>{n==null||n(p),p.defaultPrevented||Wn(p)&&(p.preventDefault(),p.stopPropagation(),i==null||i())},[n,i]);return d.jsx(Ze,{icon:e,iconRight:!0,onClick:l,onKeyDown:u,disabled:a,ref:c,...o})});Yv.displayName="DropdownButton";const Kv=v.forwardRef(({size:e="32",onClick:t,onKeyDown:n,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=v.useContext(Al),c=v.useCallback(p=>{s==null||s(p),r&&(typeof r=="function"?r(p):r.current=p)},[r,s]),l=v.useCallback(p=>{p.stopPropagation(),t==null||t(p),p.defaultPrevented||(i==null||i())},[t,i]),u=v.useCallback(p=>{n==null||n(p),p.defaultPrevented||Wn(p)&&(p.preventDefault(),p.stopPropagation(),i==null||i())},[n,i]);return d.jsx(Ue,{size:e,onClick:l,onKeyDown:u,disabled:a,ref:c,...o})});function qv({className:e,...t}){const n=te("io-dropdown-content",e);return d.jsx("div",{className:n,...t})}Kv.displayName="DropdownButtonIcon";const Qv=v.createContext({}),El=v.forwardRef((e,t)=>{const{className:n,prepend:o,append:r,isSelected:i,onClick:a,description:s,disabled:c=!1,children:l,tooltip:u,descriptionTooltip:p,...f}=e,{variant:h="default",selected:m,checkIcon:g,handleItemClick:y}=v.useContext(Qv),x=i??(m==null?void 0:m.some(b=>b.children===l)),C=h!=="default"&&!!g,w=C||o,I=te("io-list-item",w&&"io-list-item-left",r&&"io-list-item-right",h!=="default"&&x&&"selected",s&&"io-list-item-description",c&&"io-list-item-disabled",n);return d.jsxs("li",{className:I,ref:t,role:"menuitem","aria-roledescription":"menuitem",tabIndex:0,onClick:b=>{c?b.preventDefault():(y==null||y(b,{children:l}),a==null||a(b))},...f,children:[w&&d.jsxs("div",{className:"io-list-left-column",children:[C&&d.jsx(wt,{variant:g.variant,title:x?g.tooltip:void 0,"data-testid":"list-item-check-icon"}),o]}),d.jsx("span",{className:"io-list-text",title:u,"data-testid":"list-item-title",children:l}),r&&d.jsx("div",{className:"io-list-right-column",children:r}),s&&d.jsx("div",{className:"io-list-text-description",title:p,children:s})]})});El.displayName="ListItem";const ey=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item-header",e);return d.jsxs("div",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});ey.displayName="ListItemHeader";const hf=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item",t&&"io-list-item-left",n&&"io-list-item-right","io-list-item-title",e);return d.jsxs("li",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,"data-testid":"list-item-title",children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});hf.displayName="ListItemTitle";const ty=v.forwardRef(({className:e,children:t,...n},o)=>{const r=te("io-list-item","io-list-with-sub-items",e);return d.jsx("li",{className:r,ref:o,...n,children:t})});ty.displayName="ListItemWithSubItems";const mf=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item",t&&"io-list-item-left",n&&"io-list-item-right","io-list-item-section",e);return d.jsxs("li",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});function ms({className:e,...t}){const n=te("io-separator",e);return d.jsx("hr",{className:n,...t})}mf.displayName="ListItemSection";const ny=e=>d.jsx(ms,{...e});ny.displayName="ListItemSeparator";const oy=v.forwardRef((e,t)=>{const{className:n,variant:o="default",checkIcon:r,children:i,...a}=e,[s,c]=v.useState([]),l=te("io-list",o!=="default"&&"io-list-selectable",n),u=v.useMemo(()=>{if(r)return typeof r=="object"?r:{variant:r}},[r]),p=v.useCallback((h,m)=>{if(o==="default")return;const g=s.some(y=>{var x,C;return((x=y.children)==null?void 0:x.toString())===((C=m.children)==null?void 0:C.toString())});o==="single"?c([m]):(()=>{const y=g?s.filter(x=>x.children!==m.children):[...s,m];c(y)})()},[s,o]),f=v.useMemo(()=>({variant:o,selected:s,checkIcon:u,handleItemClick:p}),[o,s,u,p]);return d.jsx(Qv.Provider,{value:f,children:d.jsx("ul",{className:l,ref:t,...a,children:i})})});oy.displayName="List";const Lt=oy;Lt.Item=El,Lt.ItemTitle=hf,Lt.ItemSection=mf,Lt.ItemHeader=ey,Lt.ItemWithSubItems=ty,Lt.ItemSeparator=ny;const ry=v.forwardRef((e,t)=>d.jsx(Lt,{...e,ref:t}));ry.displayName="DropdownList";const iy=v.forwardRef((e,t)=>{const{handleClose:n}=v.useContext(Al),{onClick:o,onKeyDown:r,...i}=e,a=v.useRef(null),s=v.useCallback(c=>{a.current=c,typeof t=="function"?t(c):t&&(t.current=c)},[t]);return d.jsx(El,{...i,ref:s,onClick:c=>{o==null||o(c),n==null||n()},onKeyDown:c=>{if(r==null||r(c),c.defaultPrevented||!Wn(c))return;c.preventDefault(),c.stopPropagation();const l=(typeof t=="function"?null:t==null?void 0:t.current)||a.current;l==null||l.click()}})});iy.displayName="DropdownItem";const ay=v.forwardRef((e,t)=>d.jsx(hf,{...e,ref:t}));ay.displayName="DropdownItemTitle";const sy=v.forwardRef((e,t)=>d.jsx(mf,{...e,ref:t}));sy.displayName="DropdownItemSection";const cy=v.forwardRef((e,t)=>d.jsx(ms,{...e}));cy.displayName="DropdownSeparator";function Md(e,t,n){const o=v.useCallback(r=>{t.some(a=>r.key===a)&&(r.preventDefault(),e())},[e,t]);v.useEffect(()=>{const r=(n==null?void 0:n.current)||document;return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}},[o,n])}const fe=v.forwardRef(({className:e,variant:t="outline",align:n="down",disabled:o,isOpen:r,onOpenChange:i,children:a,...s},c)=>{const l=v.useRef(null),u=v.useRef(null);v.useImperativeHandle(c,()=>u.current,[]);const{isOpen:p,handleOpen:f,handleClose:h}=((y,x)=>{const[C,w]=v.useState(!1),I=y!==void 0,b=I?y:C,k=v.useCallback(O=>{I||w(O),x==null||x(O)},[I,x]),S=v.useCallback(()=>k(!0),[k]),E=v.useCallback(()=>k(!1),[k]);return{isOpen:b,setOpen:k,handleOpen:S,handleClose:E}})(r,i);((y,x,C=!0)=>{v.useEffect(()=>{if(!C)return;const w=b=>{const k=b.target;k&&y.current&&!y.current.contains(k)&&(b.composedPath&&b.composedPath().some(S=>S===y.current||y.current&&S.nodeType===Node.ELEMENT_NODE&&y.current.contains(S))||x())},I=requestAnimationFrame(()=>{document.addEventListener("mousedown",w,!0)});return()=>{cancelAnimationFrame(I),document.removeEventListener("mousedown",w,!0)}},[y,x,C])})(u,h,p),Md(()=>{p&&h()},["Escape"],u),Md(()=>{p||o||l.current!==document.activeElement||f()},["ArrowDown","ArrowUp"],u);const m=v.useMemo(()=>({variant:t,align:n,disabled:o,isOpen:p,handleOpen:f,handleClose:h,handleToggle:p?h:f,setTriggerRef:y=>l.current=y}),[t,n,o,p,f,h]),g=te("io-dropdown",p&&"io-dropdown-open",t!=="default"&&`io-dropdown-${t}`,e);return d.jsx(Al.Provider,{value:m,children:d.jsx("div",{className:g,ref:u,...s,children:a})})});function We({className:e,variant:t="default",align:n="left",children:o,...r}){const i=te("io-btn-group",t!=="default"&&`io-btn-group-${t}`,n==="right"&&"io-btn-group-right",e);return d.jsx("div",{className:i,"data-testid":"button-group",...r,children:o})}function cn({className:e,draggable:t=!1,children:n,...o}){const r=te("io-header",t&&["draggable"],e);return d.jsx("header",{className:r,...o,children:n})}function Xr({className:e,children:t,...n}){const o=te("io-dialog-header",e);return d.jsx(cn,{"data-testid":"io-dialog-header",className:o,...n,children:t})}function rm({className:e,children:t,...n}){const o=te("io-dialog-body",e);return d.jsx("div",{"data-testid":"io-dialog-body",className:o,...n,children:t})}function hr({className:e,children:t,...n}){const o=te("io-footer",e);return d.jsx("footer",{className:o,...n,children:t})}function ma({className:e,...t}){const n=te("io-dialog-footer",e);return d.jsx(hr,{"data-testid":"io-dialog-footer",className:n,...t})}function Vo({className:e,variant:t="default",title:n="Dialog Title",isOpen:o=!1,draggable:r=!1,closeFn:i,children:a,...s}){const c=v.useRef(null),l=te("io-dialog",t==="centered"&&"io-dialog-center",e);return v.useLayoutEffect(()=>{const u=c==null?void 0:c.current;u&&(o?u.showModal():typeof u.close=="function"&&u.close())},[o]),d.jsxs("dialog",{"data-testid":"io-dialog",className:l,ref:c,"data-modal":!0,onClose:()=>{o&&i&&i()},onClick:u=>{o&&i&&u.target.nodeName==="DIALOG"&&i()},onKeyDown:u=>{const p=u.target instanceof HTMLDialogElement&&u.target.nodeName==="DIALOG";o&&i&&u.key===" "&&p&&i()},...s,children:[d.jsxs(Xr,{draggable:r,children:[d.jsx("h3",{"data-testid":"io-dialog-title",children:n}),d.jsx(We,{children:d.jsx(Ue,{className:"non-draggable","data-testid":"io-dialog-close-button",size:"24",icon:"close",iconSize:"12",onClick:i,tabIndex:-1})})]}),a]})}function jl(){return typeof window<"u"}function Or(e){return ly(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mo(e){var t;return(t=(ly(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ly(e){return!!jl()&&(e instanceof Node||e instanceof kn(e).Node)}function ht(e){return!!jl()&&(e instanceof Element||e instanceof kn(e).Element)}function _t(e){return!!jl()&&(e instanceof HTMLElement||e instanceof kn(e).HTMLElement)}function Dd(e){return!(!jl()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot)}fe.Button=Yv,fe.ButtonIcon=Kv,fe.Content=qv,fe.List=ry,fe.Item=iy,fe.ItemTitle=ay,fe.ItemSection=sy,fe.Separator=cy,We.Button=Ze,We.ButtonIcon=Ue,We.Dropdown=fe,cn.Title=bo,cn.ButtonGroup=We,cn.Button=Ze,cn.ButtonIcon=Ue,cn.Dropdown=fe,Xr.Title=bo,Xr.ButtonGroup=We,Xr.Button=Ze,Xr.ButtonIcon=Ue,Xr.Dropdown=fe,rm.Content=function({className:e,children:t,...n}){const o=te("io-dialog-content",e);return d.jsx("div",{className:o,...n,children:t})},hr.ButtonGroup=We,hr.Button=Ze,hr.ButtonIcon=Ue,hr.Dropdown=fe,ma.ButtonGroup=We,ma.Button=Ze,ma.ButtonIcon=Ue,ma.Dropdown=fe,Vo.Header=Xr,Vo.Body=rm,Vo.Footer=ma;const hk=new Set(["inline","contents"]);function Ya(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!hk.has(r)}const mk=new Set(["table","td","th"]);function gk(e){return mk.has(Or(e))}const vk=[":popover-open",":modal"];function Wc(e){return vk.some(t=>{try{return e.matches(t)}catch{return!1}})}const yk=["transform","translate","scale","rotate","perspective"],bk=["transform","translate","scale","rotate","perspective","filter"],wk=["paint","layout","strict","content"];function Bd(e){const t=Nl(),n=ht(e)?Mn(e):e;return yk.some(o=>!!n[o]&&n[o]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||bk.some(o=>(n.willChange||"").includes(o))||wk.some(o=>(n.contain||"").includes(o))}function Nl(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const xk=new Set(["html","body","#document"]);function Ir(e){return xk.has(Or(e))}function Mn(e){return kn(e).getComputedStyle(e)}function Pl(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(Or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dd(e)&&e.host||mo(e);return Dd(t)?t.host:t}function uy(e){const t=Ho(e);return Ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&Ya(t)?t:uy(t)}function kr(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=uy(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=kn(r);if(i){const s=Hd(a);return t.concat(a,a.visualViewport||[],Ya(r)?r:[],s&&n?kr(s):[])}return t.concat(r,kr(r,[],n))}function Hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _o(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Vt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Dd(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function dy(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function py(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function fy(e){return!(e.mozInputSource!==0||!e.isTrusted)||(Gd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType)}function hy(e){return!py().includes("jsdom/")&&(!Gd()&&e.width===0&&e.height===0||Gd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch")}function my(){return/apple/i.test(navigator.vendor)}function Gd(){const e=/android/i;return e.test(dy())||e.test(py())}function Ta(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tn(e){return(e==null?void 0:e.ownerDocument)||document}function ku(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function gy(e){return _t(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function sn(e){e.preventDefault(),e.stopPropagation()}function Wd(e){return!!e&&e.getAttribute("role")==="combobox"&&gy(e)}const Vc=Math.min,oi=Math.max,Fc=Math.round,Oi=Math.floor,go=e=>({x:e,y:e}),Ck={left:"right",right:"left",bottom:"top",top:"bottom"},Ik={start:"end",end:"start"};function im(e,t,n){return oi(e,Vc(t,n))}function Ol(e,t){return typeof e=="function"?e(t):e}function ui(e){return e.split("-")[0]}function Tl(e){return e.split("-")[1]}function vy(e){return e==="x"?"y":"x"}function yy(e){return e==="y"?"height":"width"}const kk=new Set(["top","bottom"]);function mr(e){return kk.has(ui(e))?"y":"x"}function by(e){return vy(mr(e))}function Vd(e){return e.replace(/start|end/g,t=>Ik[t])}const am=["left","right"],sm=["right","left"],Sk=["top","bottom"],Ak=["bottom","top"];function Ek(e,t,n,o){const r=Tl(e);let i=function(a,s,c){switch(a){case"top":case"bottom":return c?s?sm:am:s?am:sm;case"left":case"right":return s?Sk:Ak;default:return[]}}(ui(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Vd)))),i}function $s(e){return e.replace(/left|right|bottom|top/g,t=>Ck[t])}function zc(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}/*!
5
+ */Iu=Jv,function(){var e={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=o(r,n(a)))}return r}function n(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)e.call(r,a)&&r[a]&&(i=o(i,a));return i}function o(r,i){return i?r?r+" "+i:r+i:r}Iu.exports?(t.default=t,Iu.exports=t):window.classNames=t}();var te=hs(Jv.exports);function wt({className:e,size:t="16",variant:n="workspace",...o}){const r=te("icon",t&&[`icon-size-${t}`],e);return d.jsx("span",{className:r,"aria-label":`icon-${n}`,role:"presentation",...o,children:d.jsx("i",{className:`icon-${n}`})})}const Ue=v.forwardRef(({className:e,variant:t="default",icon:n="workspace",size:o="16",tooltip:r,iconSize:i="16",onClick:a,disabled:s,children:c,...l},u)=>{const p=te("io-btn-icon",t!=="default"&&[`io-btn-icon-${t}`],[`io-btn-icon-size-${o}`],e),f=v.useCallback(h=>{if(!s)return a?a(h):void 0;h.preventDefault()},[a,s]);return d.jsx("button",{className:p,type:"button",ref:u,"aria-label":"icon button","aria-disabled":s,title:r,onClick:f,disabled:s,...l,children:c??(n&&d.jsx(wt,{variant:n,size:i}))})});Ue.displayName="ButtonIcon";const uk={default:void 0,info:"info",success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function dk({className:e,variant:t="default",size:n="normal",text:o,close:r=!1,closeButtonOnClick:i,append:a,...s}){const c=te("io-alert",`io-alert-${t}`,n==="large"&&"io-alert-lg",e),l=uk[t];return d.jsxs("div",{"data-testid":"io-alert",className:c,role:"alert","aria-label":"alert",...s,children:[l&&d.jsx(wt,{"data-testid":"io-alert-icon",variant:l,className:"icon-severity"}),o&&d.jsx("p",{"data-testid":"io-alert-text",className:"io-text-smaller",children:o}),n==="large"&&a,r&&d.jsx(Ue,{"data-testid":"io-alert-close-button",className:"ms-auto",size:"16",iconSize:"10",icon:"close",onClick:i})]})}function Yv({className:e,variant:t="default",children:n,...o}){const r=te("io-badge",t!=="default"&&[`io-badge-${t}`],e);return d.jsx("div",{className:r,...o,children:n})}function bo({className:e,tag:t="h2",size:n="normal",text:o="Title",...r}){const i=t,a=te(n==="small"&&"io-title-semibold",n==="normal"&&"io-title",n==="large"&&"io-title-large",e);return d.jsx(i,{className:a,...r,children:o})}function Je({className:e,title:t,titleSize:n="normal",tag:o,hint:r,children:i,...a}){const s=te("io-block",e),c=t?"block-title":void 0;return d.jsxs("section",{className:s,"aria-label":t?void 0:"Block","aria-labelledby":c,...a,children:[t&&d.jsx(bo,{id:c,tag:o,text:t,size:n}),i,r&&d.jsx("p",{className:"io-text-smaller",children:r})]})}const Wn=e=>e.key==="Enter"||e.key===" ",ff=(e,t)=>e===void 0?{}:{tabIndex:0,onClick:e,onKeyDown:n=>{Wn(n)&&(n.preventDefault(),e==null||e(n)),t==null||t(n)}},hf=({event:e,currentIndex:t,moveFocus:n,min:o,max:r,onClose:i})=>{switch(e.key){case"ArrowUp":n(Math.max(t-1,o));break;case"ArrowDown":n(Math.min(t+1,r));break;case"Home":n(o);break;case"End":n(r);break;case"Escape":if(i){i();break}return;default:return}e.stopPropagation(),e.preventDefault()};var pk=Object.freeze({__proto__:null,isClickKeypress:Wn,keyboardNavigation:hf,onClickA11y:ff});const Ze=v.forwardRef(({className:e,variant:t="default",size:n="normal",icon:o,iconSize:r="12",iconRight:i=!1,text:a,onClick:s,disabled:c,children:l,...u},p)=>{const f=te("io-btn",(t==="primary"||t==="critical"||t==="outline"||t==="link")&&[`io-btn-${t}`],n==="large"&&"io-btn-lg",e),h=v.useCallback(g=>{if(!c)return s?s(g):void 0;g.preventDefault()},[s,c]),m=v.useCallback(g=>{c||Wn(g)&&(g.preventDefault(),h(g))},[h,c]);return d.jsxs("button",{className:f,ref:p,type:"button","aria-disabled":c,onClick:h,onKeyDown:m,disabled:c,tabIndex:0,...u,children:[o&&!i&&d.jsx(wt,{variant:o,size:r}),l??a,o&&i&&d.jsx(wt,{variant:o,size:r})]})});Ze.displayName="Button";const Al=v.createContext({}),Kv=v.forwardRef(({icon:e="chevron-down",onClick:t,onKeyDown:n,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=v.useContext(Al),c=v.useCallback(p=>{s==null||s(p),r&&(typeof r=="function"?r(p):r.current=p)},[r,s]),l=v.useCallback(p=>{p.stopPropagation(),t==null||t(p),p.defaultPrevented||(i==null||i())},[t,i]),u=v.useCallback(p=>{n==null||n(p),p.defaultPrevented||Wn(p)&&(p.preventDefault(),p.stopPropagation(),i==null||i())},[n,i]);return d.jsx(Ze,{icon:e,iconRight:!0,onClick:l,onKeyDown:u,disabled:a,ref:c,...o})});Kv.displayName="DropdownButton";const qv=v.forwardRef(({size:e="32",onClick:t,onKeyDown:n,...o},r)=>{const{handleToggle:i,disabled:a,setTriggerRef:s}=v.useContext(Al),c=v.useCallback(p=>{s==null||s(p),r&&(typeof r=="function"?r(p):r.current=p)},[r,s]),l=v.useCallback(p=>{p.stopPropagation(),t==null||t(p),p.defaultPrevented||(i==null||i())},[t,i]),u=v.useCallback(p=>{n==null||n(p),p.defaultPrevented||Wn(p)&&(p.preventDefault(),p.stopPropagation(),i==null||i())},[n,i]);return d.jsx(Ue,{size:e,onClick:l,onKeyDown:u,disabled:a,ref:c,...o})});function Qv({className:e,...t}){const n=te("io-dropdown-content",e);return d.jsx("div",{className:n,...t})}qv.displayName="DropdownButtonIcon";const ey=v.createContext({}),El=v.forwardRef((e,t)=>{const{className:n,prepend:o,append:r,isSelected:i,onClick:a,description:s,disabled:c=!1,children:l,tooltip:u,descriptionTooltip:p,...f}=e,{variant:h="default",selected:m,checkIcon:g,handleItemClick:y}=v.useContext(ey),x=i??(m==null?void 0:m.some(b=>b.children===l)),C=h!=="default"&&!!g,w=C||o,I=te("io-list-item",w&&"io-list-item-left",r&&"io-list-item-right",h!=="default"&&x&&"selected",s&&"io-list-item-description",c&&"io-list-item-disabled",n);return d.jsxs("li",{className:I,ref:t,role:"menuitem","aria-roledescription":"menuitem",tabIndex:0,onClick:b=>{c?b.preventDefault():(y==null||y(b,{children:l}),a==null||a(b))},...f,children:[w&&d.jsxs("div",{className:"io-list-left-column",children:[C&&d.jsx(wt,{variant:g.variant,title:x?g.tooltip:void 0,"data-testid":"list-item-check-icon"}),o]}),d.jsx("span",{className:"io-list-text",title:u,"data-testid":"list-item-title",children:l}),r&&d.jsx("div",{className:"io-list-right-column",children:r}),s&&d.jsx("div",{className:"io-list-text-description",title:p,children:s})]})});El.displayName="ListItem";const ty=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item-header",e);return d.jsxs("div",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});ty.displayName="ListItemHeader";const mf=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item",t&&"io-list-item-left",n&&"io-list-item-right","io-list-item-title",e);return d.jsxs("li",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,"data-testid":"list-item-title",children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});mf.displayName="ListItemTitle";const ny=v.forwardRef(({className:e,children:t,...n},o)=>{const r=te("io-list-item","io-list-with-sub-items",e);return d.jsx("li",{className:r,ref:o,...n,children:t})});ny.displayName="ListItemWithSubItems";const gf=v.forwardRef(({className:e,prepend:t,append:n,children:o,tooltip:r,...i},a)=>{const s=te("io-list-item",t&&"io-list-item-left",n&&"io-list-item-right","io-list-item-section",e);return d.jsxs("li",{className:s,ref:a,...i,children:[t&&d.jsx("div",{className:"io-list-left-column",children:t}),d.jsx("span",{className:"io-list-text",title:r,children:o}),n&&d.jsx("div",{className:"io-list-right-column",children:n})]})});function ms({className:e,...t}){const n=te("io-separator",e);return d.jsx("hr",{className:n,...t})}gf.displayName="ListItemSection";const oy=e=>d.jsx(ms,{...e});oy.displayName="ListItemSeparator";const ry=v.forwardRef((e,t)=>{const{className:n,variant:o="default",checkIcon:r,children:i,...a}=e,[s,c]=v.useState([]),l=te("io-list",o!=="default"&&"io-list-selectable",n),u=v.useMemo(()=>{if(r)return typeof r=="object"?r:{variant:r}},[r]),p=v.useCallback((h,m)=>{if(o==="default")return;const g=s.some(y=>{var x,C;return((x=y.children)==null?void 0:x.toString())===((C=m.children)==null?void 0:C.toString())});o==="single"?c([m]):(()=>{const y=g?s.filter(x=>x.children!==m.children):[...s,m];c(y)})()},[s,o]),f=v.useMemo(()=>({variant:o,selected:s,checkIcon:u,handleItemClick:p}),[o,s,u,p]);return d.jsx(ey.Provider,{value:f,children:d.jsx("ul",{className:l,ref:t,...a,children:i})})});ry.displayName="List";const Lt=ry;Lt.Item=El,Lt.ItemTitle=mf,Lt.ItemSection=gf,Lt.ItemHeader=ty,Lt.ItemWithSubItems=ny,Lt.ItemSeparator=oy;const iy=v.forwardRef((e,t)=>d.jsx(Lt,{...e,ref:t}));iy.displayName="DropdownList";const ay=v.forwardRef((e,t)=>{const{handleClose:n}=v.useContext(Al),{onClick:o,onKeyDown:r,...i}=e,a=v.useRef(null),s=v.useCallback(c=>{a.current=c,typeof t=="function"?t(c):t&&(t.current=c)},[t]);return d.jsx(El,{...i,ref:s,onClick:c=>{o==null||o(c),n==null||n()},onKeyDown:c=>{if(r==null||r(c),c.defaultPrevented||!Wn(c))return;c.preventDefault(),c.stopPropagation();const l=(typeof t=="function"?null:t==null?void 0:t.current)||a.current;l==null||l.click()}})});ay.displayName="DropdownItem";const sy=v.forwardRef((e,t)=>d.jsx(mf,{...e,ref:t}));sy.displayName="DropdownItemTitle";const cy=v.forwardRef((e,t)=>d.jsx(gf,{...e,ref:t}));cy.displayName="DropdownItemSection";const ly=v.forwardRef((e,t)=>d.jsx(ms,{...e}));ly.displayName="DropdownSeparator";function Md(e,t,n){const o=v.useCallback(r=>{t.some(a=>r.key===a)&&(r.preventDefault(),e())},[e,t]);v.useEffect(()=>{const r=(n==null?void 0:n.current)||document;return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}},[o,n])}const fe=v.forwardRef(({className:e,variant:t="outline",align:n="down",disabled:o,isOpen:r,onOpenChange:i,children:a,...s},c)=>{const l=v.useRef(null),u=v.useRef(null);v.useImperativeHandle(c,()=>u.current,[]);const{isOpen:p,handleOpen:f,handleClose:h}=((y,x)=>{const[C,w]=v.useState(!1),I=y!==void 0,b=I?y:C,k=v.useCallback(N=>{I||w(N),x==null||x(N)},[I,x]),S=v.useCallback(()=>k(!0),[k]),E=v.useCallback(()=>k(!1),[k]);return{isOpen:b,setOpen:k,handleOpen:S,handleClose:E}})(r,i);((y,x,C=!0)=>{v.useEffect(()=>{if(!C)return;const w=b=>{const k=b.target;k&&y.current&&!y.current.contains(k)&&(b.composedPath&&b.composedPath().some(S=>S===y.current||y.current&&S.nodeType===Node.ELEMENT_NODE&&y.current.contains(S))||x())},I=requestAnimationFrame(()=>{document.addEventListener("mousedown",w,!0)});return()=>{cancelAnimationFrame(I),document.removeEventListener("mousedown",w,!0)}},[y,x,C])})(u,h,p),Md(()=>{p&&h()},["Escape"],u),Md(()=>{p||o||l.current!==document.activeElement||f()},["ArrowDown","ArrowUp"],u);const m=v.useMemo(()=>({variant:t,align:n,disabled:o,isOpen:p,handleOpen:f,handleClose:h,handleToggle:p?h:f,setTriggerRef:y=>l.current=y}),[t,n,o,p,f,h]),g=te("io-dropdown",p&&"io-dropdown-open",t!=="default"&&`io-dropdown-${t}`,e);return d.jsx(Al.Provider,{value:m,children:d.jsx("div",{className:g,ref:u,...s,children:a})})});function We({className:e,variant:t="default",align:n="left",children:o,...r}){const i=te("io-btn-group",t!=="default"&&`io-btn-group-${t}`,n==="right"&&"io-btn-group-right",e);return d.jsx("div",{className:i,"data-testid":"button-group",...r,children:o})}function cn({className:e,draggable:t=!1,children:n,...o}){const r=te("io-header",t&&["draggable"],e);return d.jsx("header",{className:r,...o,children:n})}function Xr({className:e,children:t,...n}){const o=te("io-dialog-header",e);return d.jsx(cn,{"data-testid":"io-dialog-header",className:o,...n,children:t})}function im({className:e,children:t,...n}){const o=te("io-dialog-body",e);return d.jsx("div",{"data-testid":"io-dialog-body",className:o,...n,children:t})}function hr({className:e,children:t,...n}){const o=te("io-footer",e);return d.jsx("footer",{className:o,...n,children:t})}function ma({className:e,...t}){const n=te("io-dialog-footer",e);return d.jsx(hr,{"data-testid":"io-dialog-footer",className:n,...t})}function Vo({className:e,variant:t="default",title:n="Dialog Title",isOpen:o=!1,draggable:r=!1,closeFn:i,children:a,...s}){const c=v.useRef(null),l=te("io-dialog",t==="centered"&&"io-dialog-center",e);return v.useLayoutEffect(()=>{const u=c==null?void 0:c.current;u&&(o?u.showModal():typeof u.close=="function"&&u.close())},[o]),d.jsxs("dialog",{"data-testid":"io-dialog",className:l,ref:c,"data-modal":!0,onClose:()=>{o&&i&&i()},onClick:u=>{o&&i&&u.target.nodeName==="DIALOG"&&i()},onKeyDown:u=>{const p=u.target instanceof HTMLDialogElement&&u.target.nodeName==="DIALOG";o&&i&&u.key===" "&&p&&i()},...s,children:[d.jsxs(Xr,{draggable:r,children:[d.jsx("h3",{"data-testid":"io-dialog-title",children:n}),d.jsx(We,{children:d.jsx(Ue,{className:"non-draggable","data-testid":"io-dialog-close-button",size:"24",icon:"close",iconSize:"12",onClick:i,tabIndex:-1})})]}),a]})}function jl(){return typeof window<"u"}function Or(e){return uy(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mo(e){var t;return(t=(uy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uy(e){return!!jl()&&(e instanceof Node||e instanceof kn(e).Node)}function ht(e){return!!jl()&&(e instanceof Element||e instanceof kn(e).Element)}function _t(e){return!!jl()&&(e instanceof HTMLElement||e instanceof kn(e).HTMLElement)}function Dd(e){return!(!jl()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot)}fe.Button=Kv,fe.ButtonIcon=qv,fe.Content=Qv,fe.List=iy,fe.Item=ay,fe.ItemTitle=sy,fe.ItemSection=cy,fe.Separator=ly,We.Button=Ze,We.ButtonIcon=Ue,We.Dropdown=fe,cn.Title=bo,cn.ButtonGroup=We,cn.Button=Ze,cn.ButtonIcon=Ue,cn.Dropdown=fe,Xr.Title=bo,Xr.ButtonGroup=We,Xr.Button=Ze,Xr.ButtonIcon=Ue,Xr.Dropdown=fe,im.Content=function({className:e,children:t,...n}){const o=te("io-dialog-content",e);return d.jsx("div",{className:o,...n,children:t})},hr.ButtonGroup=We,hr.Button=Ze,hr.ButtonIcon=Ue,hr.Dropdown=fe,ma.ButtonGroup=We,ma.Button=Ze,ma.ButtonIcon=Ue,ma.Dropdown=fe,Vo.Header=Xr,Vo.Body=im,Vo.Footer=ma;const fk=new Set(["inline","contents"]);function Ya(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!fk.has(r)}const hk=new Set(["table","td","th"]);function mk(e){return hk.has(Or(e))}const gk=[":popover-open",":modal"];function Wc(e){return gk.some(t=>{try{return e.matches(t)}catch{return!1}})}const vk=["transform","translate","scale","rotate","perspective"],yk=["transform","translate","scale","rotate","perspective","filter"],bk=["paint","layout","strict","content"];function Bd(e){const t=Pl(),n=ht(e)?Mn(e):e;return vk.some(o=>!!n[o]&&n[o]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||yk.some(o=>(n.willChange||"").includes(o))||bk.some(o=>(n.contain||"").includes(o))}function Pl(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const wk=new Set(["html","body","#document"]);function Ir(e){return wk.has(Or(e))}function Mn(e){return kn(e).getComputedStyle(e)}function Nl(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(Or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dd(e)&&e.host||mo(e);return Dd(t)?t.host:t}function dy(e){const t=Ho(e);return Ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&Ya(t)?t:dy(t)}function kr(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=dy(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=kn(r);if(i){const s=Hd(a);return t.concat(a,a.visualViewport||[],Ya(r)?r:[],s&&n?kr(s):[])}return t.concat(r,kr(r,[],n))}function Hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _o(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Vt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Dd(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function py(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function fy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function hy(e){return!(e.mozInputSource!==0||!e.isTrusted)||(Gd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType)}function my(e){return!fy().includes("jsdom/")&&(!Gd()&&e.width===0&&e.height===0||Gd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch")}function gy(){return/apple/i.test(navigator.vendor)}function Gd(){const e=/android/i;return e.test(py())||e.test(fy())}function Ta(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tn(e){return(e==null?void 0:e.ownerDocument)||document}function ku(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vy(e){return _t(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function sn(e){e.preventDefault(),e.stopPropagation()}function Wd(e){return!!e&&e.getAttribute("role")==="combobox"&&vy(e)}const Vc=Math.min,oi=Math.max,Fc=Math.round,Oi=Math.floor,go=e=>({x:e,y:e}),xk={left:"right",right:"left",bottom:"top",top:"bottom"},Ck={start:"end",end:"start"};function am(e,t,n){return oi(e,Vc(t,n))}function Ol(e,t){return typeof e=="function"?e(t):e}function ui(e){return e.split("-")[0]}function Tl(e){return e.split("-")[1]}function yy(e){return e==="x"?"y":"x"}function by(e){return e==="y"?"height":"width"}const Ik=new Set(["top","bottom"]);function mr(e){return Ik.has(ui(e))?"y":"x"}function wy(e){return yy(mr(e))}function Vd(e){return e.replace(/start|end/g,t=>Ck[t])}const sm=["left","right"],cm=["right","left"],kk=["top","bottom"],Sk=["bottom","top"];function Ak(e,t,n,o){const r=Tl(e);let i=function(a,s,c){switch(a){case"top":case"bottom":return c?s?cm:sm:s?sm:cm;case"left":case"right":return s?kk:Sk;default:return[]}}(ui(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Vd)))),i}function $s(e){return e.replace(/left|right|bottom|top/g,t=>xk[t])}function zc(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}/*!
6
6
  * tabbable 6.4.0
7
7
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
8
- */var $c=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),wy=typeof Element>"u",$i=wy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cc=!wy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Zc=function(e,t){var n;t===void 0&&(t=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert");return o===""||o==="true"||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Zc(e.parentNode))},Fd=function(e,t,n){for(var o=[],r=Array.from(e);r.length;){var i=r.shift();if(!Zc(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),s=a.length?a:i.children,c=Fd(s,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{$i.call(i,$c)&&n.filter(i)&&(t||!e.includes(i))&&o.push(i);var l=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),u=!Zc(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(l&&u){var p=Fd(l===!0?i.children:l.children,!0,n);n.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else r.unshift.apply(r,i.children)}}return o},xy=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Cy=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"}(e))&&!xy(e)?0:e.tabIndex},jk=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Iy=function(e){return e.tagName==="INPUT"},Nk=function(e){return function(t){return Iy(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,o=t.form||Cc(t),r=function(a){return o.querySelectorAll('input[type="radio"][name="'+a+'"]')};if(typeof window<"u"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=r(window.CSS.escape(t.name));else try{n=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(a,s){for(var c=0;c<a.length;c++)if(a[c].checked&&a[c].form===s)return a[c]}(n,t.form);return!i||i===t}(e)},cm=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return n===0&&o===0},Pk=function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility==="hidden")return!0;var r=$i.call(e,"details>summary:first-of-type")?e.parentElement:e;if($i.call(r,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return cm(e)}else{if(typeof o=="function"){for(var i=e;e;){var a=e.parentElement,s=Cc(e);if(a&&!a.shadowRoot&&o(a)===!0)return cm(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(c){var l,u,p,f,h=c&&Cc(c),m=(l=h)===null||l===void 0?void 0:l.host,g=!1;if(h&&h!==c)for(g=!!((u=m)!==null&&u!==void 0&&(p=u.ownerDocument)!==null&&p!==void 0&&p.contains(m)||c!=null&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(c));!g&&m;){var y,x,C;g=!((x=m=(y=h=Cc(m))===null||y===void 0?void 0:y.host)===null||x===void 0||(C=x.ownerDocument)===null||C===void 0||!C.contains(m))}return g}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Ok=function(e,t){return!(t.disabled||function(n){return Iy(n)&&n.type==="hidden"}(t)||Pk(t,e)||function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(o){return o.tagName==="SUMMARY"})}(t)||function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var o=n.parentElement;o;){if(o.tagName==="FIELDSET"&&o.disabled){for(var r=0;r<o.children.length;r++){var i=o.children.item(r);if(i.tagName==="LEGEND")return!!$i.call(o,"fieldset[disabled] *")||!i.contains(n)}return!0}o=o.parentElement}return!1}(t))},zd=function(e,t){return!(Nk(t)||Cy(t)<0||!Ok(e,t))},Tk=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ky=function(e){var t=[],n=[];return e.forEach(function(o,r){var i=!!o.scopeParent,a=i?o.scopeParent:o,s=function(l,u){var p=Cy(l);return p<0&&u&&!xy(l)?0:p}(a,i),c=i?ky(o.candidates):a;s===0?i?t.push.apply(t,c):t.push(a):n.push({documentOrder:r,tabIndex:s,item:o,isScope:i,content:c})}),n.sort(jk).reduce(function(o,r){return r.isScope?o.push.apply(o,r.content):o.push(r.content),o},[]).concat(t)},gf=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Fd([e],t.includeContainer,{filter:zd.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Tk}):function(o,r,i){if(Zc(o))return[];var a=Array.prototype.slice.apply(o.querySelectorAll($c));return r&&$i.call(o,$c)&&a.unshift(o),a.filter(i)}(e,t.includeContainer,zd.bind(null,t)),ky(n)};function lm(e,t,n){let{reference:o,floating:r}=e;const i=mr(t),a=by(t),s=yy(a),c=ui(t),l=i==="y",u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let h;switch(c){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}switch(Tl(t)){case"start":h[a]-=f*(n&&l?-1:1);break;case"end":h[a]+=f*(n&&l?-1:1)}return h}async function Rk(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=Ol(t,e),m=function(b){return typeof b!="number"?function(k){return{top:0,right:0,bottom:0,left:0,...k}}(b):{top:b,right:b,bottom:b,left:b}}(h),g=s[f?p==="floating"?"reference":"floating":p],y=zc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),x=p==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},I=zc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:c}):x);return{top:(y.top-I.top+m.top)/w.y,bottom:(I.bottom-y.bottom+m.bottom)/w.y,left:(y.left-I.left+m.left)/w.x,right:(I.right-y.right+m.right)/w.x}}const Lk=new Set(["left","top"]);function Sy(e){const t=Mn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=_t(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Fc(n)!==i||Fc(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function vf(e){return ht(e)?e:e.contextElement}function Gi(e){const t=vf(e);if(!_t(t))return go(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Sy(t);let a=(i?Fc(n.width):n.width)/o,s=(i?Fc(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const _k=go(0);function Ay(e){const t=kn(e);return Nl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_k}function di(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=vf(e);let a=go(1);t&&(o?ht(o)&&(a=Gi(o)):a=Gi(e));const s=function(f,h,m){return h===void 0&&(h=!1),!(!m||h&&m!==kn(f))&&h}(i,n,o)?Ay(i):go(0);let c=(r.left+s.x)/a.x,l=(r.top+s.y)/a.y,u=r.width/a.x,p=r.height/a.y;if(i){const f=kn(i),h=o&&ht(o)?kn(o):o;let m=f,g=Hd(m);for(;g&&o&&h!==m;){const y=Gi(g),x=g.getBoundingClientRect(),C=Mn(g),w=x.left+(g.clientLeft+parseFloat(C.paddingLeft))*y.x,I=x.top+(g.clientTop+parseFloat(C.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,p*=y.y,c+=w,l+=I,m=kn(g),g=Hd(m)}}return zc({width:u,height:p,x:c,y:l})}function Xc(e,t){const n=Pl(e).scrollLeft;return t?t.left+n:di(mo(e)).left+n}function Ey(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xc(e,n),y:n.top+t.scrollTop}}const Mk=new Set(["absolute","fixed"]);function um(e,t,n){let o;if(t==="viewport")o=function(r,i){const a=kn(r),s=mo(r),c=a.visualViewport;let l=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){l=c.width,u=c.height;const m=Nl();(!m||m&&i==="fixed")&&(p=c.offsetLeft,f=c.offsetTop)}const h=Xc(s);if(h<=0){const m=s.ownerDocument,g=m.body,y=getComputedStyle(g),x=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(s.clientWidth-g.clientWidth-x);C<=25&&(l-=C)}else h<=25&&(l+=h);return{width:l,height:u,x:p,y:f}}(e,n);else if(t==="document")o=function(r){const i=mo(r),a=Pl(r),s=r.ownerDocument.body,c=oi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),l=oi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let u=-a.scrollLeft+Xc(r);const p=-a.scrollTop;return Mn(s).direction==="rtl"&&(u+=oi(i.clientWidth,s.clientWidth)-c),{width:c,height:l,x:u,y:p}}(mo(e));else if(ht(t))o=function(r,i){const a=di(r,!0,i==="fixed"),s=a.top+r.clientTop,c=a.left+r.clientLeft,l=_t(r)?Gi(r):go(1);return{width:r.clientWidth*l.x,height:r.clientHeight*l.y,x:c*l.x,y:s*l.y}}(t,n);else{const r=Ay(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return zc(o)}function jy(e,t){const n=Ho(e);return!(n===t||!ht(n)||Ir(n))&&(Mn(n).position==="fixed"||jy(n,t))}function Dk(e,t,n){const o=_t(t),r=mo(t),i=n==="fixed",a=di(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=go(0);function l(){c.x=Xc(r)}if(o||!o&&!i)if((Or(t)!=="body"||Ya(r))&&(s=Pl(t)),o){const p=di(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=!r||o||i?go(0):Ey(r,s);return{x:a.left+s.scrollLeft-c.x-u.x,y:a.top+s.scrollTop-c.y-u.y,width:a.width,height:a.height}}function Su(e){return Mn(e).position==="static"}function dm(e,t){if(!_t(e)||Mn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mo(e)===n&&(n=n.ownerDocument.body),n}function pm(e,t){const n=kn(e);if(Wc(e))return n;if(!_t(e)){let r=Ho(e);for(;r&&!Ir(r);){if(ht(r)&&!Su(r))return r;r=Ho(r)}return n}let o=dm(e,t);for(;o&&gk(o)&&Su(o);)o=dm(o,t);return o&&Ir(o)&&Su(o)&&!Bd(o)?n:o||function(r){let i=Ho(r);for(;_t(i)&&!Ir(i);){if(Bd(i))return i;if(Wc(i))return null;i=Ho(i)}return null}(e)||n}const Bk={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=mo(o),s=!!t&&Wc(t.floating);if(o===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=go(1);const u=go(0),p=_t(o);if((p||!p&&!i)&&((Or(o)!=="body"||Ya(a))&&(c=Pl(o)),_t(o))){const h=di(o);l=Gi(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=!a||p||i?go(0):Ey(a,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}},getDocumentElement:mo,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?Wc(t)?[]:function(c,l){const u=l.get(c);if(u)return u;let p=kr(c,[],!1).filter(g=>ht(g)&&Or(g)!=="body"),f=null;const h=Mn(c).position==="fixed";let m=h?Ho(c):c;for(;ht(m)&&!Ir(m);){const g=Mn(m),y=Bd(m);y||g.position!=="fixed"||(f=null),(h?!y&&!f:!y&&g.position==="static"&&f&&Mk.has(f.position)||Ya(m)&&!y&&jy(c,m))?p=p.filter(x=>x!==m):f=g,m=Ho(m)}return l.set(c,p),p}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce((c,l)=>{const u=um(t,l,r);return c.top=oi(u.top,c.top),c.right=Vc(u.right,c.right),c.bottom=Vc(u.bottom,c.bottom),c.left=oi(u.left,c.left),c},um(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:pm,getElementRects:async function(e){const t=this.getOffsetParent||pm,n=this.getDimensions,o=await n(e.floating);return{reference:Dk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Sy(e);return{width:t,height:n}},getScale:Gi,isElement:ht,isRTL:function(e){return Mn(e).direction==="rtl"}};function fm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ny(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=vf(e),u=r||i?[...l?kr(l):[],...kr(t)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=l&&s?function(y,x){let C,w=null;const I=mo(y);function b(){var k;clearTimeout(C),(k=w)==null||k.disconnect(),w=null}return function k(S,E){S===void 0&&(S=!1),E===void 0&&(E=1),b();const O=y.getBoundingClientRect(),{left:A,top:N,width:j,height:G}=O;if(S||x(),!j||!G)return;const M={rootMargin:-Oi(N)+"px "+-Oi(I.clientWidth-(A+j))+"px "+-Oi(I.clientHeight-(N+G))+"px "+-Oi(A)+"px",threshold:oi(0,Vc(1,E))||1};let T=!0;function H(V){const z=V[0].intersectionRatio;if(z!==E){if(!T)return k();z?k(!1,z):C=setTimeout(()=>{k(!1,1e-7)},1e3)}z!==1||fm(O,y.getBoundingClientRect())||k(),T=!1}try{w=new IntersectionObserver(H,{...M,root:I.ownerDocument})}catch{w=new IntersectionObserver(H,M)}w.observe(y)}(!0),b}(l,n):null;let f,h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let g=c?di(e):null;return c&&function y(){const x=di(e);g&&!fm(g,x)&&n(),g=x,f=requestAnimationFrame(y)}(),n(),()=>{var y;u.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(f)}}const Hk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await async function(l,u){const{placement:p,platform:f,elements:h}=l,m=await(f.isRTL==null?void 0:f.isRTL(h.floating)),g=ui(p),y=Tl(p),x=mr(p)==="y",C=Lk.has(g)?-1:1,w=m&&x?-1:1,I=Ol(u,l);let{mainAxis:b,crossAxis:k,alignmentAxis:S}=typeof I=="number"?{mainAxis:I,crossAxis:0,alignmentAxis:null}:{mainAxis:I.mainAxis||0,crossAxis:I.crossAxis||0,alignmentAxis:I.alignmentAxis};return y&&typeof S=="number"&&(k=y==="end"?-1*S:S),x?{x:k*w,y:b*C}:{x:b*C,y:k*w}}(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},Gk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:x=>{let{x:C,y:w}=x;return{x:C,y:w}}},...l}=Ol(e,t),u={x:n,y:o},p=await i.detectOverflow(t,l),f=mr(ui(r)),h=vy(f);let m=u[h],g=u[f];if(a){const x=h==="y"?"bottom":"right";m=im(m+p[h==="y"?"top":"left"],m,m-p[x])}if(s){const x=f==="y"?"bottom":"right";g=im(g+p[f==="y"?"top":"left"],g,g-p[x])}const y=c.fn({...t,[h]:m,[f]:g});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:a,[f]:s}}}}}},Wk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ol(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ui(r),C=mr(s),w=ui(s)===s,I=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=f||(w||!g?[$s(s)]:function(M){const T=$s(M);return[Vd(M),T,Vd(T)]}(s)),k=m!=="none";!f&&k&&b.push(...Ek(s,g,m,I));const S=[s,...b],E=await c.detectOverflow(t,y),O=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&O.push(E[x]),p){const M=function(T,H,V){V===void 0&&(V=!1);const z=Tl(T),P=by(T),B=yy(P);let F=P==="x"?z===(V?"end":"start")?"right":"left":z==="start"?"bottom":"top";return H.reference[B]>H.floating[B]&&(F=$s(F)),[F,$s(F)]}(r,a,I);O.push(E[M[0]],E[M[1]])}if(A=[...A,{placement:r,overflows:O}],!O.every(M=>M<=0)){var N,j;const M=(((N=i.flip)==null?void 0:N.index)||0)+1,T=S[M];if(T&&(!(p==="alignment"&&C!==mr(T))||A.every(V=>mr(V.placement)!==C||V.overflows[0]>0)))return{data:{index:M,overflows:A},reset:{placement:T}};let H=(j=A.filter(V=>V.overflows[0]<=0).sort((V,z)=>V.overflows[1]-z.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(h){case"bestFit":{var G;const V=(G=A.filter(z=>{if(k){const P=mr(z.placement);return P===C||P==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(P=>P>0).reduce((P,B)=>P+B,0)]).sort((z,P)=>z[1]-P[1])[0])==null?void 0:G[0];V&&(H=V);break}case"initialPlacement":H=s}if(r!==H)return{reset:{placement:H}}}return{}}}},Vk=(e,t,n)=>{const o=new Map,r={platform:Bk,...n},i={...r.platform,_c:o};return(async(a,s,c)=>{const{placement:l="bottom",strategy:u="absolute",middleware:p=[],platform:f}=c,h=p.filter(Boolean),m=await(f.isRTL==null?void 0:f.isRTL(s));let g=await f.getElementRects({reference:a,floating:s,strategy:u}),{x:y,y:x}=lm(g,l,m),C=l,w={},I=0;for(let k=0;k<h.length;k++){var b;const{name:S,fn:E}=h[k],{x:O,y:A,data:N,reset:j}=await E({x:y,y:x,initialPlacement:l,placement:C,strategy:u,middlewareData:w,rects:g,platform:{...f,detectOverflow:(b=f.detectOverflow)!=null?b:Rk},elements:{reference:a,floating:s}});y=O??y,x=A??x,w={...w,[S]:{...w[S],...N}},j&&I<=50&&(I++,typeof j=="object"&&(j.placement&&(C=j.placement),j.rects&&(g=j.rects===!0?await f.getElementRects({reference:a,floating:s,strategy:u}):j.rects),{x:y,y:x}=lm(g,C,m)),k=-1)}return{x:y,y:x,placement:C,strategy:u,middlewareData:w}})(e,t,{...r,platform:i})};var Ic=typeof document<"u"?v.useLayoutEffect:function(){};function Uc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Uc(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if((i!=="_owner"||!e.$$typeof)&&!Uc(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hm(e,t){const n=Py(e);return Math.round(t*n)/n}function Au(e){const t=W.useRef(e);return Ic(()=>{t.current=e}),t}const Fk=(e,t)=>({...Hk(e),options:[e,t]}),zk=(e,t)=>({...Gk(e),options:[e,t]}),$k=(e,t)=>({...Wk(e),options:[e,t]});function Oy(e){return W.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ty={...W},Zk=Ty.useInsertionEffect||(e=>e());function dn(e){const t=W.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Zk(()=>{t.current=e}),W.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const yf="ArrowUp",Ga="ArrowDown",lr="ArrowLeft",ur="ArrowRight";function Zs(e,t,n){return Math.floor(e/t)!==n}function ga(e,t){return t<0||t>=e.current.length}function Eu(e,t){return en(e,{disabledIndices:t})}function mm(e,t){return en(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function en(e,t){let{startingIndex:n=-1,decrement:o=!1,disabledIndices:r,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=o?-i:i;while(s>=0&&s<=a.length-1&&kc(a,s,r));return s}function Xk(e,t,n,o,r){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(r){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*o:i;case"br":return n.lastIndexOf(e)}}function Uk(e,t){return t.flatMap((n,o)=>e.includes(n)?[o]:[])}function kc(e,t,n){if(n)return n.includes(t);const o=e[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}var yt=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Jk(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Ry=W.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Yk(e){const{children:t,elementsRef:n,labelsRef:o}=e,[r,i]=W.useState(()=>new Map),a=W.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),s=W.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return yt(()=>{const c=new Map(r);Array.from(c.keys()).sort(Jk).forEach((l,u)=>{c.set(l,u)}),function(l,u){if(l.size!==u.size)return!1;for(const[p,f]of l.entries())if(f!==u.get(p))return!1;return!0}(r,c)||i(c)},[r]),W.createElement(Ry.Provider,{value:W.useMemo(()=>({register:a,unregister:s,map:r,elementsRef:n,labelsRef:o}),[a,s,r,n,o])},t)}function Ly(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:o,map:r,elementsRef:i,labelsRef:a}=W.useContext(Ry),[s,c]=W.useState(null),l=W.useRef(null),u=W.useCallback(p=>{if(l.current=p,s!==null&&(i.current[s]=p,a)){var f;const h=t!==void 0;a.current[s]=h?t:(f=p==null?void 0:p.textContent)!=null?f:null}},[s,i,a,t]);return yt(()=>{const p=l.current;if(p)return n(p),()=>{o(p)}},[n,o]),yt(()=>{const p=l.current?r.get(l.current):null;p!=null&&c(p)},[r]),W.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jc.apply(this,arguments)}let gm=!1,Kk=0;const vm=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kk++,$d=Ty.useId||function(){const[e,t]=W.useState(()=>gm?vm():void 0);return yt(()=>{e==null&&t(vm())},[]),W.useEffect(()=>{gm=!0},[]),e};let Ka;function ju(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const r="Floating UI: "+n.join(" ");var i;(e=Ka)!=null&&e.has(r)||((i=Ka)==null||i.add(r),console.warn(r))}function _y(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(r=>r!==n))||[])}}}process.env.NODE_ENV!=="production"&&(Ka=new Set);const My=W.createContext(null),Dy=W.createContext(null),gr=()=>{var e;return((e=W.useContext(My))==null?void 0:e.id)||null},vr=()=>W.useContext(Dy);function qk(e){const{children:t,id:n}=e,o=gr();return W.createElement(My.Provider,{value:W.useMemo(()=>({id:n,parentId:o}),[n,o])},t)}function Qk(e){const{children:t}=e,n=W.useRef([]),o=W.useCallback(a=>{n.current=[...n.current,a]},[]),r=W.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=W.useState(()=>_y())[0];return W.createElement(Dy.Provider,{value:W.useMemo(()=>({nodesRef:n,addNode:o,removeNode:r,events:i}),[o,r,i])},t)}function qa(e){return"data-floating-ui-"+e}function Jn(e){const t=v.useRef(e);return yt(()=>{t.current=e}),t}const ym=qa("safe-polygon");function Nu(e,t,n){return n&&!Ta(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}let bm=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(bm);const i=()=>e==null?void 0:e.focus({preventScroll:n});r?i():bm=requestAnimationFrame(i)}function ri(e,t){let n=e.filter(r=>{var i;return r.parentId===t&&((i=r.context)==null?void 0:i.open)}),o=n;for(;o.length;)o=e.filter(r=>{var i;return(i=o)==null?void 0:i.some(a=>{var s;return r.parentId===a.id&&((s=r.context)==null?void 0:s.open)})}),n=n.concat(o);return n}let xi=new WeakMap,Xs=new WeakSet,Us={},Pu=0;const By=e=>e&&(e.host||By(e.parentNode));function e3(e,t,n,o){const r="data-floating-ui-inert",i=o?"inert":n?"aria-hidden":null,a=((p,f)=>f.map(h=>{if(p.contains(h))return h;const m=By(h);return p.contains(m)?m:null}).filter(h=>h!=null))(t,e),s=new Set,c=new Set(a),l=[];Us[r]||(Us[r]=new WeakMap);const u=Us[r];return a.forEach(function p(f){!f||s.has(f)||(s.add(f),f.parentNode&&p(f.parentNode))}),function p(f){!f||c.has(f)||[].forEach.call(f.children,h=>{if(Or(h)!=="script")if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,g=m!==null&&m!=="false",y=(xi.get(h)||0)+1,x=(u.get(h)||0)+1;xi.set(h,y),u.set(h,x),l.push(h),y===1&&g&&Xs.add(h),x===1&&h.setAttribute(r,""),!g&&i&&h.setAttribute(i,"true")}})}(t),s.clear(),Pu++,()=>{l.forEach(p=>{const f=(xi.get(p)||0)-1,h=(u.get(p)||0)-1;xi.set(p,f),u.set(p,h),f||(!Xs.has(p)&&i&&p.removeAttribute(i),Xs.delete(p)),h||p.removeAttribute(r)}),Pu--,Pu||(xi=new WeakMap,xi=new WeakMap,Xs=new WeakSet,Us={})}}function wm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=tn(e[0]).body;return e3(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const Yc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function xm(e,t){const n=gf(e,Yc());t==="prev"&&n.reverse();const o=n.indexOf(_o(tn(e)));return n.slice(o+1)[0]}function Cm(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Vt(n,o)}const bf={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Im(e){e.key==="Tab"&&(e.target,clearTimeout(void 0))}const km=W.forwardRef(function(e,t){const[n,o]=W.useState();yt(()=>(my()&&o("button"),document.addEventListener("keydown",Im),()=>{document.removeEventListener("keydown",Im)}),[]);const r={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[qa("focus-guard")]:"",style:bf};return W.createElement("span",Jc({},e,r))}),t3=W.createContext(null),Zd="data-floating-ui-focusable";function Hy(e){return e?e.hasAttribute(Zd)?e:e.querySelector("["+Zd+"]")||e:null}let Ur=[];function Ou(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(t&&Or(t)!=="body"){if(!function(n,o){if(o=o||{},!n)throw new Error("No node provided");return $i.call(n,$c)!==!1&&zd(o,n)}(t,Yc())){const n=gf(t,Yc())[0];n&&(t=n)}Ur.push(t),Ur.length>20&&(Ur=Ur.slice(-20))}}function Sm(){return Ur.slice().reverse().find(e=>e.isConnected)}const n3=W.forwardRef(function(e,t){return W.createElement("button",Jc({},e,{type:"button",ref:t,tabIndex:-1,style:bf}))});function o3(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:p=!0}=e,{open:f,refs:h,nodeId:m,onOpenChange:g,events:y,dataRef:x,floatingId:C,elements:{domReference:w,floating:I}}=t,b=typeof a=="number"&&a<0,k=Wd(w)&&b,S=typeof HTMLElement>"u"||!("inert"in HTMLElement.prototype)||i,E=Jn(r),O=Jn(a),A=Jn(s),N=vr(),j=W.useContext(t3),G=W.useRef(null),M=W.useRef(null),T=W.useRef(!1),H=W.useRef(!1),V=W.useRef(-1),z=j!=null,P=Hy(I),B=dn(function(_){return _===void 0&&(_=P),_?gf(_,Yc()):[]}),F=dn(_=>{const R=B(_);return E.current.map(L=>w&&L==="reference"?w:P&&L==="floating"?P:R).filter(Boolean).flat()});function $(_){return!o&&u&&l?W.createElement(n3,{ref:_==="start"?G:M,onClick:R=>g(!1,R.nativeEvent)},typeof u=="string"?u:"Dismiss"):null}W.useEffect(()=>{if(o||!l)return;function _(L){if(L.key==="Tab"){Vt(P,_o(tn(P)))&&B().length===0&&!k&&sn(L);const D=F(),K=cr(L);E.current[0]==="reference"&&K===w&&(sn(L),L.shiftKey?ar(D[D.length-1]):ar(D[1])),E.current[1]==="floating"&&K===P&&L.shiftKey&&(sn(L),ar(D[0]))}}const R=tn(P);return R.addEventListener("keydown",_),()=>{R.removeEventListener("keydown",_)}},[o,w,P,l,E,k,B,F]),W.useEffect(()=>{if(!o&&I)return I.addEventListener("focusin",_),()=>{I.removeEventListener("focusin",_)};function _(R){const L=cr(R),D=B().indexOf(L);D!==-1&&(V.current=D)}},[o,I,B]),W.useEffect(()=>{if(!o&&p)return I&&_t(w)?(w.addEventListener("focusout",R),w.addEventListener("pointerdown",_),I.addEventListener("focusout",R),()=>{w.removeEventListener("focusout",R),w.removeEventListener("pointerdown",_),I.removeEventListener("focusout",R)}):void 0;function _(){H.current=!0,setTimeout(()=>{H.current=!1})}function R(L){const D=L.relatedTarget;queueMicrotask(()=>{const K=!(Vt(w,D)||Vt(I,D)||Vt(D,I)||Vt(j==null?void 0:j.portalNode,D)||D!=null&&D.hasAttribute(qa("focus-guard"))||N&&(ri(N.nodesRef.current,m).find(J=>{var Y,ee;return Vt((Y=J.context)==null?void 0:Y.elements.floating,D)||Vt((ee=J.context)==null?void 0:ee.elements.domReference,D)})||function(J,Y){var ee;let X=[],ae=(ee=J.find(ce=>ce.id===Y))==null?void 0:ee.parentId;for(;ae;){const ce=J.find(me=>me.id===ae);ae=ce==null?void 0:ce.parentId,ce&&(X=X.concat(ce))}return X}(N.nodesRef.current,m).find(J=>{var Y,ee;return((Y=J.context)==null?void 0:Y.elements.floating)===D||((ee=J.context)==null?void 0:ee.elements.domReference)===D})));if(c&&K&&_o(tn(P))===tn(P).body){_t(P)&&P.focus();const J=V.current,Y=B(),ee=Y[J]||Y[Y.length-1]||P;_t(ee)&&ee.focus()}!k&&l||!D||!K||H.current||D===Sm()||(T.current=!0,g(!1,L,"focus-out"))})}},[o,w,I,P,l,m,N,j,g,p,c,B,k]),W.useEffect(()=>{var _;if(o)return;const R=Array.from((j==null||(_=j.portalNode)==null?void 0:_.querySelectorAll("["+qa("portal")+"]"))||[]);if(I){const L=[I,...R,G.current,M.current,E.current.includes("reference")||k?w:null].filter(K=>K!=null),D=l||k?wm(L,S,!S):wm(L);return()=>{D()}}},[o,w,I,l,E,j,k,S]),yt(()=>{if(o||!_t(P))return;const _=_o(tn(P));queueMicrotask(()=>{const R=F(P),L=O.current,D=(typeof L=="number"?R[L]:L.current)||P,K=Vt(P,_);b||K||!f||ar(D,{preventScroll:D===P})})},[o,f,P,b,F,O]),yt(()=>{if(o||!P)return;let _=!1;const R=tn(P),L=_o(R);let D=x.current.openEvent;function K(Y){let{open:ee,reason:X,event:ae,nested:ce}=Y;ee&&(D=ae),X==="escape-key"&&h.domReference.current&&Ou(h.domReference.current),X==="hover"&&ae.type==="mouseleave"&&(T.current=!0),X==="outside-press"&&(ce?(T.current=!1,_=!0):T.current=!(fy(ae)||hy(ae)))}Ou(L),y.on("openchange",K);const J=R.createElement("span");return J.setAttribute("tabindex","-1"),J.setAttribute("aria-hidden","true"),Object.assign(J.style,bf),z&&w&&w.insertAdjacentElement("afterend",J),()=>{y.off("openchange",K);const Y=_o(R),ee=Vt(I,Y)||N&&ri(N.nodesRef.current,m).some(ae=>{var ce;return Vt((ce=ae.context)==null?void 0:ce.elements.floating,Y)});(ee||D&&["click","mousedown"].includes(D.type))&&h.domReference.current&&Ou(h.domReference.current);const X=typeof A.current=="boolean"?Sm()||J:A.current.current||J;queueMicrotask(()=>{A.current&&!T.current&&_t(X)&&(X===Y||Y===R.body||ee)&&X.focus({preventScroll:_}),J.remove()})}},[o,I,P,A,x,h,y,N,m,z,w]),W.useEffect(()=>{queueMicrotask(()=>{T.current=!1})},[o]),yt(()=>{if(!o&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:p,open:f,onOpenChange:g,refs:h}),()=>{j.setFocusManagerState(null)}},[o,j,l,f,g,h,p]),yt(()=>{if(o||!P||typeof MutationObserver!="function"||b)return;const _=()=>{const L=P.getAttribute("tabindex"),D=B(),K=_o(tn(I)),J=D.indexOf(K);J!==-1&&(V.current=J),E.current.includes("floating")||K!==h.domReference.current&&D.length===0?L!=="0"&&P.setAttribute("tabindex","0"):L!=="-1"&&P.setAttribute("tabindex","-1")};_();const R=new MutationObserver(_);return R.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{R.disconnect()}},[o,I,P,h,E,B,b]);const Z=!o&&S&&(!l||!k)&&(z||l);return W.createElement(W.Fragment,null,Z&&W.createElement(km,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:_=>{if(l){const L=F();ar(r[0]==="reference"?L[0]:L[L.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(T.current=!1,Cm(_,j.portalNode)){const L=xm(document.body,"next")||w;L==null||L.focus()}else{var R;(R=j.beforeOutsideRef.current)==null||R.focus()}}}),!k&&$("start"),n,$("end"),Z&&W.createElement(km,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:_=>{if(l)ar(F()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(p&&(T.current=!0),Cm(_,j.portalNode)){const L=xm(document.body,"prev")||w;L==null||L.focus()}else{var R;(R=j.afterOutsideRef.current)==null||R.focus()}}}))}function Am(e){return _t(e.target)&&e.target.tagName==="BUTTON"}function Em(e){return gy(e)}const r3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},i3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jm=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null&&t,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)==null||n}};function a3(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=$d(),i=W.useRef({}),[a]=W.useState(()=>_y()),s=gr()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ht(h)&&function(){for(var m,g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C="Floating UI: "+y.join(" ");var w;(m=Ka)!=null&&m.has(C)||((w=Ka)==null||w.add(C),console.error(C))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=W.useState(o.reference),u=dn((h,m,g)=>{i.current.openEvent=h?m:void 0,a.emit("openchange",{open:h,event:m,reason:g,nested:s}),n==null||n(h,m,g)}),p=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return W.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:r,refs:p}),[t,u,f,a,r,p])}function s3(e){e===void 0&&(e={});const{nodeId:t}=e,n=a3({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[i,a]=W.useState(null),[s,c]=W.useState(null),l=(r==null?void 0:r.domReference)||i,u=W.useRef(null),p=vr();yt(()=>{l&&(u.current=l)},[l]);const f=function(C){C===void 0&&(C={});const{placement:w="bottom",strategy:I="absolute",middleware:b=[],platform:k,elements:{reference:S,floating:E}={},transform:O=!0,whileElementsMounted:A,open:N}=C,[j,G]=W.useState({x:0,y:0,strategy:I,placement:w,middlewareData:{},isPositioned:!1}),[M,T]=W.useState(b);Uc(M,b)||T(b);const[H,V]=W.useState(null),[z,P]=W.useState(null),B=W.useCallback(be=>{be!==_.current&&(_.current=be,V(be))},[]),F=W.useCallback(be=>{be!==R.current&&(R.current=be,P(be))},[]),$=S||H,Z=E||z,_=W.useRef(null),R=W.useRef(null),L=W.useRef(j),D=A!=null,K=Au(A),J=Au(k),Y=Au(N),ee=W.useCallback(()=>{if(!_.current||!R.current)return;const be={placement:w,strategy:I,middleware:M};J.current&&(be.platform=J.current),Vk(_.current,R.current,be).then(Le=>{const q={...Le,isPositioned:Y.current!==!1};X.current&&!Uc(L.current,q)&&(L.current=q,Xv.flushSync(()=>{G(q)}))})},[M,w,I,J,Y]);Ic(()=>{N===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,G(be=>({...be,isPositioned:!1})))},[N]);const X=W.useRef(!1);Ic(()=>(X.current=!0,()=>{X.current=!1}),[]),Ic(()=>{if($&&(_.current=$),Z&&(R.current=Z),$&&Z){if(K.current)return K.current($,Z,ee);ee()}},[$,Z,ee,K,D]);const ae=W.useMemo(()=>({reference:_,floating:R,setReference:B,setFloating:F}),[B,F]),ce=W.useMemo(()=>({reference:$,floating:Z}),[$,Z]),me=W.useMemo(()=>{const be={position:I,left:0,top:0};if(!ce.floating)return be;const Le=hm(ce.floating,j.x),q=hm(ce.floating,j.y);return O?{...be,transform:"translate("+Le+"px, "+q+"px)",...Py(ce.floating)>=1.5&&{willChange:"transform"}}:{position:I,left:Le,top:q}},[I,O,ce.floating,j.x,j.y]);return W.useMemo(()=>({...j,update:ee,refs:ae,elements:ce,floatingStyles:me}),[j,ee,ae,ce,me])}({...e,elements:{...r,...s&&{reference:s}}}),h=W.useCallback(C=>{const w=ht(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;c(w),f.refs.setReference(w)},[f.refs]),m=W.useCallback(C=>{(ht(C)||C===null)&&(u.current=C,a(C)),(ht(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!ht(C))&&f.refs.setReference(C)},[f.refs]),g=W.useMemo(()=>({...f.refs,setReference:m,setPositionReference:h,domReference:u}),[f.refs,m,h]),y=W.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),x=W.useMemo(()=>({...f,...o,refs:g,elements:y,nodeId:t}),[f,g,y,t,o]);return yt(()=>{o.dataRef.current.floatingContext=x;const C=p==null?void 0:p.nodesRef.current.find(w=>w.id===t);C&&(C.context=x)}),W.useMemo(()=>({...f,context:x,refs:g,elements:y}),[f,g,y,x])}const Nm="active",Pm="selected";function Tu(e,t,n){const o=new Map,r=n==="item";let i=e;if(r&&e){const{[Nm]:a,[Pm]:s,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1,[Zd]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(c=>{let[l,u]=c;var p;r&&[Nm,Pm].includes(l)||(l.indexOf("on")===0?(o.has(l)||o.set(l,[]),typeof u=="function"&&((p=o.get(l))==null||p.push(u),a[l]=function(){for(var f,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(f=o.get(l))==null?void 0:f.map(y=>y(...m)).find(y=>y!==void 0)})):a[l]=u)}),a),{})}}let Om=!1;function Rl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Tm(e,t){return Rl(t,e===yf||e===Ga,e===lr||e===ur)}function Ru(e,t,n){return Rl(t,e===Ga,n?e===lr:e===ur)||e==="Enter"||e===" "||e===""}function Rm(e,t,n){return Rl(t,n?e===ur:e===lr,e===yf)}function c3(e,t){const{open:n,onOpenChange:o,elements:r}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:p=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:C,orientation:w="vertical",cols:I=1,scrollItemIntoView:b=!0,virtualItemRef:k,itemSizes:S,dense:E=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(p||ju("`useListNavigation` looping must be enabled to allow escaping."),m||ju("`useListNavigation` must be virtual to allow escaping.")),w==="vertical"&&I>1&&ju("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=Jn(Hy(r.floating)),A=gr(),N=vr(),j=dn(s),G=Wd(r.domReference),M=W.useRef(g),T=W.useRef(l??-1),H=W.useRef(null),V=W.useRef(!0),z=W.useRef(j),P=W.useRef(!!r.floating),B=W.useRef(n),F=W.useRef(!1),$=W.useRef(!1),Z=Jn(C),_=Jn(n),R=Jn(b),L=Jn(l),[D,K]=W.useState(),[J,Y]=W.useState(),ee=dn(function(q,oe,se){function we(de){m?(K(de.id),N==null||N.events.emit("virtualfocus",de),k&&(k.current=de)):ar(de,{preventScroll:!0,sync:!(!dy().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!my())&&(Om||F.current)})}se===void 0&&(se=!1);const Oe=q.current[oe.current];Oe&&we(Oe),requestAnimationFrame(()=>{const de=q.current[oe.current]||Oe;if(!de)return;Oe||we(de);const Ve=R.current;Ve&&ae&&(se||!V.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof Ve=="boolean"?{block:"nearest",inline:"nearest"}:Ve))})});yt(()=>{document.createElement("div").focus({get preventScroll(){return Om=!0,!1}})},[]),yt(()=>{c&&(n&&r.floating?M.current&&l!=null&&($.current=!0,T.current=l,j(l)):P.current&&(T.current=-1,z.current(null)))},[c,n,r.floating,l,j]),yt(()=>{if(c&&n&&r.floating)if(a==null){if(F.current=!1,L.current!=null)return;if(P.current&&(T.current=-1,ee(i,T)),(!B.current||!P.current)&&M.current&&(H.current!=null||M.current===!0&&H.current==null)){let q=0;const oe=()=>{i.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(oe),q++):(T.current=H.current==null||Ru(H.current,w,h)||f?Eu(i,Z.current):mm(i,Z.current),H.current=null,j(T.current))};oe()}}else ga(i,a)||(T.current=a,ee(i,T,$.current),$.current=!1)},[c,n,r.floating,a,L,f,i,w,h,j,ee,Z]),yt(()=>{var q;if(!c||r.floating||!N||m||!P.current)return;const oe=N.nodesRef.current,se=(q=oe.find(de=>de.id===A))==null||(q=q.context)==null?void 0:q.elements.floating,we=_o(tn(r.floating)),Oe=oe.some(de=>de.context&&Vt(de.context.elements.floating,we));se&&!Oe&&V.current&&se.focus({preventScroll:!0})},[c,r.floating,N,A,m]),yt(()=>{if(c&&N&&m&&!A)return N.events.on("virtualfocus",q),()=>{N.events.off("virtualfocus",q)};function q(oe){Y(oe.id),k&&(k.current=oe)}},[c,N,m,A,k]),yt(()=>{z.current=j,P.current=!!r.floating}),yt(()=>{n||(H.current=null)},[n]),yt(()=>{B.current=n},[n]);const X=a!=null,ae=W.useMemo(()=>{function q(se){if(!n)return;const we=i.current.indexOf(se);we!==-1&&j(we)}return{onFocus(se){let{currentTarget:we}=se;q(we)},onClick:se=>{let{currentTarget:we}=se;return we.focus({preventScroll:!0})},...y&&{onMouseMove(se){let{currentTarget:we}=se;q(we)},onPointerLeave(se){let{pointerType:we}=se;V.current&&we!=="touch"&&(T.current=-1,ee(i,T),j(null),m||ar(O.current,{preventScroll:!0}))}}}},[n,O,ee,y,i,j,m]),ce=dn(q=>{if(V.current=!1,F.current=!0,q.which===229||!_.current&&q.currentTarget===O.current)return;if(f&&Rm(q.key,w,h))return sn(q),o(!1,q.nativeEvent,"list-navigation"),void(_t(r.domReference)&&(m?N==null||N.events.emit("virtualfocus",r.domReference):r.domReference.focus()));const oe=T.current,se=Eu(i,C),we=mm(i,C);if(G||(q.key==="Home"&&(sn(q),T.current=se,j(T.current)),q.key==="End"&&(sn(q),T.current=we,j(T.current))),I>1){const Oe=S||Array.from({length:i.current.length},()=>({width:1,height:1})),de=function(Te,Ne,Be){const He=[];let le=0;return Te.forEach((ye,re)=>{let{width:ie,height:Me}=ye;if(ie>Ne&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+re+" is greater than grid columns");let ge=!1;for(Be&&(le=0);!ge;){const ne=[];for(let Q=0;Q<ie;Q++)for(let ue=0;ue<Me;ue++)ne.push(le+Q+ue*Ne);le%Ne+ie<=Ne&&ne.every(Q=>He[Q]==null)?(ne.forEach(Q=>{He[Q]=re}),ge=!0):le++}}),[...He]}(Oe,I,E),Ve=de.findIndex(Te=>Te!=null&&!kc(i.current,Te,C)),it=de.reduce((Te,Ne,Be)=>Ne==null||kc(i.current,Ne,C)?Te:Be,-1),dt=de[function(Te,Ne){let{event:Be,orientation:He,loop:le,rtl:ye,cols:re,disabledIndices:ie,minIndex:Me,maxIndex:ge,prevIndex:ne,stopEvent:Q=!1}=Ne,ue=ne;if(Be.key===yf){if(Q&&sn(Be),ne===-1)ue=ge;else if(ue=en(Te,{startingIndex:ue,amount:re,decrement:!0,disabledIndices:ie}),le&&(ne-re<Me||ue<0)){const Ce=ne%re,$e=ge%re,Zt=ge-($e-Ce);ue=$e===Ce?ge:$e>Ce?Zt:Zt-re}ga(Te,ue)&&(ue=ne)}if(Be.key===Ga&&(Q&&sn(Be),ne===-1?ue=Me:(ue=en(Te,{startingIndex:ne,amount:re,disabledIndices:ie}),le&&ne+re>ge&&(ue=en(Te,{startingIndex:ne%re-re,amount:re,disabledIndices:ie}))),ga(Te,ue)&&(ue=ne)),He==="both"){const Ce=Oi(ne/re);Be.key===(ye?lr:ur)&&(Q&&sn(Be),ne%re!==re-1?(ue=en(Te,{startingIndex:ne,disabledIndices:ie}),le&&Zs(ue,re,Ce)&&(ue=en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie}))):le&&(ue=en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie})),Zs(ue,re,Ce)&&(ue=ne)),Be.key===(ye?ur:lr)&&(Q&&sn(Be),ne%re!==0?(ue=en(Te,{startingIndex:ne,decrement:!0,disabledIndices:ie}),le&&Zs(ue,re,Ce)&&(ue=en(Te,{startingIndex:ne+(re-ne%re),decrement:!0,disabledIndices:ie}))):le&&(ue=en(Te,{startingIndex:ne+(re-ne%re),decrement:!0,disabledIndices:ie})),Zs(ue,re,Ce)&&(ue=ne));const $e=Oi(ge/re)===Ce;ga(Te,ue)&&(ue=le&&$e?Be.key===(ye?ur:lr)?ge:en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie}):ne)}return ue}({current:de.map(Te=>Te!=null?i.current[Te]:null)},{event:q,orientation:w,loop:p,rtl:h,cols:I,disabledIndices:Uk([...C||i.current.map((Te,Ne)=>kc(i.current,Ne)?Ne:void 0),void 0],de),minIndex:Ve,maxIndex:it,prevIndex:Xk(T.current>we?se:T.current,Oe,de,I,q.key===Ga?"bl":q.key===(h?lr:ur)?"tr":"tl"),stopEvent:!0})];if(dt!=null&&(T.current=dt,j(T.current)),w==="both")return}if(Tm(q.key,w)){if(sn(q),n&&!m&&_o(q.currentTarget.ownerDocument)===q.currentTarget)return T.current=Ru(q.key,w,h)?se:we,void j(T.current);Ru(q.key,w,h)?T.current=p?oe>=we?u&&oe!==i.current.length?-1:se:en(i,{startingIndex:oe,disabledIndices:C}):Math.min(we,en(i,{startingIndex:oe,disabledIndices:C})):T.current=p?oe<=se?u&&oe!==-1?i.current.length:we:en(i,{startingIndex:oe,decrement:!0,disabledIndices:C}):Math.max(se,en(i,{startingIndex:oe,decrement:!0,disabledIndices:C})),ga(i,T.current)?j(null):j(T.current)}}),me=W.useMemo(()=>m&&n&&X&&{"aria-activedescendant":J||D},[m,n,X,J,D]),be=W.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,...!Wd(r.domReference)&&me,onKeyDown:ce,onPointerMove(){V.current=!0}}),[me,ce,r.domReference,w]),Le=W.useMemo(()=>{function q(oe){g==="auto"&&fy(oe.nativeEvent)&&(M.current=!0)}return{...me,onKeyDown(oe){V.current=!1;const se=oe.key.startsWith("Arrow"),we=["Home","End"].includes(oe.key),Oe=se||we,de=function(He,le,ye){return Rl(le,ye?He===lr:He===ur,He===Ga)}(oe.key,w,h),Ve=Rm(oe.key,w,h),it=Tm(oe.key,w),dt=(f?de:it)||oe.key==="Enter"||oe.key.trim()==="";if(m&&n){const He=N==null?void 0:N.nodesRef.current.find(ye=>ye.parentId==null),le=N&&He?function(ye,re){let ie,Me=-1;return function ge(ne,Q){Q>Me&&(ie=ne,Me=Q),ri(ye,ne).forEach(ue=>{ge(ue.id,Q+1)})}(re,0),ye.find(ge=>ge.id===ie)}(N.nodesRef.current,He.id):null;if(Oe&&le&&k){const ye=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(de||Ve){var Te,Ne;const re=((Te=le.context)==null?void 0:Te.elements.domReference)===oe.currentTarget,ie=Ve&&!re?(Ne=le.context)==null?void 0:Ne.elements.domReference:de?i.current.find(Me=>(Me==null?void 0:Me.id)===D):null;ie&&(sn(oe),ie.dispatchEvent(ye),Y(void 0))}var Be;if((it||we)&&le.context&&le.context.open&&le.parentId&&oe.currentTarget!==le.context.elements.domReference)return sn(oe),void((Be=le.context.elements.domReference)==null||Be.dispatchEvent(ye))}return ce(oe)}(n||x||!se)&&(dt&&(H.current=f&&it?null:oe.key),f?de&&(sn(oe),n?(T.current=Eu(i,Z.current),j(T.current)):o(!0,oe.nativeEvent,"list-navigation")):it&&(l!=null&&(T.current=l),sn(oe),!n&&x?o(!0,oe.nativeEvent,"list-navigation"):ce(oe),n&&j(T.current)))},onFocus(){n&&!m&&j(null)},onPointerDown:function(oe){M.current=g,g==="auto"&&hy(oe.nativeEvent)&&(M.current=!0)},onMouseDown:q,onClick:q}},[D,me,ce,Z,g,i,f,j,o,n,x,w,h,l,N,m,k]);return W.useMemo(()=>c?{reference:Le,floating:be,item:ae}:{},[c,Le,be,ae])}const l3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Lm(e,t){const[n,o]=e;let r=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[c,l]=t[a]||[0,0],[u,p]=t[s]||[0,0];l>=o!=p>=o&&n<=(u-c)*(o-l)/(p-l)+c&&(r=!r)}return r}function u3(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=e;let r,i=!1,a=null,s=null,c=performance.now();const l=u=>{let{x:p,y:f,placement:h,elements:m,onClose:g,nodeId:y,tree:x}=u;return function(C){function w(){clearTimeout(r),g()}if(clearTimeout(r),!m.domReference||!m.floating||h==null||p==null||f==null)return;const{clientX:I,clientY:b}=C,k=[I,b],S=cr(C),E=C.type==="mouseleave",O=Vt(m.floating,S),A=Vt(m.domReference,S),N=m.domReference.getBoundingClientRect(),j=m.floating.getBoundingClientRect(),G=h.split("-")[0],M=p>j.right-j.width/2,T=f>j.bottom-j.height/2,H=function(_,R){return _[0]>=R.x&&_[0]<=R.x+R.width&&_[1]>=R.y&&_[1]<=R.y+R.height}(k,N),V=j.width>N.width,z=j.height>N.height,P=(V?N:j).left,B=(V?N:j).right,F=(z?N:j).top,$=(z?N:j).bottom;if(O&&(i=!0,!E))return;if(A&&(i=!1),A&&!E)return void(i=!0);if(E&&ht(C.relatedTarget)&&Vt(m.floating,C.relatedTarget)||x&&ri(x.nodesRef.current,y).some(_=>{let{context:R}=_;return R==null?void 0:R.open}))return;if(G==="top"&&f>=N.bottom-1||G==="bottom"&&f<=N.top+1||G==="left"&&p>=N.right-1||G==="right"&&p<=N.left+1)return w();let Z=[];switch(G){case"top":Z=[[P,N.top+1],[P,j.bottom-1],[B,j.bottom-1],[B,N.top+1]];break;case"bottom":Z=[[P,j.top+1],[P,N.bottom-1],[B,N.bottom-1],[B,j.top+1]];break;case"left":Z=[[j.right-1,$],[j.right-1,F],[N.left+1,F],[N.left+1,$]];break;case"right":Z=[[N.right-1,$],[N.right-1,F],[j.left+1,F],[j.left+1,$]]}if(!Lm([I,b],Z)){if(i&&!H)return w();if(!E&&o){const _=function(R,L){const D=performance.now(),K=D-c;if(a===null||s===null||K===0)return a=R,s=L,c=D,null;const J=R-a,Y=L-s,ee=Math.sqrt(J*J+Y*Y);return a=R,s=L,c=D,ee/K}(C.clientX,C.clientY);if(_!==null&&_<.1)return w()}Lm([I,b],function(_){let[R,L]=_;switch(G){case"top":return[[V?R+t/2:M?R+4*t:R-4*t,L+t+1],[V?R-t/2:M?R+4*t:R-4*t,L+t+1],[j.left,M||V?j.bottom-t:j.top],[j.right,M?V?j.bottom-t:j.top:j.bottom-t]];case"bottom":return[[V?R+t/2:M?R+4*t:R-4*t,L-t],[V?R-t/2:M?R+4*t:R-4*t,L-t],[j.left,M||V?j.top+t:j.bottom],[j.right,M?V?j.top+t:j.bottom:j.top+t]];case"left":{const D=[R+t+1,z?L+t/2:T?L+4*t:L-4*t],K=[R+t+1,z?L-t/2:T?L+4*t:L-4*t];return[[T||z?j.right-t:j.left,j.top],[T?z?j.right-t:j.left:j.right-t,j.bottom],D,K]}case"right":return[[R-t,z?L+t/2:T?L+4*t:L-4*t],[R-t,z?L-t/2:T?L+4*t:L-4*t],[T||z?j.left+t:j.right,j.top],[T?z?j.left+t:j.right:j.left+t,j.bottom]]}}([p,f]))?!i&&o&&(r=window.setTimeout(w,40)):w()}}};return l.__options={blockPointerEvents:n},l}const Xd=v.createContext({getItemProps:()=>({}),activeIndex:null,setActiveIndex:()=>{},setHasFocusInside:()=>{},isOpen:!1,setIsOpen:()=>{}}),Gy=v.forwardRef(({className:e,disabled:t,children:n,...o},r)=>{const i=v.useContext(Xd),a=Ly(),s=vr(),c=a.index===i.activeIndex,l=te("io-dropdown-menu-item",t&&"io-dropdown-menu-item-disabled",e);return d.jsx("div",{ref:Oy([a.ref,r]),role:"menuitem",className:l,tabIndex:c?0:-1,"aria-disabled":t,...o,...i.getItemProps({onClick(u){var p;if(t)return u.preventDefault(),void u.stopPropagation();(p=o.onClick)==null||p.call(o,u),i.setIsOpen(!1),s==null||s.events.emit("click")},onFocus(u){var p;t||((p=o.onFocus)==null||p.call(o,u),i.setHasFocusInside(!0))}}),children:n})});Gy.displayName="DropdownMenuItem";const Ud=v.forwardRef(({className:e,variant:t="default",icon:n,iconRight:o,text:r="",disabled:i,children:a,...s},c)=>{const[l,u]=v.useState(!1),[p,f]=v.useState(!1),[h,m]=v.useState(null),g=v.useRef([]),y=v.useRef([]),x=v.useContext(Xd),C=vr(),w=function(){const Z=$d(),_=vr(),R=gr();return yt(()=>{const L={id:Z,parentId:R};return _==null||_.addNode(L),()=>{_==null||_.removeNode(L)}},[_,Z,R]),Z}(),I=gr(),b=Ly(),k=I!=null,{floatingStyles:S,refs:E,context:O}=s3({nodeId:w,open:l,onOpenChange:u,placement:k?"right-start":"bottom-start",middleware:[Fk({mainAxis:k?0:4,alignmentAxis:k?-4:0}),$k(),zk()],whileElementsMounted:Ny}),A=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,dataRef:D,events:K,elements:J}=Z,{enabled:Y=!0,delay:ee=0,handleClose:X=null,mouseOnly:ae=!1,restMs:ce=0,move:me=!0}=_,be=vr(),Le=gr(),q=Jn(X),oe=Jn(ee),se=Jn(R),we=W.useRef(),Oe=W.useRef(-1),de=W.useRef(),Ve=W.useRef(-1),it=W.useRef(!0),dt=W.useRef(!1),Te=W.useRef(()=>{}),Ne=W.useRef(!1),Be=W.useCallback(()=>{var ge;const ne=(ge=D.current.openEvent)==null?void 0:ge.type;return(ne==null?void 0:ne.includes("mouse"))&&ne!=="mousedown"},[D]);W.useEffect(()=>{if(Y)return K.on("openchange",ge),()=>{K.off("openchange",ge)};function ge(ne){let{open:Q}=ne;Q||(clearTimeout(Oe.current),clearTimeout(Ve.current),it.current=!0,Ne.current=!1)}},[Y,K]),W.useEffect(()=>{if(!Y||!q.current||!R)return;function ge(Q){Be()&&L(!1,Q,"hover")}const ne=tn(J.floating).documentElement;return ne.addEventListener("mouseleave",ge),()=>{ne.removeEventListener("mouseleave",ge)}},[J.floating,R,L,Y,q,Be]);const He=W.useCallback(function(ge,ne,Q){ne===void 0&&(ne=!0),Q===void 0&&(Q="hover");const ue=Nu(oe.current,"close",we.current);ue&&!de.current?(clearTimeout(Oe.current),Oe.current=window.setTimeout(()=>L(!1,ge,Q),ue)):ne&&(clearTimeout(Oe.current),L(!1,ge,Q))},[oe,L]),le=dn(()=>{Te.current(),de.current=void 0}),ye=dn(()=>{if(dt.current){const ge=tn(J.floating).body;ge.style.pointerEvents="",ge.removeAttribute(ym),dt.current=!1}}),re=dn(()=>!!D.current.openEvent&&["click","mousedown"].includes(D.current.openEvent.type));W.useEffect(()=>{if(Y&&ht(J.domReference)){var ge;const Ce=J.domReference;return R&&Ce.addEventListener("mouseleave",ue),(ge=J.floating)==null||ge.addEventListener("mouseleave",ue),me&&Ce.addEventListener("mousemove",ne,{once:!0}),Ce.addEventListener("mouseenter",ne),Ce.addEventListener("mouseleave",Q),()=>{var $e;R&&Ce.removeEventListener("mouseleave",ue),($e=J.floating)==null||$e.removeEventListener("mouseleave",ue),me&&Ce.removeEventListener("mousemove",ne),Ce.removeEventListener("mouseenter",ne),Ce.removeEventListener("mouseleave",Q)}}function ne(Ce){if(clearTimeout(Oe.current),it.current=!1,ae&&!Ta(we.current)||ce>0&&!Nu(oe.current,"open"))return;const $e=Nu(oe.current,"open",we.current);$e?Oe.current=window.setTimeout(()=>{se.current||L(!0,Ce,"hover")},$e):R||L(!0,Ce,"hover")}function Q(Ce){if(re())return;Te.current();const $e=tn(J.floating);if(clearTimeout(Ve.current),Ne.current=!1,q.current&&D.current.floatingContext){R||clearTimeout(Oe.current),de.current=q.current({...D.current.floatingContext,tree:be,x:Ce.clientX,y:Ce.clientY,onClose(){ye(),le(),re()||He(Ce,!0,"safe-polygon")}});const Zt=de.current;return $e.addEventListener("mousemove",Zt),void(Te.current=()=>{$e.removeEventListener("mousemove",Zt)})}(we.current!=="touch"||!Vt(J.floating,Ce.relatedTarget))&&He(Ce)}function ue(Ce){re()||D.current.floatingContext&&(q.current==null||q.current({...D.current.floatingContext,tree:be,x:Ce.clientX,y:Ce.clientY,onClose(){ye(),le(),re()||He(Ce)}})(Ce))}},[J,Y,Z,ae,ce,me,He,le,ye,L,R,se,be,oe,q,D,re]),yt(()=>{var ge;if(Y&&R&&(ge=q.current)!=null&&ge.__options.blockPointerEvents&&Be()){dt.current=!0;const Q=J.floating;if(ht(J.domReference)&&Q){var ne;const ue=tn(J.floating).body;ue.setAttribute(ym,"");const Ce=J.domReference,$e=be==null||(ne=be.nodesRef.current.find(Zt=>Zt.id===Le))==null||(ne=ne.context)==null?void 0:ne.elements.floating;return $e&&($e.style.pointerEvents=""),ue.style.pointerEvents="none",Ce.style.pointerEvents="auto",Q.style.pointerEvents="auto",()=>{ue.style.pointerEvents="",Ce.style.pointerEvents="",Q.style.pointerEvents=""}}}},[Y,R,Le,J,be,q,Be]),yt(()=>{R||(we.current=void 0,Ne.current=!1,le(),ye())},[R,le,ye]),W.useEffect(()=>()=>{le(),clearTimeout(Oe.current),clearTimeout(Ve.current),ye()},[Y,J.domReference,le,ye]);const ie=W.useMemo(()=>{function ge(ne){we.current=ne.pointerType}return{onPointerDown:ge,onPointerEnter:ge,onMouseMove(ne){const{nativeEvent:Q}=ne;function ue(){it.current||se.current||L(!0,Q,"hover")}ae&&!Ta(we.current)||R||ce===0||Ne.current&&ne.movementX**2+ne.movementY**2<2||(clearTimeout(Ve.current),we.current==="touch"?ue():(Ne.current=!0,Ve.current=window.setTimeout(ue,ce)))}}},[ae,L,R,se,ce]),Me=W.useMemo(()=>({onMouseEnter(){clearTimeout(Oe.current)},onMouseLeave(ge){re()||He(ge.nativeEvent,!1)}}),[He,re]);return W.useMemo(()=>Y?{reference:ie,floating:Me}:{},[Y,ie,Me])}(O,{enabled:k,delay:{open:75},handleClose:u3({blockPointerEvents:!0})}),N=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,dataRef:D,elements:{domReference:K}}=Z,{enabled:J=!0,event:Y="click",toggle:ee=!0,ignoreMouse:X=!1,keyboardHandlers:ae=!0,stickIfOpen:ce=!0}=_,me=W.useRef(),be=W.useRef(!1),Le=W.useMemo(()=>({onPointerDown(q){me.current=q.pointerType},onMouseDown(q){const oe=me.current;q.button===0&&Y!=="click"&&(Ta(oe,!0)&&X||(!R||!ee||D.current.openEvent&&ce&&D.current.openEvent.type!=="mousedown"?(q.preventDefault(),L(!0,q.nativeEvent,"click")):L(!1,q.nativeEvent,"click")))},onClick(q){const oe=me.current;Y==="mousedown"&&me.current?me.current=void 0:Ta(oe,!0)&&X||(!R||!ee||D.current.openEvent&&ce&&D.current.openEvent.type!=="click"?L(!0,q.nativeEvent,"click"):L(!1,q.nativeEvent,"click"))},onKeyDown(q){me.current=void 0,q.defaultPrevented||!ae||Am(q)||(q.key!==" "||Em(K)||(q.preventDefault(),be.current=!0),q.key==="Enter"&&L(!R||!ee,q.nativeEvent,"click"))},onKeyUp(q){q.defaultPrevented||!ae||Am(q)||Em(K)||q.key===" "&&be.current&&(be.current=!1,L(!R||!ee,q.nativeEvent,"click"))}}),[D,K,Y,X,ae,L,R,ce,ee]);return W.useMemo(()=>J?{reference:Le}:{},[J,Le])}(O,{event:"mousedown",toggle:!k,ignoreMouse:k}),j=function(Z,_){var R;_===void 0&&(_={});const{open:L,floatingId:D}=Z,{enabled:K=!0,role:J="dialog"}=_,Y=(R=l3.get(J))!=null?R:J,ee=$d(),X=gr()!=null,ae=W.useMemo(()=>Y==="tooltip"||J==="label"?{["aria-"+(J==="label"?"labelledby":"describedby")]:L?D:void 0}:{"aria-expanded":L?"true":"false","aria-haspopup":Y==="alertdialog"?"dialog":Y,"aria-controls":L?D:void 0,...Y==="listbox"&&{role:"combobox"},...Y==="menu"&&{id:ee},...Y==="menu"&&X&&{role:"menuitem"},...J==="select"&&{"aria-autocomplete":"none"},...J==="combobox"&&{"aria-autocomplete":"list"}},[Y,D,X,L,ee,J]),ce=W.useMemo(()=>{const be={id:D,...Y&&{role:Y}};return Y==="tooltip"||J==="label"?be:{...be,...Y==="menu"&&{"aria-labelledby":ee}}},[Y,D,ee,J]),me=W.useCallback(be=>{let{active:Le,selected:q}=be;const oe={role:"option",...Le&&{id:D+"-option"}};switch(J){case"select":return{...oe,"aria-selected":Le&&q};case"combobox":return{...oe,...Le&&{"aria-selected":!0}}}return{}},[D,J]);return W.useMemo(()=>K?{reference:ae,floating:ce,item:me}:{},[K,ae,ce,me])}(O,{role:"menu"}),G=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,elements:D,dataRef:K}=Z,{enabled:J=!0,escapeKey:Y=!0,outsidePress:ee=!0,outsidePressEvent:X="pointerdown",referencePress:ae=!1,referencePressEvent:ce="pointerdown",ancestorScroll:me=!1,bubbles:be,capture:Le}=_,q=vr(),oe=dn(typeof ee=="function"?ee:()=>!1),se=typeof ee=="function"?oe:ee,we=W.useRef(!1),Oe=W.useRef(!1),{escapeKey:de,outsidePress:Ve}=jm(be),{escapeKey:it,outsidePress:dt}=jm(Le),Te=W.useRef(!1),Ne=dn(ie=>{var Me;if(!R||!J||!Y||ie.key!=="Escape"||Te.current)return;const ge=(Me=K.current.floatingContext)==null?void 0:Me.nodeId,ne=q?ri(q.nodesRef.current,ge):[];if(!de&&(ie.stopPropagation(),ne.length>0)){let Q=!0;if(ne.forEach(ue=>{var Ce;(Ce=ue.context)==null||!Ce.open||ue.context.dataRef.current.__escapeKeyBubbles||(Q=!1)}),!Q)return}L(!1,function(Q){return"nativeEvent"in Q}(ie)?ie.nativeEvent:ie,"escape-key")}),Be=dn(ie=>{var Me;const ge=()=>{var ne;Ne(ie),(ne=cr(ie))==null||ne.removeEventListener("keydown",ge)};(Me=cr(ie))==null||Me.addEventListener("keydown",ge)}),He=dn(ie=>{var Me;const ge=we.current;we.current=!1;const ne=Oe.current;if(Oe.current=!1,X==="click"&&ne||ge||typeof se=="function"&&!se(ie))return;const Q=cr(ie),ue="["+qa("inert")+"]",Ce=tn(D.floating).querySelectorAll(ue);let $e=ht(Q)?Q:null;for(;$e&&!Ir($e);){const qt=Ho($e);if(Ir(qt)||!ht(qt))break;$e=qt}if(Ce.length&&ht(Q)&&!Q.matches("html,body")&&!Vt(Q,D.floating)&&Array.from(Ce).every(qt=>!Vt($e,qt)))return;if(_t(Q)&&re){const qt=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,yn=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let No=yn&&ie.offsetX>Q.clientWidth;if(yn&&Mn(Q).direction==="rtl"&&(No=ie.offsetX<=Q.offsetWidth-Q.clientWidth),No||qt&&ie.offsetY>Q.clientHeight)return}const Zt=(Me=K.current.floatingContext)==null?void 0:Me.nodeId,ha=q&&ri(q.nodesRef.current,Zt).some(qt=>{var yn;return ku(ie,(yn=qt.context)==null?void 0:yn.elements.floating)});if(ku(ie,D.floating)||ku(ie,D.domReference)||ha)return;const qo=q?ri(q.nodesRef.current,Zt):[];if(qo.length>0){let qt=!0;if(qo.forEach(yn=>{var No;(No=yn.context)==null||!No.open||yn.context.dataRef.current.__outsidePressBubbles||(qt=!1)}),!qt)return}L(!1,ie,"outside-press")}),le=dn(ie=>{var Me;const ge=()=>{var ne;He(ie),(ne=cr(ie))==null||ne.removeEventListener(X,ge)};(Me=cr(ie))==null||Me.addEventListener(X,ge)});W.useEffect(()=>{if(!R||!J)return;K.current.__escapeKeyBubbles=de,K.current.__outsidePressBubbles=Ve;let ie=-1;function Me(Ce){L(!1,Ce,"ancestor-scroll")}function ge(){window.clearTimeout(ie),Te.current=!0}function ne(){ie=window.setTimeout(()=>{Te.current=!1},Nl()?5:0)}const Q=tn(D.floating);Y&&(Q.addEventListener("keydown",it?Be:Ne,it),Q.addEventListener("compositionstart",ge),Q.addEventListener("compositionend",ne)),se&&Q.addEventListener(X,dt?le:He,dt);let ue=[];return me&&(ht(D.domReference)&&(ue=kr(D.domReference)),ht(D.floating)&&(ue=ue.concat(kr(D.floating))),!ht(D.reference)&&D.reference&&D.reference.contextElement&&(ue=ue.concat(kr(D.reference.contextElement)))),ue=ue.filter(Ce=>{var $e;return Ce!==(($e=Q.defaultView)==null?void 0:$e.visualViewport)}),ue.forEach(Ce=>{Ce.addEventListener("scroll",Me,{passive:!0})}),()=>{Y&&(Q.removeEventListener("keydown",it?Be:Ne,it),Q.removeEventListener("compositionstart",ge),Q.removeEventListener("compositionend",ne)),se&&Q.removeEventListener(X,dt?le:He,dt),ue.forEach(Ce=>{Ce.removeEventListener("scroll",Me)}),window.clearTimeout(ie)}},[K,D,Y,se,X,R,L,me,J,de,Ve,Ne,it,Be,He,dt,le]),W.useEffect(()=>{we.current=!1},[se,X]);const ye=W.useMemo(()=>({onKeyDown:Ne,[r3[ce]]:ie=>{ae&&L(!1,ie.nativeEvent,"reference-press")}}),[Ne,L,ae,ce]),re=W.useMemo(()=>({onKeyDown:Ne,onMouseDown(){Oe.current=!0},onMouseUp(){Oe.current=!0},[i3[X]]:()=>{we.current=!0}}),[Ne,X]);return W.useMemo(()=>J?{reference:ye,floating:re}:{},[J,ye,re])}(O,{bubbles:!0}),M=c3(O,{listRef:g,activeIndex:h,nested:k,onNavigate:m}),{getReferenceProps:T,getFloatingProps:H,getItemProps:V}=function(Z){Z===void 0&&(Z=[]);const _=Z.map(Y=>Y==null?void 0:Y.reference),R=Z.map(Y=>Y==null?void 0:Y.floating),L=Z.map(Y=>Y==null?void 0:Y.item),D=W.useCallback(Y=>Tu(Y,Z,"reference"),_),K=W.useCallback(Y=>Tu(Y,Z,"floating"),R),J=W.useCallback(Y=>Tu(Y,Z,"item"),L);return W.useMemo(()=>({getReferenceProps:D,getFloatingProps:K,getItemProps:J}),[D,K,J])}([A,N,j,G,M]);v.useEffect(()=>{if(C)return C.events.on("click",Z),C.events.on("menuopen",_),()=>{C.events.off("click",Z),C.events.off("menuopen",_)};function Z(){u(!1)}function _(R){R.nodeId!==w&&R.parentId===I&&u(!1)}},[C,w,I]),v.useEffect(()=>{l&&C&&C.events.emit("menuopen",{parentId:I,nodeId:w})},[C,l,w,I]);const z={activeIndex:h,setActiveIndex:m,getItemProps:V,setHasFocusInside:f,isOpen:l,setIsOpen:u},P=v.useMemo(()=>z,[h,m,V,f,l]),B=te("io-dropdown-menu-button",k&&"io-dropdown-menu-item",l&&!k&&"active",e),F=Oy([E.setReference,b.ref,c]),$=x.activeIndex===b.index?0:-1;return d.jsxs(qk,{id:w,children:[d.jsx(Ze,{className:B,ref:F,variant:k?"link":t,tabIndex:k?$:void 0,role:k?"menuitem":void 0,"data-open":l?"":void 0,"data-nested":k?"":void 0,"data-focus-inside":p?"":void 0,text:r,icon:k?"chevron-right":n,iconSize:"10",iconRight:!!k||o,disabled:i,...T(x.getItemProps({onFocus(Z){var _;(_=s.onFocus)==null||_.call(s,Z),f(!1),x.setHasFocusInside(!0)},...s}))}),d.jsx(Xd.Provider,{value:P,children:d.jsx(Yk,{elementsRef:g,labelsRef:y,children:l&&d.jsx(o3,{context:O,modal:!1,initialFocus:k?-1:0,returnFocus:!k,children:d.jsx("div",{ref:E.setFloating,className:"io-dropdown-menu",style:S,...H(),children:a})})})})]})});Ud.displayName="DropdownMenu";const Yn=v.forwardRef(({...e},t)=>gr()===null?d.jsx(Qk,{children:d.jsx(Ud,{ref:t,...e})}):d.jsx(Ud,{ref:t,...e}));Yn.displayName="DropdownMenu",Yn.Item=Gy,Yn.Separator=ms;var _m=function(e){return e.reduce(function(t,n){var o=n[0],r=n[1];return t[o]=r,t},{})},Mm=typeof window<"u"&&window.document&&window.document.createElement?W.useLayoutEffect:W.useEffect,mn="top",Dn="bottom",Bn="right",gn="left",Jd="auto",gs=[mn,Dn,Bn,gn],Zi="start",Qa="end",Wy="viewport",va="popper",Dm=gs.reduce(function(e,t){return e.concat([t+"-"+Zi,t+"-"+Qa])},[]),Vy=[].concat(gs,[Jd]).reduce(function(e,t){return e.concat([t,t+"-"+Zi,t+"-"+Qa])},[]),d3=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function vo(e){return e?(e.nodeName||"").toLowerCase():null}function jn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pi(e){return e instanceof jn(e).Element||e instanceof Element}function _n(e){return e instanceof jn(e).HTMLElement||e instanceof HTMLElement}function wf(e){return typeof ShadowRoot<"u"&&(e instanceof jn(e).ShadowRoot||e instanceof ShadowRoot)}var p3={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];_n(i)&&vo(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var s=r[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})},effect:function(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.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]).reduce(function(s,c){return s[c]="",s},{});_n(r)&&vo(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}},requires:["computeStyles"]};function fo(e){return e.split("-")[0]}var ii=Math.max,Kc=Math.min,Xi=Math.round;function Yd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Fy(){return!/^((?!chrome|android).)*safari/i.test(Yd())}function Ui(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&_n(e)&&(r=e.offsetWidth>0&&Xi(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Xi(o.height)/e.offsetHeight||1);var a=(pi(e)?jn(e):window).visualViewport,s=!Fy()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/r,l=(o.top+(s&&a?a.offsetTop:0))/i,u=o.width/r,p=o.height/i;return{width:u,height:p,top:l,right:c+u,bottom:l+p,left:c,x:c,y:l}}function xf(e){var t=Ui(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function zy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&wf(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Go(e){return jn(e).getComputedStyle(e)}function f3(e){return["table","td","th"].indexOf(vo(e))>=0}function Sr(e){return((pi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ll(e){return vo(e)==="html"?e:e.assignedSlot||e.parentNode||(wf(e)?e.host:null)||Sr(e)}function Bm(e){return _n(e)&&Go(e).position!=="fixed"?e.offsetParent:null}function vs(e){for(var t=jn(e),n=Bm(e);n&&f3(n)&&Go(n).position==="static";)n=Bm(n);return n&&(vo(n)==="html"||vo(n)==="body"&&Go(n).position==="static")?t:n||function(o){var r=/firefox/i.test(Yd());if(/Trident/i.test(Yd())&&_n(o)&&Go(o).position==="fixed")return null;var i=Ll(o);for(wf(i)&&(i=i.host);_n(i)&&["html","body"].indexOf(vo(i))<0;){var a=Go(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||r&&a.willChange==="filter"||r&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}(e)||t}function Cf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ra(e,t,n){return ii(e,Kc(t,n))}function $y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Zy(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var h3={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=fo(n.placement),c=Cf(s),l=[gn,Bn].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(E,O){return $y(typeof(E=typeof E=="function"?E(Object.assign({},O.rects,{placement:O.placement})):E)!="number"?E:Zy(E,gs))}(r.padding,n),p=xf(i),f=c==="y"?mn:gn,h=c==="y"?Dn:Bn,m=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],g=a[c]-n.rects.reference[c],y=vs(i),x=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,C=m/2-g/2,w=u[f],I=x-p[l]-u[h],b=x/2-p[l]/2+C,k=Ra(w,b,I),S=c;n.modifiersData[o]=((t={})[S]=k,t.centerOffset=k-b,t)}},effect:function(e){var t=e.state,n=e.options.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o!="string"||(o=t.elements.popper.querySelector(o)))&&zy(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ji(e){return e.split("-")[1]}var m3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hm(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,p=e.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,g=m===void 0?0:m,y=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var x=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),w=gn,I=mn,b=window;if(l){var k=vs(n),S="clientHeight",E="clientWidth";k===jn(n)&&Go(k=Sr(n)).position!=="static"&&s==="absolute"&&(S="scrollHeight",E="scrollWidth"),(r===mn||(r===gn||r===Bn)&&i===Qa)&&(I=Dn,g-=(p&&k===b&&b.visualViewport?b.visualViewport.height:k[S])-o.height,g*=c?1:-1),(r===gn||(r===mn||r===Dn)&&i===Qa)&&(w=Bn,h-=(p&&k===b&&b.visualViewport?b.visualViewport.width:k[E])-o.width,h*=c?1:-1)}var O,A=Object.assign({position:s},l&&m3),N=u===!0?function(j,G){var M=j.x,T=j.y,H=G.devicePixelRatio||1;return{x:Xi(M*H)/H||0,y:Xi(T*H)/H||0}}({x:h,y:g},jn(n)):{x:h,y:g};return h=N.x,g=N.y,c?Object.assign({},A,((O={})[I]=C?"0":"",O[w]=x?"0":"",O.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",O)):Object.assign({},A,((t={})[I]=C?g+"px":"",t[w]=x?h+"px":"",t.transform="",t))}var g3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0||o,i=n.adaptive,a=i===void 0||i,s=n.roundOffsets,c=s===void 0||s,l={placement:fo(t.placement),variation:Ji(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Hm(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Hm(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Js={passive:!0},v3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0||r,a=o.resize,s=a===void 0||a,c=jn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(u){u.addEventListener("scroll",n.update,Js)}),s&&c.addEventListener("resize",n.update,Js),function(){i&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Js)}),s&&c.removeEventListener("resize",n.update,Js)}},data:{}},y3={left:"right",right:"left",bottom:"top",top:"bottom"};function Ys(e){return e.replace(/left|right|bottom|top/g,function(t){return y3[t]})}var b3={start:"end",end:"start"};function Gm(e){return e.replace(/start|end/g,function(t){return b3[t]})}function If(e){var t=jn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Kd(e){return Ui(Sr(e)).left+If(e).scrollLeft}function kf(e){var t=Go(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function Xy(e){return["html","body","#document"].indexOf(vo(e))>=0?e.ownerDocument.body:_n(e)&&kf(e)?e:Xy(Ll(e))}function Wa(e,t){var n;t===void 0&&(t=[]);var o=Xy(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=jn(o),a=r?[i].concat(i.visualViewport||[],kf(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(Wa(Ll(a)))}function qd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Wm(e,t,n){return t===Wy?qd(function(o,r){var i=jn(o),a=Sr(o),s=i.visualViewport,c=a.clientWidth,l=a.clientHeight,u=0,p=0;if(s){c=s.width,l=s.height;var f=Fy();(f||!f&&r==="fixed")&&(u=s.offsetLeft,p=s.offsetTop)}return{width:c,height:l,x:u+Kd(o),y:p}}(e,n)):pi(t)?function(o,r){var i=Ui(o,!1,r==="fixed");return i.top=i.top+o.clientTop,i.left=i.left+o.clientLeft,i.bottom=i.top+o.clientHeight,i.right=i.left+o.clientWidth,i.width=o.clientWidth,i.height=o.clientHeight,i.x=i.left,i.y=i.top,i}(t,n):qd(function(o){var r,i=Sr(o),a=If(o),s=(r=o.ownerDocument)==null?void 0:r.body,c=ii(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=ii(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-a.scrollLeft+Kd(o),p=-a.scrollTop;return Go(s||i).direction==="rtl"&&(u+=ii(i.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:p}}(Sr(e)))}function w3(e,t,n,o){var r=t==="clippingParents"?function(c){var l=Wa(Ll(c)),u=["absolute","fixed"].indexOf(Go(c).position)>=0&&_n(c)?vs(c):c;return pi(u)?l.filter(function(p){return pi(p)&&zy(p,u)&&vo(p)!=="body"}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(c,l){var u=Wm(e,l,o);return c.top=ii(u.top,c.top),c.right=Kc(u.right,c.right),c.bottom=Kc(u.bottom,c.bottom),c.left=ii(u.left,c.left),c},Wm(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Uy(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?fo(r):null,a=r?Ji(r):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case mn:t={x:s,y:n.y-o.height};break;case Dn:t={x:s,y:n.y+n.height};break;case Bn:t={x:n.x+n.width,y:c};break;case gn:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?Cf(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case Zi:t[l]=t[l]-(n[u]/2-o[u]/2);break;case Qa:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function es(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,c=s===void 0?"clippingParents":s,l=n.rootBoundary,u=l===void 0?Wy:l,p=n.elementContext,f=p===void 0?va:p,h=n.altBoundary,m=h!==void 0&&h,g=n.padding,y=g===void 0?0:g,x=$y(typeof y!="number"?y:Zy(y,gs)),C=f===va?"reference":va,w=e.rects.popper,I=e.elements[m?C:f],b=w3(pi(I)?I:I.contextElement||Sr(e.elements.popper),c,u,a),k=Ui(e.elements.reference),S=Uy({reference:k,element:w,strategy:"absolute",placement:r}),E=qd(Object.assign({},w,S)),O=f===va?E:k,A={top:b.top-O.top+x.top,bottom:O.bottom-b.bottom+x.bottom,left:b.left-O.left+x.left,right:O.right-b.right+x.right},N=e.modifiersData.offset;if(f===va&&N){var j=N[r];Object.keys(A).forEach(function(G){var M=[Bn,Dn].indexOf(G)>=0?1:-1,T=[mn,Dn].indexOf(G)>=0?"y":"x";A[G]+=j[T]*M})}return A}function x3(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Vy:c,u=Ji(o),p=u?s?Dm:Dm.filter(function(m){return Ji(m)===u}):gs,f=p.filter(function(m){return l.indexOf(m)>=0});f.length===0&&(f=p);var h=f.reduce(function(m,g){return m[g]=es(e,{placement:g,boundary:r,rootBoundary:i,padding:a})[fo(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}var C3={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0||r,a=n.altAxis,s=a===void 0||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,p=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0||h,g=n.allowedAutoPlacements,y=t.options.placement,x=fo(y),C=c||(x===y||!m?[Ys(y)]:function(F){if(fo(F)===Jd)return[];var $=Ys(F);return[Gm(F),$,Gm($)]}(y)),w=[y].concat(C).reduce(function(F,$){return F.concat(fo($)===Jd?x3(t,{placement:$,boundary:u,rootBoundary:p,padding:l,flipVariations:m,allowedAutoPlacements:g}):$)},[]),I=t.rects.reference,b=t.rects.popper,k=new Map,S=!0,E=w[0],O=0;O<w.length;O++){var A=w[O],N=fo(A),j=Ji(A)===Zi,G=[mn,Dn].indexOf(N)>=0,M=G?"width":"height",T=es(t,{placement:A,boundary:u,rootBoundary:p,altBoundary:f,padding:l}),H=G?j?Bn:gn:j?Dn:mn;I[M]>b[M]&&(H=Ys(H));var V=Ys(H),z=[];if(i&&z.push(T[N]<=0),s&&z.push(T[H]<=0,T[V]<=0),z.every(function(F){return F})){E=A,S=!1;break}k.set(A,z)}if(S)for(var P=function(F){var $=w.find(function(Z){var _=k.get(Z);if(_)return _.slice(0,F).every(function(R){return R})});if($)return E=$,"break"},B=m?3:1;B>0&&P(B)!=="break";B--);t.placement!==E&&(t.modifiersData[o]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Vm(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 Fm(e){return[mn,Bn,Dn,gn].some(function(t){return e[t]>=0})}var I3={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=es(t,{elementContext:"reference"}),s=es(t,{altBoundary:!0}),c=Vm(a,o),l=Vm(s,r,i),u=Fm(c),p=Fm(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}},k3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=Vy.reduce(function(u,p){return u[p]=function(f,h,m){var g=fo(f),y=[gn,mn].indexOf(g)>=0?-1:1,x=typeof m=="function"?m(Object.assign({},h,{placement:f})):m,C=x[0],w=x[1];return C=C||0,w=(w||0)*y,[gn,Bn].indexOf(g)>=0?{x:w,y:C}:{x:C,y:w}}(p,t.rects,i),u},{}),s=a[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}},S3={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Uy({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},A3={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0||r,a=n.altAxis,s=a!==void 0&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,p=n.padding,f=n.tether,h=f===void 0||f,m=n.tetherOffset,g=m===void 0?0:m,y=es(t,{boundary:c,rootBoundary:l,padding:p,altBoundary:u}),x=fo(t.placement),C=Ji(t.placement),w=!C,I=Cf(x),b=I==="x"?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,O=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,A=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(k){if(i){var G,M=I==="y"?mn:gn,T=I==="y"?Dn:Bn,H=I==="y"?"height":"width",V=k[I],z=V+y[M],P=V-y[T],B=h?-E[H]/2:0,F=C===Zi?S[H]:E[H],$=C===Zi?-E[H]:-S[H],Z=t.elements.arrow,_=h&&Z?xf(Z):{width:0,height:0},R=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=R[M],D=R[T],K=Ra(0,S[H],_[H]),J=w?S[H]/2-B-K-L-A.mainAxis:F-K-L-A.mainAxis,Y=w?-S[H]/2+B+K+D+A.mainAxis:$+K+D+A.mainAxis,ee=t.elements.arrow&&vs(t.elements.arrow),X=ee?I==="y"?ee.clientTop||0:ee.clientLeft||0:0,ae=(G=N==null?void 0:N[I])!=null?G:0,ce=V+Y-ae,me=Ra(h?Kc(z,V+J-ae-X):z,V,h?ii(P,ce):P);k[I]=me,j[I]=me-V}if(s){var be,Le=I==="x"?mn:gn,q=I==="x"?Dn:Bn,oe=k[b],se=b==="y"?"height":"width",we=oe+y[Le],Oe=oe-y[q],de=[mn,gn].indexOf(x)!==-1,Ve=(be=N==null?void 0:N[b])!=null?be:0,it=de?we:oe-S[se]-E[se]-Ve+A.altAxis,dt=de?oe+S[se]+E[se]-Ve-A.altAxis:Oe,Te=h&&de?function(Ne,Be,He){var le=Ra(Ne,Be,He);return le>He?He:le}(it,oe,dt):Ra(h?it:we,oe,h?dt:Oe);k[b]=Te,j[b]=Te-oe}t.modifiersData[o]=j}},requiresIfExists:["offset"]};function E3(e,t,n){n===void 0&&(n=!1);var o=_n(t),r=_n(t)&&function(l){var u=l.getBoundingClientRect(),p=Xi(u.width)/l.offsetWidth||1,f=Xi(u.height)/l.offsetHeight||1;return p!==1||f!==1}(t),i=Sr(t),a=Ui(e,r,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&((vo(t)!=="body"||kf(i))&&(s=function(l){return l!==jn(l)&&_n(l)?{scrollLeft:(u=l).scrollLeft,scrollTop:u.scrollTop}:If(l);var u}(t)),_n(t)?((c=Ui(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=Kd(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function j3(e){var t=new Map,n=new Set,o=[];function r(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach(function(a){if(!n.has(a)){var s=t.get(a);s&&r(s)}}),o.push(i)}return e.forEach(function(i){t.set(i.name,i)}),e.forEach(function(i){n.has(i.name)||r(i)}),o}var zm={placement:"bottom",modifiers:[],strategy:"absolute"};function $m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function N3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?zm:r;return function(a,s,c){c===void 0&&(c=i);var l,u,p={placement:"bottom",orderedModifiers:[],options:Object.assign({},zm,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},f=[],h=!1,m={state:p,setOptions:function(y){var x=typeof y=="function"?y(p.options):y;g(),p.options=Object.assign({},i,p.options,x),p.scrollParents={reference:pi(a)?Wa(a):a.contextElement?Wa(a.contextElement):[],popper:Wa(s)};var C,w,I=function(b){var k=j3(b);return d3.reduce(function(S,E){return S.concat(k.filter(function(O){return O.phase===E}))},[])}((C=[].concat(o,p.options.modifiers),w=C.reduce(function(b,k){var S=b[k.name];return b[k.name]=S?Object.assign({},S,k,{options:Object.assign({},S.options,k.options),data:Object.assign({},S.data,k.data)}):k,b},{}),Object.keys(w).map(function(b){return w[b]})));return p.orderedModifiers=I.filter(function(b){return b.enabled}),p.orderedModifiers.forEach(function(b){var k=b.name,S=b.options,E=S===void 0?{}:S,O=b.effect;if(typeof O=="function"){var A=O({state:p,name:k,instance:m,options:E}),N=function(){};f.push(A||N)}}),m.update()},forceUpdate:function(){if(!h){var y=p.elements,x=y.reference,C=y.popper;if($m(x,C)){p.rects={reference:E3(x,vs(C),p.options.strategy==="fixed"),popper:xf(C)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(O){return p.modifiersData[O.name]=Object.assign({},O.data)});for(var w=0;w<p.orderedModifiers.length;w++)if(p.reset!==!0){var I=p.orderedModifiers[w],b=I.fn,k=I.options,S=k===void 0?{}:k,E=I.name;typeof b=="function"&&(p=b({state:p,options:S,name:E,instance:m})||p)}else p.reset=!1,w=-1}}},update:(l=function(){return new Promise(function(y){m.forceUpdate(),y(p)})},function(){return u||(u=new Promise(function(y){Promise.resolve().then(function(){u=void 0,y(l())})})),u}),destroy:function(){g(),h=!0}};if(!$m(a,s))return m;function g(){f.forEach(function(y){return y()}),f=[]}return m.setOptions(c).then(function(y){!h&&c.onFirstUpdate&&c.onFirstUpdate(y)}),m}}var P3=N3({defaultModifiers:[v3,S3,g3,p3,k3,C3,A3,h3,I3]}),O3=typeof Element<"u",T3=typeof Map=="function",R3=typeof Set=="function",L3=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,r,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(o=n;o--!==0;)if(!Sc(e[o],t[o]))return!1;return!0}if(T3&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(o=i.next()).done;)if(!t.has(o.value[0]))return!1;for(i=e.entries();!(o=i.next()).done;)if(!Sc(o.value[1],t.get(o.value[0])))return!1;return!0}if(R3&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(o=i.next()).done;)if(!t.has(o.value[0]))return!1;return!0}if(L3&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(o=n;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;if(O3&&e instanceof Element)return!1;for(o=n;o--!==0;)if((r[o]!=="_owner"&&r[o]!=="__v"&&r[o]!=="__o"||!e.$$typeof)&&!Sc(e[r[o]],t[r[o]]))return!1;return!0}return e!=e&&t!=t}var _3=function(e,t){try{return Sc(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}},M3=hs(_3),D3=[],Jy=function(e,t,n){n===void 0&&(n={});var o=W.useRef(null),r={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||D3},i=W.useState({styles:{popper:{position:r.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=i[0],s=i[1],c=W.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var f=p.state,h=Object.keys(f.elements);Xv.flushSync(function(){s({styles:_m(h.map(function(m){return[m,f.styles[m]||{}]})),attributes:_m(h.map(function(m){return[m,f.attributes[m]]}))})})},requires:["computeStyles"]}},[]),l=W.useMemo(function(){var p={onFirstUpdate:r.onFirstUpdate,placement:r.placement,strategy:r.strategy,modifiers:[].concat(r.modifiers,[c,{name:"applyStyles",enabled:!1}])};return M3(o.current,p)?o.current||p:(o.current=p,p)},[r.onFirstUpdate,r.placement,r.strategy,r.modifiers,c]),u=W.useRef();return Mm(function(){u.current&&u.current.setOptions(l)},[l]),Mm(function(){if(e!=null&&t!=null){var p=(n.createPopper||P3)(e,t,l);return u.current=p,function(){p.destroy(),u.current=null}}},[e,t,n.createPopper]),{state:u.current?u.current.state:null,styles:a.styles,attributes:a.attributes,update:u.current?u.current.update:null,forceUpdate:u.current?u.current.forceUpdate:null}};function _l({className:e,variant:t="default",size:n="16",src:o,alt:r,...i}){const a=te("io-image-icon",t==="grayscale"&&[`io-image-icon-${t}`],n&&[`io-image-icon-${n}`],e);return d.jsx("img",{className:a,style:{width:`${n}px`,filter:t==="grayscale"?"grayscale(100%)":"none"},src:o,alt:r,...i})}const Sf=v.forwardRef((e,t)=>{const{title:n,subtitle:o,actions:r,className:i,onClose:a,onActionItemClick:s,"data-testid":c="context-menu",...l}=e,u=v.useRef({}),[p,f]=v.useState(0),h=m=>{var g;(g=u.current[m])==null||g.focus({preventScroll:!0}),f(m)};return v.useEffect(()=>{var m;(m=u.current[p])==null||m.focus({preventScroll:!0})},[]),d.jsxs(Lt,{ref:t,className:te(i,"context-menu"),onClick:m=>m.stopPropagation(),onKeyDown:m=>ff({event:m,currentIndex:p,min:0,max:r.length-1,moveFocus:h,onClose:a}),"data-testid":c,...l,children:[n&&d.jsxs(Lt.ItemSection,{className:"context-menu-header","data-testid":`${c}-header`,children:[d.jsx("span",{className:"context-menu-header-title io-title",children:n}),o&&d.jsx("span",{className:"context-menu-header-subtitle io-list-text-description",children:o})]}),r.map((m,g)=>{const y=m.displayName||m.name,x=m.iconSrc?d.jsx(_l,{size:"16",src:m.iconSrc,alt:`${y} icon`}):m.icon&&d.jsx(wt,{size:"16",variant:m.icon});return d.jsxs(v.Fragment,{children:[d.jsx(Lt.Item,{ref:C=>u.current[g]=C,prepend:x,disabled:m.disabled,tabIndex:-1,...pf(C=>s(C,m)),"data-testid":`${c}-item-${m.name}`,children:y}),m.separatorAfter&&d.jsx("li",{className:"context-menu-separator","aria-hidden":!0,"data-testid":`${c}-separator`})]},m.name)})]})});Sf.displayName="ContextMenuActionsList";const Af=()=>{const[e,t]=v.useState([]),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=s=>{const{name:c,title:l,caption:u,icon:p,userProperties:f}=s;return{id:c,name:c,title:l??c,caption:u,icon:p,userProperties:f}},r=n.appManager.onAppAdded(s=>{if(s.userProperties.hidden||"hidden"in s&&s.hidden)return;const c=o(s);t(l=>[...l,c])}),i=n.appManager.onAppChanged(s=>{if(s.userProperties.hidden||"hidden"in s&&s.hidden)return;const c=o(s);t(l=>[...l.filter(u=>u.id!==c.id),c])}),a=[r,n.appManager.onAppRemoved(s=>{const c=o(s);t(l=>l.filter(u=>u.id!==c.id))}),i];return()=>a.forEach(s=>s())},[n]),e},Yy=()=>{const[e,t]=v.useState({}),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.appManager.onInstanceStarted(a=>{t(s=>{const c=s[a.application.name]??[];return{...s,[a.application.name]:[...c,a.id]}})}),r=n.appManager.onInstanceStopped(a=>{t(s=>{const c=s[a.application.name];return c?{...s,[a.application.name]:c.filter(l=>l!==a.id)}:s})}),i=[o,r];return()=>i.forEach(a=>a())},[n]),e};var Ht=function(e){return{ok:!0,result:e}},Ot=function(e){return{ok:!1,error:e}},Zm=function(e,t,n){return t.ok===!1?t:n.ok===!1?n:Ht(e(t.result,n.result))},Lu=function(e,t){return t.ok===!0?t:Ot(e(t.error))},Qd=function(){return Qd=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Qd.apply(this,arguments)};function ep(e,t){if(e===t||e===null&&t===null)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="object"){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ep(e[n],t[n]))return!1;return!0}var o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(n=0;n<o.length;n++)if(!t.hasOwnProperty(o[n])||!ep(e[o[n]],t[o[n]]))return!1;return!0}}var La=function(e){return Array.isArray(e)},Ks=function(e){return typeof e=="object"&&e!==null&&!La(e)},Po=function(e,t){return"expected "+e+", got "+function(n){switch(typeof n){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return n instanceof Array?"an array":n===null?"null":"an object";default:return JSON.stringify(n)}}(t)},ya=function(e){return e.map(function(t){return typeof t=="string"?"."+t:"["+t+"]"}).join("")},ba=function(e,t){var n=t.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(s=Object.getOwnPropertySymbols(r);c<s.length;c++)i.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(r,s[c])&&(a[s[c]]=r[s[c]])}return a}(t,["at"]);return Qd({at:e+(n||"")},o)},Mt=function(){function e(t){var n=this;this.decode=t,this.run=function(o){return Lu(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},n.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(n.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(n.run(o))},this.map=function(o){return new e(function(r){return function(i,a){return a.ok===!0?Ht(i(a.result)):a}(o,n.decode(r))})},this.andThen=function(o){return new e(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},n.decode(r))})},this.where=function(o,r){return n.andThen(function(i){return o(i)?e.succeed(i):e.fail(r)})}}return e.string=function(){return new e(function(t){return typeof t=="string"?Ht(t):Ot({message:Po("a string",t)})})},e.number=function(){return new e(function(t){return typeof t=="number"?Ht(t):Ot({message:Po("a number",t)})})},e.boolean=function(){return new e(function(t){return typeof t=="boolean"?Ht(t):Ot({message:Po("a boolean",t)})})},e.constant=function(t){return new e(function(n){return ep(n,t)?Ht(t):Ot({message:"expected "+JSON.stringify(t)+", got "+JSON.stringify(n)})})},e.object=function(t){return new e(function(n){if(Ks(n)&&t){var o={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r].decode(n[r]);if(i.ok!==!0)return n[r]===void 0?Ot({message:"the key '"+r+"' is required but was not present"}):Ot(ba("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return Ht(o)}return Ks(n)?Ht(n):Ot({message:Po("an object",n)})})},e.array=function(t){return new e(function(n){return La(n)&&t?n.reduce(function(o,r,i){return Zm(function(a,s){return a.concat([s])},o,function(a,s){return Lu(function(c){return ba("["+s+"]",c)},t.decode(a))}(r,i))},Ht([])):La(n)?Ht(n):Ot({message:Po("an array",n)})})},e.tuple=function(t){return new e(function(n){if(La(n)){if(n.length!==t.length)return Ot({message:"expected a tuple of length "+t.length+", got one of length "+n.length});for(var o=[],r=0;r<t.length;r++){var i=t[r].decode(n[r]);if(!i.ok)return Ot(ba("["+r+"]",i.error));o[r]=i.result}return Ht(o)}return Ot({message:Po("a tuple of length "+t.length,n)})})},e.union=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return e.oneOf.apply(e,[t,n].concat(o))},e.intersection=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new e(function(i){return[t,n].concat(o).reduce(function(a,s){return Zm(Object.assign,a,s.decode(i))},Ht({}))})},e.anyJson=function(){return new e(function(t){return Ht(t)})},e.unknownJson=function(){return new e(function(t){return Ht(t)})},e.dict=function(t){return new e(function(n){if(Ks(n)){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=t.decode(n[r]);if(i.ok!==!0)return Ot(ba("."+r,i.error));o[r]=i.result}return Ht(o)}return Ot({message:Po("an object",n)})})},e.optional=function(t){return new e(function(n){return n==null?Ht(void 0):t.decode(n)})},e.oneOf=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(function(o){for(var r=[],i=0;i<t.length;i++){var a=t[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(c){return"at error"+(c.at||"")+": "+c.message}).join('", "');return Ot({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},e.withDefault=function(t,n){return new e(function(o){return Ht(function(r,i){return i.ok===!0?i.result:r}(t,n.decode(o)))})},e.valueAt=function(t,n){return new e(function(o){for(var r=o,i=0;i<t.length;i++){if(r===void 0)return Ot({at:ya(t.slice(0,i+1)),message:"path does not exist"});if(typeof t[i]=="string"&&!Ks(r))return Ot({at:ya(t.slice(0,i+1)),message:Po("an object",r)});if(typeof t[i]=="number"&&!La(r))return Ot({at:ya(t.slice(0,i+1)),message:Po("an array",r)});r=r[t[i]]}return Lu(function(a){return r===void 0?{at:ya(t),message:"path does not exist"}:ba(ya(t),a)},n.decode(r))})},e.succeed=function(t){return new e(function(n){return Ht(t)})},e.fail=function(t){return new e(function(n){return Ot({message:t})})},e.lazy=function(t){return new e(function(n){return t().decode(n)})},e}(),ln=Mt.string,B3=Mt.number,pt=Mt.boolean,tp=Mt.anyJson;Mt.unknownJson;var U=Mt.constant,$t=Mt.object,wo=Mt.array;Mt.tuple,Mt.dict;var xe=Mt.optional,ys=Mt.oneOf;Mt.union,Mt.intersection,Mt.withDefault,Mt.valueAt,Mt.succeed;var H3=Mt.fail;Mt.lazy;const ut=ln().where(e=>e.length>0,"Expected a non-empty string"),Xm=B3().where(e=>e>=0,"Expected a non-negative number"),G3=$t({name:ut,id:xe(ut)}),Ky=(e,t,n)=>{const[o,r]=v.useState(()=>{try{const s=window[e].getItem(t);return s?JSON.parse(s):null}catch(s){return console.log(s),null}}),i=`${e}-${t}`;v.useEffect(()=>{const s=c=>{r(c.detail)};return window.addEventListener(i,s),()=>{window.removeEventListener(i,s)}},[i]);const a=v.useCallback(s=>{try{if(!s)return window[e].removeItem(t),void r(null);const c=n.run(s);if(!c.ok)return void console.warn(`Error validating the value to be stored: ${c.error.message}`);const l=c.result;r(l),window[e].setItem(t,JSON.stringify(l)),window.dispatchEvent(new CustomEvent(i,{detail:l}))}catch(c){console.log(c)}},[t,e,i,n]);return[o,a]},qy=()=>{const[e,t]=Ky("sessionStorage","interopio_home_ui_active_layout",G3);return{activeLayout:e,setActiveLayout:t}},Rn="success",ot="warning",W3={success:5e3,warning:1e4},dr=e=>typeof e=="string"?e:e!=null&&e.message?typeof e.message=="string"?e.message:JSON.stringify(e.message):JSON.stringify(e),De=async e=>{const{io:t,variant:n,text:o,error:r}=e,i=dr(r);try{if(n===ot&&t.logger.warn(i?`${o} ${i}`:o),!("modals"in t)||!t.modals)throw new Error("Modals are not enabled.");const a={text:o,variant:n,ttl:W3[n]};await t.modals.alerts.request(a)}catch(a){console.warn("Failed to request alert. ",{error:a})}};function mt(e){return e.id??e.name}function zt(e){var t;return(t=e==null?void 0:e.layouts)==null?void 0:t.v2}function vi(e){var t;return!!((t=zt(e))!=null&&t.advancedLayoutsSupported)}function Um(e,t){return e.some(n=>n.name===t)?e:[...e,{name:t}]}function V3(e){return{id:e.id,name:e.name,type:e.type,metadata:e.metadata,accessInfo:e.accessInfo}}function Jm(e,t){const n=t.filter(i=>i.type==="Global").map(V3),o=new Set(n.map(i=>i.id)),r=e.filter(i=>i.id&&!o.has(i.id));return[...n,...r]}function Ym(e,t){return e.filter(n=>n.name!==t)}function Km(e,t,n){const o=e.filter(i=>i.name!==t),r=o.findIndex(i=>i.name===n);return r===-1?e:[...o.slice(0,r),{name:t},...o.slice(r+1)]}const ra=()=>{const[e,t]=v.useState([]),[n,o]=v.useState(!1),r=v.useContext(Se.IOConnectContext),i=zt(r),a=vi(r);return v.useEffect(()=>{if(!r)return;let s=!1;const c=[];if(a){const l=()=>{i.getMany({includeAccessInfo:!0}).then(u=>{s||t(p=>Jm(p,u))}).catch(u=>console.error("useLayouts: Failed to refresh V2 layouts:",u))};i.getMany({includeAccessInfo:!0}).then(u=>{s||(o(!0),t(p=>Jm(p,u)))}).catch(u=>console.error("useLayouts: Failed to fetch initial V2 layouts:",u)),Promise.all([i.onAdded(u=>{u.type!=="Global"||s||(o(!0),l())}),i.onRemoved(u=>{u.type!=="Global"||s||t(p=>function(f,h){return f.filter(m=>m.id!==h)}(p,u.id))}),i.onRenamed(u=>{u.type!=="Global"||s||t(p=>function(f,h,m){return f.map(g=>g.id===h?{...g,name:m}:g)}(p,u.id,u.name))}),i.onChanged(u=>{u.type!=="Global"||s||l()})]).then(([u,p,f,h])=>{if(s)return u(),p(),f(),void h();c.push(u,p,f,h)}).catch(u=>console.error("useLayouts: Failed to subscribe to V2 layout events:",u))}else{let l=!1;const u=[];r.layouts.getAll("Global").then(p=>{if(s)return;const f=u.splice(0,u.length);l=!0,o(!0),t(h=>{const m=function(g,y){const x=new Set(y),C=g.filter(w=>!x.has(w.name));return[...y.map(w=>({name:w})),...C]}(h,p.map(g=>g.name));return f.reduce((g,y)=>y(g),m)})}).catch(p=>{if(s)return;console.error("useLayouts: Failed to fetch initial V1 layouts:",p);const f=u.splice(0,u.length);l=!0,o(!0),t(h=>f.reduce((m,g)=>g(m),h))});try{const p=r.layouts.onAdded(m=>{m.type!=="Global"||s||(o(!0),l?t(g=>Um(g,m.name)):u.push(g=>Um(g,m.name)))}),f=r.layouts.onRemoved(m=>{m.type!=="Global"||s||(l?t(g=>Ym(g,m.name)):u.push(g=>Ym(g,m.name)))}),h=r.layouts.onRenamed((m,g)=>{m.type!=="Global"||s||(l?t(y=>Km(y,m.name,g==null?void 0:g.name)):u.push(y=>Km(y,m.name,g==null?void 0:g.name)))});c.push(p,f,h)}catch(p){console.error("useLayouts: Failed to subscribe to V1 layout events:",p)}}return()=>{s=!0,c.forEach(l=>{try{l()}catch(u){console.error("useLayouts: Failed to unsubscribe from layout events:",u)}})}},[r,i,a]),{layouts:e,isInitialized:n}},Ef=()=>{const e=v.useContext(Se.IOConnectContext);return v.useCallback(async t=>{const{id:n,name:o}=t;if(e)try{n?await zt(e).restore({id:n}):await e.layouts.restore({name:o}),await De({io:e,variant:Rn,text:`Layout "${o}" was loaded successfully.`})}catch(r){await De({io:e,variant:ot,text:`Failed to load Layout "${o}".`,error:r})}},[e])},Qy="Control",eb="Shift",Ml=()=>{const[e,t]=v.useState(),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{var o,r;try{const i=(o=n.windows.my())!=null&&o.name?void 0:((r=window.workspacesManager)==null?void 0:r.getFrameId())||(()=>{if(!window.name)throw new Error("The frame id is not available because the platform is still initializing");return window.name})();t(i)}catch(i){console.error("Failed to get the current frame ID ",{error:i})}},[n,t]),e},np=async(e,t,n)=>{if(!e.restoreWorkspaceById)throw new Error("The connected io.Connect host doesn't support restoreWorkspaceById, which is required to restore V2 workspaces.");return e.restoreWorkspaceById({...n,layoutId:t})},Dl=()=>{const e=v.useContext(Se.IOConnectContext),t=Ml();return async({id:n,workspaceId:o,accessInfo:r,modifier:i,reuseWorkspaceId:a})=>{try{const s=i===Qy?{newFrame:!0}:{frameId:t,reuseWorkspaceId:a},c=e.workspaces;if(!c)return;if(vi(e)){const l=zt(e);if(o)return void await np(c,o,s);const u=await l.getMany({type:"Workspace",name:n,includeAccessInfo:!0}),p=r?u.find(f=>{var h;return((h=f.accessInfo)==null?void 0:h.owner)===r.owner}):u[0];if(!p)throw new Error(`Workspace "${n}" not found via the V2 Layouts API.`);await np(c,p.id,s)}else await c.restoreWorkspace(n,s)}catch(s){await De({io:e,variant:ot,text:`Failed to load Workspace "${n}".`,error:s})}}},qm="Welcome",tb=e=>e.trim().length>0,Zo=()=>window.glue42gd!==void 0||window.glue42alert!==void 0||window.glue42dialog!==void 0||window.iodesktop!==void 0;function qs(e){let t,n=!1;return e().then(o=>{n?o():t=o}).catch(o=>console.error("Failed to subscribe to V2 layout event:",o)),()=>{n=!0,t==null||t()}}const F3=(e,t)=>{const[n,o]=v.useState(void 0),r=v.useRef(!1),{activeLayout:i,setActiveLayout:a}=qy(),s=Ef(),c=Dl(),l=v.useContext(Se.IOConnectContext),u=vi(l),p=zt(l),f=v.useCallback(async({id:h,name:m})=>{try{u&&h?await p.default.set({id:h}):await l.layouts.setDefaultGlobal(m)}catch(g){console.error("Failed to set default Layout: ",{error:g})}},[l,u,p]);return v.useEffect(()=>{if(!l)return;let h=!1;if(u){p.default.get().then(y=>{h||o(y?{id:y.id,name:y.name}:void 0)}).catch(y=>console.error("Failed to fetch default Layout:",y));const g=qs(()=>p.default.onChanged(y=>{o(y?{id:y.id,name:y.name}:void 0)}));return()=>{h=!0,g()}}l.layouts.getDefaultGlobal().then(g=>{h||o(g??void 0)}).catch(g=>console.error("Failed to fetch default Layout:",g));const m=l.layouts.onDefaultGlobalChanged(g=>{o(g)});return()=>{h=!0,m()}},[l,u,p]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRestored(h=>{a({id:h.id,name:h.name})})):l.layouts.onRestored(h=>{a({name:h.name})})},[l,u,p,a]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRemoved(h=>{h.id===(i==null?void 0:i.id)&&a(null)})):l.layouts.onRemoved(h=>{(h==null?void 0:h.name)===(i==null?void 0:i.name)&&a(null)})},[l,u,p,i,a]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRenamed(h=>{h.id===(i==null?void 0:i.id)&&a({id:h.id,name:h.name})})):l.layouts.onRenamed((h,m)=>{(m==null?void 0:m.name)===(i==null?void 0:i.name)&&a({name:h.name})})},[l,u,p,i,a]),v.useEffect(()=>{if(!l||r.current)return;let h,m=!1;const g=()=>{var y;m||(Zo()||(y=window.iobrowser)!=null&&y.platformStarted?(async()=>{var C;r.current=!0;const x=u?await p.default.get()??(await p.getMany({type:"Global"})).find(w=>w.name===qm):await l.layouts.getDefaultGlobal()??(await l.layouts.getAll("Global")).find(w=>w.name===qm);if(x&&(o({id:x.id,name:x.name}),!i&&!Zo())){e(!0);try{if(t)return void await s({id:x.id,name:x.name});const w=await((C=l.workspaces)==null?void 0:C.getWorkspace(E=>E.children.length===0)),I=u?await p.get({id:x.id,includeComponents:!0}):await l.layouts.get(x.name,"Global");if(!I)throw new Error("Default Global Layout not found.");const b=I.components.reduce((E,O)=>{if(O.type==="workspaceFrame"){const A=O.state.workspaces.map(N=>N.config.name);E.push(...A)}return E},[]),k=u?await p.getMany({type:"Workspace",includeAccessInfo:!0}):[],S=b.reduce((E,O,A)=>{const N=k.filter(G=>G.name===O);if(N.length>1)return console.warn(`useSetUpLayouts: Workspace "${O}" is ambiguous (multiple V2 matches) - skipping restore.`),E;const j=N[0];return E.push(c({id:O,workspaceId:j==null?void 0:j.id,accessInfo:j==null?void 0:j.accessInfo,reuseWorkspaceId:A===0?w==null?void 0:w.id:void 0})),E},[]);await Promise.all(S)}finally{e(!1)}}})().catch(x=>console.error("Initial Global Layout setup failed. ",dr(x))):h=setTimeout(g,100))};return g(),()=>{m=!0,h&&clearTimeout(h)}},[l,u,p,i,s,c,t,e]),{defaultLayout:n,activeLayout:i,setDefaultLayout:f,setActiveLayout:a}},nb=v.createContext(void 0),to=()=>{const e=v.useContext(nb);if(e===void 0)throw new Error("useLaunchpadAPI must be used within a LaunchpadAPIProvider");return e},z3=({children:e,close:t,isOpen:n,isGlobalLayoutsAvailable:o})=>{const[r,i]=v.useState(!1),{defaultLayout:a,activeLayout:s,setDefaultLayout:c,setActiveLayout:l}=F3(i,o),u=v.useMemo(()=>({close:t,isOpen:n,defaultLayout:a,activeLayout:s,setDefaultLayout:c,setActiveLayout:l,isLayoutOperationBlocked:r,setIsLayoutOperationBlocked:i,isGlobalLayoutsAvailable:o}),[t,n,a,s,c,l,r,o]);return d.jsx(nb.Provider,{value:u,children:e})},Qm="io-connect-platform",ei="___platform_prefs___",ob="_launchpad_collapsedSections",rb="_launchpad_favorites",$3="_launchpad_recent",ib="_launchpad_isCollapsed",qc="_launchpad_isPinned",op="_launchpad_isDocked",ab="_launchpad_minimizeToTray",sb="_launchpad_autoCloseStartingAppsAndWorkspaces",cb="_launchpad_pinnedPosition",lb="_launchpad_allowDocking",ub="_launchpad_dockedAlwaysOnTop",db="_launchpad_dockedClaimsSpace",bs="_launchpad_showExtendedArea",pb="_launchpad_hideLabelsInExtendedArea",fb="_launchpad_showFavoritesInExtendedArea",jf="_launchpad_hideFavoritesSection",hb="_launchpad_showRecentAppsInExtendedArea",mb="_layouts_restoreLastSaved",gb="_layouts_saveCurrentOnExit",vb="_layouts_showUnsavedChangesPrompt",Nf="_layouts_showDeletePrompt",yb="_layouts_hidden",ia="_layouts_showHidden",bb="_workspaces_hidden",wb="_downloads_askForEachDownload",Z3="_downloads_location",X3="_system_scheduleRestart",U3="_system_scheduleRestartTime",J3="_system_scheduleRestartFrequency",Y3="_system_scheduleRestartDay",K3="_system_scheduleShutdown",q3="_system_scheduleShutdownTime",Q3="_system_scheduleShutdownFrequency",e5="_system_scheduleShutdownDay",t5={[ob]:[],[rb]:[],[$3]:[],[ib]:!1,[qc]:!1,[op]:!1,[ab]:!1,[sb]:!0,[cb]:"Left",[lb]:!0,[ub]:!1,[db]:!1,[bs]:!0,[pb]:!0,[fb]:!0,[jf]:!1,[hb]:!0,[mb]:!0,[gb]:!0,[vb]:!0,[Nf]:!0,[yb]:[],[ia]:!1,[bb]:[],[wb]:!0,[Z3]:"",[X3]:!1,[U3]:"12:00 AM",[J3]:"daily",[Y3]:"Monday",[K3]:!1,[q3]:"12:00 AM",[Q3]:"daily",[e5]:"Monday"},xb=ys(U("add"),U("add-workspace"),U("align-bottom"),U("align-bottom-solid"),U("align-left"),U("align-left-bottom"),U("align-left-bottom-solid"),U("align-left-solid"),U("align-left-top"),U("align-left-top-solid"),U("align-right"),U("align-right-bottom"),U("align-right-bottom-solid"),U("align-right-solid"),U("align-right-top"),U("align-right-top-solid"),U("align-top"),U("align-top-solid"),U("always-on-top"),U("always-on-top-on"),U("application"),U("apps"),U("arrow-down-long"),U("arrow-down"),U("arrow-down-to-bracket"),U("arrow-left-long"),U("arrow-right-from-bracket"),U("arrow-right-long"),U("arrow-right-long-to-line"),U("arrow-up"),U("arrow-up-long"),U("ban"),U("bell"),U("bell-solid"),U("bookmark"),U("bullseye-pointer"),U("certificate"),U("check"),U("check-solid"),U("chevron-down"),U("chevron-left"),U("chevron-right"),U("chevron-up"),U("circle-info"),U("circle-xmark"),U("circle-xmark-full"),U("clock"),U("clock-rotate-left"),U("clone"),U("close"),U("cog"),U("cog-solid"),U("collapse"),U("copy"),U("display"),U("download"),U("download-icon-arrow"),U("delete-left"),U("dev-tools"),U("ellipsis"),U("ellipsis-vertical"),U("expand"),U("envelope"),U("envelope-open"),U("exclamation-mark"),U("expand"),U("feedback"),U("filter"),U("floppy"),U("floppy-disk-pen"),U("folder"),U("folder-open"),U("folder-plus"),U("globe"),U("grid"),U("group"),U("hidden"),U("home"),U("house"),U("info"),U("keyboard"),U("layout"),U("link"),U("link-disabled"),U("list-ul"),U("lock"),U("logo"),U("minimize"),U("minimize-down"),U("paper-plane-top"),U("paperclip"),U("plug"),U("pause"),U("pen-line"),U("pen-to-square"),U("pin"),U("play"),U("pop-in"),U("pop-in-widget"),U("pop-out"),U("power-off"),U("publish"),U("refresh"),U("resize"),U("restore"),U("rotate-right"),U("search"),U("search-filled"),U("sleep"),U("sliders"),U("snooze"),U("spinner"),U("square"),U("square-arrow-down"),U("square-arrow-up"),U("square-list"),U("star"),U("star-full"),U("sticky-off"),U("sticky-off-hover"),U("sticky-on"),U("sticky-on-hover"),U("subscribe"),U("up-from-line"),U("system-close"),U("system-maximize"),U("system-minimize"),U("thumbs-down"),U("thumbs-up"),U("trash"),U("trash-can"),U("triangle-exclamation"),U("unlock"),U("unpin"),U("up-to-line"),U("user"),U("user-gear"),U("visible"),U("visible-full"),U("users-gear"),U("workspace"),U("fav-add"),U("fav-remove")),n5=$t({name:ut,displayName:xe(ut),icon:xe(xb),iconSrc:xe(ut),disabled:xe(pt()),separatorAfter:xe(pt())}),o5=$t({id:ut,title:ut,description:xe(ln()),icon:xe(xb),iconSrc:xe(ut),contextMenuActions:xe(wo(n5)),type:ut}),r5=wo(o5),i5=wo($t({name:ut,id:xe(ut)})),a5=wo($t({id:ut,title:ut})),s5=$t({name:ut,type:ut,id:xe(ut)}),c5=ys(U("Left"),U("Right")),eg=ys(U("daily"),U("weekly")),tg=ys(U("Sunday"),U("Monday"),U("Tuesday"),U("Wednesday"),U("Thursday"),U("Friday"),U("Saturday")),Ac=$t({customPrefs:xe(tp()),_launchpad_collapsedSections:xe(wo(ut)),_launchpad_favorites:xe(r5),_launchpad_recent:xe(wo(s5)),_launchpad_isCollapsed:xe(pt()),_launchpad_isPinned:xe(pt()),_launchpad_isDocked:xe(pt()),_launchpad_minimizeToTray:xe(pt()),_launchpad_autoCloseStartingAppsAndWorkspaces:xe(pt()),_launchpad_pinnedPosition:xe(c5),_launchpad_allowDocking:xe(pt()),_launchpad_dockedAlwaysOnTop:xe(pt()),_launchpad_dockedClaimsSpace:xe(pt()),_launchpad_showExtendedArea:xe(pt()),_launchpad_hideLabelsInExtendedArea:xe(pt()),_launchpad_showFavoritesInExtendedArea:xe(pt()),_launchpad_hideFavoritesSection:xe(pt()),_launchpad_showRecentAppsInExtendedArea:xe(pt()),_layouts_restoreLastSaved:xe(pt()),_layouts_saveCurrentOnExit:xe(pt()),_layouts_showUnsavedChangesPrompt:xe(pt()),_layouts_showDeletePrompt:xe(pt()),_layouts_hidden:xe(i5),_layouts_showHidden:xe(pt()),_workspaces_hidden:xe(a5),_downloads_askForEachDownload:xe(pt()),_downloads_location:xe(ln()),_system_scheduleRestart:xe(pt()),_system_scheduleRestartTime:xe(ut),_system_scheduleRestartFrequency:xe(eg),_system_scheduleRestartDay:xe(tg),_system_scheduleShutdown:xe(pt()),_system_scheduleShutdownTime:xe(ut),_system_scheduleShutdownFrequency:xe(eg),_system_scheduleShutdownDay:xe(tg)}),Pf=v.createContext(void 0),Bl=({children:e,launchpadMode:t})=>{const[n,o]=v.useState(),[r,i]=v.useState(!1),[a,s]=v.useState(),c=v.useContext(Se.IOConnectContext),l=v.useMemo(()=>({prefs:n,isInitialSetupCompleted:r,initialSetupError:a}),[n,r,a]);return v.useEffect(()=>{if(!c)return;let u=!1;const p=c.contexts.subscribe(ei,f=>{if(u)return;const h=Ac.run(f);if(!h.ok)return void c.logger.warn(`The received data for context ${ei} is with an invalid shape: ${dr(h.error.message)}`);const m=h.result;o(m),c.prefs.updateFor(Qm,m).catch(g=>{c.logger.warn(`Failed to update platform prefs. Error: ${dr(g)}`)})});return()=>{u=!0,p.then(f=>{f()})}},[c]),v.useEffect(()=>{c&&(async()=>{var u;try{const p=await c.contexts.get(ei),f=Ac.run(p);if(!f.ok)throw new Error(`The data in context ${ei} is with an invalid shape: ${dr(f.error.message)}`);const h=f.result;if(Object.keys(h).length>0)return;const m=((u=await c.prefs.get(Qm))==null?void 0:u.data)??{},g=Ac.run(m);if(!g.ok)throw new Error(`The stored platform prefs in io.prefs are with an invalid shape: ${dr(g.error.message)}`);const y={[qc]:t==="pinned"||(m[qc]??!1),[op]:t==="docked"||(m[op]??!1)},x={...t5,...g.result,...y};await c.contexts.set(ei,x)}catch(p){s({message:dr(p)}),await De({io:c,variant:ot,text:"Initial platform prefs setup failed.",error:p})}finally{i(!0)}})().catch(console.error)},[c,t]),d.jsx(Pf.Provider,{value:l,children:e})};function Cb(){const e=v.useContext(Pf);if(e===void 0)throw new Error("usePlatformPrefs must be used within a PlatformPrefsProvider");return e}function St({prefKey:e}){var p;const t=v.useContext(Se.IOConnectContext),n=v.useContext(Pf),o=(p=n==null?void 0:n.prefs)==null?void 0:p[e],r=(n==null?void 0:n.isInitialSetupCompleted)??!1,[i,a]=v.useState(!r),[s,c]=v.useState(),l=v.useRef(0);v.useEffect(()=>{r&&l.current===0&&a(!1)},[r]);const u=v.useCallback(async f=>{if(!t)return;const h=++l.current;a(!0),c(void 0);const m=async y=>{y&&await De({io:t,variant:ot,text:`Failed to update prefKey "${e}".`,error:y}),h===l.current&&(a(!1),y&&c({message:dr(y)}))};let g;if(f instanceof Function)try{g=f((await t.contexts.get(ei))[e])}catch(y){return m(y)}else g=f;try{const y=Ac.runWithException({[e]:g});await t.contexts.update(ei,y)}catch(y){return m(y)}await m()},[t,e]);if(n===void 0)throw new Error("usePlatformPref must be used within a PlatformPrefsProvider");return{error:s,isLoading:i,update:u,value:o}}const Hl=()=>{const{value:e,update:t,isLoading:n,error:o}=St({prefKey:qc}),r=v.useCallback(()=>t(i=>!i),[t]);return{error:o,isLaunchpadPinned:e,isLoading:n,toggle:r}},ws=()=>{const{isLaunchpadPinned:e}=Hl(),{close:t}=to();return v.useCallback(()=>{e||(t==null||t())},[e,t])},Ib="openInNewWindow",kb="openInNewWorkspace",Sb="toggleFavorite",yr=e=>"items"in e,rp=e=>`${e.type}:${e.id}`,ts={ASCENDING:"ascending",DESCENDING:"descending",DISABLED:"disabled"},xs=new Intl.Collator(void 0,{sensitivity:"base"}),Ab=(e,t)=>xs.compare(e.title,t.title),Eb=(e,t)=>xs.compare(t.title,e.title),Of=e=>{const{items:t,sortOrder:n,ascendingCompare:o,descendingCompare:r}=e;if(n===ts.DISABLED)return t;const i=n===ts.ASCENDING?o:r;return[...t].sort(i)},Tf=e=>{const t={name:Sb,displayName:e?"Remove from Favorites":"Add to Favorites",icon:e?"fav-remove":"fav-add"};return Zo()?[t]:[{name:Ib,displayName:"Open in a new window",icon:"pop-out"},{name:kb,displayName:"Open in a new Workspace",icon:"pop-out",separatorAfter:!0},t]},ip=e=>{var h;const{items:t,newItem:n,settings:o,path:r,accumulatedPath:i=""}=e,{isFolderCollapsible:a}=o,[s,...c]=r.split("/"),l=i?`${i}/${s}`:s,u=t.findIndex(m=>yr(m)&&m.title===s),p=u!==-1?t[u]:null;if(!p){const m=c.length>0?ip({items:[],newItem:n,settings:o,path:c.join("/"),accumulatedPath:l}):[n],g=(h=o.folderIconGetters)==null?void 0:h[l],y=g?x=>({src:g(x)}):void 0;return[...t,{id:s,title:s,items:m,isCollapsible:a,getIcon:y}]}const f=c.length>0?ip({items:p.items,newItem:n,settings:o,path:c.join("/"),accumulatedPath:l}):[...p.items,n];return[...t.slice(0,u),{...p,items:f},...t.slice(u+1)]},Qc=e=>{const{title:t,userProperties:n}=e,{folder:o}=n;return o?`${o}/${t}`:t},l5=(e,t)=>xs.compare(Qc(e),Qc(t)),u5=(e,t)=>xs.compare(Qc(t),Qc(e)),d5={[Ib]:async e=>{var r;const{io:t,item:n,closeLaunchpadIfNotPinned:o}=e;try{o(),await((r=t.appManager.application(n.id))==null?void 0:r.start())}catch(i){await De({io:t,variant:ot,text:`Failed to start app "${n.title}" in a new window.`,error:i})}},[kb]:async e=>{const{io:t,item:n,frameId:o,closeLaunchpadIfNotPinned:r}=e;if(!t.workspaces)return;const i={type:"workspace",definition:{frame:o?{reuseFrameId:o}:{newFrame:!0}}},a=t.workspaces.getBuilder(i);a.addGroup().addWindow({appName:n.id});try{r(),await a.create()}catch(s){await De({io:t,variant:ot,text:`Failed to start app "${n.title}" in a new Workspace.`,error:s})}},[Sb]:async e=>{const{item:t,toggleFavorite:n}=e;await n({...t,contextMenuActions:Tf(!0)})}},Tr="application",Xo="workspace",no="layout";class Rf{constructor(){Vn(this,"queue",[]);Vn(this,"isExecutingQueue",!1)}enqueue(t){return new Promise((n,o)=>{this.queue.push({action:t,resolve:n,reject:o}),this.executeQueue()})}async executeQueue(){if(!this.isExecutingQueue){for(this.isExecutingQueue=!0;this.queue.length;){const t=this.queue.shift();if(!t)return void(this.isExecutingQueue=!1);try{const n=await t.action();t.resolve(n)}catch(n){t.reject(n)}await this.intervalBreak()}this.isExecutingQueue=!1}}intervalBreak(){return new Promise(t=>setTimeout(t,0))}}function fi(e){return e.id??e.title}function p5(e){return{id:e.id,title:e.name,metadata:e.metadata,accessInfo:e.accessInfo}}function ng(e,t){const n=e.findIndex(i=>i.id===t.id);if(n===-1)return[...e,t];const o=e[n],r={...o,...t,metadata:t.metadata??o.metadata,accessInfo:t.accessInfo??o.accessInfo};return[...e.slice(0,n),r,...e.slice(n+1)]}const Cs=()=>{const[e,t]=v.useState([]),[n,o]=v.useState([]),r=v.useContext(Se.IOConnectContext),i=zt(r),a=vi(r);return v.useEffect(()=>{if(!(r!=null&&r.workspaces))return;let s=!1;const c=[];if(a){const f=()=>{i.getMany({includeAccessInfo:!0}).then(h=>{s||o(m=>function(g,y){const x=y.filter(I=>I.type==="Workspace"),C=new Set(x.map(I=>I.id)),w=g.filter(I=>!C.has(I.id));return[...x,...w]}(m,h))}).catch(h=>console.error("useWorkspaces: Failed to refresh V2 workspaces:",h))};return f(),Promise.all([i.onAdded(h=>{h.type!=="Workspace"||s||(o(m=>ng(m,h)),f())}),i.onRemoved(h=>{h.type!=="Workspace"||s||o(m=>function(g,y){return g.filter(x=>x.id!==y)}(m,h.id))}),i.onRenamed(h=>{h.type!=="Workspace"||s||o(m=>function(g,y,x){return g.map(C=>C.id===y?{...C,name:x}:C)}(m,h.id,h.name))}),i.onChanged(h=>{h.type!=="Workspace"||s||(o(m=>ng(m,h)),f())})]).then(h=>{s?h.forEach(m=>m()):c.push(...h)}).catch(h=>console.error("useWorkspaces: Failed to subscribe to V2 workspace events:",h)),()=>{s=!0,c.forEach(h=>{try{h()}catch(m){console.error("useWorkspaces: Failed to unsubscribe from V2 workspace events:",m)}})}}const l=r.workspaces.layouts.onSaved(({name:f})=>{s||t(h=>h.some(({title:m})=>m===f)?h:[...h,{title:f}])}),u=r.workspaces.layouts.onRemoved(({name:f})=>{s||t(h=>function(m,g){return m.filter(({title:y})=>y!==g)}(h,f))}),p=r.layouts.onRenamed((f,h)=>{s||f.type!=="Workspace"||t(m=>function(g,y,x){const C=g.filter(I=>I.title!==y),w=C.findIndex(I=>I.title===x);return w===-1?g:[...C.slice(0,w),{title:y},...C.slice(w+1)]}(m,f.name,h==null?void 0:h.name))});return()=>{s=!0,p(),[l,u].forEach(async f=>{try{(await f)()}catch(h){console.error(h)}})}},[r,i,a]),v.useMemo(()=>a?n.map(p5):e,[a,n,e])},og=new Rf,Eo=()=>{const{value:e,update:t,isLoading:n}=St({prefKey:rb}),o=Af(),r=Cs(),{layouts:i}=ra();return{favorites:v.useMemo(()=>(e??[]).filter(a=>a.type===Tr?o.some(s=>s.id===a.id):a.type===Xo?r.some(s=>fi(s)===a.id):a.type!==no||i.some(s=>mt(s)===a.id)),[e,o,r,i]),toggleFavorite:v.useCallback(a=>{const{openInstances:s,...c}=a;return og.enqueue(()=>t((l=[])=>((u,p)=>u.find(f=>f.id===p.id&&f.type===p.type)?u.filter(f=>!(f.id===p.id&&f.type===p.type)):[p,...u])(l,c)))},[t]),removeFavorite:v.useCallback(a=>og.enqueue(()=>t((s=[])=>((c,l)=>c.filter(u=>!(u.id===l.id&&u.type===l.type)))(s,a))),[t]),isLoading:n}},jb=()=>{const e=v.useContext(Se.IOConnectContext),t=Ml(),{toggleFavorite:n}=Eo(),o=ws();return(r,i)=>{d5[i]({io:e,item:r,frameId:t,toggleFavorite:n,closeLaunchpadIfNotPinned:o})}},Nb="rename",Pb="save",Ob="saveAs",Tb="savePrivateCopy",f5="delete",h5="setAsDefault",m5="toggleFavorite",g5="hideFromLaunchpad",v5="showInLaunchpad",y5="load",Rb="share",Lb="manage",_b="details",Ec="edit",rg=e=>(e??"").trim().replace(/\s+/g," "),xo=e=>(e==null?void 0:e.accessLevel)==="public"||(e==null?void 0:e.accessLevel)==="shared",Lf=(e,t,n)=>{if(t)return xo(e)?`Public ${n}`:`Private ${n}`},Mb=e=>!xo(e)||!!(e!=null&&e.canEdit),Db=e=>!xo(e)||!!(e!=null&&e.canEdit),b5=e=>{var o;const t=e==null?void 0:e.owner,n=(o=globalThis.iodesktop??globalThis.glue42gd)==null?void 0:o.user;return!(!t||!n)&&t===n},w5=(e,t,n)=>{if(!xo(e))return{heading:`Delete "${t}"`,text:`Are you sure you want to delete this ${n}?`};const o=n.toLowerCase(),r=`Are you sure you want to delete "${t}" ${o}?`;return b5(e)?{heading:r,text:`Deleting this ${o} will remove it from all users.`}:{heading:r,text:`This ${o} is owned by ${e!=null&&e.owner?`"${e.owner}"`:"another user"}. Deleting it will remove it from all users, including the owner.`}},x5=(e,t)=>{const n=t.toLowerCase();return{heading:`Are you sure you want to delete "${e}" ${n}?`,text:`Its sharing settings couldn't be loaded. If this ${n} is public or shared, deleting it will remove it from all users.`}},Bb=(e,t)=>xo(e)?Mb(e)?[{name:t.MANAGE,displayName:"Manage",icon:"users-gear",separatorAfter:!0}]:[{name:t.DETAILS,displayName:"Details",icon:"square-list",separatorAfter:!0}]:[{name:t.SHARE,displayName:"Publish",icon:"up-from-line"},{name:t.EDIT,displayName:"Edit",icon:"pen-line",separatorAfter:!0}],Hb=(e,t)=>xs.compare(e.title,t.title),Gb=e=>[...e].sort(Hb),C5=(e,t,n,o=Gb)=>{const r=new Map,i=[];return e.forEach(s=>{const c=rg(t(s));if(!c)return void i.push(s);const l=(p=>rg(p).toLowerCase())(c),u=r.get(l);r.set(l,{title:u&&u.title<c?u.title:c,items:[...(u==null?void 0:u.items)??[],s]})}),[...Array.from(r.entries()).map(([s,{title:c,items:l}])=>({id:s,title:c,isCollapsible:!0,items:o(l).map(n)})).sort(Hb),...o(i).map(n)]},Wb=(e,t,n)=>{const{getAccessInfo:o,getFolder:r,toItemShell:i,filterPublicItems:a=p=>p,sortLeafItems:s=Gb}=n;if(!t)return s(e).map(i);const c=a(e.filter(p=>xo(o(p)))),l=e.filter(p=>!xo(o(p))),u=(p,f,h)=>h.length>0?[{id:p,title:f,isCollapsible:!0,items:C5(h,r,i,s)}]:[];return[...u("public","Public",c),...u("private","Private",l)]},I5={[Rb]:"share-layout",[Lb]:"manage-layout",[_b]:"details-layout",[Ec]:"edit-layout"},_f=e=>I5[e],ig=e=>xo(e.accessInfo),Gl=(e,t)=>Lf(e.accessInfo,t,"Layout"),k5=new Set([Nb,Pb,Ob]),Is=(e,t)=>{const n=t&&ig(e),o=!n||Db(e.accessInfo),r=t&&!ig(e),i=t?Bb(e.accessInfo,{SHARE:Rb,MANAGE:Lb,DETAILS:_b,EDIT:Ec}):[],a=i.find(u=>u.name===Ec),s=i.filter(u=>u.name!==Ec).map((u,p,f)=>p===f.length-1?{...u,separatorAfter:!0}:u),c=[...r?[]:[{name:Nb,displayName:"Rename",icon:"pen-line"}],...a?[{...a,separatorAfter:!1}]:[],{name:Pb,displayName:"Save",disabled:!e.isActive,icon:"floppy"},{name:Ob,displayName:"Save as",icon:"floppy-disk-pen"},...n?[{name:Tb,displayName:"Save a Private Copy",icon:"floppy-disk-pen"}]:[],{name:y5,displayName:"Load",icon:"spinner",separatorAfter:!0},{name:h5,displayName:"Set as Default",disabled:e.isDefault,icon:"user-gear"},{name:m5,displayName:e.isFavorite?"Remove from Favorites":"Add to Favorites",icon:e.isFavorite?"fav-remove":"fav-add",separatorAfter:!n},...n?[e.isHidden?{name:v5,displayName:"Show in Launchpad",icon:"visible",separatorAfter:!0}:{name:g5,displayName:"Hide from Launchpad",icon:"hidden",separatorAfter:!0}]:[],...s,...o?[{name:f5,displayName:"Delete",icon:"trash-can"}]:[]].filter(u=>!n||!k5.has(u.name)),l=c.length-1;return c.map((u,p)=>p===l?{...u,separatorAfter:!1}:u)},S5=e=>{var t;return{id:mt(e),title:e.name,type:no,icon:"layout",iconSrc:((t=e.metadata)==null?void 0:t.icon)||void 0,accessInfo:e.accessInfo}},Vb=(e,t)=>e.map(n=>yr(n)?{...n,items:Vb(n.items,t)}:((o,{activeLayout:r,defaultLayout:i,isLayoutSharingEnabled:a,hiddenLayoutIds:s,favoriteLayoutIds:c})=>{const l=!!r&&o.id===mt(r),u=!!i&&o.id===mt(i),p=s.has(o.id),f=c.has(o.id),h=o.accessInfo,m={id:o.id,name:o.title,isActive:l,isDefault:u,isHidden:p,isFavorite:f,accessInfo:h};return{...o,isSelected:l,className:p?"is-hidden-item":void 0,statusPill:u?{variant:"default",text:"Default"}:void 0,contextMenuSubtitle:Gl(m,a),contextMenuActions:Is(m,a)}})(n,t)),Do={NO_INPUTS_CONFIRMATION_DIALOG:"noInputsConfirmationDialog",SINGLE_CHECKBOX_DIALOG:"singleCheckboxDialog",SINGLE_TEXT_INPUT_DIALOG:"singleTextInputDialog"},Va="(.|\\s)*\\S(.|\\s)*",ag=e=>e==="public"||e==="shared",sg=new WeakMap;function A5(e){if(!e||!vi(e))return Promise.resolve(!1);const t=sg.get(e);if(t&&(t.retryAt===void 0||Date.now()<t.retryAt))return t.support;const n={support:Promise.resolve(!1)};return n.support=async function(o){const r=o.manager;if(!(r!=null&&r.checkCapability))return!1;const[i,a]=await Promise.all([r.checkCapability("ADVANCED_LAYOUTS"),r.checkCapability("API_METHOD_LAYOUTS_CHECK_CONFLICT")]);return(i==null?void 0:i.available)===!0&&(a==null?void 0:a.available)===!0}(e).catch(o=>(console.error("getConflictCheckSupport: Failed to check capabilities.",o),!1)).then(o=>(o||(n.retryAt=Date.now()+1e4),o)),sg.set(e,n),n.support}async function Wl({io:e,type:t,name:n,targetAccessLevel:o,excludeId:r}){if(await A5(e)){const{conflict:i}=await e.manager.layouts.checkConflict({id:r,type:t,name:n,accessLevel:o});return i?"taken":"available"}return ag(o)?"unverifiable":(await zt(e).getMany({type:t,name:n,includeAccessInfo:!0})).some(i=>{var a;return i.id!==r&&!ag((a=i.accessInfo)==null?void 0:a.accessLevel)})?"taken":"available"}const Fb="Unable to verify name uniqueness - required capability is not available.";async function ap(e,t,n,o,r="Global"){var f;const i=r==="Workspace"?"Workspace":"Layout",a=await Wl({io:e,type:r,name:n,targetAccessLevel:(o==null?void 0:o.accessLevel)??"private"});if(a!=="available")return{success:!1,conflictMessage:a==="taken"?`Failed to save ${i} as "${n}". A ${i} with this name already exists.`:`Failed to save ${i} as "${n}". ${Fb}`};const s=zt(e),c=await s.get({id:t.id,includeComponents:!0,includeContext:!0});if(!c)return{success:!1,conflictMessage:`Failed to save ${i} "${t.name}". The ${i} wasn't found.`};const{imported:l,errors:u}=await s.import([{name:n,type:r,context:c.context,metadata:c.metadata,components:c.components,...o?{accessInfo:o}:{}}],"merge");return u!=null&&u.length?{success:!1,conflictMessage:`Failed to save ${i} as "${n}".`}:{success:!0,savedLayoutId:(f=l.find(h=>h.name===n))==null?void 0:f.id}}async function zb(e,t,n="Global",o="private"){const r=`${t} copy`;try{const i=async a=>await Wl({io:e,type:n,name:a,targetAccessLevel:o})!=="available";if(!await i(r))return r;for(let a=1;a<=20;a++){const s=`${r} ${a}`;if(!await i(s))return s}return r}catch(i){return console.warn(`Failed to determine an available copy name for ${n==="Workspace"?"Workspace":"Layout"} "${t}".`,i),r}}const cg="delete",lg="do-not-ask-again";async function $b(e,t,n,o,r){var a;let i=o;if(!i&&t){try{i=(a=await zt(e).get({id:t,includeAccessInfo:!0}))==null?void 0:a.accessInfo}catch(s){console.warn(`Failed to load the access info of ${r} "${n}".`,s)}if(!i)return{isPublic:!0,...x5(n,r)}}return{isPublic:xo(i),...w5(i,n,r)}}async function Zb(e,t){if(!t.id)return void await e.layouts.save({name:t.name,type:"Global"});const n=zt(e),{metadata:o}=await n.get({id:t.id})??{};await n.save({id:t.id,name:t.name,type:"Global",...o?{metadata:o}:{}})}const E5={delete:async e=>{var a;const{io:t,layout:n,showDeletePromptPref:o,updateShowDeletePromptPref:r}=e,i=await $b(t,n.id,n.name,n.accessInfo,"Layout");if("modals"in t&&t.modals&&(o||i.isPublic)){const{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await t.modals.dialogs.request(function({isPublic:p,heading:f,text:h}){const m=[{variant:"critical",text:"Delete",id:cg},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}];return p?{templateName:Do.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:f,text:h,actionButtons:m}}:{templateName:Do.SINGLE_CHECKBOX_DIALOG,variables:{heading:f,text:h,checkbox:{id:lg,label:"Don't ask me again"},actionButtons:m}}}(i));if(((a=l==null?void 0:l.find(p=>p.id===lg))==null?void 0:a.checked)&&r(!1),!(s||(c==null?void 0:c.id)===cg))return}try{if(n.id){const s=zt(t);await s.remove({id:n.id}),n.isDefault&&await s.default.clear()}else await t.layouts.remove("Global",n.name),n.isDefault&&await t.layouts.clearDefaultGlobal();await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully deleted.`})}catch(s){await De({io:t,variant:ot,text:`Failed to delete Layout "${n.name}".`,error:s})}},rename:async e=>{var u;const{io:t,layout:n,setDefaultLayout:o}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot rename Layout because io dialogs are not enabled");const r="rename",i="new-layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Rename "${n.name}"`,input:{id:i,initialValue:n.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Rename",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))if(l!==n.name)try{const p=n.id?await async function(f,h,m,g){var x;const y=await Wl({io:f,type:"Global",name:m,targetAccessLevel:((x=h.accessInfo)==null?void 0:x.accessLevel)??"private",excludeId:h.id});return y!=="available"?{success:!1,conflictMessage:y==="taken"?`Failed to rename Layout "${h.name}" to "${m}". A Layout with name "${m}" already exists.`:`Failed to rename Layout "${h.name}". ${Fb}`}:(await zt(f).rename({id:h.id},m),h.isDefault&&await g({id:h.id,name:m}),{success:!0})}(t,n,l,o):await async function(f,h,m,g){const y=f.layouts;if((await y.getAll("Global")).some(C=>C.name===m))return{success:!1,conflictMessage:`Failed to rename Layout "${h.name}" to "${m}". A Layout with name "${m}" already exists.`};const x=await y.get(h.name,"Global");return x?(await y.rename(x,m),h.isDefault&&await g({name:m}),{success:!0}):{success:!1,conflictMessage:`Failed to rename Layout "${h.name}". The Layout wasn't found.`}}(t,n,l,o);if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully renamed to "${l}".`})}catch(p){await De({io:t,variant:ot,text:`Failed to rename Layout "${n.name}".`,error:p})}else await De({io:t,variant:ot,text:`Failed to rename Layout "${n.name}". The new Layout name must be different from the current one.`})},save:async e=>{const{io:t,layout:n}=e;try{await Zb(t,n),await De({io:t,variant:Rn,text:`Layout "${n.name}" saved successfully`})}catch(o){await De({io:t,variant:ot,text:`Failed to save layout "${n.name}"`,error:o})}},saveAs:async e=>{var u;const{io:t,layout:n,setActiveLayout:o}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot save Layout under a new name because io dialogs are not enabled");const r="save-as",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save Layout "${n.name}" as`,input:{id:i,initialValue:n.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save as",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))try{const p=n.id?await ap(t,n,l):await async function(f,h,m){const g=f.layouts;if((await g.getAll("Global")).some(x=>x.name===m))return{success:!1,conflictMessage:`Failed to save Layout as "${m}". A Layout with this name already exists.`};const y=await g.get(h.name,"Global");return y?(await g.import([{...y,name:m}],"merge"),{success:!0}):{success:!1,conflictMessage:`Failed to save Layout "${h.name}". The Layout wasn't found.`}}(t,n,l);if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});n.isActive&&o({id:p.savedLayoutId,name:l}),await De({io:t,variant:Rn,text:`The Layout was successfully saved as "${l}".`})}catch(p){await De({io:t,variant:ot,text:`Failed to save Layout "${l}".`,error:p})}},savePrivateCopy:async e=>{var u;const{io:t,layout:n}=e;if(!n.id)return void console.error("Cannot save a private copy because the Layout has no id");if(!("modals"in t)||!t.modals)return void console.error("Cannot save a private copy because io dialogs are not enabled");const o=await zb(t,n.name),r="save-private-copy",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save a private copy of the layout "${n.name}"`,input:{id:i,initialValue:o,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))try{const p=await ap(t,n,l,{accessLevel:"private"});if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});await De({io:t,variant:Rn,text:`Layout "${l}" saved successfully`})}catch(p){await De({io:t,variant:ot,text:`Failed to save layout "${n.name}"`,error:p})}},setAsDefault:async e=>{const{io:t,layout:n,setDefaultLayout:o}=e;try{await o({id:n.id,name:n.name}),await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully set as the default Layout.`})}catch{await De({io:t,variant:ot,text:`Failed to set Layout "${n.name}" as the default Layout.`})}},toggleFavorite:async e=>{var r;const{layout:t,isLayoutSharingEnabled:n,toggleFavorite:o}=e;await o({id:mt(t),title:t.name,type:no,icon:"layout",iconSrc:((r=t.metadata)==null?void 0:r.icon)||void 0,contextMenuActions:Is({...t,isFavorite:!0},n)})},hideFromLaunchpad:async e=>{const{layout:t,hideLayout:n}=e;try{await n({id:t.id,name:t.name})}catch(o){console.warn(`Failed to hide Layout "${t.name}" from the Launchpad.`,o)}},showInLaunchpad:async e=>{const{layout:t,showLayout:n}=e;try{await n({id:t.id,name:t.name})}catch(o){console.warn(`Failed to show Layout "${t.name}" in the Launchpad.`,o)}},load:async e=>{const{io:t,layout:n,closeLaunchpadIfNotPinned:o}=e;try{o(),n.id?await zt(t).restore({id:n.id}):await t.layouts.restore({name:n.name}),await De({io:t,variant:Rn,text:`Layout "${n.name}" was loaded successfully.`})}catch(r){await De({io:t,variant:ot,text:`Failed to load Layout "${n.name}".`,error:r})}}},ug=new Rf,Xb=({prefKey:e,getIdentity:t})=>{const{value:n,update:o,isLoading:r}=St({prefKey:e}),i=v.useMemo(()=>n??[],[n]),a=v.useCallback(l=>i.some(u=>t(u)===t(l)),[i,t]),s=v.useCallback(l=>ug.enqueue(()=>o((u=[])=>u.some(p=>t(p)===t(l))?u:[...u,l])),[o,t]),c=v.useCallback(l=>ug.enqueue(()=>o((u=[])=>u.filter(p=>t(p)!==t(l)))),[o,t]);return{hiddenItems:i,isItemHidden:a,hideItem:s,showItem:c,isLoading:r}},ks=()=>{const{hiddenItems:e,isItemHidden:t,hideItem:n,showItem:o,isLoading:r}=Xb({prefKey:yb,getIdentity:mt});return{hiddenLayouts:e,isLayoutHidden:t,hideLayout:n,showLayout:o,isLoading:r}};function Pn(){const e=v.useContext(Se.IOConnectContext);return v.useMemo(()=>vi(e),[e])}const Vl=()=>{const e=v.useContext(Se.IOConnectContext),{setActiveLayout:t,setDefaultLayout:n}=to(),o=Pn(),{value:r,update:i}=St({prefKey:Nf}),a=ws(),{hideLayout:s,showLayout:c}=ks(),{toggleFavorite:l}=Eo();return v.useCallback(async p=>{const{layout:f,actionName:h}=p;return await E5[h]({io:e,layout:f,setActiveLayout:t,setDefaultLayout:n,showDeletePromptPref:r,updateShowDeletePromptPref:i,closeLaunchpadIfNotPinned:a,hideLayout:s,showLayout:c,isLayoutSharingEnabled:o,toggleFavorite:l})},[e,n,t,a,r,i,s,c,o,l])},aa=()=>{const{isLayoutOperationBlocked:e,setIsLayoutOperationBlocked:t}=to();return v.useCallback(async n=>{if(!e){t(!0);try{await n()}catch(o){console.error("Layout operation failed: ",{error:o})}t(!1)}},[e,t])},Ub="openInNewWindow",Jb="toggleFavorite",Yb="savePrivateCopy",Kb="hideFromLaunchpad",qb="showInLaunchpad",Qb="delete",e1="share",t1="manage",n1="details",jc="edit",j5={[e1]:"share-workspace",[t1]:"manage-workspace",[n1]:"details-workspace",[jc]:"edit-workspace"},o1=e=>j5[e],Mf=(e,t)=>Lf(e,t,"Workspace"),Fl=(e,t,n,o)=>{const r=n&&xo(e),i=!r||Db(e),a=n?Bb(e,{SHARE:e1,MANAGE:t1,DETAILS:n1,EDIT:jc}):[],s=a.find(p=>p.name===jc),c=a.filter(p=>p.name!==jc).map((p,f,h)=>f===h.length-1?{...p,separatorAfter:!0}:p),l=[{name:Ub,displayName:"Open in a new window",icon:"pop-out",separatorAfter:!0},...s?[{...s,separatorAfter:!0}]:[],...r?[{name:Yb,displayName:"Save a Private Copy",icon:"floppy-disk-pen",separatorAfter:!0}]:[],{name:Jb,displayName:t?"Remove from Favorites":"Add to Favorites",icon:t?"fav-remove":"fav-add",separatorAfter:!r},...r?[o?{name:qb,displayName:"Show in Launchpad",icon:"visible",separatorAfter:!0}:{name:Kb,displayName:"Hide from Launchpad",icon:"hidden",separatorAfter:!0}]:[],...c,...i?[{name:Qb,displayName:"Delete",icon:"trash-can"}]:[]],u=l.length-1;return l.map((p,f)=>f===u?{...p,separatorAfter:!1}:p)},N5=e=>{var t;return{id:fi(e),title:e.title,type:Xo,icon:"workspace",iconSrc:((t=e.metadata)==null?void 0:t.icon)||void 0,accessInfo:e.accessInfo}},r1=(e,t)=>e.map(n=>yr(n)?{...n,items:r1(n.items,t)}:((o,{isFavorite:r,getOpenInstances:i,isWorkspaceSharingEnabled:a,hiddenWorkspaceIds:s})=>{const c=o.accessInfo,l=s.has(o.id);return{...o,openInstances:i(o.title),className:l?"is-hidden-item":void 0,contextMenuSubtitle:Mf(c,a),contextMenuActions:Fl(c,r(o.id),a,l)}})(n,t)),P5={[Ub]:async e=>{const{io:t,item:n,isWorkspaceSharingEnabled:o,closeLaunchpadIfNotPinned:r}=e;if(t.workspaces)try{r();const i=zt(t);o&&i?await np(t.workspaces,n.id,{newFrame:!0}):await t.workspaces.restoreWorkspace(n.title,{newFrame:!0})}catch(i){await De({io:t,variant:ot,text:`Failed to load Workspace "${n.title}".`,error:i})}},[Qb]:async e=>{const{io:t,item:n,isWorkspaceSharingEnabled:o,removeFavorite:r,closeLaunchpadIfNotPinned:i}=e;if(t.workspaces){if("modals"in t&&t.modals){const a="delete",s=await $b(t,o?n.id:void 0,n.title,n.accessInfo,"Workspace"),{isEnterPressed:c,responseButtonClicked:l}=await t.modals.dialogs.request({templateName:Do.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:s.heading,text:s.text,actionButtons:[{variant:"critical",text:"Delete",id:a},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(!(c||(l==null?void 0:l.id)===a))return}try{i();const a=zt(t);o&&a?await a.remove({id:n.id}):await t.workspaces.layouts.delete(n.title),await r(n),await De({io:t,variant:Rn,text:`"Workspace ${n.title}" was successfully deleted.`})}catch(a){await De({io:t,variant:ot,text:`Failed to delete Workspace "${n.title}".`,error:a})}}},[Jb]:async e=>{const{item:t,isWorkspaceSharingEnabled:n,isWorkspaceHidden:o,toggleFavorite:r}=e;await r({...t,contextMenuActions:Fl(t.accessInfo,!0,n,o(t))})},[Yb]:async e=>{var p;const{io:t,item:n}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot save a private copy because io dialogs are not enabled");if(!zt(t))return void console.error("Cannot save a private copy because the V2 Layouts API is not available");const o=n.id;if(!o)return void console.error(`Cannot save a private copy because Workspace "${n.title}" was not found`);const r=await zb(t,n.title,"Workspace"),i="save-private-copy",a="workspace-name",{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save a private copy of the workspace "${n.title}"`,input:{id:a,initialValue:r,validation:{disabledButtonIds:[i],errorMessage:"Please provide a Workspace name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save",id:i},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(p=l==null?void 0:l.find(f=>f.id===a))==null?void 0:p.value;if(u&&(s||(c==null?void 0:c.id)===i))try{const f=await ap(t,{id:o,name:n.title},u,{accessLevel:"private"},"Workspace");if(!f.success)return void await De({io:t,variant:ot,text:f.conflictMessage});await De({io:t,variant:Rn,text:`Workspace "${u}" saved successfully`})}catch(f){await De({io:t,variant:ot,text:`Failed to save workspace "${n.title}"`,error:f})}},[Kb]:async e=>{const{item:t,hideWorkspace:n}=e;try{await n({id:t.id,title:t.title})}catch(o){console.warn(`Failed to hide Workspace "${t.title}" from the Launchpad.`,o)}},[qb]:async e=>{const{item:t,showWorkspace:n}=e;try{await n({id:t.id,title:t.title})}catch(o){console.warn(`Failed to show Workspace "${t.title}" in the Launchpad.`,o)}}},O5=e=>e.id,zl=()=>{const{hiddenItems:e,isItemHidden:t,hideItem:n,showItem:o,isLoading:r}=Xb({prefKey:bb,getIdentity:O5});return{hiddenWorkspaces:e,isWorkspaceHidden:t,hideWorkspace:n,showWorkspace:o,isLoading:r}},i1=()=>{const e=v.useContext(Se.IOConnectContext),{removeFavorite:t,toggleFavorite:n}=Eo(),o=ws(),r=Pn(),{isWorkspaceHidden:i,hideWorkspace:a,showWorkspace:s}=zl();return v.useCallback((c,l)=>{P5[l]({io:e,item:c,isWorkspaceSharingEnabled:r,removeFavorite:t,toggleFavorite:n,isWorkspaceHidden:i,hideWorkspace:a,showWorkspace:s,closeLaunchpadIfNotPinned:o})},[e,r,t,n,i,a,s,o])},Df=()=>{const{value:e,update:t,isLoading:n,error:o}=St({prefKey:ib});return{error:o,isLaunchpadCollapsed:e,setIsLaunchpadCollapsed:t,isLoading:n}},Bf=e=>{const{handler:t,skip:n}=e;v.useEffect(()=>{if(n)return;const o=r=>{setTimeout(()=>{var i;((i=document.activeElement)==null?void 0:i.nodeName)==="IFRAME"&&t(r)},0)};return window.addEventListener("blur",o,!0),()=>{window.removeEventListener("blur",o,!0)}},[t,n])},Hf=e=>{const{eventType:t,handler:n,ref:o,skip:r}=e;v.useEffect(()=>{if(r)return;const i=a=>{const s=a.target;(Array.isArray(o)?o.every(l=>l.current&&!l.current.contains(s)):o.current&&!o.current.contains(s))&&n(a)};return document.addEventListener(t,i,!0),()=>{document.removeEventListener(t,i,!0)}},[t,n,o,r])},Gf=()=>{const[e,t]=v.useState([]);return v.useEffect(()=>{const n=({key:i})=>{t(a=>a.includes(i)?a:a.concat(i))},o=i=>{t(a=>a.filter(s=>s!==i.key))},r=()=>{t([])};return document.addEventListener("keydown",n),document.addEventListener("keyup",o),window.addEventListener("blur",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",o),window.removeEventListener("blur",r)}},[]),e.length===1?e[0]:null},dg=e=>`${e.type.name}:${e.id}`,T5=e=>{const[t,n]=v.useState([]),[o,r]=v.useState(!0),i=v.useRef(0),a=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{const s=a==null?void 0:a.search;if(!s)return;const c=[],l=[],u=++i.current;let p=!1;const f=()=>p||u!==i.current;return(async h=>{let m;r(!0),n([]);try{m=await s.query({search:h.trim(),providerLimits:{maxResults:100,maxResultsPerType:5}})}catch(C){return void(f()||(console.error("Search query failed to initialize:",C),r(!1)))}if(f())return;const g=m.onResults(C=>{f()||(((w,I)=>{const b=new Set(w.map(k=>dg(k)));for(const k of I){const S=dg(k);b.has(S)||(w.push(k),b.add(S))}})(l,C.results),r(!1),n([...l]))}),y=m.onCompleted(()=>{f()||r(!1)}),x=m.onError(C=>{f()||(console.error(`Query failed. Provider: ${C.provider}; Error: ${C.error}`),r(!1))});c.push(g,y,x)})(e),()=>{p=!0,c.forEach(h=>h())}},[a,e]),{resultsToRender:t,isLoading:o}},Wf=()=>{const e=v.useContext(Se.IOConnectContext),t=async({id:o})=>{var r;await((r=e.appManager.application(o))==null?void 0:r.start())},n=async({id:o,modifier:r})=>{var c,l;const i=await((c=e.workspaces)==null?void 0:c.getWorkspace(u=>u.isSelected===!0)),a=i==null?void 0:i.children[0];if(r===Qy||!i||(a==null?void 0:a.type)==="window")return void await((l=e.appManager.application(o))==null?void 0:l.start());await((a==null?void 0:a.type)==="group"?a:await(a??i).addGroup()).addWindow({appName:o})};return async o=>{try{await(Zo()?t:n)(o)}catch(r){await De({io:e,variant:ot,text:`Failed to start app "${o.title}".`,error:r})}}},R5={byTitle:{},byLayoutId:{}};function a1(e,t){var n;return t?(n=e.byLayoutId[t])==null?void 0:n.values().next().value:void 0}function pg(e,t){const n={...e.byTitle},o={...e.byLayoutId};return t.forEach(r=>{n[r.title]=n[r.title]??new Set,n[r.title].add(r.id),r.layoutId&&(o[r.layoutId]=o[r.layoutId]??new Set,o[r.layoutId].add(r.id))}),{byTitle:n,byLayoutId:o}}const s1=()=>{const[e,t]=v.useState(R5),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{const o=n.workspaces,r=[];let i=!1;if(o)return(async()=>{const a=new Set;try{const s=await o.onWorkspaceOpened(l=>t(u=>pg(u,[l]))),c=await o.onWorkspaceClosed(({workspaceId:l})=>{a.add(l),t(u=>function(p,f){const h={...p.byTitle};for(const g in h)if(h[g].has(f)){h[g].delete(f);break}const m={...p.byLayoutId};for(const g in m)if(m[g].has(f)){m[g].delete(f),m[g].size===0&&delete m[g];break}return{byTitle:h,byLayoutId:m}}(u,l))});if(i)return s==null||s(),void(c==null?void 0:c());r.push(s,c)}catch(s){console.error(s)}try{const s=await o.getAllWorkspaces();if(i)return;const c=s.filter(l=>!a.has(l.id));t(l=>pg(l,c))}catch(s){console.error(s)}})(),()=>{i=!0,r.forEach(a=>a==null?void 0:a())}},[n]),e};function Vf(e){const{title:t,subtitle:n,buttonSize:o="16",icon:r="ellipsis-vertical",iconSize:i="12",actions:a,isTabStop:s,onActionItemClick:c,buttonVariant:l,placement:u,strategy:p,offset:f,shouldCloseOnOutsideScroll:h=!1,shouldCloseOnWindowBlur:m=!1,shouldCloseOnWindowResize:g=!1,"data-testid":y,contextMenuDataTestId:x}=e,[C,w]=v.useState(!1),[I,b]=v.useState(null),[k,S]=v.useState(null),E=v.useRef(null),O=v.useRef(null),A=v.useMemo(()=>[O,E],[]),N=v.useCallback(()=>w(!1),[]),j=v.useMemo(()=>[{name:"offset",options:{offset:f}}],[f]),{styles:G,attributes:M}=Jy(I,k,{placement:u,strategy:p,modifiers:j});return v.useEffect(()=>{E.current=I},[I]),v.useEffect(()=>{O.current=k},[k]),Hf({eventType:"mouseup",handler:N,ref:A,skip:!C}),Bf({handler:N,skip:!C}),v.useEffect(()=>{if(m&&C)return window.addEventListener("blur",N),()=>{window.removeEventListener("blur",N)}},[N,C,m]),v.useEffect(()=>{if(!h||!k)return;const T=H=>{k.contains(H.target)?H.preventDefault():N()};return document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("wheel",T,{passive:!1}),()=>{document.removeEventListener("touchmove",T),document.removeEventListener("wheel",T)}},[N,k,h]),v.useEffect(()=>{if(g&&C)return window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}},[N,C,g]),d.jsxs(d.Fragment,{children:[d.jsx(Ue,{ref:b,size:o,icon:r,iconSize:i,variant:l,...pf(T=>{T.stopPropagation(),w(H=>!H),k==null||k.focus({preventScroll:!0})}),tabIndex:s?0:-1,"data-testid":y}),C&&d.jsx(Sf,{ref:S,title:t,subtitle:n,actions:a,onActionItemClick:(T,H)=>{T.stopPropagation(),c(T,H),N()},onClose:()=>{I==null||I.focus(),N()},style:G.popper,"data-testid":x,...M.popper})]})}function L5({className:e,size:t="large",variant:n="default",align:o="up",text:r,...i}){const a=te("io-loader",{[`io-loader-${n}`]:n!=="default"},t==="normal"&&"io-loader-md",t==="small"&&"io-loader-sm",o&&[`direction-${o}`],e);return d.jsxs("div",{className:a,role:"status","aria-live":"polite",...i,children:[d.jsx("div",{className:"io-loader-icon"}),r&&d.jsx("div",{className:"io-loader-text",children:r})]})}function pr({className:e,children:t,...n}){const o=te("io-panel-header",e);return d.jsx(cn,{className:o,...n,children:t})}pr.Title=bo,pr.ButtonGroup=We,pr.Button=Ze,pr.ButtonIcon=Ue,pr.Dropdown=fe;const Yi=v.forwardRef(({className:e,children:t,...n},o)=>{const r=te("io-panel-body",e);return d.jsx("div",{className:r,ref:o,"data-testid":"panel-body",...n,children:t})});function ji({className:e,...t}){const n=te("io-panel-footer",e);return d.jsx(hr,{className:n,...t})}function ze({className:e,children:t,...n}){const o=te("io-panel",e);return d.jsx("div",{className:o,"data-testid":"panel",...n,children:t})}function Ss({className:e,variant:t="default",children:n,...o}){const r=te("io-pill",t!=="default"&&[`io-pill-${t}`],e);return d.jsx("div",{className:r,role:"status",...o,children:n})}function _5({className:e,variant:t="active",value:n=0,...o}){const r=te("io-progress",t,e);let i;return i=n<0?0:n>100?100:n,d.jsx("div",{className:r,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...o,children:d.jsx("div",{className:"io-progress-bar",style:{width:`${i}%`}})})}/*!
8
+ */var $c=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),xy=typeof Element>"u",$i=xy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cc=!xy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Zc=function(e,t){var n;t===void 0&&(t=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert");return o===""||o==="true"||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Zc(e.parentNode))},Fd=function(e,t,n){for(var o=[],r=Array.from(e);r.length;){var i=r.shift();if(!Zc(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),s=a.length?a:i.children,c=Fd(s,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{$i.call(i,$c)&&n.filter(i)&&(t||!e.includes(i))&&o.push(i);var l=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),u=!Zc(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(l&&u){var p=Fd(l===!0?i.children:l.children,!0,n);n.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else r.unshift.apply(r,i.children)}}return o},Cy=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Iy=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"}(e))&&!Cy(e)?0:e.tabIndex},Ek=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ky=function(e){return e.tagName==="INPUT"},jk=function(e){return function(t){return ky(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,o=t.form||Cc(t),r=function(a){return o.querySelectorAll('input[type="radio"][name="'+a+'"]')};if(typeof window<"u"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=r(window.CSS.escape(t.name));else try{n=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(a,s){for(var c=0;c<a.length;c++)if(a[c].checked&&a[c].form===s)return a[c]}(n,t.form);return!i||i===t}(e)},lm=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return n===0&&o===0},Pk=function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility==="hidden")return!0;var r=$i.call(e,"details>summary:first-of-type")?e.parentElement:e;if($i.call(r,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return lm(e)}else{if(typeof o=="function"){for(var i=e;e;){var a=e.parentElement,s=Cc(e);if(a&&!a.shadowRoot&&o(a)===!0)return lm(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(c){var l,u,p,f,h=c&&Cc(c),m=(l=h)===null||l===void 0?void 0:l.host,g=!1;if(h&&h!==c)for(g=!!((u=m)!==null&&u!==void 0&&(p=u.ownerDocument)!==null&&p!==void 0&&p.contains(m)||c!=null&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(c));!g&&m;){var y,x,C;g=!((x=m=(y=h=Cc(m))===null||y===void 0?void 0:y.host)===null||x===void 0||(C=x.ownerDocument)===null||C===void 0||!C.contains(m))}return g}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Nk=function(e,t){return!(t.disabled||function(n){return ky(n)&&n.type==="hidden"}(t)||Pk(t,e)||function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(o){return o.tagName==="SUMMARY"})}(t)||function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var o=n.parentElement;o;){if(o.tagName==="FIELDSET"&&o.disabled){for(var r=0;r<o.children.length;r++){var i=o.children.item(r);if(i.tagName==="LEGEND")return!!$i.call(o,"fieldset[disabled] *")||!i.contains(n)}return!0}o=o.parentElement}return!1}(t))},zd=function(e,t){return!(jk(t)||Iy(t)<0||!Nk(e,t))},Ok=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Sy=function(e){var t=[],n=[];return e.forEach(function(o,r){var i=!!o.scopeParent,a=i?o.scopeParent:o,s=function(l,u){var p=Iy(l);return p<0&&u&&!Cy(l)?0:p}(a,i),c=i?Sy(o.candidates):a;s===0?i?t.push.apply(t,c):t.push(a):n.push({documentOrder:r,tabIndex:s,item:o,isScope:i,content:c})}),n.sort(Ek).reduce(function(o,r){return r.isScope?o.push.apply(o,r.content):o.push(r.content),o},[]).concat(t)},vf=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Fd([e],t.includeContainer,{filter:zd.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ok}):function(o,r,i){if(Zc(o))return[];var a=Array.prototype.slice.apply(o.querySelectorAll($c));return r&&$i.call(o,$c)&&a.unshift(o),a.filter(i)}(e,t.includeContainer,zd.bind(null,t)),Sy(n)};function um(e,t,n){let{reference:o,floating:r}=e;const i=mr(t),a=wy(t),s=by(a),c=ui(t),l=i==="y",u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let h;switch(c){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}switch(Tl(t)){case"start":h[a]-=f*(n&&l?-1:1);break;case"end":h[a]+=f*(n&&l?-1:1)}return h}async function Tk(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=Ol(t,e),m=function(b){return typeof b!="number"?function(k){return{top:0,right:0,bottom:0,left:0,...k}}(b):{top:b,right:b,bottom:b,left:b}}(h),g=s[f?p==="floating"?"reference":"floating":p],y=zc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),x=p==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},I=zc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:c}):x);return{top:(y.top-I.top+m.top)/w.y,bottom:(I.bottom-y.bottom+m.bottom)/w.y,left:(y.left-I.left+m.left)/w.x,right:(I.right-y.right+m.right)/w.x}}const Rk=new Set(["left","top"]);function Ay(e){const t=Mn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=_t(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Fc(n)!==i||Fc(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function yf(e){return ht(e)?e:e.contextElement}function Gi(e){const t=yf(e);if(!_t(t))return go(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Ay(t);let a=(i?Fc(n.width):n.width)/o,s=(i?Fc(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Lk=go(0);function Ey(e){const t=kn(e);return Pl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Lk}function di(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=yf(e);let a=go(1);t&&(o?ht(o)&&(a=Gi(o)):a=Gi(e));const s=function(f,h,m){return h===void 0&&(h=!1),!(!m||h&&m!==kn(f))&&h}(i,n,o)?Ey(i):go(0);let c=(r.left+s.x)/a.x,l=(r.top+s.y)/a.y,u=r.width/a.x,p=r.height/a.y;if(i){const f=kn(i),h=o&&ht(o)?kn(o):o;let m=f,g=Hd(m);for(;g&&o&&h!==m;){const y=Gi(g),x=g.getBoundingClientRect(),C=Mn(g),w=x.left+(g.clientLeft+parseFloat(C.paddingLeft))*y.x,I=x.top+(g.clientTop+parseFloat(C.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,p*=y.y,c+=w,l+=I,m=kn(g),g=Hd(m)}}return zc({width:u,height:p,x:c,y:l})}function Xc(e,t){const n=Nl(e).scrollLeft;return t?t.left+n:di(mo(e)).left+n}function jy(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xc(e,n),y:n.top+t.scrollTop}}const _k=new Set(["absolute","fixed"]);function dm(e,t,n){let o;if(t==="viewport")o=function(r,i){const a=kn(r),s=mo(r),c=a.visualViewport;let l=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){l=c.width,u=c.height;const m=Pl();(!m||m&&i==="fixed")&&(p=c.offsetLeft,f=c.offsetTop)}const h=Xc(s);if(h<=0){const m=s.ownerDocument,g=m.body,y=getComputedStyle(g),x=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(s.clientWidth-g.clientWidth-x);C<=25&&(l-=C)}else h<=25&&(l+=h);return{width:l,height:u,x:p,y:f}}(e,n);else if(t==="document")o=function(r){const i=mo(r),a=Nl(r),s=r.ownerDocument.body,c=oi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),l=oi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let u=-a.scrollLeft+Xc(r);const p=-a.scrollTop;return Mn(s).direction==="rtl"&&(u+=oi(i.clientWidth,s.clientWidth)-c),{width:c,height:l,x:u,y:p}}(mo(e));else if(ht(t))o=function(r,i){const a=di(r,!0,i==="fixed"),s=a.top+r.clientTop,c=a.left+r.clientLeft,l=_t(r)?Gi(r):go(1);return{width:r.clientWidth*l.x,height:r.clientHeight*l.y,x:c*l.x,y:s*l.y}}(t,n);else{const r=Ey(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return zc(o)}function Py(e,t){const n=Ho(e);return!(n===t||!ht(n)||Ir(n))&&(Mn(n).position==="fixed"||Py(n,t))}function Mk(e,t,n){const o=_t(t),r=mo(t),i=n==="fixed",a=di(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=go(0);function l(){c.x=Xc(r)}if(o||!o&&!i)if((Or(t)!=="body"||Ya(r))&&(s=Nl(t)),o){const p=di(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=!r||o||i?go(0):jy(r,s);return{x:a.left+s.scrollLeft-c.x-u.x,y:a.top+s.scrollTop-c.y-u.y,width:a.width,height:a.height}}function Su(e){return Mn(e).position==="static"}function pm(e,t){if(!_t(e)||Mn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mo(e)===n&&(n=n.ownerDocument.body),n}function fm(e,t){const n=kn(e);if(Wc(e))return n;if(!_t(e)){let r=Ho(e);for(;r&&!Ir(r);){if(ht(r)&&!Su(r))return r;r=Ho(r)}return n}let o=pm(e,t);for(;o&&mk(o)&&Su(o);)o=pm(o,t);return o&&Ir(o)&&Su(o)&&!Bd(o)?n:o||function(r){let i=Ho(r);for(;_t(i)&&!Ir(i);){if(Bd(i))return i;if(Wc(i))return null;i=Ho(i)}return null}(e)||n}const Dk={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=mo(o),s=!!t&&Wc(t.floating);if(o===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=go(1);const u=go(0),p=_t(o);if((p||!p&&!i)&&((Or(o)!=="body"||Ya(a))&&(c=Nl(o)),_t(o))){const h=di(o);l=Gi(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=!a||p||i?go(0):jy(a,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}},getDocumentElement:mo,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?Wc(t)?[]:function(c,l){const u=l.get(c);if(u)return u;let p=kr(c,[],!1).filter(g=>ht(g)&&Or(g)!=="body"),f=null;const h=Mn(c).position==="fixed";let m=h?Ho(c):c;for(;ht(m)&&!Ir(m);){const g=Mn(m),y=Bd(m);y||g.position!=="fixed"||(f=null),(h?!y&&!f:!y&&g.position==="static"&&f&&_k.has(f.position)||Ya(m)&&!y&&Py(c,m))?p=p.filter(x=>x!==m):f=g,m=Ho(m)}return l.set(c,p),p}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce((c,l)=>{const u=dm(t,l,r);return c.top=oi(u.top,c.top),c.right=Vc(u.right,c.right),c.bottom=Vc(u.bottom,c.bottom),c.left=oi(u.left,c.left),c},dm(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:fm,getElementRects:async function(e){const t=this.getOffsetParent||fm,n=this.getDimensions,o=await n(e.floating);return{reference:Mk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ay(e);return{width:t,height:n}},getScale:Gi,isElement:ht,isRTL:function(e){return Mn(e).direction==="rtl"}};function hm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ny(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=yf(e),u=r||i?[...l?kr(l):[],...kr(t)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=l&&s?function(y,x){let C,w=null;const I=mo(y);function b(){var k;clearTimeout(C),(k=w)==null||k.disconnect(),w=null}return function k(S,E){S===void 0&&(S=!1),E===void 0&&(E=1),b();const N=y.getBoundingClientRect(),{left:A,top:P,width:j,height:G}=N;if(S||x(),!j||!G)return;const M={rootMargin:-Oi(P)+"px "+-Oi(I.clientWidth-(A+j))+"px "+-Oi(I.clientHeight-(P+G))+"px "+-Oi(A)+"px",threshold:oi(0,Vc(1,E))||1};let T=!0;function H(V){const z=V[0].intersectionRatio;if(z!==E){if(!T)return k();z?k(!1,z):C=setTimeout(()=>{k(!1,1e-7)},1e3)}z!==1||hm(N,y.getBoundingClientRect())||k(),T=!1}try{w=new IntersectionObserver(H,{...M,root:I.ownerDocument})}catch{w=new IntersectionObserver(H,M)}w.observe(y)}(!0),b}(l,n):null;let f,h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let g=c?di(e):null;return c&&function y(){const x=di(e);g&&!hm(g,x)&&n(),g=x,f=requestAnimationFrame(y)}(),n(),()=>{var y;u.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(f)}}const Bk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,c=await async function(l,u){const{placement:p,platform:f,elements:h}=l,m=await(f.isRTL==null?void 0:f.isRTL(h.floating)),g=ui(p),y=Tl(p),x=mr(p)==="y",C=Rk.has(g)?-1:1,w=m&&x?-1:1,I=Ol(u,l);let{mainAxis:b,crossAxis:k,alignmentAxis:S}=typeof I=="number"?{mainAxis:I,crossAxis:0,alignmentAxis:null}:{mainAxis:I.mainAxis||0,crossAxis:I.crossAxis||0,alignmentAxis:I.alignmentAxis};return y&&typeof S=="number"&&(k=y==="end"?-1*S:S),x?{x:k*w,y:b*C}:{x:b*C,y:k*w}}(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},Hk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:x=>{let{x:C,y:w}=x;return{x:C,y:w}}},...l}=Ol(e,t),u={x:n,y:o},p=await i.detectOverflow(t,l),f=mr(ui(r)),h=yy(f);let m=u[h],g=u[f];if(a){const x=h==="y"?"bottom":"right";m=am(m+p[h==="y"?"top":"left"],m,m-p[x])}if(s){const x=f==="y"?"bottom":"right";g=am(g+p[f==="y"?"top":"left"],g,g-p[x])}const y=c.fn({...t,[h]:m,[f]:g});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:a,[f]:s}}}}}},Gk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ol(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ui(r),C=mr(s),w=ui(s)===s,I=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=f||(w||!g?[$s(s)]:function(M){const T=$s(M);return[Vd(M),T,Vd(T)]}(s)),k=m!=="none";!f&&k&&b.push(...Ak(s,g,m,I));const S=[s,...b],E=await c.detectOverflow(t,y),N=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&N.push(E[x]),p){const M=function(T,H,V){V===void 0&&(V=!1);const z=Tl(T),O=wy(T),B=by(O);let F=O==="x"?z===(V?"end":"start")?"right":"left":z==="start"?"bottom":"top";return H.reference[B]>H.floating[B]&&(F=$s(F)),[F,$s(F)]}(r,a,I);N.push(E[M[0]],E[M[1]])}if(A=[...A,{placement:r,overflows:N}],!N.every(M=>M<=0)){var P,j;const M=(((P=i.flip)==null?void 0:P.index)||0)+1,T=S[M];if(T&&(!(p==="alignment"&&C!==mr(T))||A.every(V=>mr(V.placement)!==C||V.overflows[0]>0)))return{data:{index:M,overflows:A},reset:{placement:T}};let H=(j=A.filter(V=>V.overflows[0]<=0).sort((V,z)=>V.overflows[1]-z.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(h){case"bestFit":{var G;const V=(G=A.filter(z=>{if(k){const O=mr(z.placement);return O===C||O==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(O=>O>0).reduce((O,B)=>O+B,0)]).sort((z,O)=>z[1]-O[1])[0])==null?void 0:G[0];V&&(H=V);break}case"initialPlacement":H=s}if(r!==H)return{reset:{placement:H}}}return{}}}},Wk=(e,t,n)=>{const o=new Map,r={platform:Dk,...n},i={...r.platform,_c:o};return(async(a,s,c)=>{const{placement:l="bottom",strategy:u="absolute",middleware:p=[],platform:f}=c,h=p.filter(Boolean),m=await(f.isRTL==null?void 0:f.isRTL(s));let g=await f.getElementRects({reference:a,floating:s,strategy:u}),{x:y,y:x}=um(g,l,m),C=l,w={},I=0;for(let k=0;k<h.length;k++){var b;const{name:S,fn:E}=h[k],{x:N,y:A,data:P,reset:j}=await E({x:y,y:x,initialPlacement:l,placement:C,strategy:u,middlewareData:w,rects:g,platform:{...f,detectOverflow:(b=f.detectOverflow)!=null?b:Tk},elements:{reference:a,floating:s}});y=N??y,x=A??x,w={...w,[S]:{...w[S],...P}},j&&I<=50&&(I++,typeof j=="object"&&(j.placement&&(C=j.placement),j.rects&&(g=j.rects===!0?await f.getElementRects({reference:a,floating:s,strategy:u}):j.rects),{x:y,y:x}=um(g,C,m)),k=-1)}return{x:y,y:x,placement:C,strategy:u,middlewareData:w}})(e,t,{...r,platform:i})};var Ic=typeof document<"u"?v.useLayoutEffect:function(){};function Uc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Uc(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if((i!=="_owner"||!e.$$typeof)&&!Uc(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function Oy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mm(e,t){const n=Oy(e);return Math.round(t*n)/n}function Au(e){const t=W.useRef(e);return Ic(()=>{t.current=e}),t}const Vk=(e,t)=>({...Bk(e),options:[e,t]}),Fk=(e,t)=>({...Hk(e),options:[e,t]}),zk=(e,t)=>({...Gk(e),options:[e,t]});function Ty(e){return W.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ry={...W},$k=Ry.useInsertionEffect||(e=>e());function dn(e){const t=W.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $k(()=>{t.current=e}),W.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const bf="ArrowUp",Ga="ArrowDown",lr="ArrowLeft",ur="ArrowRight";function Zs(e,t,n){return Math.floor(e/t)!==n}function ga(e,t){return t<0||t>=e.current.length}function Eu(e,t){return en(e,{disabledIndices:t})}function gm(e,t){return en(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function en(e,t){let{startingIndex:n=-1,decrement:o=!1,disabledIndices:r,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=o?-i:i;while(s>=0&&s<=a.length-1&&kc(a,s,r));return s}function Zk(e,t,n,o,r){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(r){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*o:i;case"br":return n.lastIndexOf(e)}}function Xk(e,t){return t.flatMap((n,o)=>e.includes(n)?[o]:[])}function kc(e,t,n){if(n)return n.includes(t);const o=e[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}var yt=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Uk(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Ly=W.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Jk(e){const{children:t,elementsRef:n,labelsRef:o}=e,[r,i]=W.useState(()=>new Map),a=W.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),s=W.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return yt(()=>{const c=new Map(r);Array.from(c.keys()).sort(Uk).forEach((l,u)=>{c.set(l,u)}),function(l,u){if(l.size!==u.size)return!1;for(const[p,f]of l.entries())if(f!==u.get(p))return!1;return!0}(r,c)||i(c)},[r]),W.createElement(Ly.Provider,{value:W.useMemo(()=>({register:a,unregister:s,map:r,elementsRef:n,labelsRef:o}),[a,s,r,n,o])},t)}function _y(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:o,map:r,elementsRef:i,labelsRef:a}=W.useContext(Ly),[s,c]=W.useState(null),l=W.useRef(null),u=W.useCallback(p=>{if(l.current=p,s!==null&&(i.current[s]=p,a)){var f;const h=t!==void 0;a.current[s]=h?t:(f=p==null?void 0:p.textContent)!=null?f:null}},[s,i,a,t]);return yt(()=>{const p=l.current;if(p)return n(p),()=>{o(p)}},[n,o]),yt(()=>{const p=l.current?r.get(l.current):null;p!=null&&c(p)},[r]),W.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jc.apply(this,arguments)}let vm=!1,Yk=0;const ym=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yk++,$d=Ry.useId||function(){const[e,t]=W.useState(()=>vm?ym():void 0);return yt(()=>{e==null&&t(ym())},[]),W.useEffect(()=>{vm=!0},[]),e};let Ka;function ju(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const r="Floating UI: "+n.join(" ");var i;(e=Ka)!=null&&e.has(r)||((i=Ka)==null||i.add(r),console.warn(r))}function My(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(r=>r!==n))||[])}}}process.env.NODE_ENV!=="production"&&(Ka=new Set);const Dy=W.createContext(null),By=W.createContext(null),gr=()=>{var e;return((e=W.useContext(Dy))==null?void 0:e.id)||null},vr=()=>W.useContext(By);function Kk(e){const{children:t,id:n}=e,o=gr();return W.createElement(Dy.Provider,{value:W.useMemo(()=>({id:n,parentId:o}),[n,o])},t)}function qk(e){const{children:t}=e,n=W.useRef([]),o=W.useCallback(a=>{n.current=[...n.current,a]},[]),r=W.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=W.useState(()=>My())[0];return W.createElement(By.Provider,{value:W.useMemo(()=>({nodesRef:n,addNode:o,removeNode:r,events:i}),[o,r,i])},t)}function qa(e){return"data-floating-ui-"+e}function Jn(e){const t=v.useRef(e);return yt(()=>{t.current=e}),t}const bm=qa("safe-polygon");function Pu(e,t,n){return n&&!Ta(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}let wm=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(wm);const i=()=>e==null?void 0:e.focus({preventScroll:n});r?i():wm=requestAnimationFrame(i)}function ri(e,t){let n=e.filter(r=>{var i;return r.parentId===t&&((i=r.context)==null?void 0:i.open)}),o=n;for(;o.length;)o=e.filter(r=>{var i;return(i=o)==null?void 0:i.some(a=>{var s;return r.parentId===a.id&&((s=r.context)==null?void 0:s.open)})}),n=n.concat(o);return n}let xi=new WeakMap,Xs=new WeakSet,Us={},Nu=0;const Hy=e=>e&&(e.host||Hy(e.parentNode));function Qk(e,t,n,o){const r="data-floating-ui-inert",i=o?"inert":n?"aria-hidden":null,a=((p,f)=>f.map(h=>{if(p.contains(h))return h;const m=Hy(h);return p.contains(m)?m:null}).filter(h=>h!=null))(t,e),s=new Set,c=new Set(a),l=[];Us[r]||(Us[r]=new WeakMap);const u=Us[r];return a.forEach(function p(f){!f||s.has(f)||(s.add(f),f.parentNode&&p(f.parentNode))}),function p(f){!f||c.has(f)||[].forEach.call(f.children,h=>{if(Or(h)!=="script")if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,g=m!==null&&m!=="false",y=(xi.get(h)||0)+1,x=(u.get(h)||0)+1;xi.set(h,y),u.set(h,x),l.push(h),y===1&&g&&Xs.add(h),x===1&&h.setAttribute(r,""),!g&&i&&h.setAttribute(i,"true")}})}(t),s.clear(),Nu++,()=>{l.forEach(p=>{const f=(xi.get(p)||0)-1,h=(u.get(p)||0)-1;xi.set(p,f),u.set(p,h),f||(!Xs.has(p)&&i&&p.removeAttribute(i),Xs.delete(p)),h||p.removeAttribute(r)}),Nu--,Nu||(xi=new WeakMap,xi=new WeakMap,Xs=new WeakSet,Us={})}}function xm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=tn(e[0]).body;return Qk(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const Yc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cm(e,t){const n=vf(e,Yc());t==="prev"&&n.reverse();const o=n.indexOf(_o(tn(e)));return n.slice(o+1)[0]}function Im(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Vt(n,o)}const wf={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function km(e){e.key==="Tab"&&(e.target,clearTimeout(void 0))}const Sm=W.forwardRef(function(e,t){const[n,o]=W.useState();yt(()=>(gy()&&o("button"),document.addEventListener("keydown",km),()=>{document.removeEventListener("keydown",km)}),[]);const r={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[qa("focus-guard")]:"",style:wf};return W.createElement("span",Jc({},e,r))}),e3=W.createContext(null),Zd="data-floating-ui-focusable";function Gy(e){return e?e.hasAttribute(Zd)?e:e.querySelector("["+Zd+"]")||e:null}let Ur=[];function Ou(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(t&&Or(t)!=="body"){if(!function(n,o){if(o=o||{},!n)throw new Error("No node provided");return $i.call(n,$c)!==!1&&zd(o,n)}(t,Yc())){const n=vf(t,Yc())[0];n&&(t=n)}Ur.push(t),Ur.length>20&&(Ur=Ur.slice(-20))}}function Am(){return Ur.slice().reverse().find(e=>e.isConnected)}const t3=W.forwardRef(function(e,t){return W.createElement("button",Jc({},e,{type:"button",ref:t,tabIndex:-1,style:wf}))});function n3(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:p=!0}=e,{open:f,refs:h,nodeId:m,onOpenChange:g,events:y,dataRef:x,floatingId:C,elements:{domReference:w,floating:I}}=t,b=typeof a=="number"&&a<0,k=Wd(w)&&b,S=typeof HTMLElement>"u"||!("inert"in HTMLElement.prototype)||i,E=Jn(r),N=Jn(a),A=Jn(s),P=vr(),j=W.useContext(e3),G=W.useRef(null),M=W.useRef(null),T=W.useRef(!1),H=W.useRef(!1),V=W.useRef(-1),z=j!=null,O=Gy(I),B=dn(function(_){return _===void 0&&(_=O),_?vf(_,Yc()):[]}),F=dn(_=>{const R=B(_);return E.current.map(L=>w&&L==="reference"?w:O&&L==="floating"?O:R).filter(Boolean).flat()});function $(_){return!o&&u&&l?W.createElement(t3,{ref:_==="start"?G:M,onClick:R=>g(!1,R.nativeEvent)},typeof u=="string"?u:"Dismiss"):null}W.useEffect(()=>{if(o||!l)return;function _(L){if(L.key==="Tab"){Vt(O,_o(tn(O)))&&B().length===0&&!k&&sn(L);const D=F(),K=cr(L);E.current[0]==="reference"&&K===w&&(sn(L),L.shiftKey?ar(D[D.length-1]):ar(D[1])),E.current[1]==="floating"&&K===O&&L.shiftKey&&(sn(L),ar(D[0]))}}const R=tn(O);return R.addEventListener("keydown",_),()=>{R.removeEventListener("keydown",_)}},[o,w,O,l,E,k,B,F]),W.useEffect(()=>{if(!o&&I)return I.addEventListener("focusin",_),()=>{I.removeEventListener("focusin",_)};function _(R){const L=cr(R),D=B().indexOf(L);D!==-1&&(V.current=D)}},[o,I,B]),W.useEffect(()=>{if(!o&&p)return I&&_t(w)?(w.addEventListener("focusout",R),w.addEventListener("pointerdown",_),I.addEventListener("focusout",R),()=>{w.removeEventListener("focusout",R),w.removeEventListener("pointerdown",_),I.removeEventListener("focusout",R)}):void 0;function _(){H.current=!0,setTimeout(()=>{H.current=!1})}function R(L){const D=L.relatedTarget;queueMicrotask(()=>{const K=!(Vt(w,D)||Vt(I,D)||Vt(D,I)||Vt(j==null?void 0:j.portalNode,D)||D!=null&&D.hasAttribute(qa("focus-guard"))||P&&(ri(P.nodesRef.current,m).find(J=>{var Y,ee;return Vt((Y=J.context)==null?void 0:Y.elements.floating,D)||Vt((ee=J.context)==null?void 0:ee.elements.domReference,D)})||function(J,Y){var ee;let X=[],ae=(ee=J.find(ce=>ce.id===Y))==null?void 0:ee.parentId;for(;ae;){const ce=J.find(me=>me.id===ae);ae=ce==null?void 0:ce.parentId,ce&&(X=X.concat(ce))}return X}(P.nodesRef.current,m).find(J=>{var Y,ee;return((Y=J.context)==null?void 0:Y.elements.floating)===D||((ee=J.context)==null?void 0:ee.elements.domReference)===D})));if(c&&K&&_o(tn(O))===tn(O).body){_t(O)&&O.focus();const J=V.current,Y=B(),ee=Y[J]||Y[Y.length-1]||O;_t(ee)&&ee.focus()}!k&&l||!D||!K||H.current||D===Am()||(T.current=!0,g(!1,L,"focus-out"))})}},[o,w,I,O,l,m,P,j,g,p,c,B,k]),W.useEffect(()=>{var _;if(o)return;const R=Array.from((j==null||(_=j.portalNode)==null?void 0:_.querySelectorAll("["+qa("portal")+"]"))||[]);if(I){const L=[I,...R,G.current,M.current,E.current.includes("reference")||k?w:null].filter(K=>K!=null),D=l||k?xm(L,S,!S):xm(L);return()=>{D()}}},[o,w,I,l,E,j,k,S]),yt(()=>{if(o||!_t(O))return;const _=_o(tn(O));queueMicrotask(()=>{const R=F(O),L=N.current,D=(typeof L=="number"?R[L]:L.current)||O,K=Vt(O,_);b||K||!f||ar(D,{preventScroll:D===O})})},[o,f,O,b,F,N]),yt(()=>{if(o||!O)return;let _=!1;const R=tn(O),L=_o(R);let D=x.current.openEvent;function K(Y){let{open:ee,reason:X,event:ae,nested:ce}=Y;ee&&(D=ae),X==="escape-key"&&h.domReference.current&&Ou(h.domReference.current),X==="hover"&&ae.type==="mouseleave"&&(T.current=!0),X==="outside-press"&&(ce?(T.current=!1,_=!0):T.current=!(hy(ae)||my(ae)))}Ou(L),y.on("openchange",K);const J=R.createElement("span");return J.setAttribute("tabindex","-1"),J.setAttribute("aria-hidden","true"),Object.assign(J.style,wf),z&&w&&w.insertAdjacentElement("afterend",J),()=>{y.off("openchange",K);const Y=_o(R),ee=Vt(I,Y)||P&&ri(P.nodesRef.current,m).some(ae=>{var ce;return Vt((ce=ae.context)==null?void 0:ce.elements.floating,Y)});(ee||D&&["click","mousedown"].includes(D.type))&&h.domReference.current&&Ou(h.domReference.current);const X=typeof A.current=="boolean"?Am()||J:A.current.current||J;queueMicrotask(()=>{A.current&&!T.current&&_t(X)&&(X===Y||Y===R.body||ee)&&X.focus({preventScroll:_}),J.remove()})}},[o,I,O,A,x,h,y,P,m,z,w]),W.useEffect(()=>{queueMicrotask(()=>{T.current=!1})},[o]),yt(()=>{if(!o&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:p,open:f,onOpenChange:g,refs:h}),()=>{j.setFocusManagerState(null)}},[o,j,l,f,g,h,p]),yt(()=>{if(o||!O||typeof MutationObserver!="function"||b)return;const _=()=>{const L=O.getAttribute("tabindex"),D=B(),K=_o(tn(I)),J=D.indexOf(K);J!==-1&&(V.current=J),E.current.includes("floating")||K!==h.domReference.current&&D.length===0?L!=="0"&&O.setAttribute("tabindex","0"):L!=="-1"&&O.setAttribute("tabindex","-1")};_();const R=new MutationObserver(_);return R.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{R.disconnect()}},[o,I,O,h,E,B,b]);const Z=!o&&S&&(!l||!k)&&(z||l);return W.createElement(W.Fragment,null,Z&&W.createElement(Sm,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:_=>{if(l){const L=F();ar(r[0]==="reference"?L[0]:L[L.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(T.current=!1,Im(_,j.portalNode)){const L=Cm(document.body,"next")||w;L==null||L.focus()}else{var R;(R=j.beforeOutsideRef.current)==null||R.focus()}}}),!k&&$("start"),n,$("end"),Z&&W.createElement(Sm,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:_=>{if(l)ar(F()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(p&&(T.current=!0),Im(_,j.portalNode)){const L=Cm(document.body,"prev")||w;L==null||L.focus()}else{var R;(R=j.afterOutsideRef.current)==null||R.focus()}}}))}function Em(e){return _t(e.target)&&e.target.tagName==="BUTTON"}function jm(e){return vy(e)}const o3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},r3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Pm=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null&&t,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)==null||n}};function i3(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=$d(),i=W.useRef({}),[a]=W.useState(()=>My()),s=gr()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ht(h)&&function(){for(var m,g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C="Floating UI: "+y.join(" ");var w;(m=Ka)!=null&&m.has(C)||((w=Ka)==null||w.add(C),console.error(C))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=W.useState(o.reference),u=dn((h,m,g)=>{i.current.openEvent=h?m:void 0,a.emit("openchange",{open:h,event:m,reason:g,nested:s}),n==null||n(h,m,g)}),p=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return W.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:r,refs:p}),[t,u,f,a,r,p])}function a3(e){e===void 0&&(e={});const{nodeId:t}=e,n=i3({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[i,a]=W.useState(null),[s,c]=W.useState(null),l=(r==null?void 0:r.domReference)||i,u=W.useRef(null),p=vr();yt(()=>{l&&(u.current=l)},[l]);const f=function(C){C===void 0&&(C={});const{placement:w="bottom",strategy:I="absolute",middleware:b=[],platform:k,elements:{reference:S,floating:E}={},transform:N=!0,whileElementsMounted:A,open:P}=C,[j,G]=W.useState({x:0,y:0,strategy:I,placement:w,middlewareData:{},isPositioned:!1}),[M,T]=W.useState(b);Uc(M,b)||T(b);const[H,V]=W.useState(null),[z,O]=W.useState(null),B=W.useCallback(be=>{be!==_.current&&(_.current=be,V(be))},[]),F=W.useCallback(be=>{be!==R.current&&(R.current=be,O(be))},[]),$=S||H,Z=E||z,_=W.useRef(null),R=W.useRef(null),L=W.useRef(j),D=A!=null,K=Au(A),J=Au(k),Y=Au(P),ee=W.useCallback(()=>{if(!_.current||!R.current)return;const be={placement:w,strategy:I,middleware:M};J.current&&(be.platform=J.current),Wk(_.current,R.current,be).then(Le=>{const q={...Le,isPositioned:Y.current!==!1};X.current&&!Uc(L.current,q)&&(L.current=q,Uv.flushSync(()=>{G(q)}))})},[M,w,I,J,Y]);Ic(()=>{P===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,G(be=>({...be,isPositioned:!1})))},[P]);const X=W.useRef(!1);Ic(()=>(X.current=!0,()=>{X.current=!1}),[]),Ic(()=>{if($&&(_.current=$),Z&&(R.current=Z),$&&Z){if(K.current)return K.current($,Z,ee);ee()}},[$,Z,ee,K,D]);const ae=W.useMemo(()=>({reference:_,floating:R,setReference:B,setFloating:F}),[B,F]),ce=W.useMemo(()=>({reference:$,floating:Z}),[$,Z]),me=W.useMemo(()=>{const be={position:I,left:0,top:0};if(!ce.floating)return be;const Le=mm(ce.floating,j.x),q=mm(ce.floating,j.y);return N?{...be,transform:"translate("+Le+"px, "+q+"px)",...Oy(ce.floating)>=1.5&&{willChange:"transform"}}:{position:I,left:Le,top:q}},[I,N,ce.floating,j.x,j.y]);return W.useMemo(()=>({...j,update:ee,refs:ae,elements:ce,floatingStyles:me}),[j,ee,ae,ce,me])}({...e,elements:{...r,...s&&{reference:s}}}),h=W.useCallback(C=>{const w=ht(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;c(w),f.refs.setReference(w)},[f.refs]),m=W.useCallback(C=>{(ht(C)||C===null)&&(u.current=C,a(C)),(ht(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!ht(C))&&f.refs.setReference(C)},[f.refs]),g=W.useMemo(()=>({...f.refs,setReference:m,setPositionReference:h,domReference:u}),[f.refs,m,h]),y=W.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),x=W.useMemo(()=>({...f,...o,refs:g,elements:y,nodeId:t}),[f,g,y,t,o]);return yt(()=>{o.dataRef.current.floatingContext=x;const C=p==null?void 0:p.nodesRef.current.find(w=>w.id===t);C&&(C.context=x)}),W.useMemo(()=>({...f,context:x,refs:g,elements:y}),[f,g,y,x])}const Nm="active",Om="selected";function Tu(e,t,n){const o=new Map,r=n==="item";let i=e;if(r&&e){const{[Nm]:a,[Om]:s,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1,[Zd]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(c=>{let[l,u]=c;var p;r&&[Nm,Om].includes(l)||(l.indexOf("on")===0?(o.has(l)||o.set(l,[]),typeof u=="function"&&((p=o.get(l))==null||p.push(u),a[l]=function(){for(var f,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(f=o.get(l))==null?void 0:f.map(y=>y(...m)).find(y=>y!==void 0)})):a[l]=u)}),a),{})}}let Tm=!1;function Rl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rm(e,t){return Rl(t,e===bf||e===Ga,e===lr||e===ur)}function Ru(e,t,n){return Rl(t,e===Ga,n?e===lr:e===ur)||e==="Enter"||e===" "||e===""}function Lm(e,t,n){return Rl(t,n?e===ur:e===lr,e===bf)}function s3(e,t){const{open:n,onOpenChange:o,elements:r}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:p=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:C,orientation:w="vertical",cols:I=1,scrollItemIntoView:b=!0,virtualItemRef:k,itemSizes:S,dense:E=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(p||ju("`useListNavigation` looping must be enabled to allow escaping."),m||ju("`useListNavigation` must be virtual to allow escaping.")),w==="vertical"&&I>1&&ju("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=Jn(Gy(r.floating)),A=gr(),P=vr(),j=dn(s),G=Wd(r.domReference),M=W.useRef(g),T=W.useRef(l??-1),H=W.useRef(null),V=W.useRef(!0),z=W.useRef(j),O=W.useRef(!!r.floating),B=W.useRef(n),F=W.useRef(!1),$=W.useRef(!1),Z=Jn(C),_=Jn(n),R=Jn(b),L=Jn(l),[D,K]=W.useState(),[J,Y]=W.useState(),ee=dn(function(q,oe,se){function we(de){m?(K(de.id),P==null||P.events.emit("virtualfocus",de),k&&(k.current=de)):ar(de,{preventScroll:!0,sync:!(!py().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!gy())&&(Tm||F.current)})}se===void 0&&(se=!1);const Oe=q.current[oe.current];Oe&&we(Oe),requestAnimationFrame(()=>{const de=q.current[oe.current]||Oe;if(!de)return;Oe||we(de);const Ve=R.current;Ve&&ae&&(se||!V.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof Ve=="boolean"?{block:"nearest",inline:"nearest"}:Ve))})});yt(()=>{document.createElement("div").focus({get preventScroll(){return Tm=!0,!1}})},[]),yt(()=>{c&&(n&&r.floating?M.current&&l!=null&&($.current=!0,T.current=l,j(l)):O.current&&(T.current=-1,z.current(null)))},[c,n,r.floating,l,j]),yt(()=>{if(c&&n&&r.floating)if(a==null){if(F.current=!1,L.current!=null)return;if(O.current&&(T.current=-1,ee(i,T)),(!B.current||!O.current)&&M.current&&(H.current!=null||M.current===!0&&H.current==null)){let q=0;const oe=()=>{i.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(oe),q++):(T.current=H.current==null||Ru(H.current,w,h)||f?Eu(i,Z.current):gm(i,Z.current),H.current=null,j(T.current))};oe()}}else ga(i,a)||(T.current=a,ee(i,T,$.current),$.current=!1)},[c,n,r.floating,a,L,f,i,w,h,j,ee,Z]),yt(()=>{var q;if(!c||r.floating||!P||m||!O.current)return;const oe=P.nodesRef.current,se=(q=oe.find(de=>de.id===A))==null||(q=q.context)==null?void 0:q.elements.floating,we=_o(tn(r.floating)),Oe=oe.some(de=>de.context&&Vt(de.context.elements.floating,we));se&&!Oe&&V.current&&se.focus({preventScroll:!0})},[c,r.floating,P,A,m]),yt(()=>{if(c&&P&&m&&!A)return P.events.on("virtualfocus",q),()=>{P.events.off("virtualfocus",q)};function q(oe){Y(oe.id),k&&(k.current=oe)}},[c,P,m,A,k]),yt(()=>{z.current=j,O.current=!!r.floating}),yt(()=>{n||(H.current=null)},[n]),yt(()=>{B.current=n},[n]);const X=a!=null,ae=W.useMemo(()=>{function q(se){if(!n)return;const we=i.current.indexOf(se);we!==-1&&j(we)}return{onFocus(se){let{currentTarget:we}=se;q(we)},onClick:se=>{let{currentTarget:we}=se;return we.focus({preventScroll:!0})},...y&&{onMouseMove(se){let{currentTarget:we}=se;q(we)},onPointerLeave(se){let{pointerType:we}=se;V.current&&we!=="touch"&&(T.current=-1,ee(i,T),j(null),m||ar(N.current,{preventScroll:!0}))}}}},[n,N,ee,y,i,j,m]),ce=dn(q=>{if(V.current=!1,F.current=!0,q.which===229||!_.current&&q.currentTarget===N.current)return;if(f&&Lm(q.key,w,h))return sn(q),o(!1,q.nativeEvent,"list-navigation"),void(_t(r.domReference)&&(m?P==null||P.events.emit("virtualfocus",r.domReference):r.domReference.focus()));const oe=T.current,se=Eu(i,C),we=gm(i,C);if(G||(q.key==="Home"&&(sn(q),T.current=se,j(T.current)),q.key==="End"&&(sn(q),T.current=we,j(T.current))),I>1){const Oe=S||Array.from({length:i.current.length},()=>({width:1,height:1})),de=function(Te,Pe,Be){const He=[];let le=0;return Te.forEach((ye,re)=>{let{width:ie,height:Me}=ye;if(ie>Pe&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+re+" is greater than grid columns");let ge=!1;for(Be&&(le=0);!ge;){const ne=[];for(let Q=0;Q<ie;Q++)for(let ue=0;ue<Me;ue++)ne.push(le+Q+ue*Pe);le%Pe+ie<=Pe&&ne.every(Q=>He[Q]==null)?(ne.forEach(Q=>{He[Q]=re}),ge=!0):le++}}),[...He]}(Oe,I,E),Ve=de.findIndex(Te=>Te!=null&&!kc(i.current,Te,C)),it=de.reduce((Te,Pe,Be)=>Pe==null||kc(i.current,Pe,C)?Te:Be,-1),dt=de[function(Te,Pe){let{event:Be,orientation:He,loop:le,rtl:ye,cols:re,disabledIndices:ie,minIndex:Me,maxIndex:ge,prevIndex:ne,stopEvent:Q=!1}=Pe,ue=ne;if(Be.key===bf){if(Q&&sn(Be),ne===-1)ue=ge;else if(ue=en(Te,{startingIndex:ue,amount:re,decrement:!0,disabledIndices:ie}),le&&(ne-re<Me||ue<0)){const Ce=ne%re,$e=ge%re,Zt=ge-($e-Ce);ue=$e===Ce?ge:$e>Ce?Zt:Zt-re}ga(Te,ue)&&(ue=ne)}if(Be.key===Ga&&(Q&&sn(Be),ne===-1?ue=Me:(ue=en(Te,{startingIndex:ne,amount:re,disabledIndices:ie}),le&&ne+re>ge&&(ue=en(Te,{startingIndex:ne%re-re,amount:re,disabledIndices:ie}))),ga(Te,ue)&&(ue=ne)),He==="both"){const Ce=Oi(ne/re);Be.key===(ye?lr:ur)&&(Q&&sn(Be),ne%re!==re-1?(ue=en(Te,{startingIndex:ne,disabledIndices:ie}),le&&Zs(ue,re,Ce)&&(ue=en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie}))):le&&(ue=en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie})),Zs(ue,re,Ce)&&(ue=ne)),Be.key===(ye?ur:lr)&&(Q&&sn(Be),ne%re!==0?(ue=en(Te,{startingIndex:ne,decrement:!0,disabledIndices:ie}),le&&Zs(ue,re,Ce)&&(ue=en(Te,{startingIndex:ne+(re-ne%re),decrement:!0,disabledIndices:ie}))):le&&(ue=en(Te,{startingIndex:ne+(re-ne%re),decrement:!0,disabledIndices:ie})),Zs(ue,re,Ce)&&(ue=ne));const $e=Oi(ge/re)===Ce;ga(Te,ue)&&(ue=le&&$e?Be.key===(ye?ur:lr)?ge:en(Te,{startingIndex:ne-ne%re-1,disabledIndices:ie}):ne)}return ue}({current:de.map(Te=>Te!=null?i.current[Te]:null)},{event:q,orientation:w,loop:p,rtl:h,cols:I,disabledIndices:Xk([...C||i.current.map((Te,Pe)=>kc(i.current,Pe)?Pe:void 0),void 0],de),minIndex:Ve,maxIndex:it,prevIndex:Zk(T.current>we?se:T.current,Oe,de,I,q.key===Ga?"bl":q.key===(h?lr:ur)?"tr":"tl"),stopEvent:!0})];if(dt!=null&&(T.current=dt,j(T.current)),w==="both")return}if(Rm(q.key,w)){if(sn(q),n&&!m&&_o(q.currentTarget.ownerDocument)===q.currentTarget)return T.current=Ru(q.key,w,h)?se:we,void j(T.current);Ru(q.key,w,h)?T.current=p?oe>=we?u&&oe!==i.current.length?-1:se:en(i,{startingIndex:oe,disabledIndices:C}):Math.min(we,en(i,{startingIndex:oe,disabledIndices:C})):T.current=p?oe<=se?u&&oe!==-1?i.current.length:we:en(i,{startingIndex:oe,decrement:!0,disabledIndices:C}):Math.max(se,en(i,{startingIndex:oe,decrement:!0,disabledIndices:C})),ga(i,T.current)?j(null):j(T.current)}}),me=W.useMemo(()=>m&&n&&X&&{"aria-activedescendant":J||D},[m,n,X,J,D]),be=W.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,...!Wd(r.domReference)&&me,onKeyDown:ce,onPointerMove(){V.current=!0}}),[me,ce,r.domReference,w]),Le=W.useMemo(()=>{function q(oe){g==="auto"&&hy(oe.nativeEvent)&&(M.current=!0)}return{...me,onKeyDown(oe){V.current=!1;const se=oe.key.startsWith("Arrow"),we=["Home","End"].includes(oe.key),Oe=se||we,de=function(He,le,ye){return Rl(le,ye?He===lr:He===ur,He===Ga)}(oe.key,w,h),Ve=Lm(oe.key,w,h),it=Rm(oe.key,w),dt=(f?de:it)||oe.key==="Enter"||oe.key.trim()==="";if(m&&n){const He=P==null?void 0:P.nodesRef.current.find(ye=>ye.parentId==null),le=P&&He?function(ye,re){let ie,Me=-1;return function ge(ne,Q){Q>Me&&(ie=ne,Me=Q),ri(ye,ne).forEach(ue=>{ge(ue.id,Q+1)})}(re,0),ye.find(ge=>ge.id===ie)}(P.nodesRef.current,He.id):null;if(Oe&&le&&k){const ye=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(de||Ve){var Te,Pe;const re=((Te=le.context)==null?void 0:Te.elements.domReference)===oe.currentTarget,ie=Ve&&!re?(Pe=le.context)==null?void 0:Pe.elements.domReference:de?i.current.find(Me=>(Me==null?void 0:Me.id)===D):null;ie&&(sn(oe),ie.dispatchEvent(ye),Y(void 0))}var Be;if((it||we)&&le.context&&le.context.open&&le.parentId&&oe.currentTarget!==le.context.elements.domReference)return sn(oe),void((Be=le.context.elements.domReference)==null||Be.dispatchEvent(ye))}return ce(oe)}(n||x||!se)&&(dt&&(H.current=f&&it?null:oe.key),f?de&&(sn(oe),n?(T.current=Eu(i,Z.current),j(T.current)):o(!0,oe.nativeEvent,"list-navigation")):it&&(l!=null&&(T.current=l),sn(oe),!n&&x?o(!0,oe.nativeEvent,"list-navigation"):ce(oe),n&&j(T.current)))},onFocus(){n&&!m&&j(null)},onPointerDown:function(oe){M.current=g,g==="auto"&&my(oe.nativeEvent)&&(M.current=!0)},onMouseDown:q,onClick:q}},[D,me,ce,Z,g,i,f,j,o,n,x,w,h,l,P,m,k]);return W.useMemo(()=>c?{reference:Le,floating:be,item:ae}:{},[c,Le,be,ae])}const c3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _m(e,t){const[n,o]=e;let r=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[c,l]=t[a]||[0,0],[u,p]=t[s]||[0,0];l>=o!=p>=o&&n<=(u-c)*(o-l)/(p-l)+c&&(r=!r)}return r}function l3(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=e;let r,i=!1,a=null,s=null,c=performance.now();const l=u=>{let{x:p,y:f,placement:h,elements:m,onClose:g,nodeId:y,tree:x}=u;return function(C){function w(){clearTimeout(r),g()}if(clearTimeout(r),!m.domReference||!m.floating||h==null||p==null||f==null)return;const{clientX:I,clientY:b}=C,k=[I,b],S=cr(C),E=C.type==="mouseleave",N=Vt(m.floating,S),A=Vt(m.domReference,S),P=m.domReference.getBoundingClientRect(),j=m.floating.getBoundingClientRect(),G=h.split("-")[0],M=p>j.right-j.width/2,T=f>j.bottom-j.height/2,H=function(_,R){return _[0]>=R.x&&_[0]<=R.x+R.width&&_[1]>=R.y&&_[1]<=R.y+R.height}(k,P),V=j.width>P.width,z=j.height>P.height,O=(V?P:j).left,B=(V?P:j).right,F=(z?P:j).top,$=(z?P:j).bottom;if(N&&(i=!0,!E))return;if(A&&(i=!1),A&&!E)return void(i=!0);if(E&&ht(C.relatedTarget)&&Vt(m.floating,C.relatedTarget)||x&&ri(x.nodesRef.current,y).some(_=>{let{context:R}=_;return R==null?void 0:R.open}))return;if(G==="top"&&f>=P.bottom-1||G==="bottom"&&f<=P.top+1||G==="left"&&p>=P.right-1||G==="right"&&p<=P.left+1)return w();let Z=[];switch(G){case"top":Z=[[O,P.top+1],[O,j.bottom-1],[B,j.bottom-1],[B,P.top+1]];break;case"bottom":Z=[[O,j.top+1],[O,P.bottom-1],[B,P.bottom-1],[B,j.top+1]];break;case"left":Z=[[j.right-1,$],[j.right-1,F],[P.left+1,F],[P.left+1,$]];break;case"right":Z=[[P.right-1,$],[P.right-1,F],[j.left+1,F],[j.left+1,$]]}if(!_m([I,b],Z)){if(i&&!H)return w();if(!E&&o){const _=function(R,L){const D=performance.now(),K=D-c;if(a===null||s===null||K===0)return a=R,s=L,c=D,null;const J=R-a,Y=L-s,ee=Math.sqrt(J*J+Y*Y);return a=R,s=L,c=D,ee/K}(C.clientX,C.clientY);if(_!==null&&_<.1)return w()}_m([I,b],function(_){let[R,L]=_;switch(G){case"top":return[[V?R+t/2:M?R+4*t:R-4*t,L+t+1],[V?R-t/2:M?R+4*t:R-4*t,L+t+1],[j.left,M||V?j.bottom-t:j.top],[j.right,M?V?j.bottom-t:j.top:j.bottom-t]];case"bottom":return[[V?R+t/2:M?R+4*t:R-4*t,L-t],[V?R-t/2:M?R+4*t:R-4*t,L-t],[j.left,M||V?j.top+t:j.bottom],[j.right,M?V?j.top+t:j.bottom:j.top+t]];case"left":{const D=[R+t+1,z?L+t/2:T?L+4*t:L-4*t],K=[R+t+1,z?L-t/2:T?L+4*t:L-4*t];return[[T||z?j.right-t:j.left,j.top],[T?z?j.right-t:j.left:j.right-t,j.bottom],D,K]}case"right":return[[R-t,z?L+t/2:T?L+4*t:L-4*t],[R-t,z?L-t/2:T?L+4*t:L-4*t],[T||z?j.left+t:j.right,j.top],[T?z?j.left+t:j.right:j.left+t,j.bottom]]}}([p,f]))?!i&&o&&(r=window.setTimeout(w,40)):w()}}};return l.__options={blockPointerEvents:n},l}const Xd=v.createContext({getItemProps:()=>({}),activeIndex:null,setActiveIndex:()=>{},setHasFocusInside:()=>{},isOpen:!1,setIsOpen:()=>{}}),Wy=v.forwardRef(({className:e,disabled:t,children:n,...o},r)=>{const i=v.useContext(Xd),a=_y(),s=vr(),c=a.index===i.activeIndex,l=te("io-dropdown-menu-item",t&&"io-dropdown-menu-item-disabled",e);return d.jsx("div",{ref:Ty([a.ref,r]),role:"menuitem",className:l,tabIndex:c?0:-1,"aria-disabled":t,...o,...i.getItemProps({onClick(u){var p;if(t)return u.preventDefault(),void u.stopPropagation();(p=o.onClick)==null||p.call(o,u),i.setIsOpen(!1),s==null||s.events.emit("click")},onFocus(u){var p;t||((p=o.onFocus)==null||p.call(o,u),i.setHasFocusInside(!0))}}),children:n})});Wy.displayName="DropdownMenuItem";const Ud=v.forwardRef(({className:e,variant:t="default",icon:n,iconRight:o,text:r="",disabled:i,children:a,...s},c)=>{const[l,u]=v.useState(!1),[p,f]=v.useState(!1),[h,m]=v.useState(null),g=v.useRef([]),y=v.useRef([]),x=v.useContext(Xd),C=vr(),w=function(){const Z=$d(),_=vr(),R=gr();return yt(()=>{const L={id:Z,parentId:R};return _==null||_.addNode(L),()=>{_==null||_.removeNode(L)}},[_,Z,R]),Z}(),I=gr(),b=_y(),k=I!=null,{floatingStyles:S,refs:E,context:N}=a3({nodeId:w,open:l,onOpenChange:u,placement:k?"right-start":"bottom-start",middleware:[Vk({mainAxis:k?0:4,alignmentAxis:k?-4:0}),zk(),Fk()],whileElementsMounted:Ny}),A=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,dataRef:D,events:K,elements:J}=Z,{enabled:Y=!0,delay:ee=0,handleClose:X=null,mouseOnly:ae=!1,restMs:ce=0,move:me=!0}=_,be=vr(),Le=gr(),q=Jn(X),oe=Jn(ee),se=Jn(R),we=W.useRef(),Oe=W.useRef(-1),de=W.useRef(),Ve=W.useRef(-1),it=W.useRef(!0),dt=W.useRef(!1),Te=W.useRef(()=>{}),Pe=W.useRef(!1),Be=W.useCallback(()=>{var ge;const ne=(ge=D.current.openEvent)==null?void 0:ge.type;return(ne==null?void 0:ne.includes("mouse"))&&ne!=="mousedown"},[D]);W.useEffect(()=>{if(Y)return K.on("openchange",ge),()=>{K.off("openchange",ge)};function ge(ne){let{open:Q}=ne;Q||(clearTimeout(Oe.current),clearTimeout(Ve.current),it.current=!0,Pe.current=!1)}},[Y,K]),W.useEffect(()=>{if(!Y||!q.current||!R)return;function ge(Q){Be()&&L(!1,Q,"hover")}const ne=tn(J.floating).documentElement;return ne.addEventListener("mouseleave",ge),()=>{ne.removeEventListener("mouseleave",ge)}},[J.floating,R,L,Y,q,Be]);const He=W.useCallback(function(ge,ne,Q){ne===void 0&&(ne=!0),Q===void 0&&(Q="hover");const ue=Pu(oe.current,"close",we.current);ue&&!de.current?(clearTimeout(Oe.current),Oe.current=window.setTimeout(()=>L(!1,ge,Q),ue)):ne&&(clearTimeout(Oe.current),L(!1,ge,Q))},[oe,L]),le=dn(()=>{Te.current(),de.current=void 0}),ye=dn(()=>{if(dt.current){const ge=tn(J.floating).body;ge.style.pointerEvents="",ge.removeAttribute(bm),dt.current=!1}}),re=dn(()=>!!D.current.openEvent&&["click","mousedown"].includes(D.current.openEvent.type));W.useEffect(()=>{if(Y&&ht(J.domReference)){var ge;const Ce=J.domReference;return R&&Ce.addEventListener("mouseleave",ue),(ge=J.floating)==null||ge.addEventListener("mouseleave",ue),me&&Ce.addEventListener("mousemove",ne,{once:!0}),Ce.addEventListener("mouseenter",ne),Ce.addEventListener("mouseleave",Q),()=>{var $e;R&&Ce.removeEventListener("mouseleave",ue),($e=J.floating)==null||$e.removeEventListener("mouseleave",ue),me&&Ce.removeEventListener("mousemove",ne),Ce.removeEventListener("mouseenter",ne),Ce.removeEventListener("mouseleave",Q)}}function ne(Ce){if(clearTimeout(Oe.current),it.current=!1,ae&&!Ta(we.current)||ce>0&&!Pu(oe.current,"open"))return;const $e=Pu(oe.current,"open",we.current);$e?Oe.current=window.setTimeout(()=>{se.current||L(!0,Ce,"hover")},$e):R||L(!0,Ce,"hover")}function Q(Ce){if(re())return;Te.current();const $e=tn(J.floating);if(clearTimeout(Ve.current),Pe.current=!1,q.current&&D.current.floatingContext){R||clearTimeout(Oe.current),de.current=q.current({...D.current.floatingContext,tree:be,x:Ce.clientX,y:Ce.clientY,onClose(){ye(),le(),re()||He(Ce,!0,"safe-polygon")}});const Zt=de.current;return $e.addEventListener("mousemove",Zt),void(Te.current=()=>{$e.removeEventListener("mousemove",Zt)})}(we.current!=="touch"||!Vt(J.floating,Ce.relatedTarget))&&He(Ce)}function ue(Ce){re()||D.current.floatingContext&&(q.current==null||q.current({...D.current.floatingContext,tree:be,x:Ce.clientX,y:Ce.clientY,onClose(){ye(),le(),re()||He(Ce)}})(Ce))}},[J,Y,Z,ae,ce,me,He,le,ye,L,R,se,be,oe,q,D,re]),yt(()=>{var ge;if(Y&&R&&(ge=q.current)!=null&&ge.__options.blockPointerEvents&&Be()){dt.current=!0;const Q=J.floating;if(ht(J.domReference)&&Q){var ne;const ue=tn(J.floating).body;ue.setAttribute(bm,"");const Ce=J.domReference,$e=be==null||(ne=be.nodesRef.current.find(Zt=>Zt.id===Le))==null||(ne=ne.context)==null?void 0:ne.elements.floating;return $e&&($e.style.pointerEvents=""),ue.style.pointerEvents="none",Ce.style.pointerEvents="auto",Q.style.pointerEvents="auto",()=>{ue.style.pointerEvents="",Ce.style.pointerEvents="",Q.style.pointerEvents=""}}}},[Y,R,Le,J,be,q,Be]),yt(()=>{R||(we.current=void 0,Pe.current=!1,le(),ye())},[R,le,ye]),W.useEffect(()=>()=>{le(),clearTimeout(Oe.current),clearTimeout(Ve.current),ye()},[Y,J.domReference,le,ye]);const ie=W.useMemo(()=>{function ge(ne){we.current=ne.pointerType}return{onPointerDown:ge,onPointerEnter:ge,onMouseMove(ne){const{nativeEvent:Q}=ne;function ue(){it.current||se.current||L(!0,Q,"hover")}ae&&!Ta(we.current)||R||ce===0||Pe.current&&ne.movementX**2+ne.movementY**2<2||(clearTimeout(Ve.current),we.current==="touch"?ue():(Pe.current=!0,Ve.current=window.setTimeout(ue,ce)))}}},[ae,L,R,se,ce]),Me=W.useMemo(()=>({onMouseEnter(){clearTimeout(Oe.current)},onMouseLeave(ge){re()||He(ge.nativeEvent,!1)}}),[He,re]);return W.useMemo(()=>Y?{reference:ie,floating:Me}:{},[Y,ie,Me])}(N,{enabled:k,delay:{open:75},handleClose:l3({blockPointerEvents:!0})}),P=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,dataRef:D,elements:{domReference:K}}=Z,{enabled:J=!0,event:Y="click",toggle:ee=!0,ignoreMouse:X=!1,keyboardHandlers:ae=!0,stickIfOpen:ce=!0}=_,me=W.useRef(),be=W.useRef(!1),Le=W.useMemo(()=>({onPointerDown(q){me.current=q.pointerType},onMouseDown(q){const oe=me.current;q.button===0&&Y!=="click"&&(Ta(oe,!0)&&X||(!R||!ee||D.current.openEvent&&ce&&D.current.openEvent.type!=="mousedown"?(q.preventDefault(),L(!0,q.nativeEvent,"click")):L(!1,q.nativeEvent,"click")))},onClick(q){const oe=me.current;Y==="mousedown"&&me.current?me.current=void 0:Ta(oe,!0)&&X||(!R||!ee||D.current.openEvent&&ce&&D.current.openEvent.type!=="click"?L(!0,q.nativeEvent,"click"):L(!1,q.nativeEvent,"click"))},onKeyDown(q){me.current=void 0,q.defaultPrevented||!ae||Em(q)||(q.key!==" "||jm(K)||(q.preventDefault(),be.current=!0),q.key==="Enter"&&L(!R||!ee,q.nativeEvent,"click"))},onKeyUp(q){q.defaultPrevented||!ae||Em(q)||jm(K)||q.key===" "&&be.current&&(be.current=!1,L(!R||!ee,q.nativeEvent,"click"))}}),[D,K,Y,X,ae,L,R,ce,ee]);return W.useMemo(()=>J?{reference:Le}:{},[J,Le])}(N,{event:"mousedown",toggle:!k,ignoreMouse:k}),j=function(Z,_){var R;_===void 0&&(_={});const{open:L,floatingId:D}=Z,{enabled:K=!0,role:J="dialog"}=_,Y=(R=c3.get(J))!=null?R:J,ee=$d(),X=gr()!=null,ae=W.useMemo(()=>Y==="tooltip"||J==="label"?{["aria-"+(J==="label"?"labelledby":"describedby")]:L?D:void 0}:{"aria-expanded":L?"true":"false","aria-haspopup":Y==="alertdialog"?"dialog":Y,"aria-controls":L?D:void 0,...Y==="listbox"&&{role:"combobox"},...Y==="menu"&&{id:ee},...Y==="menu"&&X&&{role:"menuitem"},...J==="select"&&{"aria-autocomplete":"none"},...J==="combobox"&&{"aria-autocomplete":"list"}},[Y,D,X,L,ee,J]),ce=W.useMemo(()=>{const be={id:D,...Y&&{role:Y}};return Y==="tooltip"||J==="label"?be:{...be,...Y==="menu"&&{"aria-labelledby":ee}}},[Y,D,ee,J]),me=W.useCallback(be=>{let{active:Le,selected:q}=be;const oe={role:"option",...Le&&{id:D+"-option"}};switch(J){case"select":return{...oe,"aria-selected":Le&&q};case"combobox":return{...oe,...Le&&{"aria-selected":!0}}}return{}},[D,J]);return W.useMemo(()=>K?{reference:ae,floating:ce,item:me}:{},[K,ae,ce,me])}(N,{role:"menu"}),G=function(Z,_){_===void 0&&(_={});const{open:R,onOpenChange:L,elements:D,dataRef:K}=Z,{enabled:J=!0,escapeKey:Y=!0,outsidePress:ee=!0,outsidePressEvent:X="pointerdown",referencePress:ae=!1,referencePressEvent:ce="pointerdown",ancestorScroll:me=!1,bubbles:be,capture:Le}=_,q=vr(),oe=dn(typeof ee=="function"?ee:()=>!1),se=typeof ee=="function"?oe:ee,we=W.useRef(!1),Oe=W.useRef(!1),{escapeKey:de,outsidePress:Ve}=Pm(be),{escapeKey:it,outsidePress:dt}=Pm(Le),Te=W.useRef(!1),Pe=dn(ie=>{var Me;if(!R||!J||!Y||ie.key!=="Escape"||Te.current)return;const ge=(Me=K.current.floatingContext)==null?void 0:Me.nodeId,ne=q?ri(q.nodesRef.current,ge):[];if(!de&&(ie.stopPropagation(),ne.length>0)){let Q=!0;if(ne.forEach(ue=>{var Ce;(Ce=ue.context)==null||!Ce.open||ue.context.dataRef.current.__escapeKeyBubbles||(Q=!1)}),!Q)return}L(!1,function(Q){return"nativeEvent"in Q}(ie)?ie.nativeEvent:ie,"escape-key")}),Be=dn(ie=>{var Me;const ge=()=>{var ne;Pe(ie),(ne=cr(ie))==null||ne.removeEventListener("keydown",ge)};(Me=cr(ie))==null||Me.addEventListener("keydown",ge)}),He=dn(ie=>{var Me;const ge=we.current;we.current=!1;const ne=Oe.current;if(Oe.current=!1,X==="click"&&ne||ge||typeof se=="function"&&!se(ie))return;const Q=cr(ie),ue="["+qa("inert")+"]",Ce=tn(D.floating).querySelectorAll(ue);let $e=ht(Q)?Q:null;for(;$e&&!Ir($e);){const qt=Ho($e);if(Ir(qt)||!ht(qt))break;$e=qt}if(Ce.length&&ht(Q)&&!Q.matches("html,body")&&!Vt(Q,D.floating)&&Array.from(Ce).every(qt=>!Vt($e,qt)))return;if(_t(Q)&&re){const qt=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,yn=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let Po=yn&&ie.offsetX>Q.clientWidth;if(yn&&Mn(Q).direction==="rtl"&&(Po=ie.offsetX<=Q.offsetWidth-Q.clientWidth),Po||qt&&ie.offsetY>Q.clientHeight)return}const Zt=(Me=K.current.floatingContext)==null?void 0:Me.nodeId,ha=q&&ri(q.nodesRef.current,Zt).some(qt=>{var yn;return ku(ie,(yn=qt.context)==null?void 0:yn.elements.floating)});if(ku(ie,D.floating)||ku(ie,D.domReference)||ha)return;const qo=q?ri(q.nodesRef.current,Zt):[];if(qo.length>0){let qt=!0;if(qo.forEach(yn=>{var Po;(Po=yn.context)==null||!Po.open||yn.context.dataRef.current.__outsidePressBubbles||(qt=!1)}),!qt)return}L(!1,ie,"outside-press")}),le=dn(ie=>{var Me;const ge=()=>{var ne;He(ie),(ne=cr(ie))==null||ne.removeEventListener(X,ge)};(Me=cr(ie))==null||Me.addEventListener(X,ge)});W.useEffect(()=>{if(!R||!J)return;K.current.__escapeKeyBubbles=de,K.current.__outsidePressBubbles=Ve;let ie=-1;function Me(Ce){L(!1,Ce,"ancestor-scroll")}function ge(){window.clearTimeout(ie),Te.current=!0}function ne(){ie=window.setTimeout(()=>{Te.current=!1},Pl()?5:0)}const Q=tn(D.floating);Y&&(Q.addEventListener("keydown",it?Be:Pe,it),Q.addEventListener("compositionstart",ge),Q.addEventListener("compositionend",ne)),se&&Q.addEventListener(X,dt?le:He,dt);let ue=[];return me&&(ht(D.domReference)&&(ue=kr(D.domReference)),ht(D.floating)&&(ue=ue.concat(kr(D.floating))),!ht(D.reference)&&D.reference&&D.reference.contextElement&&(ue=ue.concat(kr(D.reference.contextElement)))),ue=ue.filter(Ce=>{var $e;return Ce!==(($e=Q.defaultView)==null?void 0:$e.visualViewport)}),ue.forEach(Ce=>{Ce.addEventListener("scroll",Me,{passive:!0})}),()=>{Y&&(Q.removeEventListener("keydown",it?Be:Pe,it),Q.removeEventListener("compositionstart",ge),Q.removeEventListener("compositionend",ne)),se&&Q.removeEventListener(X,dt?le:He,dt),ue.forEach(Ce=>{Ce.removeEventListener("scroll",Me)}),window.clearTimeout(ie)}},[K,D,Y,se,X,R,L,me,J,de,Ve,Pe,it,Be,He,dt,le]),W.useEffect(()=>{we.current=!1},[se,X]);const ye=W.useMemo(()=>({onKeyDown:Pe,[o3[ce]]:ie=>{ae&&L(!1,ie.nativeEvent,"reference-press")}}),[Pe,L,ae,ce]),re=W.useMemo(()=>({onKeyDown:Pe,onMouseDown(){Oe.current=!0},onMouseUp(){Oe.current=!0},[r3[X]]:()=>{we.current=!0}}),[Pe,X]);return W.useMemo(()=>J?{reference:ye,floating:re}:{},[J,ye,re])}(N,{bubbles:!0}),M=s3(N,{listRef:g,activeIndex:h,nested:k,onNavigate:m}),{getReferenceProps:T,getFloatingProps:H,getItemProps:V}=function(Z){Z===void 0&&(Z=[]);const _=Z.map(Y=>Y==null?void 0:Y.reference),R=Z.map(Y=>Y==null?void 0:Y.floating),L=Z.map(Y=>Y==null?void 0:Y.item),D=W.useCallback(Y=>Tu(Y,Z,"reference"),_),K=W.useCallback(Y=>Tu(Y,Z,"floating"),R),J=W.useCallback(Y=>Tu(Y,Z,"item"),L);return W.useMemo(()=>({getReferenceProps:D,getFloatingProps:K,getItemProps:J}),[D,K,J])}([A,P,j,G,M]);v.useEffect(()=>{if(C)return C.events.on("click",Z),C.events.on("menuopen",_),()=>{C.events.off("click",Z),C.events.off("menuopen",_)};function Z(){u(!1)}function _(R){R.nodeId!==w&&R.parentId===I&&u(!1)}},[C,w,I]),v.useEffect(()=>{l&&C&&C.events.emit("menuopen",{parentId:I,nodeId:w})},[C,l,w,I]);const z={activeIndex:h,setActiveIndex:m,getItemProps:V,setHasFocusInside:f,isOpen:l,setIsOpen:u},O=v.useMemo(()=>z,[h,m,V,f,l]),B=te("io-dropdown-menu-button",k&&"io-dropdown-menu-item",l&&!k&&"active",e),F=Ty([E.setReference,b.ref,c]),$=x.activeIndex===b.index?0:-1;return d.jsxs(Kk,{id:w,children:[d.jsx(Ze,{className:B,ref:F,variant:k?"link":t,tabIndex:k?$:void 0,role:k?"menuitem":void 0,"data-open":l?"":void 0,"data-nested":k?"":void 0,"data-focus-inside":p?"":void 0,text:r,icon:k?"chevron-right":n,iconSize:"10",iconRight:!!k||o,disabled:i,...T(x.getItemProps({onFocus(Z){var _;(_=s.onFocus)==null||_.call(s,Z),f(!1),x.setHasFocusInside(!0)},...s}))}),d.jsx(Xd.Provider,{value:O,children:d.jsx(Jk,{elementsRef:g,labelsRef:y,children:l&&d.jsx(n3,{context:N,modal:!1,initialFocus:k?-1:0,returnFocus:!k,children:d.jsx("div",{ref:E.setFloating,className:"io-dropdown-menu",style:S,...H(),children:a})})})})]})});Ud.displayName="DropdownMenu";const Yn=v.forwardRef(({...e},t)=>gr()===null?d.jsx(qk,{children:d.jsx(Ud,{ref:t,...e})}):d.jsx(Ud,{ref:t,...e}));Yn.displayName="DropdownMenu",Yn.Item=Wy,Yn.Separator=ms;var Mm=function(e){return e.reduce(function(t,n){var o=n[0],r=n[1];return t[o]=r,t},{})},Dm=typeof window<"u"&&window.document&&window.document.createElement?W.useLayoutEffect:W.useEffect,mn="top",Dn="bottom",Bn="right",gn="left",Jd="auto",gs=[mn,Dn,Bn,gn],Zi="start",Qa="end",Vy="viewport",va="popper",Bm=gs.reduce(function(e,t){return e.concat([t+"-"+Zi,t+"-"+Qa])},[]),Fy=[].concat(gs,[Jd]).reduce(function(e,t){return e.concat([t,t+"-"+Zi,t+"-"+Qa])},[]),u3=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function vo(e){return e?(e.nodeName||"").toLowerCase():null}function jn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pi(e){return e instanceof jn(e).Element||e instanceof Element}function _n(e){return e instanceof jn(e).HTMLElement||e instanceof HTMLElement}function xf(e){return typeof ShadowRoot<"u"&&(e instanceof jn(e).ShadowRoot||e instanceof ShadowRoot)}var d3={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];_n(i)&&vo(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var s=r[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})},effect:function(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.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]).reduce(function(s,c){return s[c]="",s},{});_n(r)&&vo(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}},requires:["computeStyles"]};function fo(e){return e.split("-")[0]}var ii=Math.max,Kc=Math.min,Xi=Math.round;function Yd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zy(){return!/^((?!chrome|android).)*safari/i.test(Yd())}function Ui(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&_n(e)&&(r=e.offsetWidth>0&&Xi(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Xi(o.height)/e.offsetHeight||1);var a=(pi(e)?jn(e):window).visualViewport,s=!zy()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/r,l=(o.top+(s&&a?a.offsetTop:0))/i,u=o.width/r,p=o.height/i;return{width:u,height:p,top:l,right:c+u,bottom:l+p,left:c,x:c,y:l}}function Cf(e){var t=Ui(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function $y(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xf(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Go(e){return jn(e).getComputedStyle(e)}function p3(e){return["table","td","th"].indexOf(vo(e))>=0}function Sr(e){return((pi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ll(e){return vo(e)==="html"?e:e.assignedSlot||e.parentNode||(xf(e)?e.host:null)||Sr(e)}function Hm(e){return _n(e)&&Go(e).position!=="fixed"?e.offsetParent:null}function vs(e){for(var t=jn(e),n=Hm(e);n&&p3(n)&&Go(n).position==="static";)n=Hm(n);return n&&(vo(n)==="html"||vo(n)==="body"&&Go(n).position==="static")?t:n||function(o){var r=/firefox/i.test(Yd());if(/Trident/i.test(Yd())&&_n(o)&&Go(o).position==="fixed")return null;var i=Ll(o);for(xf(i)&&(i=i.host);_n(i)&&["html","body"].indexOf(vo(i))<0;){var a=Go(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||r&&a.willChange==="filter"||r&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}(e)||t}function If(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ra(e,t,n){return ii(e,Kc(t,n))}function Zy(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Xy(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var f3={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=fo(n.placement),c=If(s),l=[gn,Bn].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(E,N){return Zy(typeof(E=typeof E=="function"?E(Object.assign({},N.rects,{placement:N.placement})):E)!="number"?E:Xy(E,gs))}(r.padding,n),p=Cf(i),f=c==="y"?mn:gn,h=c==="y"?Dn:Bn,m=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],g=a[c]-n.rects.reference[c],y=vs(i),x=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,C=m/2-g/2,w=u[f],I=x-p[l]-u[h],b=x/2-p[l]/2+C,k=Ra(w,b,I),S=c;n.modifiersData[o]=((t={})[S]=k,t.centerOffset=k-b,t)}},effect:function(e){var t=e.state,n=e.options.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o!="string"||(o=t.elements.popper.querySelector(o)))&&$y(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ji(e){return e.split("-")[1]}var h3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gm(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,p=e.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,g=m===void 0?0:m,y=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var x=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),w=gn,I=mn,b=window;if(l){var k=vs(n),S="clientHeight",E="clientWidth";k===jn(n)&&Go(k=Sr(n)).position!=="static"&&s==="absolute"&&(S="scrollHeight",E="scrollWidth"),(r===mn||(r===gn||r===Bn)&&i===Qa)&&(I=Dn,g-=(p&&k===b&&b.visualViewport?b.visualViewport.height:k[S])-o.height,g*=c?1:-1),(r===gn||(r===mn||r===Dn)&&i===Qa)&&(w=Bn,h-=(p&&k===b&&b.visualViewport?b.visualViewport.width:k[E])-o.width,h*=c?1:-1)}var N,A=Object.assign({position:s},l&&h3),P=u===!0?function(j,G){var M=j.x,T=j.y,H=G.devicePixelRatio||1;return{x:Xi(M*H)/H||0,y:Xi(T*H)/H||0}}({x:h,y:g},jn(n)):{x:h,y:g};return h=P.x,g=P.y,c?Object.assign({},A,((N={})[I]=C?"0":"",N[w]=x?"0":"",N.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",N)):Object.assign({},A,((t={})[I]=C?g+"px":"",t[w]=x?h+"px":"",t.transform="",t))}var m3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0||o,i=n.adaptive,a=i===void 0||i,s=n.roundOffsets,c=s===void 0||s,l={placement:fo(t.placement),variation:Ji(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Gm(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Gm(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Js={passive:!0},g3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0||r,a=o.resize,s=a===void 0||a,c=jn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(u){u.addEventListener("scroll",n.update,Js)}),s&&c.addEventListener("resize",n.update,Js),function(){i&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Js)}),s&&c.removeEventListener("resize",n.update,Js)}},data:{}},v3={left:"right",right:"left",bottom:"top",top:"bottom"};function Ys(e){return e.replace(/left|right|bottom|top/g,function(t){return v3[t]})}var y3={start:"end",end:"start"};function Wm(e){return e.replace(/start|end/g,function(t){return y3[t]})}function kf(e){var t=jn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Kd(e){return Ui(Sr(e)).left+kf(e).scrollLeft}function Sf(e){var t=Go(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function Uy(e){return["html","body","#document"].indexOf(vo(e))>=0?e.ownerDocument.body:_n(e)&&Sf(e)?e:Uy(Ll(e))}function Wa(e,t){var n;t===void 0&&(t=[]);var o=Uy(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=jn(o),a=r?[i].concat(i.visualViewport||[],Sf(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(Wa(Ll(a)))}function qd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Vm(e,t,n){return t===Vy?qd(function(o,r){var i=jn(o),a=Sr(o),s=i.visualViewport,c=a.clientWidth,l=a.clientHeight,u=0,p=0;if(s){c=s.width,l=s.height;var f=zy();(f||!f&&r==="fixed")&&(u=s.offsetLeft,p=s.offsetTop)}return{width:c,height:l,x:u+Kd(o),y:p}}(e,n)):pi(t)?function(o,r){var i=Ui(o,!1,r==="fixed");return i.top=i.top+o.clientTop,i.left=i.left+o.clientLeft,i.bottom=i.top+o.clientHeight,i.right=i.left+o.clientWidth,i.width=o.clientWidth,i.height=o.clientHeight,i.x=i.left,i.y=i.top,i}(t,n):qd(function(o){var r,i=Sr(o),a=kf(o),s=(r=o.ownerDocument)==null?void 0:r.body,c=ii(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=ii(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-a.scrollLeft+Kd(o),p=-a.scrollTop;return Go(s||i).direction==="rtl"&&(u+=ii(i.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:p}}(Sr(e)))}function b3(e,t,n,o){var r=t==="clippingParents"?function(c){var l=Wa(Ll(c)),u=["absolute","fixed"].indexOf(Go(c).position)>=0&&_n(c)?vs(c):c;return pi(u)?l.filter(function(p){return pi(p)&&$y(p,u)&&vo(p)!=="body"}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(c,l){var u=Vm(e,l,o);return c.top=ii(u.top,c.top),c.right=Kc(u.right,c.right),c.bottom=Kc(u.bottom,c.bottom),c.left=ii(u.left,c.left),c},Vm(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Jy(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?fo(r):null,a=r?Ji(r):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case mn:t={x:s,y:n.y-o.height};break;case Dn:t={x:s,y:n.y+n.height};break;case Bn:t={x:n.x+n.width,y:c};break;case gn:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?If(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case Zi:t[l]=t[l]-(n[u]/2-o[u]/2);break;case Qa:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function es(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,c=s===void 0?"clippingParents":s,l=n.rootBoundary,u=l===void 0?Vy:l,p=n.elementContext,f=p===void 0?va:p,h=n.altBoundary,m=h!==void 0&&h,g=n.padding,y=g===void 0?0:g,x=Zy(typeof y!="number"?y:Xy(y,gs)),C=f===va?"reference":va,w=e.rects.popper,I=e.elements[m?C:f],b=b3(pi(I)?I:I.contextElement||Sr(e.elements.popper),c,u,a),k=Ui(e.elements.reference),S=Jy({reference:k,element:w,strategy:"absolute",placement:r}),E=qd(Object.assign({},w,S)),N=f===va?E:k,A={top:b.top-N.top+x.top,bottom:N.bottom-b.bottom+x.bottom,left:b.left-N.left+x.left,right:N.right-b.right+x.right},P=e.modifiersData.offset;if(f===va&&P){var j=P[r];Object.keys(A).forEach(function(G){var M=[Bn,Dn].indexOf(G)>=0?1:-1,T=[mn,Dn].indexOf(G)>=0?"y":"x";A[G]+=j[T]*M})}return A}function w3(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Fy:c,u=Ji(o),p=u?s?Bm:Bm.filter(function(m){return Ji(m)===u}):gs,f=p.filter(function(m){return l.indexOf(m)>=0});f.length===0&&(f=p);var h=f.reduce(function(m,g){return m[g]=es(e,{placement:g,boundary:r,rootBoundary:i,padding:a})[fo(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}var x3={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0||r,a=n.altAxis,s=a===void 0||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,p=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0||h,g=n.allowedAutoPlacements,y=t.options.placement,x=fo(y),C=c||(x===y||!m?[Ys(y)]:function(F){if(fo(F)===Jd)return[];var $=Ys(F);return[Wm(F),$,Wm($)]}(y)),w=[y].concat(C).reduce(function(F,$){return F.concat(fo($)===Jd?w3(t,{placement:$,boundary:u,rootBoundary:p,padding:l,flipVariations:m,allowedAutoPlacements:g}):$)},[]),I=t.rects.reference,b=t.rects.popper,k=new Map,S=!0,E=w[0],N=0;N<w.length;N++){var A=w[N],P=fo(A),j=Ji(A)===Zi,G=[mn,Dn].indexOf(P)>=0,M=G?"width":"height",T=es(t,{placement:A,boundary:u,rootBoundary:p,altBoundary:f,padding:l}),H=G?j?Bn:gn:j?Dn:mn;I[M]>b[M]&&(H=Ys(H));var V=Ys(H),z=[];if(i&&z.push(T[P]<=0),s&&z.push(T[H]<=0,T[V]<=0),z.every(function(F){return F})){E=A,S=!1;break}k.set(A,z)}if(S)for(var O=function(F){var $=w.find(function(Z){var _=k.get(Z);if(_)return _.slice(0,F).every(function(R){return R})});if($)return E=$,"break"},B=m?3:1;B>0&&O(B)!=="break";B--);t.placement!==E&&(t.modifiersData[o]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Fm(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 zm(e){return[mn,Bn,Dn,gn].some(function(t){return e[t]>=0})}var C3={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=es(t,{elementContext:"reference"}),s=es(t,{altBoundary:!0}),c=Fm(a,o),l=Fm(s,r,i),u=zm(c),p=zm(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}},I3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=Fy.reduce(function(u,p){return u[p]=function(f,h,m){var g=fo(f),y=[gn,mn].indexOf(g)>=0?-1:1,x=typeof m=="function"?m(Object.assign({},h,{placement:f})):m,C=x[0],w=x[1];return C=C||0,w=(w||0)*y,[gn,Bn].indexOf(g)>=0?{x:w,y:C}:{x:C,y:w}}(p,t.rects,i),u},{}),s=a[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}},k3={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Jy({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},S3={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0||r,a=n.altAxis,s=a!==void 0&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,p=n.padding,f=n.tether,h=f===void 0||f,m=n.tetherOffset,g=m===void 0?0:m,y=es(t,{boundary:c,rootBoundary:l,padding:p,altBoundary:u}),x=fo(t.placement),C=Ji(t.placement),w=!C,I=If(x),b=I==="x"?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,N=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,A=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(k){if(i){var G,M=I==="y"?mn:gn,T=I==="y"?Dn:Bn,H=I==="y"?"height":"width",V=k[I],z=V+y[M],O=V-y[T],B=h?-E[H]/2:0,F=C===Zi?S[H]:E[H],$=C===Zi?-E[H]:-S[H],Z=t.elements.arrow,_=h&&Z?Cf(Z):{width:0,height:0},R=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=R[M],D=R[T],K=Ra(0,S[H],_[H]),J=w?S[H]/2-B-K-L-A.mainAxis:F-K-L-A.mainAxis,Y=w?-S[H]/2+B+K+D+A.mainAxis:$+K+D+A.mainAxis,ee=t.elements.arrow&&vs(t.elements.arrow),X=ee?I==="y"?ee.clientTop||0:ee.clientLeft||0:0,ae=(G=P==null?void 0:P[I])!=null?G:0,ce=V+Y-ae,me=Ra(h?Kc(z,V+J-ae-X):z,V,h?ii(O,ce):O);k[I]=me,j[I]=me-V}if(s){var be,Le=I==="x"?mn:gn,q=I==="x"?Dn:Bn,oe=k[b],se=b==="y"?"height":"width",we=oe+y[Le],Oe=oe-y[q],de=[mn,gn].indexOf(x)!==-1,Ve=(be=P==null?void 0:P[b])!=null?be:0,it=de?we:oe-S[se]-E[se]-Ve+A.altAxis,dt=de?oe+S[se]+E[se]-Ve-A.altAxis:Oe,Te=h&&de?function(Pe,Be,He){var le=Ra(Pe,Be,He);return le>He?He:le}(it,oe,dt):Ra(h?it:we,oe,h?dt:Oe);k[b]=Te,j[b]=Te-oe}t.modifiersData[o]=j}},requiresIfExists:["offset"]};function A3(e,t,n){n===void 0&&(n=!1);var o=_n(t),r=_n(t)&&function(l){var u=l.getBoundingClientRect(),p=Xi(u.width)/l.offsetWidth||1,f=Xi(u.height)/l.offsetHeight||1;return p!==1||f!==1}(t),i=Sr(t),a=Ui(e,r,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&((vo(t)!=="body"||Sf(i))&&(s=function(l){return l!==jn(l)&&_n(l)?{scrollLeft:(u=l).scrollLeft,scrollTop:u.scrollTop}:kf(l);var u}(t)),_n(t)?((c=Ui(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=Kd(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function E3(e){var t=new Map,n=new Set,o=[];function r(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach(function(a){if(!n.has(a)){var s=t.get(a);s&&r(s)}}),o.push(i)}return e.forEach(function(i){t.set(i.name,i)}),e.forEach(function(i){n.has(i.name)||r(i)}),o}var $m={placement:"bottom",modifiers:[],strategy:"absolute"};function Zm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function j3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?$m:r;return function(a,s,c){c===void 0&&(c=i);var l,u,p={placement:"bottom",orderedModifiers:[],options:Object.assign({},$m,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},f=[],h=!1,m={state:p,setOptions:function(y){var x=typeof y=="function"?y(p.options):y;g(),p.options=Object.assign({},i,p.options,x),p.scrollParents={reference:pi(a)?Wa(a):a.contextElement?Wa(a.contextElement):[],popper:Wa(s)};var C,w,I=function(b){var k=E3(b);return u3.reduce(function(S,E){return S.concat(k.filter(function(N){return N.phase===E}))},[])}((C=[].concat(o,p.options.modifiers),w=C.reduce(function(b,k){var S=b[k.name];return b[k.name]=S?Object.assign({},S,k,{options:Object.assign({},S.options,k.options),data:Object.assign({},S.data,k.data)}):k,b},{}),Object.keys(w).map(function(b){return w[b]})));return p.orderedModifiers=I.filter(function(b){return b.enabled}),p.orderedModifiers.forEach(function(b){var k=b.name,S=b.options,E=S===void 0?{}:S,N=b.effect;if(typeof N=="function"){var A=N({state:p,name:k,instance:m,options:E}),P=function(){};f.push(A||P)}}),m.update()},forceUpdate:function(){if(!h){var y=p.elements,x=y.reference,C=y.popper;if(Zm(x,C)){p.rects={reference:A3(x,vs(C),p.options.strategy==="fixed"),popper:Cf(C)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(N){return p.modifiersData[N.name]=Object.assign({},N.data)});for(var w=0;w<p.orderedModifiers.length;w++)if(p.reset!==!0){var I=p.orderedModifiers[w],b=I.fn,k=I.options,S=k===void 0?{}:k,E=I.name;typeof b=="function"&&(p=b({state:p,options:S,name:E,instance:m})||p)}else p.reset=!1,w=-1}}},update:(l=function(){return new Promise(function(y){m.forceUpdate(),y(p)})},function(){return u||(u=new Promise(function(y){Promise.resolve().then(function(){u=void 0,y(l())})})),u}),destroy:function(){g(),h=!0}};if(!Zm(a,s))return m;function g(){f.forEach(function(y){return y()}),f=[]}return m.setOptions(c).then(function(y){!h&&c.onFirstUpdate&&c.onFirstUpdate(y)}),m}}var P3=j3({defaultModifiers:[g3,k3,m3,d3,I3,x3,S3,f3,C3]}),N3=typeof Element<"u",O3=typeof Map=="function",T3=typeof Set=="function",R3=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,r,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(o=n;o--!==0;)if(!Sc(e[o],t[o]))return!1;return!0}if(O3&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(o=i.next()).done;)if(!t.has(o.value[0]))return!1;for(i=e.entries();!(o=i.next()).done;)if(!Sc(o.value[1],t.get(o.value[0])))return!1;return!0}if(T3&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(o=i.next()).done;)if(!t.has(o.value[0]))return!1;return!0}if(R3&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(o=n;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;if(N3&&e instanceof Element)return!1;for(o=n;o--!==0;)if((r[o]!=="_owner"&&r[o]!=="__v"&&r[o]!=="__o"||!e.$$typeof)&&!Sc(e[r[o]],t[r[o]]))return!1;return!0}return e!=e&&t!=t}var L3=function(e,t){try{return Sc(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}},_3=hs(L3),M3=[],Yy=function(e,t,n){n===void 0&&(n={});var o=W.useRef(null),r={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||M3},i=W.useState({styles:{popper:{position:r.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=i[0],s=i[1],c=W.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var f=p.state,h=Object.keys(f.elements);Uv.flushSync(function(){s({styles:Mm(h.map(function(m){return[m,f.styles[m]||{}]})),attributes:Mm(h.map(function(m){return[m,f.attributes[m]]}))})})},requires:["computeStyles"]}},[]),l=W.useMemo(function(){var p={onFirstUpdate:r.onFirstUpdate,placement:r.placement,strategy:r.strategy,modifiers:[].concat(r.modifiers,[c,{name:"applyStyles",enabled:!1}])};return _3(o.current,p)?o.current||p:(o.current=p,p)},[r.onFirstUpdate,r.placement,r.strategy,r.modifiers,c]),u=W.useRef();return Dm(function(){u.current&&u.current.setOptions(l)},[l]),Dm(function(){if(e!=null&&t!=null){var p=(n.createPopper||P3)(e,t,l);return u.current=p,function(){p.destroy(),u.current=null}}},[e,t,n.createPopper]),{state:u.current?u.current.state:null,styles:a.styles,attributes:a.attributes,update:u.current?u.current.update:null,forceUpdate:u.current?u.current.forceUpdate:null}};function _l({className:e,variant:t="default",size:n="16",src:o,alt:r,...i}){const a=te("io-image-icon",t==="grayscale"&&[`io-image-icon-${t}`],n&&[`io-image-icon-${n}`],e);return d.jsx("img",{className:a,style:{width:`${n}px`,filter:t==="grayscale"?"grayscale(100%)":"none"},src:o,alt:r,...i})}const Af=v.forwardRef((e,t)=>{const{title:n,subtitle:o,actions:r,className:i,onClose:a,onActionItemClick:s,"data-testid":c="context-menu",...l}=e,u=v.useRef({}),[p,f]=v.useState(0),h=m=>{var g;(g=u.current[m])==null||g.focus({preventScroll:!0}),f(m)};return v.useEffect(()=>{var m;(m=u.current[p])==null||m.focus({preventScroll:!0})},[]),d.jsxs(Lt,{ref:t,className:te(i,"context-menu"),onClick:m=>m.stopPropagation(),onKeyDown:m=>hf({event:m,currentIndex:p,min:0,max:r.length-1,moveFocus:h,onClose:a}),"data-testid":c,...l,children:[n&&d.jsxs(Lt.ItemSection,{className:"context-menu-header","data-testid":`${c}-header`,children:[d.jsx("span",{className:"context-menu-header-title io-title",children:n}),o&&d.jsx("span",{className:"context-menu-header-subtitle io-list-text-description",children:o})]}),r.map((m,g)=>{const y=m.displayName||m.name,x=m.iconSrc?d.jsx(_l,{size:"16",src:m.iconSrc,alt:`${y} icon`}):m.icon&&d.jsx(wt,{size:"16",variant:m.icon});return d.jsxs(v.Fragment,{children:[d.jsx(Lt.Item,{ref:C=>u.current[g]=C,prepend:x,disabled:m.disabled,tabIndex:-1,...ff(C=>s(C,m)),"data-testid":`${c}-item-${m.name}`,children:y}),m.separatorAfter&&d.jsx("li",{className:"context-menu-separator","aria-hidden":!0,"data-testid":`${c}-separator`})]},m.name)})]})});Af.displayName="ContextMenuActionsList";const Ef=()=>{const[e,t]=v.useState([]),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=s=>{const{name:c,title:l,caption:u,icon:p,userProperties:f}=s;return{id:c,name:c,title:l??c,caption:u,icon:p,userProperties:f}},r=n.appManager.onAppAdded(s=>{if(s.userProperties.hidden||"hidden"in s&&s.hidden)return;const c=o(s);t(l=>[...l,c])}),i=n.appManager.onAppChanged(s=>{if(s.userProperties.hidden||"hidden"in s&&s.hidden)return;const c=o(s);t(l=>[...l.filter(u=>u.id!==c.id),c])}),a=[r,n.appManager.onAppRemoved(s=>{const c=o(s);t(l=>l.filter(u=>u.id!==c.id))}),i];return()=>a.forEach(s=>s())},[n]),e},Ky=()=>{const[e,t]=v.useState({}),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.appManager.onInstanceStarted(a=>{t(s=>{const c=s[a.application.name]??[];return{...s,[a.application.name]:[...c,a.id]}})}),r=n.appManager.onInstanceStopped(a=>{t(s=>{const c=s[a.application.name];return c?{...s,[a.application.name]:c.filter(l=>l!==a.id)}:s})}),i=[o,r];return()=>i.forEach(a=>a())},[n]),e};var Ht=function(e){return{ok:!0,result:e}},Ot=function(e){return{ok:!1,error:e}},Xm=function(e,t,n){return t.ok===!1?t:n.ok===!1?n:Ht(e(t.result,n.result))},Lu=function(e,t){return t.ok===!0?t:Ot(e(t.error))},Qd=function(){return Qd=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Qd.apply(this,arguments)};function ep(e,t){if(e===t||e===null&&t===null)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="object"){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ep(e[n],t[n]))return!1;return!0}var o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(n=0;n<o.length;n++)if(!t.hasOwnProperty(o[n])||!ep(e[o[n]],t[o[n]]))return!1;return!0}}var La=function(e){return Array.isArray(e)},Ks=function(e){return typeof e=="object"&&e!==null&&!La(e)},No=function(e,t){return"expected "+e+", got "+function(n){switch(typeof n){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return n instanceof Array?"an array":n===null?"null":"an object";default:return JSON.stringify(n)}}(t)},ya=function(e){return e.map(function(t){return typeof t=="string"?"."+t:"["+t+"]"}).join("")},ba=function(e,t){var n=t.at,o=function(r,i){var a={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0&&(a[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(s=Object.getOwnPropertySymbols(r);c<s.length;c++)i.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(r,s[c])&&(a[s[c]]=r[s[c]])}return a}(t,["at"]);return Qd({at:e+(n||"")},o)},Mt=function(){function e(t){var n=this;this.decode=t,this.run=function(o){return Lu(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},n.decode(o))},this.runPromise=function(o){return function(r){return r.ok===!0?Promise.resolve(r.result):Promise.reject(r.error)}(n.run(o))},this.runWithException=function(o){return function(r){if(r.ok===!0)return r.result;throw r.error}(n.run(o))},this.map=function(o){return new e(function(r){return function(i,a){return a.ok===!0?Ht(i(a.result)):a}(o,n.decode(r))})},this.andThen=function(o){return new e(function(r){return function(i,a){return a.ok===!0?i(a.result):a}(function(i){return o(i).decode(r)},n.decode(r))})},this.where=function(o,r){return n.andThen(function(i){return o(i)?e.succeed(i):e.fail(r)})}}return e.string=function(){return new e(function(t){return typeof t=="string"?Ht(t):Ot({message:No("a string",t)})})},e.number=function(){return new e(function(t){return typeof t=="number"?Ht(t):Ot({message:No("a number",t)})})},e.boolean=function(){return new e(function(t){return typeof t=="boolean"?Ht(t):Ot({message:No("a boolean",t)})})},e.constant=function(t){return new e(function(n){return ep(n,t)?Ht(t):Ot({message:"expected "+JSON.stringify(t)+", got "+JSON.stringify(n)})})},e.object=function(t){return new e(function(n){if(Ks(n)&&t){var o={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r].decode(n[r]);if(i.ok!==!0)return n[r]===void 0?Ot({message:"the key '"+r+"' is required but was not present"}):Ot(ba("."+r,i.error));i.result!==void 0&&(o[r]=i.result)}return Ht(o)}return Ks(n)?Ht(n):Ot({message:No("an object",n)})})},e.array=function(t){return new e(function(n){return La(n)&&t?n.reduce(function(o,r,i){return Xm(function(a,s){return a.concat([s])},o,function(a,s){return Lu(function(c){return ba("["+s+"]",c)},t.decode(a))}(r,i))},Ht([])):La(n)?Ht(n):Ot({message:No("an array",n)})})},e.tuple=function(t){return new e(function(n){if(La(n)){if(n.length!==t.length)return Ot({message:"expected a tuple of length "+t.length+", got one of length "+n.length});for(var o=[],r=0;r<t.length;r++){var i=t[r].decode(n[r]);if(!i.ok)return Ot(ba("["+r+"]",i.error));o[r]=i.result}return Ht(o)}return Ot({message:No("a tuple of length "+t.length,n)})})},e.union=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return e.oneOf.apply(e,[t,n].concat(o))},e.intersection=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new e(function(i){return[t,n].concat(o).reduce(function(a,s){return Xm(Object.assign,a,s.decode(i))},Ht({}))})},e.anyJson=function(){return new e(function(t){return Ht(t)})},e.unknownJson=function(){return new e(function(t){return Ht(t)})},e.dict=function(t){return new e(function(n){if(Ks(n)){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=t.decode(n[r]);if(i.ok!==!0)return Ot(ba("."+r,i.error));o[r]=i.result}return Ht(o)}return Ot({message:No("an object",n)})})},e.optional=function(t){return new e(function(n){return n==null?Ht(void 0):t.decode(n)})},e.oneOf=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(function(o){for(var r=[],i=0;i<t.length;i++){var a=t[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(c){return"at error"+(c.at||"")+": "+c.message}).join('", "');return Ot({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},e.withDefault=function(t,n){return new e(function(o){return Ht(function(r,i){return i.ok===!0?i.result:r}(t,n.decode(o)))})},e.valueAt=function(t,n){return new e(function(o){for(var r=o,i=0;i<t.length;i++){if(r===void 0)return Ot({at:ya(t.slice(0,i+1)),message:"path does not exist"});if(typeof t[i]=="string"&&!Ks(r))return Ot({at:ya(t.slice(0,i+1)),message:No("an object",r)});if(typeof t[i]=="number"&&!La(r))return Ot({at:ya(t.slice(0,i+1)),message:No("an array",r)});r=r[t[i]]}return Lu(function(a){return r===void 0?{at:ya(t),message:"path does not exist"}:ba(ya(t),a)},n.decode(r))})},e.succeed=function(t){return new e(function(n){return Ht(t)})},e.fail=function(t){return new e(function(n){return Ot({message:t})})},e.lazy=function(t){return new e(function(n){return t().decode(n)})},e}(),ln=Mt.string,D3=Mt.number,pt=Mt.boolean,tp=Mt.anyJson;Mt.unknownJson;var U=Mt.constant,$t=Mt.object,wo=Mt.array;Mt.tuple,Mt.dict;var xe=Mt.optional,ys=Mt.oneOf;Mt.union,Mt.intersection,Mt.withDefault,Mt.valueAt,Mt.succeed;var B3=Mt.fail;Mt.lazy;const ut=ln().where(e=>e.length>0,"Expected a non-empty string"),Um=D3().where(e=>e>=0,"Expected a non-negative number"),H3=$t({name:ut,id:xe(ut)}),qy=(e,t,n)=>{const[o,r]=v.useState(()=>{try{const s=window[e].getItem(t);return s?JSON.parse(s):null}catch(s){return console.log(s),null}}),i=`${e}-${t}`;v.useEffect(()=>{const s=c=>{r(c.detail)};return window.addEventListener(i,s),()=>{window.removeEventListener(i,s)}},[i]);const a=v.useCallback(s=>{try{if(!s)return window[e].removeItem(t),void r(null);const c=n.run(s);if(!c.ok)return void console.warn(`Error validating the value to be stored: ${c.error.message}`);const l=c.result;r(l),window[e].setItem(t,JSON.stringify(l)),window.dispatchEvent(new CustomEvent(i,{detail:l}))}catch(c){console.log(c)}},[t,e,i,n]);return[o,a]},Qy=()=>{const[e,t]=qy("sessionStorage","interopio_home_ui_active_layout",H3);return{activeLayout:e,setActiveLayout:t}},Rn="success",ot="warning",G3={success:5e3,warning:1e4},dr=e=>typeof e=="string"?e:e!=null&&e.message?typeof e.message=="string"?e.message:JSON.stringify(e.message):JSON.stringify(e),De=async e=>{const{io:t,variant:n,text:o,error:r}=e,i=dr(r);try{if(n===ot&&t.logger.warn(i?`${o} ${i}`:o),!("modals"in t)||!t.modals)throw new Error("Modals are not enabled.");const a={text:o,variant:n,ttl:G3[n]};await t.modals.alerts.request(a)}catch(a){console.warn("Failed to request alert. ",{error:a})}};function mt(e){return e.id??e.name}function zt(e){var t;return(t=e==null?void 0:e.layouts)==null?void 0:t.v2}function vi(e){var t;return!!((t=zt(e))!=null&&t.advancedLayoutsSupported)}function Jm(e,t){return e.some(n=>n.name===t)?e:[...e,{name:t}]}function W3(e){return{id:e.id,name:e.name,type:e.type,metadata:e.metadata,accessInfo:e.accessInfo}}function Ym(e,t){const n=t.filter(i=>i.type==="Global").map(W3),o=new Set(n.map(i=>i.id)),r=e.filter(i=>i.id&&!o.has(i.id));return[...n,...r]}function Km(e,t){return e.filter(n=>n.name!==t)}function qm(e,t,n){const o=e.filter(i=>i.name!==t),r=o.findIndex(i=>i.name===n);return r===-1?e:[...o.slice(0,r),{name:t},...o.slice(r+1)]}const ra=()=>{const[e,t]=v.useState([]),[n,o]=v.useState(!1),r=v.useContext(Se.IOConnectContext),i=zt(r),a=vi(r);return v.useEffect(()=>{if(!r)return;let s=!1;const c=[];if(a){const l=()=>{i.getMany({includeAccessInfo:!0}).then(u=>{s||t(p=>Ym(p,u))}).catch(u=>console.error("useLayouts: Failed to refresh V2 layouts:",u))};i.getMany({includeAccessInfo:!0}).then(u=>{s||(o(!0),t(p=>Ym(p,u)))}).catch(u=>console.error("useLayouts: Failed to fetch initial V2 layouts:",u)),Promise.all([i.onAdded(u=>{u.type!=="Global"||s||(o(!0),l())}),i.onRemoved(u=>{u.type!=="Global"||s||t(p=>function(f,h){return f.filter(m=>m.id!==h)}(p,u.id))}),i.onRenamed(u=>{u.type!=="Global"||s||t(p=>function(f,h,m){return f.map(g=>g.id===h?{...g,name:m}:g)}(p,u.id,u.name))}),i.onChanged(u=>{u.type!=="Global"||s||l()})]).then(([u,p,f,h])=>{if(s)return u(),p(),f(),void h();c.push(u,p,f,h)}).catch(u=>console.error("useLayouts: Failed to subscribe to V2 layout events:",u))}else{let l=!1;const u=[];r.layouts.getAll("Global").then(p=>{if(s)return;const f=u.splice(0,u.length);l=!0,o(!0),t(h=>{const m=function(g,y){const x=new Set(y),C=g.filter(w=>!x.has(w.name));return[...y.map(w=>({name:w})),...C]}(h,p.map(g=>g.name));return f.reduce((g,y)=>y(g),m)})}).catch(p=>{if(s)return;console.error("useLayouts: Failed to fetch initial V1 layouts:",p);const f=u.splice(0,u.length);l=!0,o(!0),t(h=>f.reduce((m,g)=>g(m),h))});try{const p=r.layouts.onAdded(m=>{m.type!=="Global"||s||(o(!0),l?t(g=>Jm(g,m.name)):u.push(g=>Jm(g,m.name)))}),f=r.layouts.onRemoved(m=>{m.type!=="Global"||s||(l?t(g=>Km(g,m.name)):u.push(g=>Km(g,m.name)))}),h=r.layouts.onRenamed((m,g)=>{m.type!=="Global"||s||(l?t(y=>qm(y,m.name,g==null?void 0:g.name)):u.push(y=>qm(y,m.name,g==null?void 0:g.name)))});c.push(p,f,h)}catch(p){console.error("useLayouts: Failed to subscribe to V1 layout events:",p)}}return()=>{s=!0,c.forEach(l=>{try{l()}catch(u){console.error("useLayouts: Failed to unsubscribe from layout events:",u)}})}},[r,i,a]),{layouts:e,isInitialized:n}},jf=()=>{const e=v.useContext(Se.IOConnectContext);return v.useCallback(async t=>{const{id:n,name:o}=t;if(e)try{n?await zt(e).restore({id:n}):await e.layouts.restore({name:o}),await De({io:e,variant:Rn,text:`Layout "${o}" was loaded successfully.`})}catch(r){await De({io:e,variant:ot,text:`Failed to load Layout "${o}".`,error:r})}},[e])},eb="Control",tb="Shift",Ml=()=>{const[e,t]=v.useState(),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{var o,r;try{const i=(o=n.windows.my())!=null&&o.name?void 0:((r=window.workspacesManager)==null?void 0:r.getFrameId())||(()=>{if(!window.name)throw new Error("The frame id is not available because the platform is still initializing");return window.name})();t(i)}catch(i){console.error("Failed to get the current frame ID ",{error:i})}},[n,t]),e},np=async(e,t,n)=>{if(!e.restoreWorkspaceById)throw new Error("The connected io.Connect host doesn't support restoreWorkspaceById, which is required to restore V2 workspaces.");return e.restoreWorkspaceById({...n,layoutId:t})},Dl=()=>{const e=v.useContext(Se.IOConnectContext),t=Ml();return async({id:n,workspaceId:o,accessInfo:r,modifier:i,reuseWorkspaceId:a})=>{try{const s=i===eb?{newFrame:!0}:{frameId:t,reuseWorkspaceId:a},c=e.workspaces;if(!c)return;if(vi(e)){const l=zt(e);if(o)return void await np(c,o,s);const u=await l.getMany({type:"Workspace",name:n,includeAccessInfo:!0}),p=r?u.find(f=>{var h;return((h=f.accessInfo)==null?void 0:h.owner)===r.owner}):u[0];if(!p)throw new Error(`Workspace "${n}" not found via the V2 Layouts API.`);await np(c,p.id,s)}else await c.restoreWorkspace(n,s)}catch(s){await De({io:e,variant:ot,text:`Failed to load Workspace "${n}".`,error:s})}}},Qm="Welcome",nb=e=>e.trim().length>0,Zo=()=>window.glue42gd!==void 0||window.glue42alert!==void 0||window.glue42dialog!==void 0||window.iodesktop!==void 0;function qs(e){let t,n=!1;return e().then(o=>{n?o():t=o}).catch(o=>console.error("Failed to subscribe to V2 layout event:",o)),()=>{n=!0,t==null||t()}}const V3=(e,t)=>{const[n,o]=v.useState(void 0),r=v.useRef(!1),{activeLayout:i,setActiveLayout:a}=Qy(),s=jf(),c=Dl(),l=v.useContext(Se.IOConnectContext),u=vi(l),p=zt(l),f=v.useCallback(async({id:h,name:m})=>{try{u&&h?await p.default.set({id:h}):await l.layouts.setDefaultGlobal(m)}catch(g){console.error("Failed to set default Layout: ",{error:g})}},[l,u,p]);return v.useEffect(()=>{if(!l)return;let h=!1;if(u){p.default.get().then(y=>{h||o(y?{id:y.id,name:y.name}:void 0)}).catch(y=>console.error("Failed to fetch default Layout:",y));const g=qs(()=>p.default.onChanged(y=>{o(y?{id:y.id,name:y.name}:void 0)}));return()=>{h=!0,g()}}l.layouts.getDefaultGlobal().then(g=>{h||o(g??void 0)}).catch(g=>console.error("Failed to fetch default Layout:",g));const m=l.layouts.onDefaultGlobalChanged(g=>{o(g)});return()=>{h=!0,m()}},[l,u,p]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRestored(h=>{a({id:h.id,name:h.name})})):l.layouts.onRestored(h=>{a({name:h.name})})},[l,u,p,a]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRemoved(h=>{h.id===(i==null?void 0:i.id)&&a(null)})):l.layouts.onRemoved(h=>{(h==null?void 0:h.name)===(i==null?void 0:i.name)&&a(null)})},[l,u,p,i,a]),v.useEffect(()=>{if(l)return u?qs(()=>p.onRenamed(h=>{h.id===(i==null?void 0:i.id)&&a({id:h.id,name:h.name})})):l.layouts.onRenamed((h,m)=>{(m==null?void 0:m.name)===(i==null?void 0:i.name)&&a({name:h.name})})},[l,u,p,i,a]),v.useEffect(()=>{if(!l||r.current)return;let h,m=!1;const g=()=>{var y;m||(Zo()||(y=window.iobrowser)!=null&&y.platformStarted?(async()=>{var C;r.current=!0;const x=u?await p.default.get()??(await p.getMany({type:"Global"})).find(w=>w.name===Qm):await l.layouts.getDefaultGlobal()??(await l.layouts.getAll("Global")).find(w=>w.name===Qm);if(x&&(o({id:x.id,name:x.name}),!i&&!Zo())){e(!0);try{if(t)return void await s({id:x.id,name:x.name});const w=await((C=l.workspaces)==null?void 0:C.getWorkspace(E=>E.children.length===0)),I=u?await p.get({id:x.id,includeComponents:!0}):await l.layouts.get(x.name,"Global");if(!I)throw new Error("Default Global Layout not found.");const b=I.components.reduce((E,N)=>{if(N.type==="workspaceFrame"){const A=N.state.workspaces.map(P=>P.config.name);E.push(...A)}return E},[]),k=u?await p.getMany({type:"Workspace",includeAccessInfo:!0}):[],S=b.reduce((E,N,A)=>{const P=k.filter(G=>G.name===N);if(P.length>1)return console.warn(`useSetUpLayouts: Workspace "${N}" is ambiguous (multiple V2 matches) - skipping restore.`),E;const j=P[0];return E.push(c({id:N,workspaceId:j==null?void 0:j.id,accessInfo:j==null?void 0:j.accessInfo,reuseWorkspaceId:A===0?w==null?void 0:w.id:void 0})),E},[]);await Promise.all(S)}finally{e(!1)}}})().catch(x=>console.error("Initial Global Layout setup failed. ",dr(x))):h=setTimeout(g,100))};return g(),()=>{m=!0,h&&clearTimeout(h)}},[l,u,p,i,s,c,t,e]),{defaultLayout:n,activeLayout:i,setDefaultLayout:f,setActiveLayout:a}},ob=v.createContext(void 0),to=()=>{const e=v.useContext(ob);if(e===void 0)throw new Error("useLaunchpadAPI must be used within a LaunchpadAPIProvider");return e},F3=({children:e,close:t,isOpen:n,isGlobalLayoutsAvailable:o})=>{const[r,i]=v.useState(!1),{defaultLayout:a,activeLayout:s,setDefaultLayout:c,setActiveLayout:l}=V3(i,o),u=v.useMemo(()=>({close:t,isOpen:n,defaultLayout:a,activeLayout:s,setDefaultLayout:c,setActiveLayout:l,isLayoutOperationBlocked:r,setIsLayoutOperationBlocked:i,isGlobalLayoutsAvailable:o}),[t,n,a,s,c,l,r,o]);return d.jsx(ob.Provider,{value:u,children:e})},eg="io-connect-platform",ei="___platform_prefs___",rb="_launchpad_collapsedSections",ib="_launchpad_favorites",z3="_launchpad_recent",ab="_launchpad_isCollapsed",qc="_launchpad_isPinned",op="_launchpad_isDocked",sb="_launchpad_minimizeToTray",cb="_launchpad_autoCloseStartingAppsAndWorkspaces",lb="_launchpad_pinnedPosition",ub="_launchpad_allowDocking",db="_launchpad_dockedAlwaysOnTop",pb="_launchpad_dockedClaimsSpace",bs="_launchpad_showExtendedArea",fb="_launchpad_hideLabelsInExtendedArea",hb="_launchpad_showFavoritesInExtendedArea",Pf="_launchpad_hideFavoritesSection",mb="_launchpad_showRecentAppsInExtendedArea",gb="_layouts_restoreLastSaved",vb="_layouts_saveCurrentOnExit",yb="_layouts_showUnsavedChangesPrompt",Nf="_layouts_showDeletePrompt",bb="_layouts_hidden",ia="_layouts_showHidden",wb="_workspaces_hidden",xb="_downloads_askForEachDownload",$3="_downloads_location",Z3="_system_scheduleRestart",X3="_system_scheduleRestartTime",U3="_system_scheduleRestartFrequency",J3="_system_scheduleRestartDay",Y3="_system_scheduleShutdown",K3="_system_scheduleShutdownTime",q3="_system_scheduleShutdownFrequency",Q3="_system_scheduleShutdownDay",e5={[rb]:[],[ib]:[],[z3]:[],[ab]:!1,[qc]:!1,[op]:!1,[sb]:!1,[cb]:!0,[lb]:"Left",[ub]:!0,[db]:!1,[pb]:!1,[bs]:!0,[fb]:!0,[hb]:!0,[Pf]:!1,[mb]:!0,[gb]:!0,[vb]:!0,[yb]:!0,[Nf]:!0,[bb]:[],[ia]:!1,[wb]:[],[xb]:!0,[$3]:"",[Z3]:!1,[X3]:"12:00 AM",[U3]:"daily",[J3]:"Monday",[Y3]:!1,[K3]:"12:00 AM",[q3]:"daily",[Q3]:"Monday"},Cb=ys(U("add"),U("add-workspace"),U("align-bottom"),U("align-bottom-solid"),U("align-left"),U("align-left-bottom"),U("align-left-bottom-solid"),U("align-left-solid"),U("align-left-top"),U("align-left-top-solid"),U("align-right"),U("align-right-bottom"),U("align-right-bottom-solid"),U("align-right-solid"),U("align-right-top"),U("align-right-top-solid"),U("align-top"),U("align-top-solid"),U("always-on-top"),U("always-on-top-on"),U("application"),U("apps"),U("arrow-down-long"),U("arrow-down"),U("arrow-down-to-bracket"),U("arrow-left-long"),U("arrow-right-from-bracket"),U("arrow-right-long"),U("arrow-right-long-to-line"),U("arrow-up"),U("arrow-up-long"),U("ban"),U("bell"),U("bell-solid"),U("bookmark"),U("bullseye-pointer"),U("certificate"),U("check"),U("check-solid"),U("chevron-down"),U("chevron-left"),U("chevron-right"),U("chevron-up"),U("circle-info"),U("circle-xmark"),U("circle-xmark-full"),U("clock"),U("clock-rotate-left"),U("clone"),U("close"),U("cog"),U("cog-solid"),U("collapse"),U("copy"),U("display"),U("download"),U("download-icon-arrow"),U("delete-left"),U("dev-tools"),U("ellipsis"),U("ellipsis-vertical"),U("expand"),U("envelope"),U("envelope-open"),U("exclamation-mark"),U("expand"),U("feedback"),U("filter"),U("floppy"),U("floppy-disk-pen"),U("folder"),U("folder-open"),U("folder-plus"),U("globe"),U("grid"),U("group"),U("hidden"),U("home"),U("house"),U("info"),U("keyboard"),U("layout"),U("link"),U("link-disabled"),U("list-ul"),U("lock"),U("logo"),U("minimize"),U("minimize-down"),U("paper-plane-top"),U("paperclip"),U("plug"),U("pause"),U("pen-line"),U("pen-to-square"),U("pin"),U("play"),U("pop-in"),U("pop-in-widget"),U("pop-out"),U("power-off"),U("publish"),U("refresh"),U("resize"),U("restore"),U("rotate-right"),U("search"),U("search-filled"),U("sleep"),U("sliders"),U("snooze"),U("spinner"),U("square"),U("square-arrow-down"),U("square-arrow-up"),U("square-list"),U("star"),U("star-full"),U("sticky-off"),U("sticky-off-hover"),U("sticky-on"),U("sticky-on-hover"),U("subscribe"),U("up-from-line"),U("system-close"),U("system-maximize"),U("system-minimize"),U("thumbs-down"),U("thumbs-up"),U("trash"),U("trash-can"),U("triangle-exclamation"),U("unlock"),U("unpin"),U("up-to-line"),U("user"),U("user-gear"),U("visible"),U("visible-full"),U("users-gear"),U("workspace"),U("fav-add"),U("fav-remove")),t5=$t({name:ut,displayName:xe(ut),icon:xe(Cb),iconSrc:xe(ut),disabled:xe(pt()),separatorAfter:xe(pt())}),n5=$t({id:ut,title:ut,description:xe(ln()),icon:xe(Cb),iconSrc:xe(ut),contextMenuActions:xe(wo(t5)),type:ut}),o5=wo(n5),r5=wo($t({name:ut,id:xe(ut)})),i5=wo($t({id:ut,title:ut})),a5=$t({name:ut,type:ut,id:xe(ut)}),s5=ys(U("Left"),U("Right")),tg=ys(U("daily"),U("weekly")),ng=ys(U("Sunday"),U("Monday"),U("Tuesday"),U("Wednesday"),U("Thursday"),U("Friday"),U("Saturday")),Ac=$t({customPrefs:xe(tp()),_launchpad_collapsedSections:xe(wo(ut)),_launchpad_favorites:xe(o5),_launchpad_recent:xe(wo(a5)),_launchpad_isCollapsed:xe(pt()),_launchpad_isPinned:xe(pt()),_launchpad_isDocked:xe(pt()),_launchpad_minimizeToTray:xe(pt()),_launchpad_autoCloseStartingAppsAndWorkspaces:xe(pt()),_launchpad_pinnedPosition:xe(s5),_launchpad_allowDocking:xe(pt()),_launchpad_dockedAlwaysOnTop:xe(pt()),_launchpad_dockedClaimsSpace:xe(pt()),_launchpad_showExtendedArea:xe(pt()),_launchpad_hideLabelsInExtendedArea:xe(pt()),_launchpad_showFavoritesInExtendedArea:xe(pt()),_launchpad_hideFavoritesSection:xe(pt()),_launchpad_showRecentAppsInExtendedArea:xe(pt()),_layouts_restoreLastSaved:xe(pt()),_layouts_saveCurrentOnExit:xe(pt()),_layouts_showUnsavedChangesPrompt:xe(pt()),_layouts_showDeletePrompt:xe(pt()),_layouts_hidden:xe(r5),_layouts_showHidden:xe(pt()),_workspaces_hidden:xe(i5),_downloads_askForEachDownload:xe(pt()),_downloads_location:xe(ln()),_system_scheduleRestart:xe(pt()),_system_scheduleRestartTime:xe(ut),_system_scheduleRestartFrequency:xe(tg),_system_scheduleRestartDay:xe(ng),_system_scheduleShutdown:xe(pt()),_system_scheduleShutdownTime:xe(ut),_system_scheduleShutdownFrequency:xe(tg),_system_scheduleShutdownDay:xe(ng)}),Of=v.createContext(void 0),Bl=({children:e,launchpadMode:t})=>{const[n,o]=v.useState(),[r,i]=v.useState(!1),[a,s]=v.useState(),c=v.useContext(Se.IOConnectContext),l=v.useMemo(()=>({prefs:n,isInitialSetupCompleted:r,initialSetupError:a}),[n,r,a]);return v.useEffect(()=>{if(!c)return;let u=!1;const p=c.contexts.subscribe(ei,f=>{if(u)return;const h=Ac.run(f);if(!h.ok)return void c.logger.warn(`The received data for context ${ei} is with an invalid shape: ${dr(h.error.message)}`);const m=h.result;o(m),c.prefs.updateFor(eg,m).catch(g=>{c.logger.warn(`Failed to update platform prefs. Error: ${dr(g)}`)})});return()=>{u=!0,p.then(f=>{f()})}},[c]),v.useEffect(()=>{c&&(async()=>{var u;try{const p=await c.contexts.get(ei),f=Ac.run(p);if(!f.ok)throw new Error(`The data in context ${ei} is with an invalid shape: ${dr(f.error.message)}`);const h=f.result;if(Object.keys(h).length>0)return;const m=((u=await c.prefs.get(eg))==null?void 0:u.data)??{},g=Ac.run(m);if(!g.ok)throw new Error(`The stored platform prefs in io.prefs are with an invalid shape: ${dr(g.error.message)}`);const y={[qc]:t==="pinned"||(m[qc]??!1),[op]:t==="docked"||(m[op]??!1)},x={...e5,...g.result,...y};await c.contexts.set(ei,x)}catch(p){s({message:dr(p)}),await De({io:c,variant:ot,text:"Initial platform prefs setup failed.",error:p})}finally{i(!0)}})().catch(console.error)},[c,t]),d.jsx(Of.Provider,{value:l,children:e})};function Ib(){const e=v.useContext(Of);if(e===void 0)throw new Error("usePlatformPrefs must be used within a PlatformPrefsProvider");return e}function St({prefKey:e}){var p;const t=v.useContext(Se.IOConnectContext),n=v.useContext(Of),o=(p=n==null?void 0:n.prefs)==null?void 0:p[e],r=(n==null?void 0:n.isInitialSetupCompleted)??!1,[i,a]=v.useState(!r),[s,c]=v.useState(),l=v.useRef(0);v.useEffect(()=>{r&&l.current===0&&a(!1)},[r]);const u=v.useCallback(async f=>{if(!t)return;const h=++l.current;a(!0),c(void 0);const m=async y=>{y&&await De({io:t,variant:ot,text:`Failed to update prefKey "${e}".`,error:y}),h===l.current&&(a(!1),y&&c({message:dr(y)}))};let g;if(f instanceof Function)try{g=f((await t.contexts.get(ei))[e])}catch(y){return m(y)}else g=f;try{const y=Ac.runWithException({[e]:g});await t.contexts.update(ei,y)}catch(y){return m(y)}await m()},[t,e]);if(n===void 0)throw new Error("usePlatformPref must be used within a PlatformPrefsProvider");return{error:s,isLoading:i,update:u,value:o}}const Hl=()=>{const{value:e,update:t,isLoading:n,error:o}=St({prefKey:qc}),r=v.useCallback(()=>t(i=>!i),[t]);return{error:o,isLaunchpadPinned:e,isLoading:n,toggle:r}},ws=()=>{const{isLaunchpadPinned:e}=Hl(),{close:t}=to();return v.useCallback(()=>{e||(t==null||t())},[e,t])},kb="openInNewWindow",Sb="openInNewWorkspace",Ab="toggleFavorite",yr=e=>"items"in e,rp=e=>`${e.type}:${e.id}`,ts={ASCENDING:"ascending",DESCENDING:"descending",DISABLED:"disabled"},xs=new Intl.Collator(void 0,{sensitivity:"base"}),Eb=(e,t)=>xs.compare(e.title,t.title),jb=(e,t)=>xs.compare(t.title,e.title),Tf=e=>{const{items:t,sortOrder:n,ascendingCompare:o,descendingCompare:r}=e;if(n===ts.DISABLED)return t;const i=n===ts.ASCENDING?o:r;return[...t].sort(i)},Rf=e=>{const t={name:Ab,displayName:e?"Remove from Favorites":"Add to Favorites",icon:e?"fav-remove":"fav-add"};return Zo()?[t]:[{name:kb,displayName:"Open in a new window",icon:"pop-out"},{name:Sb,displayName:"Open in a new Workspace",icon:"pop-out",separatorAfter:!0},t]},ip=e=>{var h;const{items:t,newItem:n,settings:o,path:r,accumulatedPath:i=""}=e,{isFolderCollapsible:a}=o,[s,...c]=r.split("/"),l=i?`${i}/${s}`:s,u=t.findIndex(m=>yr(m)&&m.title===s),p=u!==-1?t[u]:null;if(!p){const m=c.length>0?ip({items:[],newItem:n,settings:o,path:c.join("/"),accumulatedPath:l}):[n],g=(h=o.folderIconGetters)==null?void 0:h[l],y=g?x=>({src:g(x)}):void 0;return[...t,{id:s,title:s,items:m,isCollapsible:a,getIcon:y}]}const f=c.length>0?ip({items:p.items,newItem:n,settings:o,path:c.join("/"),accumulatedPath:l}):[...p.items,n];return[...t.slice(0,u),{...p,items:f},...t.slice(u+1)]},Qc=e=>{const{title:t,userProperties:n}=e,{folder:o}=n;return o?`${o}/${t}`:t},c5=(e,t)=>xs.compare(Qc(e),Qc(t)),l5=(e,t)=>xs.compare(Qc(t),Qc(e)),u5={[kb]:async e=>{var r;const{io:t,item:n,closeLaunchpadIfNotPinned:o}=e;try{o(),await((r=t.appManager.application(n.id))==null?void 0:r.start())}catch(i){await De({io:t,variant:ot,text:`Failed to start app "${n.title}" in a new window.`,error:i})}},[Sb]:async e=>{const{io:t,item:n,frameId:o,closeLaunchpadIfNotPinned:r}=e;if(!t.workspaces)return;const i={type:"workspace",definition:{frame:o?{reuseFrameId:o}:{newFrame:!0}}},a=t.workspaces.getBuilder(i);a.addGroup().addWindow({appName:n.id});try{r(),await a.create()}catch(s){await De({io:t,variant:ot,text:`Failed to start app "${n.title}" in a new Workspace.`,error:s})}},[Ab]:async e=>{const{item:t,toggleFavorite:n}=e;await n({...t,contextMenuActions:Rf(!0)})}},Tr="application",Xo="workspace",no="layout";class Lf{constructor(){Vn(this,"queue",[]);Vn(this,"isExecutingQueue",!1)}enqueue(t){return new Promise((n,o)=>{this.queue.push({action:t,resolve:n,reject:o}),this.executeQueue()})}async executeQueue(){if(!this.isExecutingQueue){for(this.isExecutingQueue=!0;this.queue.length;){const t=this.queue.shift();if(!t)return void(this.isExecutingQueue=!1);try{const n=await t.action();t.resolve(n)}catch(n){t.reject(n)}await this.intervalBreak()}this.isExecutingQueue=!1}}intervalBreak(){return new Promise(t=>setTimeout(t,0))}}function fi(e){return e.id??e.title}function d5(e){return{id:e.id,title:e.name,metadata:e.metadata,accessInfo:e.accessInfo}}function og(e,t){const n=e.findIndex(i=>i.id===t.id);if(n===-1)return[...e,t];const o=e[n],r={...o,...t,metadata:t.metadata??o.metadata,accessInfo:t.accessInfo??o.accessInfo};return[...e.slice(0,n),r,...e.slice(n+1)]}const Cs=()=>{const[e,t]=v.useState([]),[n,o]=v.useState([]),r=v.useContext(Se.IOConnectContext),i=zt(r),a=vi(r);return v.useEffect(()=>{if(!(r!=null&&r.workspaces))return;let s=!1;const c=[];if(a){const f=()=>{i.getMany({includeAccessInfo:!0}).then(h=>{s||o(m=>function(g,y){const x=y.filter(I=>I.type==="Workspace"),C=new Set(x.map(I=>I.id)),w=g.filter(I=>!C.has(I.id));return[...x,...w]}(m,h))}).catch(h=>console.error("useWorkspaces: Failed to refresh V2 workspaces:",h))};return f(),Promise.all([i.onAdded(h=>{h.type!=="Workspace"||s||(o(m=>og(m,h)),f())}),i.onRemoved(h=>{h.type!=="Workspace"||s||o(m=>function(g,y){return g.filter(x=>x.id!==y)}(m,h.id))}),i.onRenamed(h=>{h.type!=="Workspace"||s||o(m=>function(g,y,x){return g.map(C=>C.id===y?{...C,name:x}:C)}(m,h.id,h.name))}),i.onChanged(h=>{h.type!=="Workspace"||s||(o(m=>og(m,h)),f())})]).then(h=>{s?h.forEach(m=>m()):c.push(...h)}).catch(h=>console.error("useWorkspaces: Failed to subscribe to V2 workspace events:",h)),()=>{s=!0,c.forEach(h=>{try{h()}catch(m){console.error("useWorkspaces: Failed to unsubscribe from V2 workspace events:",m)}})}}const l=r.workspaces.layouts.onSaved(({name:f})=>{s||t(h=>h.some(({title:m})=>m===f)?h:[...h,{title:f}])}),u=r.workspaces.layouts.onRemoved(({name:f})=>{s||t(h=>function(m,g){return m.filter(({title:y})=>y!==g)}(h,f))}),p=r.layouts.onRenamed((f,h)=>{s||f.type!=="Workspace"||t(m=>function(g,y,x){const C=g.filter(I=>I.title!==y),w=C.findIndex(I=>I.title===x);return w===-1?g:[...C.slice(0,w),{title:y},...C.slice(w+1)]}(m,f.name,h==null?void 0:h.name))});return()=>{s=!0,p(),[l,u].forEach(async f=>{try{(await f)()}catch(h){console.error(h)}})}},[r,i,a]),v.useMemo(()=>a?n.map(d5):e,[a,n,e])},rg=new Lf,Eo=()=>{const{value:e,update:t,isLoading:n}=St({prefKey:ib}),o=Ef(),r=Cs(),{layouts:i}=ra();return{favorites:v.useMemo(()=>(e??[]).filter(a=>a.type===Tr?o.some(s=>s.id===a.id):a.type===Xo?r.some(s=>fi(s)===a.id):a.type!==no||i.some(s=>mt(s)===a.id)),[e,o,r,i]),toggleFavorite:v.useCallback(a=>{const{openInstances:s,...c}=a;return rg.enqueue(()=>t((l=[])=>((u,p)=>u.find(f=>f.id===p.id&&f.type===p.type)?u.filter(f=>!(f.id===p.id&&f.type===p.type)):[p,...u])(l,c)))},[t]),removeFavorite:v.useCallback(a=>rg.enqueue(()=>t((s=[])=>((c,l)=>c.filter(u=>!(u.id===l.id&&u.type===l.type)))(s,a))),[t]),isLoading:n}},Pb=()=>{const e=v.useContext(Se.IOConnectContext),t=Ml(),{toggleFavorite:n}=Eo(),o=ws();return(r,i)=>{u5[i]({io:e,item:r,frameId:t,toggleFavorite:n,closeLaunchpadIfNotPinned:o})}},Nb="rename",Ob="save",Tb="saveAs",Rb="savePrivateCopy",p5="delete",f5="setAsDefault",h5="toggleFavorite",m5="hideFromLaunchpad",g5="showInLaunchpad",v5="load",Lb="share",_b="manage",Mb="details",Ec="edit",ig=e=>(e??"").trim().replace(/\s+/g," "),xo=e=>(e==null?void 0:e.accessLevel)==="public"||(e==null?void 0:e.accessLevel)==="shared",_f=(e,t,n)=>{if(t)return xo(e)?`Public ${n}`:`Private ${n}`},Db=e=>!xo(e)||!!(e!=null&&e.canEdit),Bb=e=>!xo(e)||!!(e!=null&&e.canEdit),y5=e=>{var o;const t=e==null?void 0:e.owner,n=(o=globalThis.iodesktop??globalThis.glue42gd)==null?void 0:o.user;return!(!t||!n)&&t===n},b5=(e,t,n)=>{if(!xo(e))return{heading:`Delete "${t}"`,text:`Are you sure you want to delete this ${n}?`};const o=n.toLowerCase(),r=`Are you sure you want to delete "${t}" ${o}?`;return y5(e)?{heading:r,text:`Deleting this ${o} will remove it from all users.`}:{heading:r,text:`This ${o} is owned by ${e!=null&&e.owner?`"${e.owner}"`:"another user"}. Deleting it will remove it from all users, including the owner.`}},w5=(e,t)=>{const n=t.toLowerCase();return{heading:`Are you sure you want to delete "${e}" ${n}?`,text:`Its sharing settings couldn't be loaded. If this ${n} is public or shared, deleting it will remove it from all users.`}},Hb=(e,t)=>xo(e)?Db(e)?[{name:t.MANAGE,displayName:"Manage",icon:"users-gear",separatorAfter:!0}]:[{name:t.DETAILS,displayName:"Details",icon:"square-list",separatorAfter:!0}]:[{name:t.SHARE,displayName:"Publish",icon:"up-from-line"},{name:t.EDIT,displayName:"Edit",icon:"pen-line",separatorAfter:!0}],Gb=(e,t)=>xs.compare(e.title,t.title),Wb=e=>[...e].sort(Gb),x5=(e,t,n,o=Wb)=>{const r=new Map,i=[];return e.forEach(s=>{const c=ig(t(s));if(!c)return void i.push(s);const l=(p=>ig(p).toLowerCase())(c),u=r.get(l);r.set(l,{title:u&&u.title<c?u.title:c,items:[...(u==null?void 0:u.items)??[],s]})}),[...Array.from(r.entries()).map(([s,{title:c,items:l}])=>({id:s,title:c,isCollapsible:!0,items:o(l).map(n)})).sort(Gb),...o(i).map(n)]},Vb=(e,t,n)=>{const{getAccessInfo:o,getFolder:r,toItemShell:i,filterPublicItems:a=p=>p,sortLeafItems:s=Wb}=n;if(!t)return s(e).map(i);const c=a(e.filter(p=>xo(o(p)))),l=e.filter(p=>!xo(o(p))),u=(p,f,h)=>h.length>0?[{id:p,title:f,isCollapsible:!0,items:x5(h,r,i,s)}]:[];return[...u("public","Public",c),...u("private","Private",l)]},C5={[Lb]:"share-layout",[_b]:"manage-layout",[Mb]:"details-layout",[Ec]:"edit-layout"},Mf=e=>C5[e],ag=e=>xo(e.accessInfo),Gl=(e,t)=>_f(e.accessInfo,t,"Layout"),I5=new Set([Nb,Ob,Tb]),Is=(e,t)=>{const n=t&&ag(e),o=!n||Bb(e.accessInfo),r=t&&!ag(e),i=t?Hb(e.accessInfo,{SHARE:Lb,MANAGE:_b,DETAILS:Mb,EDIT:Ec}):[],a=i.find(u=>u.name===Ec),s=i.filter(u=>u.name!==Ec).map((u,p,f)=>p===f.length-1?{...u,separatorAfter:!0}:u),c=[...r?[]:[{name:Nb,displayName:"Rename",icon:"pen-line"}],...a?[{...a,separatorAfter:!1}]:[],{name:Ob,displayName:"Save",disabled:!e.isActive,icon:"floppy"},{name:Tb,displayName:"Save as",icon:"floppy-disk-pen"},...n?[{name:Rb,displayName:"Save a Private Copy",icon:"floppy-disk-pen"}]:[],{name:v5,displayName:"Load",icon:"spinner",separatorAfter:!0},{name:f5,displayName:"Set as Default",disabled:e.isDefault,icon:"user-gear"},{name:h5,displayName:e.isFavorite?"Remove from Favorites":"Add to Favorites",icon:e.isFavorite?"fav-remove":"fav-add",separatorAfter:!n},...n?[e.isHidden?{name:g5,displayName:"Show in Launchpad",icon:"visible",separatorAfter:!0}:{name:m5,displayName:"Hide from Launchpad",icon:"hidden",separatorAfter:!0}]:[],...s,...o?[{name:p5,displayName:"Delete",icon:"trash-can"}]:[]].filter(u=>!n||!I5.has(u.name)),l=c.length-1;return c.map((u,p)=>p===l?{...u,separatorAfter:!1}:u)},k5=e=>{var t;return{id:mt(e),title:e.name,type:no,icon:"layout",iconSrc:((t=e.metadata)==null?void 0:t.icon)||void 0,accessInfo:e.accessInfo}},Fb=(e,t)=>e.map(n=>yr(n)?{...n,items:Fb(n.items,t)}:((o,{activeLayout:r,defaultLayout:i,isLayoutSharingEnabled:a,hiddenLayoutIds:s,favoriteLayoutIds:c})=>{const l=!!r&&o.id===mt(r),u=!!i&&o.id===mt(i),p=s.has(o.id),f=c.has(o.id),h=o.accessInfo,m={id:o.id,name:o.title,isActive:l,isDefault:u,isHidden:p,isFavorite:f,accessInfo:h};return{...o,isSelected:l,className:p?"is-hidden-item":void 0,statusPill:u?{variant:"default",text:"Default"}:void 0,contextMenuSubtitle:Gl(m,a),contextMenuActions:Is(m,a)}})(n,t)),Do={NO_INPUTS_CONFIRMATION_DIALOG:"noInputsConfirmationDialog",SINGLE_CHECKBOX_DIALOG:"singleCheckboxDialog",SINGLE_TEXT_INPUT_DIALOG:"singleTextInputDialog"},Va="(.|\\s)*\\S(.|\\s)*",sg=e=>e==="public"||e==="shared",cg=new WeakMap;function S5(e){if(!e||!vi(e))return Promise.resolve(!1);const t=cg.get(e);if(t&&(t.retryAt===void 0||Date.now()<t.retryAt))return t.support;const n={support:Promise.resolve(!1)};return n.support=async function(o){const r=o.manager;if(!(r!=null&&r.checkCapability))return!1;const[i,a]=await Promise.all([r.checkCapability("ADVANCED_LAYOUTS"),r.checkCapability("API_METHOD_LAYOUTS_CHECK_CONFLICT")]);return(i==null?void 0:i.available)===!0&&(a==null?void 0:a.available)===!0}(e).catch(o=>(console.error("getConflictCheckSupport: Failed to check capabilities.",o),!1)).then(o=>(o||(n.retryAt=Date.now()+1e4),o)),cg.set(e,n),n.support}async function Wl({io:e,type:t,name:n,targetAccessLevel:o,excludeId:r}){if(await S5(e)){const{conflict:i}=await e.manager.layouts.checkConflict({id:r,type:t,name:n,accessLevel:o});return i?"taken":"available"}return sg(o)?"unverifiable":(await zt(e).getMany({type:t,name:n,includeAccessInfo:!0})).some(i=>{var a;return i.id!==r&&!sg((a=i.accessInfo)==null?void 0:a.accessLevel)})?"taken":"available"}const zb="Unable to verify name uniqueness - required capability is not available.";async function ap(e,t,n,o,r="Global"){var f;const i=r==="Workspace"?"Workspace":"Layout",a=await Wl({io:e,type:r,name:n,targetAccessLevel:(o==null?void 0:o.accessLevel)??"private"});if(a!=="available")return{success:!1,conflictMessage:a==="taken"?`Failed to save ${i} as "${n}". A ${i} with this name already exists.`:`Failed to save ${i} as "${n}". ${zb}`};const s=zt(e),c=await s.get({id:t.id,includeComponents:!0,includeContext:!0});if(!c)return{success:!1,conflictMessage:`Failed to save ${i} "${t.name}". The ${i} wasn't found.`};const{imported:l,errors:u}=await s.import([{name:n,type:r,context:c.context,metadata:c.metadata,components:c.components,...o?{accessInfo:o}:{}}],"merge");return u!=null&&u.length?{success:!1,conflictMessage:`Failed to save ${i} as "${n}".`}:{success:!0,savedLayoutId:(f=l.find(h=>h.name===n))==null?void 0:f.id}}async function $b(e,t,n="Global",o="private"){const r=`${t} copy`;try{const i=async a=>await Wl({io:e,type:n,name:a,targetAccessLevel:o})!=="available";if(!await i(r))return r;for(let a=1;a<=20;a++){const s=`${r} ${a}`;if(!await i(s))return s}return r}catch(i){return console.warn(`Failed to determine an available copy name for ${n==="Workspace"?"Workspace":"Layout"} "${t}".`,i),r}}const lg="delete",ug="do-not-ask-again";async function Zb(e,t,n,o,r){var a;let i=o;if(!i&&t){try{i=(a=await zt(e).get({id:t,includeAccessInfo:!0}))==null?void 0:a.accessInfo}catch(s){console.warn(`Failed to load the access info of ${r} "${n}".`,s)}if(!i)return{isPublic:!0,...w5(n,r)}}return{isPublic:xo(i),...b5(i,n,r)}}async function Xb(e,t){if(!t.id)return void await e.layouts.save({name:t.name,type:"Global"});const n=zt(e),{metadata:o}=await n.get({id:t.id})??{};await n.save({id:t.id,name:t.name,type:"Global",...o?{metadata:o}:{}})}const A5={delete:async e=>{var a;const{io:t,layout:n,showDeletePromptPref:o,updateShowDeletePromptPref:r}=e,i=await Zb(t,n.id,n.name,n.accessInfo,"Layout");if("modals"in t&&t.modals&&(o||i.isPublic)){const{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await t.modals.dialogs.request(function({isPublic:p,heading:f,text:h}){const m=[{variant:"critical",text:"Delete",id:lg},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}];return p?{templateName:Do.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:f,text:h,actionButtons:m}}:{templateName:Do.SINGLE_CHECKBOX_DIALOG,variables:{heading:f,text:h,checkbox:{id:ug,label:"Don't ask me again"},actionButtons:m}}}(i));if(((a=l==null?void 0:l.find(p=>p.id===ug))==null?void 0:a.checked)&&r(!1),!(s||(c==null?void 0:c.id)===lg))return}try{if(n.id){const s=zt(t);await s.remove({id:n.id}),n.isDefault&&await s.default.clear()}else await t.layouts.remove("Global",n.name),n.isDefault&&await t.layouts.clearDefaultGlobal();await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully deleted.`})}catch(s){await De({io:t,variant:ot,text:`Failed to delete Layout "${n.name}".`,error:s})}},rename:async e=>{var u;const{io:t,layout:n,setDefaultLayout:o}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot rename Layout because io dialogs are not enabled");const r="rename",i="new-layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Rename "${n.name}"`,input:{id:i,initialValue:n.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Rename",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))if(l!==n.name)try{const p=n.id?await async function(f,h,m,g){var x;const y=await Wl({io:f,type:"Global",name:m,targetAccessLevel:((x=h.accessInfo)==null?void 0:x.accessLevel)??"private",excludeId:h.id});return y!=="available"?{success:!1,conflictMessage:y==="taken"?`Failed to rename Layout "${h.name}" to "${m}". A Layout with name "${m}" already exists.`:`Failed to rename Layout "${h.name}". ${zb}`}:(await zt(f).rename({id:h.id},m),h.isDefault&&await g({id:h.id,name:m}),{success:!0})}(t,n,l,o):await async function(f,h,m,g){const y=f.layouts;if((await y.getAll("Global")).some(C=>C.name===m))return{success:!1,conflictMessage:`Failed to rename Layout "${h.name}" to "${m}". A Layout with name "${m}" already exists.`};const x=await y.get(h.name,"Global");return x?(await y.rename(x,m),h.isDefault&&await g({name:m}),{success:!0}):{success:!1,conflictMessage:`Failed to rename Layout "${h.name}". The Layout wasn't found.`}}(t,n,l,o);if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully renamed to "${l}".`})}catch(p){await De({io:t,variant:ot,text:`Failed to rename Layout "${n.name}".`,error:p})}else await De({io:t,variant:ot,text:`Failed to rename Layout "${n.name}". The new Layout name must be different from the current one.`})},save:async e=>{const{io:t,layout:n}=e;try{await Xb(t,n),await De({io:t,variant:Rn,text:`Layout "${n.name}" saved successfully`})}catch(o){await De({io:t,variant:ot,text:`Failed to save layout "${n.name}"`,error:o})}},saveAs:async e=>{var u;const{io:t,layout:n,setActiveLayout:o}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot save Layout under a new name because io dialogs are not enabled");const r="save-as",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save Layout "${n.name}" as`,input:{id:i,initialValue:n.name,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save as",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))try{const p=n.id?await ap(t,n,l):await async function(f,h,m){const g=f.layouts;if((await g.getAll("Global")).some(x=>x.name===m))return{success:!1,conflictMessage:`Failed to save Layout as "${m}". A Layout with this name already exists.`};const y=await g.get(h.name,"Global");return y?(await g.import([{...y,name:m}],"merge"),{success:!0}):{success:!1,conflictMessage:`Failed to save Layout "${h.name}". The Layout wasn't found.`}}(t,n,l);if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});n.isActive&&o({id:p.savedLayoutId,name:l}),await De({io:t,variant:Rn,text:`The Layout was successfully saved as "${l}".`})}catch(p){await De({io:t,variant:ot,text:`Failed to save Layout "${l}".`,error:p})}},savePrivateCopy:async e=>{var u;const{io:t,layout:n}=e;if(!n.id)return void console.error("Cannot save a private copy because the Layout has no id");if(!("modals"in t)||!t.modals)return void console.error("Cannot save a private copy because io dialogs are not enabled");const o=await $b(t,n.name),r="save-private-copy",i="layout-name",{isEnterPressed:a,responseButtonClicked:s,inputs:c}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save a private copy of the layout "${n.name}"`,input:{id:i,initialValue:o,validation:{disabledButtonIds:[r],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save",id:r},{variant:"outline",text:"Cancel",id:"cancel"}]}}),l=(u=c==null?void 0:c.find(p=>p.id===i))==null?void 0:u.value;if(l&&(a||(s==null?void 0:s.id)===r))try{const p=await ap(t,n,l,{accessLevel:"private"});if(!p.success)return void await De({io:t,variant:ot,text:p.conflictMessage});await De({io:t,variant:Rn,text:`Layout "${l}" saved successfully`})}catch(p){await De({io:t,variant:ot,text:`Failed to save layout "${n.name}"`,error:p})}},setAsDefault:async e=>{const{io:t,layout:n,setDefaultLayout:o}=e;try{await o({id:n.id,name:n.name}),await De({io:t,variant:Rn,text:`Layout "${n.name}" was successfully set as the default Layout.`})}catch{await De({io:t,variant:ot,text:`Failed to set Layout "${n.name}" as the default Layout.`})}},toggleFavorite:async e=>{var r;const{layout:t,isLayoutSharingEnabled:n,toggleFavorite:o}=e;await o({id:mt(t),title:t.name,type:no,icon:"layout",iconSrc:((r=t.metadata)==null?void 0:r.icon)||void 0,contextMenuActions:Is({...t,isFavorite:!0},n)})},hideFromLaunchpad:async e=>{const{layout:t,hideLayout:n}=e;try{await n({id:t.id,name:t.name})}catch(o){console.warn(`Failed to hide Layout "${t.name}" from the Launchpad.`,o)}},showInLaunchpad:async e=>{const{layout:t,showLayout:n}=e;try{await n({id:t.id,name:t.name})}catch(o){console.warn(`Failed to show Layout "${t.name}" in the Launchpad.`,o)}},load:async e=>{const{io:t,layout:n,closeLaunchpadIfNotPinned:o}=e;try{o(),n.id?await zt(t).restore({id:n.id}):await t.layouts.restore({name:n.name}),await De({io:t,variant:Rn,text:`Layout "${n.name}" was loaded successfully.`})}catch(r){await De({io:t,variant:ot,text:`Failed to load Layout "${n.name}".`,error:r})}}},dg=new Lf,Ub=({prefKey:e,getIdentity:t})=>{const{value:n,update:o,isLoading:r}=St({prefKey:e}),i=v.useMemo(()=>n??[],[n]),a=v.useCallback(l=>i.some(u=>t(u)===t(l)),[i,t]),s=v.useCallback(l=>dg.enqueue(()=>o((u=[])=>u.some(p=>t(p)===t(l))?u:[...u,l])),[o,t]),c=v.useCallback(l=>dg.enqueue(()=>o((u=[])=>u.filter(p=>t(p)!==t(l)))),[o,t]);return{hiddenItems:i,isItemHidden:a,hideItem:s,showItem:c,isLoading:r}},ks=()=>{const{hiddenItems:e,isItemHidden:t,hideItem:n,showItem:o,isLoading:r}=Ub({prefKey:bb,getIdentity:mt});return{hiddenLayouts:e,isLayoutHidden:t,hideLayout:n,showLayout:o,isLoading:r}};function Nn(){const e=v.useContext(Se.IOConnectContext);return v.useMemo(()=>vi(e),[e])}const Vl=()=>{const e=v.useContext(Se.IOConnectContext),{setActiveLayout:t,setDefaultLayout:n}=to(),o=Nn(),{value:r,update:i}=St({prefKey:Nf}),a=ws(),{hideLayout:s,showLayout:c}=ks(),{toggleFavorite:l}=Eo();return v.useCallback(async p=>{const{layout:f,actionName:h}=p;return await A5[h]({io:e,layout:f,setActiveLayout:t,setDefaultLayout:n,showDeletePromptPref:r,updateShowDeletePromptPref:i,closeLaunchpadIfNotPinned:a,hideLayout:s,showLayout:c,isLayoutSharingEnabled:o,toggleFavorite:l})},[e,n,t,a,r,i,s,c,o,l])},aa=()=>{const{isLayoutOperationBlocked:e,setIsLayoutOperationBlocked:t}=to();return v.useCallback(async n=>{if(!e){t(!0);try{await n()}catch(o){console.error("Layout operation failed: ",{error:o})}t(!1)}},[e,t])},Jb="openInNewWindow",Yb="toggleFavorite",Kb="savePrivateCopy",qb="hideFromLaunchpad",Qb="showInLaunchpad",e1="delete",t1="share",n1="manage",o1="details",jc="edit",E5={[t1]:"share-workspace",[n1]:"manage-workspace",[o1]:"details-workspace",[jc]:"edit-workspace"},r1=e=>E5[e],Df=(e,t)=>_f(e,t,"Workspace"),Fl=(e,t,n,o)=>{const r=n&&xo(e),i=!r||Bb(e),a=n?Hb(e,{SHARE:t1,MANAGE:n1,DETAILS:o1,EDIT:jc}):[],s=a.find(p=>p.name===jc),c=a.filter(p=>p.name!==jc).map((p,f,h)=>f===h.length-1?{...p,separatorAfter:!0}:p),l=[{name:Jb,displayName:"Open in a new window",icon:"pop-out",separatorAfter:!0},...s?[{...s,separatorAfter:!0}]:[],...r?[{name:Kb,displayName:"Save a Private Copy",icon:"floppy-disk-pen",separatorAfter:!0}]:[],{name:Yb,displayName:t?"Remove from Favorites":"Add to Favorites",icon:t?"fav-remove":"fav-add",separatorAfter:!r},...r?[o?{name:Qb,displayName:"Show in Launchpad",icon:"visible",separatorAfter:!0}:{name:qb,displayName:"Hide from Launchpad",icon:"hidden",separatorAfter:!0}]:[],...c,...i?[{name:e1,displayName:"Delete",icon:"trash-can"}]:[]],u=l.length-1;return l.map((p,f)=>f===u?{...p,separatorAfter:!1}:p)},j5=e=>{var t;return{id:fi(e),title:e.title,type:Xo,icon:"workspace",iconSrc:((t=e.metadata)==null?void 0:t.icon)||void 0,accessInfo:e.accessInfo}},i1=(e,t)=>e.map(n=>yr(n)?{...n,items:i1(n.items,t)}:((o,{isFavorite:r,getOpenInstances:i,isWorkspaceSharingEnabled:a,hiddenWorkspaceIds:s})=>{const c=o.accessInfo,l=s.has(o.id);return{...o,openInstances:i(o.title),className:l?"is-hidden-item":void 0,contextMenuSubtitle:Df(c,a),contextMenuActions:Fl(c,r(o.id),a,l)}})(n,t)),P5={[Jb]:async e=>{const{io:t,item:n,isWorkspaceSharingEnabled:o,closeLaunchpadIfNotPinned:r}=e;if(t.workspaces)try{r();const i=zt(t);o&&i?await np(t.workspaces,n.id,{newFrame:!0}):await t.workspaces.restoreWorkspace(n.title,{newFrame:!0})}catch(i){await De({io:t,variant:ot,text:`Failed to load Workspace "${n.title}".`,error:i})}},[e1]:async e=>{const{io:t,item:n,isWorkspaceSharingEnabled:o,removeFavorite:r,closeLaunchpadIfNotPinned:i}=e;if(t.workspaces){if("modals"in t&&t.modals){const a="delete",s=await Zb(t,o?n.id:void 0,n.title,n.accessInfo,"Workspace"),{isEnterPressed:c,responseButtonClicked:l}=await t.modals.dialogs.request({templateName:Do.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:s.heading,text:s.text,actionButtons:[{variant:"critical",text:"Delete",id:a},{variant:"outline",text:"Cancel",id:"cancel",autofocus:!0}]}});if(!(c||(l==null?void 0:l.id)===a))return}try{i();const a=zt(t);o&&a?await a.remove({id:n.id}):await t.workspaces.layouts.delete(n.title),await r(n),await De({io:t,variant:Rn,text:`"Workspace ${n.title}" was successfully deleted.`})}catch(a){await De({io:t,variant:ot,text:`Failed to delete Workspace "${n.title}".`,error:a})}}},[Yb]:async e=>{const{item:t,isWorkspaceSharingEnabled:n,isWorkspaceHidden:o,toggleFavorite:r}=e;await r({...t,contextMenuActions:Fl(t.accessInfo,!0,n,o(t))})},[Kb]:async e=>{var p;const{io:t,item:n}=e;if(!("modals"in t)||!t.modals)return void console.error("Cannot save a private copy because io dialogs are not enabled");if(!zt(t))return void console.error("Cannot save a private copy because the V2 Layouts API is not available");const o=n.id;if(!o)return void console.error(`Cannot save a private copy because Workspace "${n.title}" was not found`);const r=await $b(t,n.title,"Workspace"),i="save-private-copy",a="workspace-name",{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await t.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:`Save a private copy of the workspace "${n.title}"`,input:{id:a,initialValue:r,validation:{disabledButtonIds:[i],errorMessage:"Please provide a Workspace name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Save",id:i},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(p=l==null?void 0:l.find(f=>f.id===a))==null?void 0:p.value;if(u&&(s||(c==null?void 0:c.id)===i))try{const f=await ap(t,{id:o,name:n.title},u,{accessLevel:"private"},"Workspace");if(!f.success)return void await De({io:t,variant:ot,text:f.conflictMessage});await De({io:t,variant:Rn,text:`Workspace "${u}" saved successfully`})}catch(f){await De({io:t,variant:ot,text:`Failed to save workspace "${n.title}"`,error:f})}},[qb]:async e=>{const{item:t,hideWorkspace:n}=e;try{await n({id:t.id,title:t.title})}catch(o){console.warn(`Failed to hide Workspace "${t.title}" from the Launchpad.`,o)}},[Qb]:async e=>{const{item:t,showWorkspace:n}=e;try{await n({id:t.id,title:t.title})}catch(o){console.warn(`Failed to show Workspace "${t.title}" in the Launchpad.`,o)}}},N5=e=>e.id,zl=()=>{const{hiddenItems:e,isItemHidden:t,hideItem:n,showItem:o,isLoading:r}=Ub({prefKey:wb,getIdentity:N5});return{hiddenWorkspaces:e,isWorkspaceHidden:t,hideWorkspace:n,showWorkspace:o,isLoading:r}},a1=()=>{const e=v.useContext(Se.IOConnectContext),{removeFavorite:t,toggleFavorite:n}=Eo(),o=ws(),r=Nn(),{isWorkspaceHidden:i,hideWorkspace:a,showWorkspace:s}=zl();return v.useCallback((c,l)=>{P5[l]({io:e,item:c,isWorkspaceSharingEnabled:r,removeFavorite:t,toggleFavorite:n,isWorkspaceHidden:i,hideWorkspace:a,showWorkspace:s,closeLaunchpadIfNotPinned:o})},[e,r,t,n,i,a,s,o])},Bf=()=>{const{value:e,update:t,isLoading:n,error:o}=St({prefKey:ab});return{error:o,isLaunchpadCollapsed:e,setIsLaunchpadCollapsed:t,isLoading:n}},Hf=e=>{const{handler:t,skip:n}=e;v.useEffect(()=>{if(n)return;const o=r=>{setTimeout(()=>{var i;((i=document.activeElement)==null?void 0:i.nodeName)==="IFRAME"&&t(r)},0)};return window.addEventListener("blur",o,!0),()=>{window.removeEventListener("blur",o,!0)}},[t,n])},Gf=e=>{const{eventType:t,handler:n,ref:o,skip:r}=e;v.useEffect(()=>{if(r)return;const i=a=>{const s=a.target;(Array.isArray(o)?o.every(l=>l.current&&!l.current.contains(s)):o.current&&!o.current.contains(s))&&n(a)};return document.addEventListener(t,i,!0),()=>{document.removeEventListener(t,i,!0)}},[t,n,o,r])},Wf=()=>{const[e,t]=v.useState([]);return v.useEffect(()=>{const n=({key:i})=>{t(a=>a.includes(i)?a:a.concat(i))},o=i=>{t(a=>a.filter(s=>s!==i.key))},r=()=>{t([])};return document.addEventListener("keydown",n),document.addEventListener("keyup",o),window.addEventListener("blur",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",o),window.removeEventListener("blur",r)}},[]),e.length===1?e[0]:null},pg=e=>`${e.type.name}:${e.id}`,O5=e=>{const[t,n]=v.useState([]),[o,r]=v.useState(!0),i=v.useRef(0),a=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{const s=a==null?void 0:a.search;if(!s)return;const c=[],l=[],u=++i.current;let p=!1;const f=()=>p||u!==i.current;return(async h=>{let m;r(!0),n([]);try{m=await s.query({search:h.trim(),providerLimits:{maxResults:100,maxResultsPerType:5}})}catch(C){return void(f()||(console.error("Search query failed to initialize:",C),r(!1)))}if(f())return;const g=m.onResults(C=>{f()||(((w,I)=>{const b=new Set(w.map(k=>pg(k)));for(const k of I){const S=pg(k);b.has(S)||(w.push(k),b.add(S))}})(l,C.results),r(!1),n([...l]))}),y=m.onCompleted(()=>{f()||r(!1)}),x=m.onError(C=>{f()||(console.error(`Query failed. Provider: ${C.provider}; Error: ${C.error}`),r(!1))});c.push(g,y,x)})(e),()=>{p=!0,c.forEach(h=>h())}},[a,e]),{resultsToRender:t,isLoading:o}},Vf=()=>{const e=v.useContext(Se.IOConnectContext),t=async({id:o})=>{var r;await((r=e.appManager.application(o))==null?void 0:r.start())},n=async({id:o,modifier:r})=>{var c,l;const i=await((c=e.workspaces)==null?void 0:c.getWorkspace(u=>u.isSelected===!0)),a=i==null?void 0:i.children[0];if(r===eb||!i||(a==null?void 0:a.type)==="window")return void await((l=e.appManager.application(o))==null?void 0:l.start());await((a==null?void 0:a.type)==="group"?a:await(a??i).addGroup()).addWindow({appName:o})};return async o=>{try{await(Zo()?t:n)(o)}catch(r){await De({io:e,variant:ot,text:`Failed to start app "${o.title}".`,error:r})}}},T5={byTitle:{},byLayoutId:{}};function s1(e,t){var n;return t?(n=e.byLayoutId[t])==null?void 0:n.values().next().value:void 0}function fg(e,t){const n={...e.byTitle},o={...e.byLayoutId};return t.forEach(r=>{n[r.title]=n[r.title]??new Set,n[r.title].add(r.id),r.layoutId&&(o[r.layoutId]=o[r.layoutId]??new Set,o[r.layoutId].add(r.id))}),{byTitle:n,byLayoutId:o}}const c1=()=>{const[e,t]=v.useState(T5),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{const o=n.workspaces,r=[];let i=!1;if(o)return(async()=>{const a=new Set;try{const s=await o.onWorkspaceOpened(l=>t(u=>fg(u,[l]))),c=await o.onWorkspaceClosed(({workspaceId:l})=>{a.add(l),t(u=>function(p,f){const h={...p.byTitle};for(const g in h)if(h[g].has(f)){h[g].delete(f);break}const m={...p.byLayoutId};for(const g in m)if(m[g].has(f)){m[g].delete(f),m[g].size===0&&delete m[g];break}return{byTitle:h,byLayoutId:m}}(u,l))});if(i)return s==null||s(),void(c==null?void 0:c());r.push(s,c)}catch(s){console.error(s)}try{const s=await o.getAllWorkspaces();if(i)return;const c=s.filter(l=>!a.has(l.id));t(l=>fg(l,c))}catch(s){console.error(s)}})(),()=>{i=!0,r.forEach(a=>a==null?void 0:a())}},[n]),e};function Ff(e){const{title:t,subtitle:n,buttonSize:o="16",icon:r="ellipsis-vertical",iconSize:i="12",actions:a,isTabStop:s,onActionItemClick:c,buttonVariant:l,placement:u,strategy:p,offset:f,shouldCloseOnOutsideScroll:h=!1,shouldCloseOnWindowBlur:m=!1,shouldCloseOnWindowResize:g=!1,"data-testid":y,contextMenuDataTestId:x}=e,[C,w]=v.useState(!1),[I,b]=v.useState(null),[k,S]=v.useState(null),E=v.useRef(null),N=v.useRef(null),A=v.useMemo(()=>[N,E],[]),P=v.useCallback(()=>w(!1),[]),j=v.useMemo(()=>[{name:"offset",options:{offset:f}}],[f]),{styles:G,attributes:M}=Yy(I,k,{placement:u,strategy:p,modifiers:j});return v.useEffect(()=>{E.current=I},[I]),v.useEffect(()=>{N.current=k},[k]),Gf({eventType:"mouseup",handler:P,ref:A,skip:!C}),Hf({handler:P,skip:!C}),v.useEffect(()=>{if(m&&C)return window.addEventListener("blur",P),()=>{window.removeEventListener("blur",P)}},[P,C,m]),v.useEffect(()=>{if(!h||!k)return;const T=H=>{k.contains(H.target)?H.preventDefault():P()};return document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("wheel",T,{passive:!1}),()=>{document.removeEventListener("touchmove",T),document.removeEventListener("wheel",T)}},[P,k,h]),v.useEffect(()=>{if(g&&C)return window.addEventListener("resize",P),()=>{window.removeEventListener("resize",P)}},[P,C,g]),d.jsxs(d.Fragment,{children:[d.jsx(Ue,{ref:b,size:o,icon:r,iconSize:i,variant:l,...ff(T=>{T.stopPropagation(),w(H=>!H),k==null||k.focus({preventScroll:!0})}),tabIndex:s?0:-1,"data-testid":y}),C&&d.jsx(Af,{ref:S,title:t,subtitle:n,actions:a,onActionItemClick:(T,H)=>{T.stopPropagation(),c(T,H),P()},onClose:()=>{I==null||I.focus(),P()},style:G.popper,"data-testid":x,...M.popper})]})}function R5({className:e,size:t="large",variant:n="default",align:o="up",text:r,...i}){const a=te("io-loader",{[`io-loader-${n}`]:n!=="default"},t==="normal"&&"io-loader-md",t==="small"&&"io-loader-sm",o&&[`direction-${o}`],e);return d.jsxs("div",{className:a,role:"status","aria-live":"polite",...i,children:[d.jsx("div",{className:"io-loader-icon"}),r&&d.jsx("div",{className:"io-loader-text",children:r})]})}function pr({className:e,children:t,...n}){const o=te("io-panel-header",e);return d.jsx(cn,{className:o,...n,children:t})}pr.Title=bo,pr.ButtonGroup=We,pr.Button=Ze,pr.ButtonIcon=Ue,pr.Dropdown=fe;const Yi=v.forwardRef(({className:e,children:t,...n},o)=>{const r=te("io-panel-body",e);return d.jsx("div",{className:r,ref:o,"data-testid":"panel-body",...n,children:t})});function ji({className:e,...t}){const n=te("io-panel-footer",e);return d.jsx(hr,{className:n,...t})}function ze({className:e,children:t,...n}){const o=te("io-panel",e);return d.jsx("div",{className:o,"data-testid":"panel",...n,children:t})}function Ss({className:e,variant:t="default",children:n,...o}){const r=te("io-pill",t!=="default"&&[`io-pill-${t}`],e);return d.jsx("div",{className:r,role:"status",...o,children:n})}function L5({className:e,variant:t="active",value:n=0,...o}){const r=te("io-progress",t,e);let i;return i=n<0?0:n>100?100:n,d.jsx("div",{className:r,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...o,children:d.jsx("div",{className:"io-progress-bar",style:{width:`${i}%`}})})}/*!
9
9
  * OverlayScrollbars
10
10
  * Version: 2.14.0
11
11
  *
@@ -13,35 +13,35 @@
13
13
  * https://github.com/KingSora
14
14
  *
15
15
  * Released under the MIT license.
16
- */Yi.displayName="PanelBody",ji.ButtonGroup=We,ji.Button=Ze,ji.ButtonIcon=Ue,ji.Dropdown=fe,ze.Header=pr,ze.Body=Yi,ze.Footer=ji,Ss.Icon=wt;const wn=(e,t)=>{const{o:n,i:o,u:r}=e;let i,a=n;const s=(c,l)=>{const u=a,p=c,f=l||(o?!o(u,p):u!==p);return(f||r)&&(a=p,i=u),[a,f,i]};return[t?c=>s(t(a,i),c):s,c=>[a,!!c,i]]},hn=typeof window<"u"&&typeof HTMLElement<"u"&&window.document?window:{},c1=Math.max,M5=Math.min,sp=Math.round,br=Math.abs,fg=Math.sign,l1=hn.cancelAnimationFrame,Ff=hn.requestAnimationFrame,zf=hn.setTimeout,u1=hn.clearTimeout,$l=e=>hn[e]!==void 0?hn[e]:void 0,D5=$l("MutationObserver"),hg=$l("IntersectionObserver"),Ti=$l("ResizeObserver"),_a=$l("ScrollTimeline"),$f=e=>e===void 0,Zl=e=>e===null,Ar=e=>typeof e=="number",sa=e=>typeof e=="string",Xl=e=>typeof e=="boolean",oo=e=>typeof e=="function",Hn=e=>Array.isArray(e),el=e=>typeof e=="object"&&!Hn(e)&&!Zl(e),Zf=e=>{const t=!!e&&e.length,n=Ar(t)&&t>-1&&t%1==0;return!!(Hn(e)||!oo(e)&&n)&&(!(t>0&&el(e))||t-1 in e)},ns=e=>!!e&&e.constructor===Object,tl=e=>e instanceof HTMLElement,Ul=e=>e instanceof Element;function lt(e,t){if(Zf(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&lt(Object.keys(e),n=>t(e[n],n,e));return e}const d1=(e,t)=>e.indexOf(t)>=0,Ki=(e,t)=>e.concat(t),bt=(e,t,n)=>(!sa(t)&&Zf(t)?Array.prototype.push.apply(e,t):e.push(t),e),Mr=e=>Array.from(e||[]),Xf=e=>Hn(e)?e:!sa(e)&&Zf(e)?Mr(e):[e],nl=e=>!!e&&!e.length,ol=e=>Mr(new Set(e)),An=(e,t,n)=>{lt(e,o=>!o||o.apply(void 0,t||[])),n||(e.length=0)},p1="paddingTop",f1="paddingRight",h1="paddingLeft",m1="paddingBottom",g1="marginLeft",v1="marginRight",y1="marginBottom",Uf="overflowX",Jf="overflowY",Jl="width",Yl="height",Mo="visible",Kn="hidden",qi="scroll",Kl=(e,t,n,o)=>{if(e&&t){let r=!0;return lt(n,i=>{e[i]!==t[i]&&(r=!1)}),r}return!1},b1=(e,t)=>Kl(e,t,["w","h"]),Nc=(e,t)=>Kl(e,t,["x","y"]),B5=(e,t)=>Kl(e,t,["t","r","b","l"]),Pe=(e,...t)=>e.bind(0,...t),Ri=e=>{let t;const n=e?zf:Ff,o=e?u1:l1;return[r=>{o(t),t=n(()=>r(),oo(e)?e():e)},()=>o(t)]},mg=e=>{const t=oo(e)?e():e;if(Ar(t)){const n=t?zf:Ff,o=t?u1:l1;return r=>{const i=n(()=>r(),t);return()=>{o(i)}}}return t&&t._},w1=(e,t)=>{const{p:n,v:o,S:r,m:i}=t||{};let a,s,c,l;const u=function(m){s&&s(),a&&a(),l=s=a=c=void 0,e.apply(this,m)},p=m=>i&&c?i(c,m):m,f=()=>{s&&c&&u(p(c)||c)},h=function(){const m=Mr(arguments),g=mg(n);if(g){const y=typeof r=="function"?r():r,x=mg(o),C=p(m)||m,w=u.bind(0,C);s&&s(),y&&!l?(w(),l=!0,s=g(()=>l=void 0)):(s=g(w),x&&!a&&(a=x(f))),c=C}else u(m)};return h.O=f,h},x1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pn=e=>e?Object.keys(e):[],Xe=(e,t,n,o,r,i,a)=>{const s=[t,n,o,r,i,a];return typeof e=="object"&&!Zl(e)||oo(e)||(e={}),lt(s,c=>{lt(c,(l,u)=>{const p=c[u];if(e===p)return!0;const f=Hn(p);if(p&&ns(p)){const h=e[u];let m=h;f&&!Hn(h)?m=[]:f||ns(h)||(m={}),e[u]=Xe(m,p)}else e[u]=f?p.slice():p})}),e},C1=(e,t)=>lt(Xe({},e),(n,o,r)=>{n===void 0?delete r[o]:n&&ns(n)&&(r[o]=C1(n))}),Yf=e=>!pn(e).length,os=()=>{},I1=(e,t,n)=>c1(e,M5(t,n)),ai=e=>ol((Hn(e)?e:(e||"").split(" ")).filter(t=>t)),Kf=(e,t)=>e&&e.getAttribute(t),gg=(e,t)=>e&&e.hasAttribute(t),Ro=(e,t,n)=>{lt(ai(t),o=>{e&&e.setAttribute(o,String(n||""))})},co=(e,t)=>{lt(ai(t),n=>e&&e.removeAttribute(n))},ql=(e,t)=>{const n=ai(Kf(e,t)),o=Pe(Ro,e,t),r=(i,a)=>{const s=new Set(n);return lt(ai(i),c=>{s[a](c)}),Mr(s).join(" ")};return{C:i=>o(r(i,"delete")),$:i=>o(r(i,"add")),H:i=>{const a=ai(i);return a.reduce((s,c)=>s&&n.includes(c),a.length>0)}}},k1=(e,t,n)=>(ql(e,t).C(n),Pe(qf,e,t,n)),qf=(e,t,n)=>(ql(e,t).$(n),Pe(k1,e,t,n)),rl=(e,t,n,o)=>(o?qf:k1)(e,t,n),Qf=(e,t,n)=>ql(e,t).H(n),S1=e=>ql(e,"class"),A1=(e,t)=>{S1(e).C(t)},eh=(e,t)=>(S1(e).$(t),Pe(A1,e,t)),vg=(e,t)=>{const n=t?Ul(t)&&t:document;return n?Mr(n.querySelectorAll(e)):[]},cp=(e,t)=>Ul(e)&&e.matches(t),E1=e=>cp(e,"body"),lp=e=>e?Mr(e.childNodes):[],rs=e=>e&&e.parentElement,Li=(e,t)=>Ul(e)&&e.closest(t),up=e=>document.activeElement,H5=(e,t,n)=>{const o=Li(e,t),r=e&&((a,s)=>{const c=s?Ul(s)&&s:document;return c&&c.querySelector(a)})(n,o),i=Li(r,t)===o;return!(!o||!r)&&(o===e||r===e||i&&Li(Li(e,n),t)!==o)},Qi=e=>{lt(Xf(e),t=>{const n=rs(t);t&&n&&n.removeChild(t)})},fn=(e,t)=>Pe(Qi,e&&t&&lt(Xf(t),n=>{n&&e.appendChild(n)}));let j1;const Wi=e=>{const t=document.createElement("div");return Ro(t,"class",e),t},N1=e=>{const t=Wi(),n=j1,o=e.trim();return t.innerHTML=n?n.createHTML(o):o,lt(lp(t),r=>Qi(r))},yg=(e,t)=>e.getPropertyValue(t)||e[t]||"",P1=e=>{const t=e||0;return isFinite(t)?t:0},Qs=e=>P1(parseFloat(e||"")),dp=e=>Math.round(1e4*e)/1e4,O1=e=>`${dp(P1(e))}px`;function is(e,t){e&&t&&lt(t,(n,o)=>{try{const r=e.style,i=Zl(n)||Xl(n)?"":Ar(n)?O1(n):n;o.indexOf("--")===0?r.setProperty(o,i):r[o]=i}catch{}})}function Co(e,t,n){const o=sa(t);let r=o?"":{};if(e){const i=hn.getComputedStyle(e,n)||e.style;r=o?yg(i,t):Mr(t).reduce((a,s)=>(a[s]=yg(i,s),a),r)}return r}const bg=(e,t,n)=>{const o=t?`${t}-`:"",r=n?`-${n}`:"",i=`${o}top${r}`,a=`${o}right${r}`,s=`${o}bottom${r}`,c=`${o}left${r}`,l=Co(e,[i,a,s,c]);return{t:Qs(l[i]),r:Qs(l[a]),b:Qs(l[s]),l:Qs(l[c])}},_u=(e,t)=>"translate"+(el(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`),G5={w:0,h:0},Ql=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:G5,W5=e=>Ql("inner",e||hn),Vi=Pe(Ql,"offset"),T1=Pe(Ql,"client"),il=Pe(Ql,"scroll"),th=e=>{const t=parseFloat(Co(e,Jl))||0,n=parseFloat(Co(e,Yl))||0;return{w:t-sp(t),h:n-sp(n)}},Mu=e=>e.getBoundingClientRect(),pp=e=>!(!e||!e[Yl]&&!e[Jl]),R1=(e,t)=>{const n=pp(e);return!pp(t)&&n},wg=(e,t,n,o)=>{lt(ai(t),r=>{e&&e.removeEventListener(r,n,o)})},ft=(e,t,n,o)=>{var r;const i=(r=o&&o.I)==null||r,a=o&&o.A||!1,s=o&&o.T||!1,c={passive:i,capture:a};return Pe(An,ai(t).map(l=>{const u=s?p=>{wg(e,l,u,a),n&&n(p)}:n;return e&&e.addEventListener(l,u,c),Pe(wg,e,l,u,a)}))},L1=e=>e.stopPropagation(),fp=e=>e.preventDefault(),_1=e=>L1(e)||fp(e),ho=(e,t)=>{const{x:n,y:o}=Ar(t)?{x:t,y:t}:t||{};Ar(n)&&(e.scrollLeft=n),Ar(o)&&(e.scrollTop=o)},Cn=e=>({x:e.scrollLeft,y:e.scrollTop}),V5=(e,t)=>{const{D:n,M:o}=e,{w:r,h:i}=t,a=(p,f,h)=>{let m=fg(p)*h,g=fg(f)*h;if(m===g){const y=br(p),x=br(f);g=y>x?0:g,m=y<x?0:m}return m=m===g?0:m,[m+0,g+0]},[s,c]=a(n.x,o.x,r),[l,u]=a(n.y,o.y,i);return{D:{x:s,y:l},M:{x:c,y:u}}},Du=({D:e,M:t})=>{const n=(o,r)=>o===0&&o<=r;return{x:n(e.x,t.x),y:n(e.y,t.y)}},xg=({D:e,M:t},n)=>{const o=(r,i,a)=>I1(0,1,(r-a)/(r-i)||0);return{x:o(e.x,t.x,n.x),y:o(e.y,t.y,n.y)}},hp=e=>{e&&e.focus&&e.focus({preventScroll:!0,focusVisible:!1})},Cg=(e,t)=>{lt(Xf(t),e)},mp=e=>{const t=new Map,n=(r,i)=>{if(r){const a=t.get(r);Cg(s=>{a&&a[s?"delete":"clear"](s)},i)}else t.forEach(a=>{a.clear()}),t.clear()},o=(r,i)=>{if(sa(r)){const c=t.get(r)||new Set;return t.set(r,c),Cg(l=>{oo(l)&&c.add(l)},i),Pe(n,r,i)}Xl(i)&&i&&n();const a=pn(r),s=[];return lt(a,c=>{const l=r[c];l&&bt(s,o(c,l))}),Pe(An,s)};return o(e||{}),[o,n,(r,i)=>{lt(Mr(t.get(r)),a=>{i&&!nl(i)?a.apply(0,i):a()})}]},M1={},D1={},B1=(e,t,n)=>pn(e).map(o=>{const{static:r,instance:i}=e[o],[a,s,c]=n||[],l=n?i:r;if(l){const u=n?l(a,s,t):l(t);return(c||D1)[o]=u}}),ca=e=>D1[e],la="data-overlayscrollbars",Pc="os-environment",ec=`${Pc}-scrollbar-hidden`,Bu=`${la}-initialize`,Oc="noClipping",Ig=`${la}-body`,Er=la,Lo=`${la}-viewport`,F5=Uf,z5=Jf,H1="measuring",G1="scrollbarHidden",gp=`${la}-padding`,kg=`${la}-content`,nh="os-size-observer",$5=`${nh}-appear`,Z5=`${nh}-listener`,On="os-scrollbar",X5=`${On}-rtl`,U5=`${On}-horizontal`,J5=`${On}-vertical`,W1=`${On}-track`,oh=`${On}-handle`,Y5=`${On}-visible`,K5=`${On}-cornerless`,Sg=`${On}-interaction`,Ag=`${On}-unusable`,vp=`${On}-auto-hide`,Eg=`${vp}-hidden`,jg=`${On}-wheel`,q5=`${W1}-interactive`,Q5=`${oh}-interactive`,_i=e=>e.indexOf(Mo)===0,yp=(e,t)=>{if(e==="auto")return t?qi:Kn;const n=e||Kn;return[Kn,qi,Mo].includes(n)?n:Kn},eS=(e,t)=>{const{overflowX:n,overflowY:o}=Co(e,[Uf,Jf]);return{x:yp(n,t.x),y:yp(o,t.y)}},rh="__osScrollbarsHidingPlugin",Ng=e=>JSON.stringify(e,(t,n)=>{if(oo(n))throw 0;return n}),Pg=(e,t)=>e?`${t}`.split(".").reduce((n,o)=>n&&x1(n,o)?n[o]:void 0,e):void 0,V1=[33,99],F1=[222,666,!0],tS={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:[0,33],resize:null,event:V1,env:F1},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},z1=(e,t)=>{const n={};return lt(Ki(pn(t),pn(e)),o=>{const r=e[o],i=t[o];if(el(r)&&el(i))Xe(n[o]={},z1(r,i)),Yf(n[o])&&delete n[o];else if(x1(t,o)&&i!==r){let a=!0;if(Hn(r)||Hn(i))try{Ng(r)===Ng(i)&&(a=!1)}catch{}a&&(n[o]=i)}}),n},Og=(e,t,n)=>o=>[Pg(e,o),n||Pg(t,o)!==void 0];let $1,Hu;const nS=()=>{const e=(x,C,w)=>{fn(document.body,x),fn(document.body,x);const I=T1(x),b=Vi(x),k=th(C);return w&&Qi(x),{x:b.h-I.h+k.h,y:b.w-I.w+k.w}},t=N1(`<div class="${Pc}"><div></div><style>${`.${Pc}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Pc} div{width:200%;height:200%;margin:10px 0}.${ec}{scrollbar-width:none!important}.${ec}::-webkit-scrollbar,.${ec}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`}</style></div>`)[0],n=t.firstChild,o=t.lastChild,r=$1;r&&(o.nonce=r);const[i,,a]=mp(),[s,c]=wn({o:e(t,n),i:Nc},Pe(e,t,n,!0)),[l]=c(),u=(x=>{let C=!1;const w=eh(x,ec);try{C=Co(x,"scrollbar-width")==="none"||Co(x,"display","::-webkit-scrollbar")==="none"}catch{}return w(),C})(t),p={x:l.x===0,y:l.y===0},f={elements:{host:null,padding:!u,viewport:x=>u&&E1(x)&&x,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Xe({},tS),m=Pe(Xe,{},h),g=Pe(Xe,{},f),y={P:l,k:p,U:u,J:!!_a,G:Pe(i,"r"),K:g,Z:x=>Xe(f,x)&&g(),tt:m,nt:x=>Xe(h,x)&&m(),ot:Xe({},f),st:Xe({},h)};if(co(t,"style"),Qi(t),ft(hn,"resize",()=>{a("r",[])}),oo(hn.matchMedia)&&!u&&(!p.x||!p.y)){const x=C=>{const w=hn.matchMedia(`(resolution: ${hn.devicePixelRatio}dppx)`);ft(w,"change",()=>{C(),x(C)},{T:!0})};x(()=>{const[C,w]=s();Xe(y.P,C),a("r",[w])})}return y},Io=()=>(Hu||(Hu=nS()),Hu),Tg=(e,t,n,o)=>{let r=!1;const{et:i,ct:a,rt:s,it:c,lt:l,ut:u}=o||{},[p,f]=((x,C,w)=>{let I=!1;const b=!!w&&new WeakMap,k=S=>{if(b&&w){const E=w.map(O=>{const[A,N]=O||[];return[N&&A?(S||vg)(A,x):[],N]});lt(E,O=>lt(O[0],A=>{const N=O[1],j=b.get(A)||[];if(x.contains(A)&&N){const G=ft(A,N,M=>{I?(G(),b.delete(A)):C(M)});b.set(A,bt(j,G))}else An(j),b.delete(A)}))}};return k(),[()=>{I=!0},k]})(e,()=>r&&n(!0),s),h=a||[],m=Ki(i||[],h),g=(x,C)=>{if(!nl(C)){const w=l||os,I=u||os,b=[],k=[];let S=!1,E=!1;if(lt(C,O=>{const{attributeName:A,target:N,type:j,oldValue:G,addedNodes:M,removedNodes:T}=O,H=j==="attributes",V=j==="childList",z=e===N,P=H&&A,B=P&&Kf(N,A||""),F=sa(B)?B:null,$=P&&G!==F,Z=d1(h,A)&&$;if(t&&(V||!z)){const _=H&&$,R=_&&c&&cp(N,c),L=(R?!w(N,A,G,F):!H||_)&&!I(O,!!R,e,o);lt(M,D=>bt(b,D)),lt(T,D=>bt(b,D)),E=E||L}!t&&z&&$&&!w(N,A,G,F)&&(bt(k,A),S=S||Z)}),f(O=>ol(b).reduce((A,N)=>(bt(A,vg(O,N)),cp(N,O)?bt(A,N):A),[])),t)return!x&&E&&n(!1),[!1];if(!nl(k)||S){const O=[ol(k),S];return x||n.apply(0,O),O}}},y=new D5(Pe(g,!1));return[()=>(y.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:m,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return g(!0,y.takeRecords())}]};let Gr=null;const Z1=(e,t,n)=>{const{ft:o}=n||{},r=ca("__osSizeObserverPlugin"),[i]=wn({o:!1,u:!0});return()=>{const a=[],s=N1(`<div class="${nh}"><div class="${Z5}"></div></div>`)[0],c=s.firstChild,l=u=>{let p=!1,f=!1;if(Hn(u)&&!nl(u)){const h=u[0],[m,,g]=i(h.contentRect),y=pp(m);f=R1(m,g),p=!f&&!y}else f=u===!0;p||t({_t:!0,ft:f})};if(Ti){if(!Xl(Gr)){const h=new Ti(os);h.observe(e,{get box(){Gr=!0}}),Gr=Gr||!1,h.disconnect()}const u=w1(l,{p:0,v:0}),p=h=>u(h),f=new Ti(p);if(f.observe(Gr?e:c),bt(a,[()=>{f.disconnect()},!Gr&&fn(e,s)]),Gr){const h=new Ti(p);h.observe(e,{box:"border-box"}),bt(a,()=>h.disconnect())}}else{if(!r)return os;{const[u,p]=r(c,l,o);bt(a,Ki([eh(s,$5),ft(s,"animationstart",u),fn(e,s)],p))}}return Pe(An,a)}},oS=(e,t)=>{let n;const o=Wi("os-trinsic-observer"),[r]=wn({o:!1}),i=(s,c)=>{if(s){const l=r((p=>p.h===0||p.isIntersecting||p.intersectionRatio>0)(s)),[,u]=l;return u&&!c&&t(l)&&[l]}},a=(s,c)=>i(c.pop(),s);return[()=>{const s=[];if(hg)n=new hg(Pe(a,!1),{root:e}),n.observe(o),bt(s,()=>{n.disconnect()});else{const c=()=>{const l=Vi(o);i(l)};bt(s,Z1(o,c)()),c()}return Pe(An,bt(s,fn(e,o)))},()=>n&&a(!0,n.takeRecords())]},rS=(e,t,n,o)=>{let r,i,a,s,c,l,u,p;const f=`[${Er}]`,h=`[${Lo}]`,m=["id","class","style","open","wrap","cols","rows"],{dt:g,vt:y,L:x,gt:C,ht:w,V:I,bt:b,wt:k,yt:S,St:E}=e,O=L=>Co(L,"direction")==="rtl",A={Ot:!1,B:O(g)},N=Io(),j=ca(rh),[G]=wn({i:b1,o:{w:0,h:0}},()=>{const L=j&&j.R(e,t,A,N,n).Y,D=!(b&&I)&&Qf(y,Er,Oc),K=!I&&k("arrange"),J=K&&Cn(C),Y=J&&E(),ee=S(H1,D),X=K&&L&&L(),ae=il(x),ce=th(x);return X&&X(),ho(C,J),Y&&Y(),D&&ee(),{w:ae.w+ce.w,h:ae.h+ce.h}}),M=(()=>{let L,D,K;const J=w1(o,{p:()=>L,v:()=>D,S:()=>K,m(ee,X){const[ae]=ee,[ce]=X;return[Ki(pn(ae),pn(ce)).reduce((me,be)=>(me[be]=ae[be]||ce[be],me),{})]}}),Y=(ee,X)=>{if(Hn(X)){const[ae,ce,me]=X;L=ae,D=ce,K=me}else Ar(X)?(L=X,D=!1,K=!1):(L=!1,D=!1,K=!1);J(ee)};return Y.O=J.O,Y})(),T=L=>{const D=O(g);Xe(L,{Ct:p!==D}),Xe(A,{B:D}),p=D},H=(L,D)=>{const[K,J]=L,Y={$t:J};return Xe(A,{Ot:K}),D||o(Y),Y},V=({_t:L,ft:D})=>{const K=D?o:M,J={_t:L||D,ft:D};T(J),K(J,i)},z=(L,D)=>{const[,K]=G(),J={xt:K};return T(J),K&&!D&&M(J,L?a:r),J},P=(L,D,K)=>{const J={Ht:D};return T(J),D&&!K&&M(J,r),J},[B,F]=w?oS(y,H):[],$=!I&&Z1(y,V,{ft:!0}),[Z,_]=Tg(y,!1,P,{ct:m,et:m}),R=I&&Ti&&new Ti(L=>{const D=L[L.length-1].contentRect;V({_t:!0,ft:R1(D,u)}),u=D});return[()=>{R&&R.observe(y);const L=$&&$(),D=B&&B(),K=Z(),J=N.G(Y=>{const[,ee]=G();M({Et:Y,xt:ee,_t:b},s)});return()=>{R&&R.disconnect(),L&&L(),D&&D(),l&&l(),K(),J()}},({zt:L,It:D,At:K})=>{const J={},[Y]=L("update.ignoreMutation"),[ee,X]=L("update.attributes"),[ae,ce]=L("update.elementEvents"),[me,be]=L("update.debounce"),Le=D||K;if(ce||X){c&&c(),l&&l();const[q,oe]=Tg(w||x,!0,z,{et:Ki(m,ee||[]),rt:ae,it:f,ut:(se,we)=>{const{target:Oe,attributeName:de}=se;return!(we||!de||I)&&H5(Oe,f,h)||!!Li(Oe,`.${On}`)||!!(Ve=>oo(Y)&&Y(Ve))(se)}});l=q(),c=oe}if(be&&(M.O(),Hn(me)||Ar(me)?(r=me,i=!1,a=V1,s=F1):ns(me)?(r=me.mutation,i=me.resize,a=me.event,s=me.env):(r=!1,i=!1,a=!1,s=!1)),Le){const q=_(),oe=F&&F(),se=c&&c();q&&Xe(J,P(q[0],q[1],Le)),oe&&Xe(J,H(oe[0],Le)),se&&Xe(J,z(se[0],Le))}return T(J),J},A]},X1=(e,t)=>oo(t)?t.apply(0,e):t,iS=(e,t,n,o)=>{const r=$f(o)?n:o;return X1(e,r)||t.apply(0,e)},U1=(e,t,n,o)=>{const r=$f(o)?n:o,i=X1(e,r);return!!i&&(tl(i)?i:t.apply(0,e))},aS=(e,t,n,o)=>{const r="--os-viewport-percent",i="--os-scroll-percent",a="--os-scroll-direction",{K:s}=Io(),{scrollbars:c}=s(),{slot:l}=c,{dt:u,vt:p,L:f,Tt:h,gt:m,bt:g,V:y}=t,{scrollbars:x}=h?{}:e,{slot:C}=x||{},w=[],I=[],b=[],k=U1([u,p,f],()=>y&&g?u:p,l,C),S=T=>{if(_a){let H=null,V=[];const z=new _a({source:m,axis:T}),P=()=>{H&&H.cancel(),H=null};return{kt:F=>{const{Dt:$}=n,Z=Du($)[T],_=T==="x",R=[_u(0,_),_u(`calc(-100% + 100cq${_?"w":"h"})`,_)],L=Z?R:R.reverse();return V[0]===L[0]&&V[1]===L[1]||(V=L,P(),H=F.Mt.animate({clear:["left"],transform:L},{timeline:z})),P}}}},E={x:S("x"),y:S("y")},O=(T,H,V)=>{const z=V?eh:A1;lt(T,P=>{z(P.Lt,H)})},A=(T,H)=>{lt(T,V=>{const[z,P]=H(V);is(z,P)})},N=(T,H,V)=>{const z=Xl(V),P=!z||!V;(!z||V)&&O(I,T,H),P&&O(b,T,H)},j=T=>{const H=T?"x":"y",V=Wi(`${On} ${T?U5:J5}`),z=Wi(W1),P=Wi(oh),B={Lt:V,Ut:z,Mt:P},F=E[H];return bt(T?I:b,B),bt(w,[fn(V,z),fn(z,P),Pe(Qi,V),F&&F.kt(B),o(B,N,T)]),B},G=Pe(j,!0),M=Pe(j,!1);return G(),M(),[{Pt:()=>{const T=(()=>{const{Rt:V,Vt:z}=n,P=(B,F)=>I1(0,1,B/(B+F)||0);return{x:P(z.x,V.x),y:P(z.y,V.y)}})(),H=V=>z=>[z.Lt,{[r]:dp(V)+""}];A(I,H(T.x)),A(b,H(T.y))},Nt:()=>{if(!_a){const{Dt:T}=n,H=xg(T,Cn(m)),V=z=>P=>[P.Lt,{[i]:dp(z)+""}];A(I,V(H.x)),A(b,V(H.y))}},qt:()=>{const{Dt:T}=n,H=Du(T),V=z=>P=>[P.Lt,{[a]:z?"0":"1"}];A(I,V(H.x)),A(b,V(H.y)),_a&&(I.forEach(E.x.kt),b.forEach(E.y.kt))},Bt:()=>{if(y&&!g){const{Rt:T,Dt:H}=n,V=Du(H),z=xg(H,Cn(m)),P=B=>{const{Lt:F}=B,$=rs(F)===f&&F,Z=(_,R,L)=>{const D=R*_;return O1(L?D:-D)};return[$,$&&{transform:_u({x:Z(z.x,T.x,V.x),y:Z(z.y,T.y,V.y)})}]};A(I,P),A(b,P)}},Ft:N,jt:{Xt:I,Yt:G,Wt:Pe(A,I)},Jt:{Xt:b,Yt:M,Wt:Pe(A,b)}},()=>(fn(k,I[0].Lt),fn(k,b[0].Lt),Pe(An,w))]},sS=(e,t,n,o)=>(r,i,a)=>{const{vt:s,L:c,V:l,gt:u,Gt:p,St:f}=t,{Lt:h,Ut:m,Mt:g}=r,[y,x]=Ri(333),[C,w]=Ri(444),I=k=>{oo(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:k.x,top:k.y})};let b=!0;return Pe(An,[ft(g,"pointermove pointerleave",o),ft(h,"pointerenter",()=>{i(Sg,!0)}),ft(h,"pointerleave pointercancel",()=>{i(Sg,!1)}),!l&&ft(h,"mousedown",()=>{const k=up();(gg(k,Lo)||gg(k,Er)||k===document.body)&&zf(Pe(hp,c),25)}),ft(h,"wheel",k=>{const{deltaX:S,deltaY:E,deltaMode:O}=k;b&&O===0&&rs(h)===s&&I({x:S,y:E}),b=!1,i(jg,!0),y(()=>{b=!0,i(jg)}),fp(k)},{I:!1,A:!0}),ft(h,"pointerdown",()=>{const k=ft(p,"click",E=>{S(),_1(E)},{T:!0,A:!0,I:!1}),S=ft(p,"pointerup pointercancel",()=>{S(),setTimeout(k,150)},{A:!0,I:!0})},{A:!0,I:!0}),(()=>{const k="pointerup pointercancel lostpointercapture",S="client"+(a?"X":"Y"),E=a?Jl:Yl,O=a?"left":"top",A=a?"w":"h",N=a?"x":"y",j=(M,T)=>H=>{const{Rt:V}=n,z=Vi(m)[A]-Vi(g)[A],P=T*H/z*V[N];ho(u,{[N]:M+P})},G=[];return ft(m,"pointerdown",M=>{const T=Li(M.target,`.${oh}`)===g,H=T?g:m,V=e.scrollbars,z=V[T?"dragScroll":"clickScroll"],{button:P,isPrimary:B,pointerType:F}=M,{pointers:$}=V;if(P===0&&B&&z&&($||[]).includes(F)){An(G),w();const Z=!T&&(M.shiftKey||z==="instant"),_=Pe(Mu,g),R=Pe(Mu,m),L=(se,we)=>(se||_())[O]-(we||R())[O],D=sp(Mu(u)[E])/Vi(u)[A]||1,K=j(Cn(u)[N],1/D),J=M[S],Y=_(),ee=R(),X=Y[E],ae=L(Y,ee)+X/2,ce=J-ee[O],me=T?0:ce-ae,be=se=>{An(oe),H.releasePointerCapture(se.pointerId)},Le=T||Z,q=f(),oe=[ft(p,k,be),ft(p,"selectstart",se=>fp(se),{I:!1}),ft(m,k,be),Le&&ft(m,"pointermove",se=>K(me+(se[S]-J))),Le&&(()=>{const se=Cn(u);q();const we=Cn(u),Oe={x:we.x-se.x,y:we.y-se.y};(br(Oe.x)>3||br(Oe.y)>3)&&(f(),ho(u,se),I(Oe),C(q))})];if(H.setPointerCapture(M.pointerId),Z)K(me);else if(!T){const se=ca("__osClickScrollPlugin");if(se){const we=se(K,me,X,Oe=>{Oe?q():bt(oe,q)});bt(oe,we),bt(G,Pe(we,!0))}}}})})(),x,w])},cS=e=>{const t=Io(),{K:n,U:o}=t,{elements:r}=n(),{padding:i,viewport:a,content:s}=r,c=tl(e),l=c?{}:e,{elements:u}=l,{padding:p,viewport:f,content:h}=u||{},m=c?e:l.target,g=E1(m),y=m.ownerDocument,x=y.documentElement,C=()=>y.defaultView||hn,w=Pe(iS,[m]),I=Pe(U1,[m]),b=Pe(Wi,""),k=Pe(w,b,a),S=Pe(I,b,s),E=k(f),O=E===m,A=O&&g,N=!O&&S(h),j=!O&&E===N,G=A?x:E,M=A?G:m,T=!O&&I(b,i,p),H=!j&&N,V=[H,G,T,M].map(ee=>tl(ee)&&!rs(ee)&&ee),z=ee=>ee&&d1(V,ee),P=!z(G)&&(ee=>{const X=Vi(ee),ae=il(ee),ce=Co(ee,Uf),me=Co(ee,Jf);return ae.w-X.w>0&&!_i(ce)||ae.h-X.h>0&&!_i(me)})(G)?G:m,B=A?x:G,F={dt:m,vt:M,L:G,rn:T,ht:H,gt:B,Kt:A?y:G,ln:g?x:P,Gt:y,bt:g,Tt:c,V:O,an:C,wt:ee=>Qf(G,Lo,ee),yt:(ee,X)=>rl(G,Lo,ee,X),St:()=>rl(B,Lo,"scrolling",!0)},{dt:$,vt:Z,rn:_,L:R,ht:L}=F,D=[()=>{co(Z,[Er,Bu]),co($,Bu),g&&co(x,[Bu,Er])}];let K=lp([L,R,_,Z,$].find(ee=>ee&&!z(ee)));const J=A?$:L||R,Y=Pe(An,D);return[F,()=>{const ee=C(),X=up(),ae=q=>{fn(rs(q),lp(q)),Qi(q)},ce=q=>ft(q,"focusin focusout focus blur",_1,{A:!0,I:!1}),me="tabindex",be=Kf(R,me),Le=ce(X);return Ro(Z,Er,O?"":"host"),Ro(_,gp,""),Ro(R,Lo,""),Ro(L,kg,""),O||(Ro(R,me,be||"-1"),g&&Ro(x,Ig,"")),fn(J,K),fn(Z,_),fn(_||Z,!O&&R),fn(R,L),bt(D,[Le,()=>{const q=up(),oe=z(R),se=oe&&q===R?$:q,we=ce(se);co(_,gp),co(L,kg),co(R,Lo),g&&co(x,Ig),be?Ro(R,me,be):co(R,me),z(L)&&ae(L),oe&&ae(R),z(_)&&ae(_),hp(se),we()}]),o&&!O&&(qf(R,Lo,G1),bt(D,Pe(co,R,Lo))),hp(!O&&g&&X===$&&ee.top===ee?R:X),Le(),K=0,Y},Y]},lS=({ht:e})=>({Qt:t,un:n,At:o})=>{const{$t:r}=t||{},{Ot:i}=n;e&&(r||o)&&is(e,{[Yl]:i&&"100%"})},uS=({vt:e,rn:t,L:n,V:o},r)=>{const[i,a]=wn({i:B5,o:bg()},Pe(bg,e,"padding",""));return({zt:s,Qt:c,un:l,At:u})=>{let[p,f]=a(u);const{U:h}=Io(),{_t:m,xt:g,Ct:y}=c||{},{B:x}=l,[C,w]=s("paddingAbsolute");(m||f||u||g)&&([p,f]=i(u));const I=!o&&(w||y||f);if(I){const b=!C||!t&&!h,k=p.r+p.l,S=p.t+p.b,E={[v1]:b&&!x?-k:0,[y1]:b?-S:0,[g1]:b&&x?-k:0,top:b?-p.t:0,right:b?x?-p.r:"auto":0,left:b?x?"auto":-p.l:0,[Jl]:b&&`calc(100% + ${k}px)`},O={[p1]:b?p.t:0,[f1]:b?p.r:0,[m1]:b?p.b:0,[h1]:b?p.l:0};is(t||n,E),is(n,O),Xe(r,{rn:p,fn:!b,F:t?O:Xe({},E,O)})}return{_n:I}}},dS=(e,t)=>{const n=Io(),{vt:o,rn:r,L:i,V:a,Kt:s,gt:c,bt:l,yt:u,an:p}=e,{U:f}=n,h=l&&a,m=Pe(c1,0),g={display:()=>!1,direction:_=>_!=="ltr",flexDirection:_=>_.endsWith("-reverse"),writingMode:_=>_!=="horizontal-tb"},y=pn(g),x={i:b1,o:{w:0,h:0}},C={i:Nc,o:{}},w=_=>{u(H1,!h&&_)},I=()=>Co(i,y),b=(_,R)=>{const L=!pn(_).length,D=!R&&y.some(q=>{const oe=_[q];return sa(oe)&&g[q](oe)});if(L&&!D||!(q=>!!q&&(oe=>!!(oe.offsetWidth||oe.offsetHeight||oe.getClientRects().length))(q))(i))return{D:{x:0,y:0},M:{x:1,y:1}};w(!0);const K=Cn(c),J=ft(s,qi,q=>{const oe=Cn(c);q.isTrusted&&oe.x===K.x&&oe.y===K.y&&L1(q)},{A:!0,T:!0}),Y=u("noContent",!0);ho(c,{x:0,y:0}),Y();const ee=Cn(c),X=il(c);ho(c,{x:X.w,y:X.h});const ae=Cn(c),ce={x:ae.x-ee.x,y:ae.y-ee.y};ho(c,{x:-X.w,y:-X.h});const me=Cn(c),be={x:me.x-ee.x,y:me.y-ee.y},Le={x:br(ce.x)>=br(be.x)?ae.x:me.x,y:br(ce.y)>=br(be.y)?ae.y:me.y};return ho(c,K),Ff(()=>J()),{D:ee,M:Le}},k=(_,R)=>{const L=hn.devicePixelRatio%1!=0?1:0,D={w:m(_.w-R.w),h:m(_.h-R.h)};return{w:D.w>L?D.w:0,h:D.h>L?D.h:0}},S=(_,R)=>{const L=(D,K,J,Y)=>{const ee=D===Mo?Kn:(ce=>ce.replace(`${Mo}-`,""))(D),X=_i(D),ae=_i(J);return!K&&!Y?Kn:X&&ae?Mo:X?K&&Y?ee:K?Mo:Kn:K?ee:ae&&Y?Mo:Kn};return{x:L(R.x,_.x,R.y,_.y),y:L(R.y,_.y,R.x,_.x)}},E=_=>{const R=D=>[Mo,Kn,qi].map(K=>Z(yp(K),D)),L=R(!0).concat(R()).join(" ");u(L),u(pn(_).map(D=>Z(_[D],D==="x")).join(" "),!0)},[O,A]=wn(x,Pe(th,i)),[N,j]=wn(x,Pe(il,i)),[G,M]=wn(x),[T]=wn(C),[H,V]=wn(x),[z]=wn(C),[P]=wn({i:(_,R)=>Kl(_,R,ol(Ki(pn(_),pn(R)))),o:{}}),[B,F]=wn({i:(_,R)=>Nc(_.D,R.D)&&Nc(_.M,R.M),o:{D:{x:0,y:0},M:{x:0,y:0}}}),$=ca(rh),Z=(_,R)=>`${R?F5:z5}${(L=>{const D=String(L||"");return D?D[0].toUpperCase()+D.slice(1):""})(_)}`;return({zt:_,Qt:R,un:L,At:D},{_n:K})=>{const{_t:J,Ht:Y,xt:ee,Ct:X,ft:ae,Et:ce}=R||{},me=$&&$.R(e,t,L,n,_),{X:be,Y:Le,W:q}=me||{},[oe,se]=((wi,Qo)=>{const{k:ao}=Qo,[er,tr]=wi("showNativeOverlaidScrollbars");return[er&&ao.x&&ao.y,tr]})(_,n),[we,Oe]=_("overflow"),de=_i(we.x),Ve=_i(we.y),it=J||K||ee||X||ce||se;let dt=A(D),Te=j(D),Ne=M(D),Be=V(D);if(se&&f&&u(G1,!oe),it){Qf(o,Er,Oc)&&w(!0);const wi=Le&&Le(),[Qo]=dt=O(D),[ao]=Te=N(D),er=T1(i),tr=h&&W5(p()),wu={w:m(ao.w+Qo.w),h:m(ao.h+Qo.h)},zs={w:m((tr?tr.w:er.w+m(er.w-ao.w))+Qo.w),h:m((tr?tr.h:er.h+m(er.h-ao.h))+Qo.h)};wi&&wi(),Be=H(zs),Ne=G(k(wu,zs),D)}const[He,le]=Be,[ye,re]=Ne,[ie,Me]=Te,[ge,ne]=dt,[Q,ue]=T({x:ye.w>0,y:ye.h>0}),Ce=de&&Ve&&(Q.x||Q.y)||de&&Q.x&&!Q.y||Ve&&Q.y&&!Q.x,$e=K||X||ce||ne||Me||le||re||Oe||se||it||Y&&h,[Zt]=_("update.flowDirectionStyles"),[ha,qo]=P(Zt?Zt(i):I(),D),qt=X||ae||qo||ue||D,[yn,No]=qt?B(b(ha,!!Zt),D):F();let Hr=S(Q,we);w(!1),$e&&(E(Hr),Hr=eS(i,Q),q&&be&&(be(Hr,ie,ge),is(i,q(Hr))));const[yu,bu]=z(Hr);return rl(o,Er,Oc,Ce),rl(r,gp,Oc,Ce),Xe(t,{cn:yu,Vt:{x:He.w,y:He.h},Rt:{x:ye.w,y:ye.h},j:Q,Dt:V5(yn,ye)}),{sn:bu,tn:le,nn:re,en:No||re}}},pS=e=>{const[t,n,o]=cS(e),r={rn:{t:0,r:0,b:0,l:0},fn:!1,F:{[v1]:0,[y1]:0,[g1]:0,[p1]:0,[f1]:0,[m1]:0,[h1]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},cn:{x:Kn,y:Kn},j:{x:!1,y:!1},Dt:{D:{x:0,y:0},M:{x:0,y:0}}},{dt:i,gt:a,V:s,St:c}=t,{U:l,k:u}=Io(),p=!l&&(u.x||u.y),f=[lS(t),uS(t,r),dS(t,r)];return[n,h=>{const m={},g=p&&Cn(a),y=g&&c();return lt(f,x=>{Xe(m,x(h,m)||{})}),ho(a,g),y&&y(),s||ho(i,0),m},r,t,o]},fS=(e,t,n,o,r)=>{let i=!1;const a=Og(t,{}),[s,c,l,u,p]=pS(e),[f,h,m]=rS(u,l,a,I=>{w({},I)}),[g,y,,x]=((I,b,k,S,E,O)=>{let A,N,j,G,M,T=os,H=0;const V=["mouse","pen"],z=de=>V.includes(de.pointerType),[P,B]=Ri(),[F,$]=Ri(100),[Z,_]=Ri(100),[R,L]=Ri(()=>H),[D,K]=aS(I,E,S,sS(b,E,S,de=>z(de)&&q())),{vt:J,Kt:Y,bt:ee}=E,{Ft:X,Pt:ae,Nt:ce,qt:me,Bt:be}=D,Le=(de,Ve)=>{if(L(),de)X(Eg);else{const it=Pe(X,Eg,!0);H>0&&!Ve?R(it):it()}},q=()=>{(j?A:G)||(Le(!0),F(()=>{Le(!1)}))},oe=de=>{X(vp,de,!0),X(vp,de,!1)},se=de=>{z(de)&&(A=j,j&&Le(!0))},we=[L,$,_,B,()=>T(),ft(J,"pointerover",se,{T:!0}),ft(J,"pointerenter",se),ft(J,"pointerleave",de=>{z(de)&&(A=!1,j&&Le(!1))}),ft(J,"pointermove",de=>{z(de)&&N&&q()}),ft(Y,"scroll",de=>{P(()=>{ce(),q()}),O(de),be()})],Oe=ca(rh);return[()=>Pe(An,bt(we,K())),({zt:de,At:Ve,Qt:it,Zt:dt})=>{const{tn:Te,nn:Ne,sn:Be,en:He}=dt||{},{Ct:le,ft:ye}=it||{},{B:re}=k,{k:ie,U:Me}=Io(),{cn:ge,j:ne}=S,[Q,ue]=de("showNativeOverlaidScrollbars"),[Ce,$e]=de("scrollbars.theme"),[Zt,ha]=de("scrollbars.visibility"),[qo,qt]=de("scrollbars.autoHide"),[yn,No]=de("scrollbars.autoHideSuspend"),[Hr]=de("scrollbars.autoHideDelay"),[yu,bu]=de("scrollbars.dragScroll"),[wi,Qo]=de("scrollbars.clickScroll"),[ao,er]=de("overflow"),tr=ye&&!Ve,wu=ne.x||ne.y,zs=Te||Ne||He||le||Ve,rk=Be||ha||er,ik=Q&&ie.x&&ie.y,tm=!Me&&!Oe,ak=ik||tm,nm=(xu,Cu,sk)=>{const om=xu.includes(qi)&&(Zt===Mo||Zt==="auto"&&Cu===qi);return X(Y5,om,sk),om};if(H=Hr,tr&&(yn&&wu?(oe(!1),T(),Z(()=>{T=ft(Y,"scroll",Pe(oe,!0),{T:!0})})):oe(!0)),(ue||tm)&&X("os-theme-none",ak),$e&&(X(M),X(Ce,!0),M=Ce),No&&!yn&&oe(!0),qt&&(N=qo==="move",j=qo==="leave",G=qo==="never",Le(G,!0)),bu&&X(Q5,yu),Qo&&X(q5,!!wi),rk){const xu=nm(ao.x,ge.x,!0),Cu=nm(ao.y,ge.y,!1);X(K5,!(xu&&Cu))}zs&&(ce(),ae(),be(),He&&me(),X(Ag,!ne.x,!0),X(Ag,!ne.y,!1),X(X5,re&&!ee))},{},D]})(e,t,m,l,u,r),C=I=>pn(I).some(b=>!!I[b]),w=(I,b)=>{if(n())return!1;const{dn:k,At:S,It:E,pn:O}=I,A=k||{},N=!!S||!i,j={zt:Og(t,A,N),dn:A,At:N};if(O)return y(j),!1;const G=b||h(Xe({},j,{It:E})),M=c(Xe({},j,{un:m,Qt:G}));y(Xe({},j,{Qt:G,Zt:M}));const T=C(G),H=C(M),V=T||H||!Yf(A)||N;return i=!0,V&&o(I,{Qt:G,Zt:M}),V};return[()=>{const{ln:I,gt:b,St:k}=u,S=Cn(I),E=[f(),s(),g()],O=k();return ho(b,S),O(),Pe(An,E)},w,()=>({vn:m,gn:l}),{hn:u,bn:x},p]},bp=new WeakMap,J1=e=>bp.get(e),Zn=(e,t,n)=>{const{tt:o}=Io(),r=tl(e),i=r?e:e.target,a=J1(i);if(t&&!a){let s=!1;const c=[],l={},u=A=>{const N=C1(A),j=ca("__osOptionsValidationPlugin");return j?j(N,!0):N},p=Xe({},o(),u(t)),[f,h,m]=mp(),[g,y,x]=mp(n),C=(A,N)=>{x(A,N),m(A,N)},[w,I,b,k,S]=fS(e,p,()=>s,({dn:A,At:N},{Qt:j,Zt:G})=>{const{_t:M,Ct:T,$t:H,xt:V,Ht:z,ft:P}=j,{tn:B,nn:F,sn:$,en:Z}=G;C("updated",[O,{updateHints:{sizeChanged:!!M,directionChanged:!!T,heightIntrinsicChanged:!!H,overflowEdgeChanged:!!B,overflowAmountChanged:!!F,overflowStyleChanged:!!$,scrollCoordinatesChanged:!!Z,contentMutation:!!V,hostMutation:!!z,appear:!!P},changedOptions:A||{},force:!!N}])},A=>C("scroll",[O,A])),E=A=>{(N=>{bp.delete(N)})(i),An(c),s=!0,C("destroyed",[O,A]),h(),y()},O={options(A,N){if(A){const j=N?o():{},G=z1(p,Xe(j,u(A)));Yf(G)||(Xe(p,G),I({dn:G}))}return Xe({},p)},on:g,off:(A,N)=>{A&&N&&y(A,N)},state(){const{vn:A,gn:N}=b(),{B:j}=A,{Vt:G,Rt:M,cn:T,j:H,rn:V,fn:z,Dt:P}=N;return Xe({},{overflowEdge:G,overflowAmount:M,overflowStyle:T,hasOverflow:H,scrollCoordinates:{start:P.D,end:P.M},padding:V,paddingAbsolute:z,directionRTL:j,destroyed:s})},elements(){const{dt:A,vt:N,rn:j,L:G,ht:M,gt:T,Kt:H}=k.hn,{jt:V,Jt:z}=k.bn,P=F=>{const{Mt:$,Ut:Z,Lt:_}=F;return{scrollbar:_,track:Z,handle:$}},B=F=>{const{Xt:$,Yt:Z}=F,_=P($[0]);return Xe({},_,{clone:()=>{const R=P(Z());return I({pn:!0}),R}})};return Xe({},{target:A,host:N,padding:j||G,viewport:G,content:M||G,scrollOffsetElement:T,scrollEventElement:H,scrollbarHorizontal:B(V),scrollbarVertical:B(z)})},update:A=>I({At:A,It:!0}),destroy:Pe(E,!1),plugin:A=>l[pn(A)[0]]};return bt(c,[S]),((A,N)=>{bp.set(A,N)})(i,O),B1(M1,Zn,[O,f,l]),((A,N)=>{const{nativeScrollbarsOverlaid:j,body:G}=N||{},{k:M,U:T,K:H}=Io(),{nativeScrollbarsOverlaid:V,body:z}=H().cancel,P=j??V,B=$f(G)?z:G,F=(M.x||M.y)&&P,$=A&&(Zl(B)?!T:B);return!!F||!!$})(k.hn.bt,!r&&e.cancel)?(E(!0),O):(bt(c,w()),C("initialized",[O]),O.update(),O)}return a};Zn.plugin=e=>{const t=Hn(e),n=t?e:[e],o=n.map(r=>B1(r,Zn)[0]);return(r=>{lt(r,i=>lt(i,(a,s)=>{M1[s]=i[s]}))})(n),t?o:o[0]},Zn.valid=e=>{const t=e&&e.elements,n=oo(t)&&t();return ns(n)&&!!J1(n.target)},Zn.env=()=>{const{P:e,k:t,U:n,J:o,ot:r,st:i,K:a,Z:s,tt:c,nt:l}=Io();return Xe({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:o,staticDefaultInitialization:r,staticDefaultOptions:i,getDefaultInitialization:a,setDefaultInitialization:s,getDefaultOptions:c,setDefaultOptions:l})},Zn.nonce=e=>{$1=e},Zn.trustedTypePolicy=e=>{j1=e};const hS=()=>{if(typeof window>"u"){const l=()=>{};return[l,l]}let e,t;const n=window,o=typeof n.requestIdleCallback=="function",r=n.requestAnimationFrame,i=n.cancelAnimationFrame,a=o?n.requestIdleCallback:r,s=o?n.cancelIdleCallback:i,c=()=>{s(e),i(t)};return[(l,u)=>{c(),e=a(o?()=>{c(),t=r(l)}:l,typeof u=="object"?u:{timeout:2233})},c]},Y1=e=>{const{options:t,events:n,defer:o}=e||{},[r,i]=v.useMemo(hS,[]),a=v.useRef(null),s=v.useRef(o),c=v.useRef(t),l=v.useRef(n);return v.useEffect(()=>{s.current=o},[o]),v.useEffect(()=>{const{current:u}=a;c.current=t,Zn.valid(u)&&u.options(t||{},!0)},[t]),v.useEffect(()=>{const{current:u}=a;l.current=n,Zn.valid(u)&&u.on(n||{},!0)},[n]),v.useEffect(()=>()=>{var u;i(),(u=a.current)==null||u.destroy()},[]),v.useMemo(()=>[u=>{const p=a.current;if(Zn.valid(p))return;const f=s.current,h=c.current||{},m=l.current||{},g=()=>a.current=Zn(u,h,m);f?r(g,f):g()},()=>a.current],[])};v.forwardRef((e,t)=>{const{element:n="div",options:o,events:r,defer:i,children:a,...s}=e,c=n,l=v.useRef(null),u=v.useRef(null),[p,f]=Y1({options:o,events:r,defer:i});return v.useEffect(()=>{const{current:h}=l,{current:m}=u;if(h)return p(n==="body"?{target:h,cancel:{body:null}}:{target:h,elements:{viewport:m,content:m}}),()=>{var g;return(g=f())==null?void 0:g.destroy()}},[p,n]),v.useImperativeHandle(t,()=>({osInstance:f,getElement:()=>l.current}),[]),v.createElement(c,{"data-overlayscrollbars-initialize":"",ref:l,...s},n==="body"?a:v.createElement("div",{"data-overlayscrollbars-contents":"",ref:u},a))});const Uo=v.forwardRef((e,t)=>{const{children:n,element:o="div",elementProps:r,wrapperClassName:i}=e,a=v.useRef(null),s=v.useRef(null),[c,l]=Y1({options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},defer:!0}),u=v.useCallback(p=>{s.current=p,typeof t=="function"?t(p):t!==null&&(t.current=p)},[t]);return v.useEffect(()=>{if(s.current&&a.current&&(p=>!!p&&typeof p=="object"&&p.nodeType===Node.ELEMENT_NODE)(s.current))return c({target:a.current,elements:{viewport:s.current,content:!1}}),()=>{var p;return(p=l())==null?void 0:p.destroy()}},[c,l]),d.jsx("div",{"data-overlayscrollbars-initialize":"",ref:a,className:te("io-overlay-scrollbars-container",i),children:d.jsx(o,{"data-overlayscrollbars-contents":"",ref:u,...r,children:n})})});function As({text:e="Label",...t}){return d.jsx("label",{...t,children:e})}var mS=v[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],K1=0,gS=()=>K1++,Rg=0;function vS(e,t){t===void 0&&(t="🅰");var[n,o]=v.useState(Rg?gS:void 0);return mS(()=>{n===void 0&&o(K1++),Rg=1},[]),e||(n===void 0?n:t+n)}function ua(){return(typeof v.useId=="function"?v.useId:vS)()??""}const Es=v.forwardRef(({id:e,className:t,name:n="checkbox",align:o="left",label:r,checked:i,disabled:a,...s},c)=>{const l=ua(),u=e||`checkbox-${l}`,p=te("io-control-checkbox",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsxs("div",{className:p,children:[d.jsx("input",{type:"checkbox",id:u,className:"io-checkbox",ref:c,name:n,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&d.jsx(As,{htmlFor:u,text:r,"data-testid":s["data-testid"]?`${s["data-testid"]}-label`:void 0})]})});Es.displayName="Checkbox";const qn=v.forwardRef(({id:e,className:t,type:n="text",name:o="input",align:r="up",label:i,iconPrepend:a,iconPrependOnClick:s,iconAppend:c,iconAppendOnClick:l,placeholder:u,disabled:p,readOnly:f,errorMessage:h,errorDataTestId:m,...g},y)=>{const x=ua(),C=e||`input-${x}`,w=te("io-control-input",a&&"io-control-leading-icon",c&&"io-control-trailing-icon",p&&"io-control-disabled",f&&"io-control-readonly",h&&"io-control-error",r&&[`direction-${r}`],t),I=v.useCallback(k=>{p?k.preventDefault():s&&s(k)},[s,p]),b=v.useCallback(k=>{p?k.preventDefault():l&&l(k)},[l,p]);return d.jsxs("div",{className:w,children:[i&&d.jsx(As,{htmlFor:C,text:i}),a&&d.jsx(wt,{variant:a,onClick:k=>I(k)}),d.jsx("input",{id:C,className:"io-input",ref:y,type:n,name:o,tabIndex:0,placeholder:u??(()=>{switch(n){case"email":return"Enter your email here...";case"number":return"Enter number here...";case"password":return"Enter your password here...";case"tel":return"Enter your phone number here...";case"file":return"Select a file...";default:return"Enter text here..."}})(),"aria-label":i,disabled:p,readOnly:f,...h?{"aria-invalid":!0,"aria-describedby":`${C}-error`}:{},...g}),c&&d.jsx(wt,{variant:c,onClick:k=>b(k)}),h&&d.jsxs("div",{"data-testid":m,id:`${C}-error`,className:"io-input-error",children:[d.jsx(wt,{variant:"close"}),h]})]})});qn.displayName="Input";const yS=v.forwardRef(({id:e,className:t,name:n="radio",align:o="left",label:r,checked:i,disabled:a,...s},c)=>{const l=ua(),u=e||`radio-${l}`,p=te("io-control-radio",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsxs("div",{className:p,children:[d.jsx("input",{type:"radio",id:u,className:"io-radio",ref:c,name:n,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&d.jsx(As,{htmlFor:u,text:r})]})});function si(e){return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function q1(e){var t=function(n,o){if(si(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,o||"default");if(si(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}(e,"string");return si(t)=="symbol"?t:t+""}function Ma(e,t,n){return(t=q1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lg(Object(n),!0).forEach(function(o){Ma(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lg(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function wp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Q1(e,t){if(e){if(typeof e=="string")return wp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wp(e,t):void 0}}function Fo(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,o){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var i,a,s,c,l=[],u=!0,p=!1;try{if(s=(r=r.call(n)).next,o===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==o);u=!0);}catch(f){p=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw a}}return l}}(e,t)||Q1(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ew(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Wo(e,t){if(e==null)return{};var n,o,r=ew(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}yS.displayName="Radio";var bS=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},je.apply(null,arguments)}function _g(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,q1(o.key),o)}}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},al(e,t)}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sl(e)}function tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tw=function(){return!!e})()}function wS(e,t){if(t&&(si(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ih(e){return function(t){if(Array.isArray(t))return wp(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Q1(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var xS=function(){function e(n){var o=this;this._insertTag=function(r){var i;i=o.tags.length===0?o.insertionPoint?o.insertionPoint.nextSibling:o.prepend?o.container.firstChild:o.before:o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0||n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(i){var a=document.createElement("style");return a.setAttribute("data-emotion",i.key),i.nonce!==void 0&&a.setAttribute("nonce",i.nonce),a.appendChild(document.createTextNode("")),a.setAttribute("data-s",""),a}(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(i){if(i.sheet)return i.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===i)return document.styleSheets[a]}(o);try{r.insertRule(n,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Qt="-ms-",Mg="-moz-",Ye="-webkit-",nw="comm",ah="rule",sh="decl",ow="@keyframes",CS=Math.abs,eu=String.fromCharCode,IS=Object.assign;function rw(e){return e.trim()}function Ke(e,t,n){return e.replace(t,n)}function xp(e,t){return e.indexOf(t)}function Ut(e,t){return 0|e.charCodeAt(t)}function as(e,t,n){return e.slice(t,n)}function lo(e){return e.length}function ch(e){return e.length}function tc(e,t){return t.push(e),e}var tu=1,ea=1,iw=0,vn=0,jt=0,da="";function nu(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:tu,column:ea,length:a,return:""}}function wa(e,t){return IS(nu("",null,null,"",null,null,0),e,{length:-e.length},t)}function kS(){return jt=vn>0?Ut(da,--vn):0,ea--,jt===10&&(ea=1,tu--),jt}function En(){return jt=vn<iw?Ut(da,vn++):0,ea++,jt===10&&(ea=1,tu++),jt}function yo(){return Ut(da,vn)}function Tc(){return vn}function js(e,t){return as(da,e,t)}function ss(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function aw(e){return tu=ea=1,iw=lo(da=e),vn=0,[]}function sw(e){return da="",e}function Rc(e){return rw(js(vn-1,Cp(e===91?e+2:e===40?e+1:e)))}function SS(e){for(;(jt=yo())&&jt<33;)En();return ss(e)>2||ss(jt)>3?"":" "}function AS(e,t){for(;--t&&En()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return js(e,Tc()+(t<6&&yo()==32&&En()==32))}function Cp(e){for(;En();)switch(jt){case e:return vn;case 34:case 39:e!==34&&e!==39&&Cp(jt);break;case 40:e===41&&Cp(e);break;case 92:En()}return vn}function ES(e,t){for(;En()&&e+jt!==57&&(e+jt!==84||yo()!==47););return"/*"+js(t,vn-1)+"*"+eu(e===47?e:En())}function jS(e){for(;!ss(yo());)En();return js(e,vn)}function Dg(e){return sw(Lc("",null,null,null,[""],e=aw(e),0,[0],e))}function Lc(e,t,n,o,r,i,a,s,c){for(var l=0,u=0,p=a,f=0,h=0,m=0,g=1,y=1,x=1,C=0,w="",I=r,b=i,k=o,S=w;y;)switch(m=C,C=En()){case 40:if(m!=108&&Ut(S,p-1)==58){xp(S+=Ke(Rc(C),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:S+=Rc(C);break;case 9:case 10:case 13:case 32:S+=SS(m);break;case 92:S+=AS(Tc()-1,7);continue;case 47:switch(yo()){case 42:case 47:tc(NS(ES(En(),Tc()),t,n),c);break;default:S+="/"}break;case 123*g:s[l++]=lo(S)*x;case 125*g:case 59:case 0:switch(C){case 0:case 125:y=0;case 59+u:x==-1&&(S=Ke(S,/\f/g,"")),h>0&&lo(S)-p&&tc(h>32?Hg(S+";",o,n,p-1):Hg(Ke(S," ","")+";",o,n,p-2),c);break;case 59:S+=";";default:if(tc(k=Bg(S,t,n,l,u,r,s,w,I=[],b=[],p),i),C===123)if(u===0)Lc(S,t,k,k,I,i,p,s,b);else switch(f===99&&Ut(S,3)===110?100:f){case 100:case 108:case 109:case 115:Lc(e,k,k,o&&tc(Bg(e,k,k,0,0,r,s,w,r,I=[],p),b),r,b,p,s,o?I:b);break;default:Lc(S,k,k,k,[""],b,0,s,b)}}l=u=h=0,g=x=1,w=S="",p=a;break;case 58:p=1+lo(S),h=m;default:if(g<1){if(C==123)--g;else if(C==125&&g++==0&&kS()==125)continue}switch(S+=eu(C),C*g){case 38:x=u>0?1:(S+="\f",-1);break;case 44:s[l++]=(lo(S)-1)*x,x=1;break;case 64:yo()===45&&(S+=Rc(En())),f=yo(),u=p=lo(w=S+=jS(Tc())),C++;break;case 45:m===45&&lo(S)==2&&(g=0)}}return i}function Bg(e,t,n,o,r,i,a,s,c,l,u){for(var p=r-1,f=r===0?i:[""],h=ch(f),m=0,g=0,y=0;m<o;++m)for(var x=0,C=as(e,p+1,p=CS(g=a[m])),w=e;x<h;++x)(w=rw(g>0?f[x]+" "+C:Ke(C,/&\f/g,f[x])))&&(c[y++]=w);return nu(e,t,n,r===0?ah:s,c,l,u)}function NS(e,t,n){return nu(e,t,n,nw,eu(jt),as(e,2,-2),0)}function Hg(e,t,n,o){return nu(e,t,n,sh,as(e,0,o),as(e,o+1,-1),o)}function ci(e,t){for(var n="",o=ch(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function Gg(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case sh:return e.return=e.return||e.value;case nw:return"";case ow:return e.return=e.value+"{"+ci(e.children,o)+"}";case ah:e.value=e.props.join(",")}return lo(n=ci(e.children,o))?e.return=e.value+"{"+n+"}":""}function Wg(e){var t=ch(e);return function(n,o,r,i){for(var a="",s=0;s<t;s++)a+=e[s](n,o,r,i)||"";return a}}var Ip=typeof document<"u",PS=function(e,t,n){for(var o=0,r=0;o=r,r=yo(),o===38&&r===12&&(t[n]=1),!ss(r);)En();return js(e,vn)},OS=function(e,t){return sw(function(n,o){var r=-1,i=44;do switch(ss(i)){case 0:i===38&&yo()===12&&(o[r]=1),n[r]+=PS(vn-1,o,r);break;case 2:n[r]+=Rc(i);break;case 4:if(i===44){n[++r]=yo()===58?"&\f":"",o[r]=n[r].length;break}default:n[r]+=eu(i)}while(i=En());return n}(aw(e),t))},Vg=new WeakMap,TS=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(!(n=n.parent))return;if((e.props.length!==1||t.charCodeAt(0)===58||Vg.get(n))&&!o){Vg.set(e,!0);for(var r=[],i=OS(t,r),a=n.props,s=0,c=0;s<i.length;s++)for(var l=0;l<a.length;l++,c++)e.props[c]=r[s]?i[s].replace(/&\f/g,a[l]):a[l]+" "+i[s]}}},RS=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function cw(e,t){switch(function(n,o){return 45^Ut(n,0)?(((o<<2^Ut(n,0))<<2^Ut(n,1))<<2^Ut(n,2))<<2^Ut(n,3):0}(e,t)){case 5103:return Ye+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ye+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ye+e+Mg+e+Qt+e+e;case 6828:case 4268:return Ye+e+Qt+e+e;case 6165:return Ye+e+Qt+"flex-"+e+e;case 5187:return Ye+e+Ke(e,/(\w+).+(:[^]+)/,Ye+"box-$1$2"+Qt+"flex-$1$2")+e;case 5443:return Ye+e+Qt+"flex-item-"+Ke(e,/flex-|-self/,"")+e;case 4675:return Ye+e+Qt+"flex-line-pack"+Ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Ye+e+Qt+Ke(e,"shrink","negative")+e;case 5292:return Ye+e+Qt+Ke(e,"basis","preferred-size")+e;case 6060:return Ye+"box-"+Ke(e,"-grow","")+Ye+e+Qt+Ke(e,"grow","positive")+e;case 4554:return Ye+Ke(e,/([^-])(transform)/g,"$1"+Ye+"$2")+e;case 6187:return Ke(Ke(Ke(e,/(zoom-|grab)/,Ye+"$1"),/(image-set)/,Ye+"$1"),e,"")+e;case 5495:case 3959:return Ke(e,/(image-set\([^]*)/,Ye+"$1$`$1");case 4968:return Ke(Ke(e,/(.+:)(flex-)?(.*)/,Ye+"box-pack:$3"+Qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ye+e+e;case 4095:case 3583:case 4068:case 2532:return Ke(e,/(.+)-inline(.+)/,Ye+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(lo(e)-1-t>6)switch(Ut(e,t+1)){case 109:if(Ut(e,t+4)!==45)break;case 102:return Ke(e,/(.+:)(.+)-([^]+)/,"$1"+Ye+"$2-$3$1"+Mg+(Ut(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xp(e,"stretch")?cw(Ke(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ut(e,t+1)!==115)break;case 6444:switch(Ut(e,lo(e)-3-(~xp(e,"!important")&&10))){case 107:return Ke(e,":",":"+Ye)+e;case 101:return Ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ye+(Ut(e,14)===45?"inline-":"")+"box$3$1"+Ye+"$2$3$1"+Qt+"$2box$3")+e}break;case 5936:switch(Ut(e,t+11)){case 114:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ye+e+Qt+e+e}return e}var Fg,nc,zg,$g=Ip?void 0:(Fg=function(){return e=function(){return{}},t=Object.create(null),function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]};var e,t},nc=new WeakMap,function(e){if(nc.has(e))return nc.get(e);var t=Fg(e);return nc.set(e,t),t}),LS=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case sh:e.return=cw(e.value,e.length);break;case ow:return ci([wa(e,{value:Ke(e.value,"@","@"+Ye)})],o);case ah:if(e.length)return function(r,i){return r.map(i).join("")}(e.props,function(r){switch(function(i,a){return(i=a.exec(i))?i[0]:i}(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ci([wa(e,{props:[Ke(r,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return ci([wa(e,{props:[Ke(r,/:(plac\w+)/,":"+Ye+"input-$1")]}),wa(e,{props:[Ke(r,/:(plac\w+)/,":-moz-$1")]}),wa(e,{props:[Ke(r,/:(plac\w+)/,Qt+"input-$1")]})],o)}return""})}}],lw=function(e){var t=e.key;if(Ip&&t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(C){C.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var o,r,i=e.stylisPlugins||LS,a={},s=[];Ip&&(o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(C){for(var w=C.getAttribute("data-emotion").split(" "),I=1;I<w.length;I++)a[w[I]]=!0;s.push(C)}));var c,l=[TS,RS];if($g){var u=[Gg],p=Wg(l.concat(i,u)),f=$g(i)(t),h=function(C,w){var I=w.name;return f[I]===void 0&&(f[I]=ci(Dg(C?C+"{"+w.styles+"}":w.styles),p)),f[I]};r=function(C,w,I,b){var k=w.name,S=h(C,w);return x.compat===void 0?(b&&(x.inserted[k]=!0),S):b?void(x.inserted[k]=S):S}}else{var m,g=[Gg,(c=function(C){m.insert(C)},function(C){C.root||(C=C.return)&&c(C)})],y=Wg(l.concat(i,g));r=function(C,w,I,b){m=I,ci(Dg(C?C+"{"+w.styles+"}":w.styles),y),b&&(x.inserted[w.name]=!0)}}var x={key:t,sheet:new xS({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return x.sheet.hydrate(s),x},kp={exports:{}},Qe={},Zg,at={};/** @license React v16.13.1
16
+ */Yi.displayName="PanelBody",ji.ButtonGroup=We,ji.Button=Ze,ji.ButtonIcon=Ue,ji.Dropdown=fe,ze.Header=pr,ze.Body=Yi,ze.Footer=ji,Ss.Icon=wt;const wn=(e,t)=>{const{o:n,i:o,u:r}=e;let i,a=n;const s=(c,l)=>{const u=a,p=c,f=l||(o?!o(u,p):u!==p);return(f||r)&&(a=p,i=u),[a,f,i]};return[t?c=>s(t(a,i),c):s,c=>[a,!!c,i]]},hn=typeof window<"u"&&typeof HTMLElement<"u"&&window.document?window:{},l1=Math.max,_5=Math.min,sp=Math.round,br=Math.abs,hg=Math.sign,u1=hn.cancelAnimationFrame,zf=hn.requestAnimationFrame,$f=hn.setTimeout,d1=hn.clearTimeout,$l=e=>hn[e]!==void 0?hn[e]:void 0,M5=$l("MutationObserver"),mg=$l("IntersectionObserver"),Ti=$l("ResizeObserver"),_a=$l("ScrollTimeline"),Zf=e=>e===void 0,Zl=e=>e===null,Ar=e=>typeof e=="number",sa=e=>typeof e=="string",Xl=e=>typeof e=="boolean",oo=e=>typeof e=="function",Hn=e=>Array.isArray(e),el=e=>typeof e=="object"&&!Hn(e)&&!Zl(e),Xf=e=>{const t=!!e&&e.length,n=Ar(t)&&t>-1&&t%1==0;return!!(Hn(e)||!oo(e)&&n)&&(!(t>0&&el(e))||t-1 in e)},ns=e=>!!e&&e.constructor===Object,tl=e=>e instanceof HTMLElement,Ul=e=>e instanceof Element;function lt(e,t){if(Xf(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&lt(Object.keys(e),n=>t(e[n],n,e));return e}const p1=(e,t)=>e.indexOf(t)>=0,Ki=(e,t)=>e.concat(t),bt=(e,t,n)=>(!sa(t)&&Xf(t)?Array.prototype.push.apply(e,t):e.push(t),e),Mr=e=>Array.from(e||[]),Uf=e=>Hn(e)?e:!sa(e)&&Xf(e)?Mr(e):[e],nl=e=>!!e&&!e.length,ol=e=>Mr(new Set(e)),An=(e,t,n)=>{lt(e,o=>!o||o.apply(void 0,t||[])),n||(e.length=0)},f1="paddingTop",h1="paddingRight",m1="paddingLeft",g1="paddingBottom",v1="marginLeft",y1="marginRight",b1="marginBottom",Jf="overflowX",Yf="overflowY",Jl="width",Yl="height",Mo="visible",Kn="hidden",qi="scroll",Kl=(e,t,n,o)=>{if(e&&t){let r=!0;return lt(n,i=>{e[i]!==t[i]&&(r=!1)}),r}return!1},w1=(e,t)=>Kl(e,t,["w","h"]),Pc=(e,t)=>Kl(e,t,["x","y"]),D5=(e,t)=>Kl(e,t,["t","r","b","l"]),Ne=(e,...t)=>e.bind(0,...t),Ri=e=>{let t;const n=e?$f:zf,o=e?d1:u1;return[r=>{o(t),t=n(()=>r(),oo(e)?e():e)},()=>o(t)]},gg=e=>{const t=oo(e)?e():e;if(Ar(t)){const n=t?$f:zf,o=t?d1:u1;return r=>{const i=n(()=>r(),t);return()=>{o(i)}}}return t&&t._},x1=(e,t)=>{const{p:n,v:o,S:r,m:i}=t||{};let a,s,c,l;const u=function(m){s&&s(),a&&a(),l=s=a=c=void 0,e.apply(this,m)},p=m=>i&&c?i(c,m):m,f=()=>{s&&c&&u(p(c)||c)},h=function(){const m=Mr(arguments),g=gg(n);if(g){const y=typeof r=="function"?r():r,x=gg(o),C=p(m)||m,w=u.bind(0,C);s&&s(),y&&!l?(w(),l=!0,s=g(()=>l=void 0)):(s=g(w),x&&!a&&(a=x(f))),c=C}else u(m)};return h.O=f,h},C1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pn=e=>e?Object.keys(e):[],Xe=(e,t,n,o,r,i,a)=>{const s=[t,n,o,r,i,a];return typeof e=="object"&&!Zl(e)||oo(e)||(e={}),lt(s,c=>{lt(c,(l,u)=>{const p=c[u];if(e===p)return!0;const f=Hn(p);if(p&&ns(p)){const h=e[u];let m=h;f&&!Hn(h)?m=[]:f||ns(h)||(m={}),e[u]=Xe(m,p)}else e[u]=f?p.slice():p})}),e},I1=(e,t)=>lt(Xe({},e),(n,o,r)=>{n===void 0?delete r[o]:n&&ns(n)&&(r[o]=I1(n))}),Kf=e=>!pn(e).length,os=()=>{},k1=(e,t,n)=>l1(e,_5(t,n)),ai=e=>ol((Hn(e)?e:(e||"").split(" ")).filter(t=>t)),qf=(e,t)=>e&&e.getAttribute(t),vg=(e,t)=>e&&e.hasAttribute(t),Ro=(e,t,n)=>{lt(ai(t),o=>{e&&e.setAttribute(o,String(n||""))})},co=(e,t)=>{lt(ai(t),n=>e&&e.removeAttribute(n))},ql=(e,t)=>{const n=ai(qf(e,t)),o=Ne(Ro,e,t),r=(i,a)=>{const s=new Set(n);return lt(ai(i),c=>{s[a](c)}),Mr(s).join(" ")};return{C:i=>o(r(i,"delete")),$:i=>o(r(i,"add")),H:i=>{const a=ai(i);return a.reduce((s,c)=>s&&n.includes(c),a.length>0)}}},S1=(e,t,n)=>(ql(e,t).C(n),Ne(Qf,e,t,n)),Qf=(e,t,n)=>(ql(e,t).$(n),Ne(S1,e,t,n)),rl=(e,t,n,o)=>(o?Qf:S1)(e,t,n),eh=(e,t,n)=>ql(e,t).H(n),A1=e=>ql(e,"class"),E1=(e,t)=>{A1(e).C(t)},th=(e,t)=>(A1(e).$(t),Ne(E1,e,t)),yg=(e,t)=>{const n=t?Ul(t)&&t:document;return n?Mr(n.querySelectorAll(e)):[]},cp=(e,t)=>Ul(e)&&e.matches(t),j1=e=>cp(e,"body"),lp=e=>e?Mr(e.childNodes):[],rs=e=>e&&e.parentElement,Li=(e,t)=>Ul(e)&&e.closest(t),up=e=>document.activeElement,B5=(e,t,n)=>{const o=Li(e,t),r=e&&((a,s)=>{const c=s?Ul(s)&&s:document;return c&&c.querySelector(a)})(n,o),i=Li(r,t)===o;return!(!o||!r)&&(o===e||r===e||i&&Li(Li(e,n),t)!==o)},Qi=e=>{lt(Uf(e),t=>{const n=rs(t);t&&n&&n.removeChild(t)})},fn=(e,t)=>Ne(Qi,e&&t&&lt(Uf(t),n=>{n&&e.appendChild(n)}));let P1;const Wi=e=>{const t=document.createElement("div");return Ro(t,"class",e),t},N1=e=>{const t=Wi(),n=P1,o=e.trim();return t.innerHTML=n?n.createHTML(o):o,lt(lp(t),r=>Qi(r))},bg=(e,t)=>e.getPropertyValue(t)||e[t]||"",O1=e=>{const t=e||0;return isFinite(t)?t:0},Qs=e=>O1(parseFloat(e||"")),dp=e=>Math.round(1e4*e)/1e4,T1=e=>`${dp(O1(e))}px`;function is(e,t){e&&t&&lt(t,(n,o)=>{try{const r=e.style,i=Zl(n)||Xl(n)?"":Ar(n)?T1(n):n;o.indexOf("--")===0?r.setProperty(o,i):r[o]=i}catch{}})}function Co(e,t,n){const o=sa(t);let r=o?"":{};if(e){const i=hn.getComputedStyle(e,n)||e.style;r=o?bg(i,t):Mr(t).reduce((a,s)=>(a[s]=bg(i,s),a),r)}return r}const wg=(e,t,n)=>{const o=t?`${t}-`:"",r=n?`-${n}`:"",i=`${o}top${r}`,a=`${o}right${r}`,s=`${o}bottom${r}`,c=`${o}left${r}`,l=Co(e,[i,a,s,c]);return{t:Qs(l[i]),r:Qs(l[a]),b:Qs(l[s]),l:Qs(l[c])}},_u=(e,t)=>"translate"+(el(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`),H5={w:0,h:0},Ql=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:H5,G5=e=>Ql("inner",e||hn),Vi=Ne(Ql,"offset"),R1=Ne(Ql,"client"),il=Ne(Ql,"scroll"),nh=e=>{const t=parseFloat(Co(e,Jl))||0,n=parseFloat(Co(e,Yl))||0;return{w:t-sp(t),h:n-sp(n)}},Mu=e=>e.getBoundingClientRect(),pp=e=>!(!e||!e[Yl]&&!e[Jl]),L1=(e,t)=>{const n=pp(e);return!pp(t)&&n},xg=(e,t,n,o)=>{lt(ai(t),r=>{e&&e.removeEventListener(r,n,o)})},ft=(e,t,n,o)=>{var r;const i=(r=o&&o.I)==null||r,a=o&&o.A||!1,s=o&&o.T||!1,c={passive:i,capture:a};return Ne(An,ai(t).map(l=>{const u=s?p=>{xg(e,l,u,a),n&&n(p)}:n;return e&&e.addEventListener(l,u,c),Ne(xg,e,l,u,a)}))},_1=e=>e.stopPropagation(),fp=e=>e.preventDefault(),M1=e=>_1(e)||fp(e),ho=(e,t)=>{const{x:n,y:o}=Ar(t)?{x:t,y:t}:t||{};Ar(n)&&(e.scrollLeft=n),Ar(o)&&(e.scrollTop=o)},Cn=e=>({x:e.scrollLeft,y:e.scrollTop}),W5=(e,t)=>{const{D:n,M:o}=e,{w:r,h:i}=t,a=(p,f,h)=>{let m=hg(p)*h,g=hg(f)*h;if(m===g){const y=br(p),x=br(f);g=y>x?0:g,m=y<x?0:m}return m=m===g?0:m,[m+0,g+0]},[s,c]=a(n.x,o.x,r),[l,u]=a(n.y,o.y,i);return{D:{x:s,y:l},M:{x:c,y:u}}},Du=({D:e,M:t})=>{const n=(o,r)=>o===0&&o<=r;return{x:n(e.x,t.x),y:n(e.y,t.y)}},Cg=({D:e,M:t},n)=>{const o=(r,i,a)=>k1(0,1,(r-a)/(r-i)||0);return{x:o(e.x,t.x,n.x),y:o(e.y,t.y,n.y)}},hp=e=>{e&&e.focus&&e.focus({preventScroll:!0,focusVisible:!1})},Ig=(e,t)=>{lt(Uf(t),e)},mp=e=>{const t=new Map,n=(r,i)=>{if(r){const a=t.get(r);Ig(s=>{a&&a[s?"delete":"clear"](s)},i)}else t.forEach(a=>{a.clear()}),t.clear()},o=(r,i)=>{if(sa(r)){const c=t.get(r)||new Set;return t.set(r,c),Ig(l=>{oo(l)&&c.add(l)},i),Ne(n,r,i)}Xl(i)&&i&&n();const a=pn(r),s=[];return lt(a,c=>{const l=r[c];l&&bt(s,o(c,l))}),Ne(An,s)};return o(e||{}),[o,n,(r,i)=>{lt(Mr(t.get(r)),a=>{i&&!nl(i)?a.apply(0,i):a()})}]},D1={},B1={},H1=(e,t,n)=>pn(e).map(o=>{const{static:r,instance:i}=e[o],[a,s,c]=n||[],l=n?i:r;if(l){const u=n?l(a,s,t):l(t);return(c||B1)[o]=u}}),ca=e=>B1[e],la="data-overlayscrollbars",Nc="os-environment",ec=`${Nc}-scrollbar-hidden`,Bu=`${la}-initialize`,Oc="noClipping",kg=`${la}-body`,Er=la,Lo=`${la}-viewport`,V5=Jf,F5=Yf,G1="measuring",W1="scrollbarHidden",gp=`${la}-padding`,Sg=`${la}-content`,oh="os-size-observer",z5=`${oh}-appear`,$5=`${oh}-listener`,On="os-scrollbar",Z5=`${On}-rtl`,X5=`${On}-horizontal`,U5=`${On}-vertical`,V1=`${On}-track`,rh=`${On}-handle`,J5=`${On}-visible`,Y5=`${On}-cornerless`,Ag=`${On}-interaction`,Eg=`${On}-unusable`,vp=`${On}-auto-hide`,jg=`${vp}-hidden`,Pg=`${On}-wheel`,K5=`${V1}-interactive`,q5=`${rh}-interactive`,_i=e=>e.indexOf(Mo)===0,yp=(e,t)=>{if(e==="auto")return t?qi:Kn;const n=e||Kn;return[Kn,qi,Mo].includes(n)?n:Kn},Q5=(e,t)=>{const{overflowX:n,overflowY:o}=Co(e,[Jf,Yf]);return{x:yp(n,t.x),y:yp(o,t.y)}},ih="__osScrollbarsHidingPlugin",Ng=e=>JSON.stringify(e,(t,n)=>{if(oo(n))throw 0;return n}),Og=(e,t)=>e?`${t}`.split(".").reduce((n,o)=>n&&C1(n,o)?n[o]:void 0,e):void 0,F1=[33,99],z1=[222,666,!0],eS={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:[0,33],resize:null,event:F1,env:z1},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},$1=(e,t)=>{const n={};return lt(Ki(pn(t),pn(e)),o=>{const r=e[o],i=t[o];if(el(r)&&el(i))Xe(n[o]={},$1(r,i)),Kf(n[o])&&delete n[o];else if(C1(t,o)&&i!==r){let a=!0;if(Hn(r)||Hn(i))try{Ng(r)===Ng(i)&&(a=!1)}catch{}a&&(n[o]=i)}}),n},Tg=(e,t,n)=>o=>[Og(e,o),n||Og(t,o)!==void 0];let Z1,Hu;const tS=()=>{const e=(x,C,w)=>{fn(document.body,x),fn(document.body,x);const I=R1(x),b=Vi(x),k=nh(C);return w&&Qi(x),{x:b.h-I.h+k.h,y:b.w-I.w+k.w}},t=N1(`<div class="${Nc}"><div></div><style>${`.${Nc}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Nc} div{width:200%;height:200%;margin:10px 0}.${ec}{scrollbar-width:none!important}.${ec}::-webkit-scrollbar,.${ec}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`}</style></div>`)[0],n=t.firstChild,o=t.lastChild,r=Z1;r&&(o.nonce=r);const[i,,a]=mp(),[s,c]=wn({o:e(t,n),i:Pc},Ne(e,t,n,!0)),[l]=c(),u=(x=>{let C=!1;const w=th(x,ec);try{C=Co(x,"scrollbar-width")==="none"||Co(x,"display","::-webkit-scrollbar")==="none"}catch{}return w(),C})(t),p={x:l.x===0,y:l.y===0},f={elements:{host:null,padding:!u,viewport:x=>u&&j1(x)&&x,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Xe({},eS),m=Ne(Xe,{},h),g=Ne(Xe,{},f),y={P:l,k:p,U:u,J:!!_a,G:Ne(i,"r"),K:g,Z:x=>Xe(f,x)&&g(),tt:m,nt:x=>Xe(h,x)&&m(),ot:Xe({},f),st:Xe({},h)};if(co(t,"style"),Qi(t),ft(hn,"resize",()=>{a("r",[])}),oo(hn.matchMedia)&&!u&&(!p.x||!p.y)){const x=C=>{const w=hn.matchMedia(`(resolution: ${hn.devicePixelRatio}dppx)`);ft(w,"change",()=>{C(),x(C)},{T:!0})};x(()=>{const[C,w]=s();Xe(y.P,C),a("r",[w])})}return y},Io=()=>(Hu||(Hu=tS()),Hu),Rg=(e,t,n,o)=>{let r=!1;const{et:i,ct:a,rt:s,it:c,lt:l,ut:u}=o||{},[p,f]=((x,C,w)=>{let I=!1;const b=!!w&&new WeakMap,k=S=>{if(b&&w){const E=w.map(N=>{const[A,P]=N||[];return[P&&A?(S||yg)(A,x):[],P]});lt(E,N=>lt(N[0],A=>{const P=N[1],j=b.get(A)||[];if(x.contains(A)&&P){const G=ft(A,P,M=>{I?(G(),b.delete(A)):C(M)});b.set(A,bt(j,G))}else An(j),b.delete(A)}))}};return k(),[()=>{I=!0},k]})(e,()=>r&&n(!0),s),h=a||[],m=Ki(i||[],h),g=(x,C)=>{if(!nl(C)){const w=l||os,I=u||os,b=[],k=[];let S=!1,E=!1;if(lt(C,N=>{const{attributeName:A,target:P,type:j,oldValue:G,addedNodes:M,removedNodes:T}=N,H=j==="attributes",V=j==="childList",z=e===P,O=H&&A,B=O&&qf(P,A||""),F=sa(B)?B:null,$=O&&G!==F,Z=p1(h,A)&&$;if(t&&(V||!z)){const _=H&&$,R=_&&c&&cp(P,c),L=(R?!w(P,A,G,F):!H||_)&&!I(N,!!R,e,o);lt(M,D=>bt(b,D)),lt(T,D=>bt(b,D)),E=E||L}!t&&z&&$&&!w(P,A,G,F)&&(bt(k,A),S=S||Z)}),f(N=>ol(b).reduce((A,P)=>(bt(A,yg(N,P)),cp(P,N)?bt(A,P):A),[])),t)return!x&&E&&n(!1),[!1];if(!nl(k)||S){const N=[ol(k),S];return x||n.apply(0,N),N}}},y=new M5(Ne(g,!1));return[()=>(y.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:m,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return g(!0,y.takeRecords())}]};let Gr=null;const X1=(e,t,n)=>{const{ft:o}=n||{},r=ca("__osSizeObserverPlugin"),[i]=wn({o:!1,u:!0});return()=>{const a=[],s=N1(`<div class="${oh}"><div class="${$5}"></div></div>`)[0],c=s.firstChild,l=u=>{let p=!1,f=!1;if(Hn(u)&&!nl(u)){const h=u[0],[m,,g]=i(h.contentRect),y=pp(m);f=L1(m,g),p=!f&&!y}else f=u===!0;p||t({_t:!0,ft:f})};if(Ti){if(!Xl(Gr)){const h=new Ti(os);h.observe(e,{get box(){Gr=!0}}),Gr=Gr||!1,h.disconnect()}const u=x1(l,{p:0,v:0}),p=h=>u(h),f=new Ti(p);if(f.observe(Gr?e:c),bt(a,[()=>{f.disconnect()},!Gr&&fn(e,s)]),Gr){const h=new Ti(p);h.observe(e,{box:"border-box"}),bt(a,()=>h.disconnect())}}else{if(!r)return os;{const[u,p]=r(c,l,o);bt(a,Ki([th(s,z5),ft(s,"animationstart",u),fn(e,s)],p))}}return Ne(An,a)}},nS=(e,t)=>{let n;const o=Wi("os-trinsic-observer"),[r]=wn({o:!1}),i=(s,c)=>{if(s){const l=r((p=>p.h===0||p.isIntersecting||p.intersectionRatio>0)(s)),[,u]=l;return u&&!c&&t(l)&&[l]}},a=(s,c)=>i(c.pop(),s);return[()=>{const s=[];if(mg)n=new mg(Ne(a,!1),{root:e}),n.observe(o),bt(s,()=>{n.disconnect()});else{const c=()=>{const l=Vi(o);i(l)};bt(s,X1(o,c)()),c()}return Ne(An,bt(s,fn(e,o)))},()=>n&&a(!0,n.takeRecords())]},oS=(e,t,n,o)=>{let r,i,a,s,c,l,u,p;const f=`[${Er}]`,h=`[${Lo}]`,m=["id","class","style","open","wrap","cols","rows"],{dt:g,vt:y,L:x,gt:C,ht:w,V:I,bt:b,wt:k,yt:S,St:E}=e,N=L=>Co(L,"direction")==="rtl",A={Ot:!1,B:N(g)},P=Io(),j=ca(ih),[G]=wn({i:w1,o:{w:0,h:0}},()=>{const L=j&&j.R(e,t,A,P,n).Y,D=!(b&&I)&&eh(y,Er,Oc),K=!I&&k("arrange"),J=K&&Cn(C),Y=J&&E(),ee=S(G1,D),X=K&&L&&L(),ae=il(x),ce=nh(x);return X&&X(),ho(C,J),Y&&Y(),D&&ee(),{w:ae.w+ce.w,h:ae.h+ce.h}}),M=(()=>{let L,D,K;const J=x1(o,{p:()=>L,v:()=>D,S:()=>K,m(ee,X){const[ae]=ee,[ce]=X;return[Ki(pn(ae),pn(ce)).reduce((me,be)=>(me[be]=ae[be]||ce[be],me),{})]}}),Y=(ee,X)=>{if(Hn(X)){const[ae,ce,me]=X;L=ae,D=ce,K=me}else Ar(X)?(L=X,D=!1,K=!1):(L=!1,D=!1,K=!1);J(ee)};return Y.O=J.O,Y})(),T=L=>{const D=N(g);Xe(L,{Ct:p!==D}),Xe(A,{B:D}),p=D},H=(L,D)=>{const[K,J]=L,Y={$t:J};return Xe(A,{Ot:K}),D||o(Y),Y},V=({_t:L,ft:D})=>{const K=D?o:M,J={_t:L||D,ft:D};T(J),K(J,i)},z=(L,D)=>{const[,K]=G(),J={xt:K};return T(J),K&&!D&&M(J,L?a:r),J},O=(L,D,K)=>{const J={Ht:D};return T(J),D&&!K&&M(J,r),J},[B,F]=w?nS(y,H):[],$=!I&&X1(y,V,{ft:!0}),[Z,_]=Rg(y,!1,O,{ct:m,et:m}),R=I&&Ti&&new Ti(L=>{const D=L[L.length-1].contentRect;V({_t:!0,ft:L1(D,u)}),u=D});return[()=>{R&&R.observe(y);const L=$&&$(),D=B&&B(),K=Z(),J=P.G(Y=>{const[,ee]=G();M({Et:Y,xt:ee,_t:b},s)});return()=>{R&&R.disconnect(),L&&L(),D&&D(),l&&l(),K(),J()}},({zt:L,It:D,At:K})=>{const J={},[Y]=L("update.ignoreMutation"),[ee,X]=L("update.attributes"),[ae,ce]=L("update.elementEvents"),[me,be]=L("update.debounce"),Le=D||K;if(ce||X){c&&c(),l&&l();const[q,oe]=Rg(w||x,!0,z,{et:Ki(m,ee||[]),rt:ae,it:f,ut:(se,we)=>{const{target:Oe,attributeName:de}=se;return!(we||!de||I)&&B5(Oe,f,h)||!!Li(Oe,`.${On}`)||!!(Ve=>oo(Y)&&Y(Ve))(se)}});l=q(),c=oe}if(be&&(M.O(),Hn(me)||Ar(me)?(r=me,i=!1,a=F1,s=z1):ns(me)?(r=me.mutation,i=me.resize,a=me.event,s=me.env):(r=!1,i=!1,a=!1,s=!1)),Le){const q=_(),oe=F&&F(),se=c&&c();q&&Xe(J,O(q[0],q[1],Le)),oe&&Xe(J,H(oe[0],Le)),se&&Xe(J,z(se[0],Le))}return T(J),J},A]},U1=(e,t)=>oo(t)?t.apply(0,e):t,rS=(e,t,n,o)=>{const r=Zf(o)?n:o;return U1(e,r)||t.apply(0,e)},J1=(e,t,n,o)=>{const r=Zf(o)?n:o,i=U1(e,r);return!!i&&(tl(i)?i:t.apply(0,e))},iS=(e,t,n,o)=>{const r="--os-viewport-percent",i="--os-scroll-percent",a="--os-scroll-direction",{K:s}=Io(),{scrollbars:c}=s(),{slot:l}=c,{dt:u,vt:p,L:f,Tt:h,gt:m,bt:g,V:y}=t,{scrollbars:x}=h?{}:e,{slot:C}=x||{},w=[],I=[],b=[],k=J1([u,p,f],()=>y&&g?u:p,l,C),S=T=>{if(_a){let H=null,V=[];const z=new _a({source:m,axis:T}),O=()=>{H&&H.cancel(),H=null};return{kt:F=>{const{Dt:$}=n,Z=Du($)[T],_=T==="x",R=[_u(0,_),_u(`calc(-100% + 100cq${_?"w":"h"})`,_)],L=Z?R:R.reverse();return V[0]===L[0]&&V[1]===L[1]||(V=L,O(),H=F.Mt.animate({clear:["left"],transform:L},{timeline:z})),O}}}},E={x:S("x"),y:S("y")},N=(T,H,V)=>{const z=V?th:E1;lt(T,O=>{z(O.Lt,H)})},A=(T,H)=>{lt(T,V=>{const[z,O]=H(V);is(z,O)})},P=(T,H,V)=>{const z=Xl(V),O=!z||!V;(!z||V)&&N(I,T,H),O&&N(b,T,H)},j=T=>{const H=T?"x":"y",V=Wi(`${On} ${T?X5:U5}`),z=Wi(V1),O=Wi(rh),B={Lt:V,Ut:z,Mt:O},F=E[H];return bt(T?I:b,B),bt(w,[fn(V,z),fn(z,O),Ne(Qi,V),F&&F.kt(B),o(B,P,T)]),B},G=Ne(j,!0),M=Ne(j,!1);return G(),M(),[{Pt:()=>{const T=(()=>{const{Rt:V,Vt:z}=n,O=(B,F)=>k1(0,1,B/(B+F)||0);return{x:O(z.x,V.x),y:O(z.y,V.y)}})(),H=V=>z=>[z.Lt,{[r]:dp(V)+""}];A(I,H(T.x)),A(b,H(T.y))},Nt:()=>{if(!_a){const{Dt:T}=n,H=Cg(T,Cn(m)),V=z=>O=>[O.Lt,{[i]:dp(z)+""}];A(I,V(H.x)),A(b,V(H.y))}},qt:()=>{const{Dt:T}=n,H=Du(T),V=z=>O=>[O.Lt,{[a]:z?"0":"1"}];A(I,V(H.x)),A(b,V(H.y)),_a&&(I.forEach(E.x.kt),b.forEach(E.y.kt))},Bt:()=>{if(y&&!g){const{Rt:T,Dt:H}=n,V=Du(H),z=Cg(H,Cn(m)),O=B=>{const{Lt:F}=B,$=rs(F)===f&&F,Z=(_,R,L)=>{const D=R*_;return T1(L?D:-D)};return[$,$&&{transform:_u({x:Z(z.x,T.x,V.x),y:Z(z.y,T.y,V.y)})}]};A(I,O),A(b,O)}},Ft:P,jt:{Xt:I,Yt:G,Wt:Ne(A,I)},Jt:{Xt:b,Yt:M,Wt:Ne(A,b)}},()=>(fn(k,I[0].Lt),fn(k,b[0].Lt),Ne(An,w))]},aS=(e,t,n,o)=>(r,i,a)=>{const{vt:s,L:c,V:l,gt:u,Gt:p,St:f}=t,{Lt:h,Ut:m,Mt:g}=r,[y,x]=Ri(333),[C,w]=Ri(444),I=k=>{oo(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:k.x,top:k.y})};let b=!0;return Ne(An,[ft(g,"pointermove pointerleave",o),ft(h,"pointerenter",()=>{i(Ag,!0)}),ft(h,"pointerleave pointercancel",()=>{i(Ag,!1)}),!l&&ft(h,"mousedown",()=>{const k=up();(vg(k,Lo)||vg(k,Er)||k===document.body)&&$f(Ne(hp,c),25)}),ft(h,"wheel",k=>{const{deltaX:S,deltaY:E,deltaMode:N}=k;b&&N===0&&rs(h)===s&&I({x:S,y:E}),b=!1,i(Pg,!0),y(()=>{b=!0,i(Pg)}),fp(k)},{I:!1,A:!0}),ft(h,"pointerdown",()=>{const k=ft(p,"click",E=>{S(),M1(E)},{T:!0,A:!0,I:!1}),S=ft(p,"pointerup pointercancel",()=>{S(),setTimeout(k,150)},{A:!0,I:!0})},{A:!0,I:!0}),(()=>{const k="pointerup pointercancel lostpointercapture",S="client"+(a?"X":"Y"),E=a?Jl:Yl,N=a?"left":"top",A=a?"w":"h",P=a?"x":"y",j=(M,T)=>H=>{const{Rt:V}=n,z=Vi(m)[A]-Vi(g)[A],O=T*H/z*V[P];ho(u,{[P]:M+O})},G=[];return ft(m,"pointerdown",M=>{const T=Li(M.target,`.${rh}`)===g,H=T?g:m,V=e.scrollbars,z=V[T?"dragScroll":"clickScroll"],{button:O,isPrimary:B,pointerType:F}=M,{pointers:$}=V;if(O===0&&B&&z&&($||[]).includes(F)){An(G),w();const Z=!T&&(M.shiftKey||z==="instant"),_=Ne(Mu,g),R=Ne(Mu,m),L=(se,we)=>(se||_())[N]-(we||R())[N],D=sp(Mu(u)[E])/Vi(u)[A]||1,K=j(Cn(u)[P],1/D),J=M[S],Y=_(),ee=R(),X=Y[E],ae=L(Y,ee)+X/2,ce=J-ee[N],me=T?0:ce-ae,be=se=>{An(oe),H.releasePointerCapture(se.pointerId)},Le=T||Z,q=f(),oe=[ft(p,k,be),ft(p,"selectstart",se=>fp(se),{I:!1}),ft(m,k,be),Le&&ft(m,"pointermove",se=>K(me+(se[S]-J))),Le&&(()=>{const se=Cn(u);q();const we=Cn(u),Oe={x:we.x-se.x,y:we.y-se.y};(br(Oe.x)>3||br(Oe.y)>3)&&(f(),ho(u,se),I(Oe),C(q))})];if(H.setPointerCapture(M.pointerId),Z)K(me);else if(!T){const se=ca("__osClickScrollPlugin");if(se){const we=se(K,me,X,Oe=>{Oe?q():bt(oe,q)});bt(oe,we),bt(G,Ne(we,!0))}}}})})(),x,w])},sS=e=>{const t=Io(),{K:n,U:o}=t,{elements:r}=n(),{padding:i,viewport:a,content:s}=r,c=tl(e),l=c?{}:e,{elements:u}=l,{padding:p,viewport:f,content:h}=u||{},m=c?e:l.target,g=j1(m),y=m.ownerDocument,x=y.documentElement,C=()=>y.defaultView||hn,w=Ne(rS,[m]),I=Ne(J1,[m]),b=Ne(Wi,""),k=Ne(w,b,a),S=Ne(I,b,s),E=k(f),N=E===m,A=N&&g,P=!N&&S(h),j=!N&&E===P,G=A?x:E,M=A?G:m,T=!N&&I(b,i,p),H=!j&&P,V=[H,G,T,M].map(ee=>tl(ee)&&!rs(ee)&&ee),z=ee=>ee&&p1(V,ee),O=!z(G)&&(ee=>{const X=Vi(ee),ae=il(ee),ce=Co(ee,Jf),me=Co(ee,Yf);return ae.w-X.w>0&&!_i(ce)||ae.h-X.h>0&&!_i(me)})(G)?G:m,B=A?x:G,F={dt:m,vt:M,L:G,rn:T,ht:H,gt:B,Kt:A?y:G,ln:g?x:O,Gt:y,bt:g,Tt:c,V:N,an:C,wt:ee=>eh(G,Lo,ee),yt:(ee,X)=>rl(G,Lo,ee,X),St:()=>rl(B,Lo,"scrolling",!0)},{dt:$,vt:Z,rn:_,L:R,ht:L}=F,D=[()=>{co(Z,[Er,Bu]),co($,Bu),g&&co(x,[Bu,Er])}];let K=lp([L,R,_,Z,$].find(ee=>ee&&!z(ee)));const J=A?$:L||R,Y=Ne(An,D);return[F,()=>{const ee=C(),X=up(),ae=q=>{fn(rs(q),lp(q)),Qi(q)},ce=q=>ft(q,"focusin focusout focus blur",M1,{A:!0,I:!1}),me="tabindex",be=qf(R,me),Le=ce(X);return Ro(Z,Er,N?"":"host"),Ro(_,gp,""),Ro(R,Lo,""),Ro(L,Sg,""),N||(Ro(R,me,be||"-1"),g&&Ro(x,kg,"")),fn(J,K),fn(Z,_),fn(_||Z,!N&&R),fn(R,L),bt(D,[Le,()=>{const q=up(),oe=z(R),se=oe&&q===R?$:q,we=ce(se);co(_,gp),co(L,Sg),co(R,Lo),g&&co(x,kg),be?Ro(R,me,be):co(R,me),z(L)&&ae(L),oe&&ae(R),z(_)&&ae(_),hp(se),we()}]),o&&!N&&(Qf(R,Lo,W1),bt(D,Ne(co,R,Lo))),hp(!N&&g&&X===$&&ee.top===ee?R:X),Le(),K=0,Y},Y]},cS=({ht:e})=>({Qt:t,un:n,At:o})=>{const{$t:r}=t||{},{Ot:i}=n;e&&(r||o)&&is(e,{[Yl]:i&&"100%"})},lS=({vt:e,rn:t,L:n,V:o},r)=>{const[i,a]=wn({i:D5,o:wg()},Ne(wg,e,"padding",""));return({zt:s,Qt:c,un:l,At:u})=>{let[p,f]=a(u);const{U:h}=Io(),{_t:m,xt:g,Ct:y}=c||{},{B:x}=l,[C,w]=s("paddingAbsolute");(m||f||u||g)&&([p,f]=i(u));const I=!o&&(w||y||f);if(I){const b=!C||!t&&!h,k=p.r+p.l,S=p.t+p.b,E={[y1]:b&&!x?-k:0,[b1]:b?-S:0,[v1]:b&&x?-k:0,top:b?-p.t:0,right:b?x?-p.r:"auto":0,left:b?x?"auto":-p.l:0,[Jl]:b&&`calc(100% + ${k}px)`},N={[f1]:b?p.t:0,[h1]:b?p.r:0,[g1]:b?p.b:0,[m1]:b?p.l:0};is(t||n,E),is(n,N),Xe(r,{rn:p,fn:!b,F:t?N:Xe({},E,N)})}return{_n:I}}},uS=(e,t)=>{const n=Io(),{vt:o,rn:r,L:i,V:a,Kt:s,gt:c,bt:l,yt:u,an:p}=e,{U:f}=n,h=l&&a,m=Ne(l1,0),g={display:()=>!1,direction:_=>_!=="ltr",flexDirection:_=>_.endsWith("-reverse"),writingMode:_=>_!=="horizontal-tb"},y=pn(g),x={i:w1,o:{w:0,h:0}},C={i:Pc,o:{}},w=_=>{u(G1,!h&&_)},I=()=>Co(i,y),b=(_,R)=>{const L=!pn(_).length,D=!R&&y.some(q=>{const oe=_[q];return sa(oe)&&g[q](oe)});if(L&&!D||!(q=>!!q&&(oe=>!!(oe.offsetWidth||oe.offsetHeight||oe.getClientRects().length))(q))(i))return{D:{x:0,y:0},M:{x:1,y:1}};w(!0);const K=Cn(c),J=ft(s,qi,q=>{const oe=Cn(c);q.isTrusted&&oe.x===K.x&&oe.y===K.y&&_1(q)},{A:!0,T:!0}),Y=u("noContent",!0);ho(c,{x:0,y:0}),Y();const ee=Cn(c),X=il(c);ho(c,{x:X.w,y:X.h});const ae=Cn(c),ce={x:ae.x-ee.x,y:ae.y-ee.y};ho(c,{x:-X.w,y:-X.h});const me=Cn(c),be={x:me.x-ee.x,y:me.y-ee.y},Le={x:br(ce.x)>=br(be.x)?ae.x:me.x,y:br(ce.y)>=br(be.y)?ae.y:me.y};return ho(c,K),zf(()=>J()),{D:ee,M:Le}},k=(_,R)=>{const L=hn.devicePixelRatio%1!=0?1:0,D={w:m(_.w-R.w),h:m(_.h-R.h)};return{w:D.w>L?D.w:0,h:D.h>L?D.h:0}},S=(_,R)=>{const L=(D,K,J,Y)=>{const ee=D===Mo?Kn:(ce=>ce.replace(`${Mo}-`,""))(D),X=_i(D),ae=_i(J);return!K&&!Y?Kn:X&&ae?Mo:X?K&&Y?ee:K?Mo:Kn:K?ee:ae&&Y?Mo:Kn};return{x:L(R.x,_.x,R.y,_.y),y:L(R.y,_.y,R.x,_.x)}},E=_=>{const R=D=>[Mo,Kn,qi].map(K=>Z(yp(K),D)),L=R(!0).concat(R()).join(" ");u(L),u(pn(_).map(D=>Z(_[D],D==="x")).join(" "),!0)},[N,A]=wn(x,Ne(nh,i)),[P,j]=wn(x,Ne(il,i)),[G,M]=wn(x),[T]=wn(C),[H,V]=wn(x),[z]=wn(C),[O]=wn({i:(_,R)=>Kl(_,R,ol(Ki(pn(_),pn(R)))),o:{}}),[B,F]=wn({i:(_,R)=>Pc(_.D,R.D)&&Pc(_.M,R.M),o:{D:{x:0,y:0},M:{x:0,y:0}}}),$=ca(ih),Z=(_,R)=>`${R?V5:F5}${(L=>{const D=String(L||"");return D?D[0].toUpperCase()+D.slice(1):""})(_)}`;return({zt:_,Qt:R,un:L,At:D},{_n:K})=>{const{_t:J,Ht:Y,xt:ee,Ct:X,ft:ae,Et:ce}=R||{},me=$&&$.R(e,t,L,n,_),{X:be,Y:Le,W:q}=me||{},[oe,se]=((wi,Qo)=>{const{k:ao}=Qo,[er,tr]=wi("showNativeOverlaidScrollbars");return[er&&ao.x&&ao.y,tr]})(_,n),[we,Oe]=_("overflow"),de=_i(we.x),Ve=_i(we.y),it=J||K||ee||X||ce||se;let dt=A(D),Te=j(D),Pe=M(D),Be=V(D);if(se&&f&&u(W1,!oe),it){eh(o,Er,Oc)&&w(!0);const wi=Le&&Le(),[Qo]=dt=N(D),[ao]=Te=P(D),er=R1(i),tr=h&&G5(p()),wu={w:m(ao.w+Qo.w),h:m(ao.h+Qo.h)},zs={w:m((tr?tr.w:er.w+m(er.w-ao.w))+Qo.w),h:m((tr?tr.h:er.h+m(er.h-ao.h))+Qo.h)};wi&&wi(),Be=H(zs),Pe=G(k(wu,zs),D)}const[He,le]=Be,[ye,re]=Pe,[ie,Me]=Te,[ge,ne]=dt,[Q,ue]=T({x:ye.w>0,y:ye.h>0}),Ce=de&&Ve&&(Q.x||Q.y)||de&&Q.x&&!Q.y||Ve&&Q.y&&!Q.x,$e=K||X||ce||ne||Me||le||re||Oe||se||it||Y&&h,[Zt]=_("update.flowDirectionStyles"),[ha,qo]=O(Zt?Zt(i):I(),D),qt=X||ae||qo||ue||D,[yn,Po]=qt?B(b(ha,!!Zt),D):F();let Hr=S(Q,we);w(!1),$e&&(E(Hr),Hr=Q5(i,Q),q&&be&&(be(Hr,ie,ge),is(i,q(Hr))));const[yu,bu]=z(Hr);return rl(o,Er,Oc,Ce),rl(r,gp,Oc,Ce),Xe(t,{cn:yu,Vt:{x:He.w,y:He.h},Rt:{x:ye.w,y:ye.h},j:Q,Dt:W5(yn,ye)}),{sn:bu,tn:le,nn:re,en:Po||re}}},dS=e=>{const[t,n,o]=sS(e),r={rn:{t:0,r:0,b:0,l:0},fn:!1,F:{[y1]:0,[b1]:0,[v1]:0,[f1]:0,[h1]:0,[g1]:0,[m1]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},cn:{x:Kn,y:Kn},j:{x:!1,y:!1},Dt:{D:{x:0,y:0},M:{x:0,y:0}}},{dt:i,gt:a,V:s,St:c}=t,{U:l,k:u}=Io(),p=!l&&(u.x||u.y),f=[cS(t),lS(t,r),uS(t,r)];return[n,h=>{const m={},g=p&&Cn(a),y=g&&c();return lt(f,x=>{Xe(m,x(h,m)||{})}),ho(a,g),y&&y(),s||ho(i,0),m},r,t,o]},pS=(e,t,n,o,r)=>{let i=!1;const a=Tg(t,{}),[s,c,l,u,p]=dS(e),[f,h,m]=oS(u,l,a,I=>{w({},I)}),[g,y,,x]=((I,b,k,S,E,N)=>{let A,P,j,G,M,T=os,H=0;const V=["mouse","pen"],z=de=>V.includes(de.pointerType),[O,B]=Ri(),[F,$]=Ri(100),[Z,_]=Ri(100),[R,L]=Ri(()=>H),[D,K]=iS(I,E,S,aS(b,E,S,de=>z(de)&&q())),{vt:J,Kt:Y,bt:ee}=E,{Ft:X,Pt:ae,Nt:ce,qt:me,Bt:be}=D,Le=(de,Ve)=>{if(L(),de)X(jg);else{const it=Ne(X,jg,!0);H>0&&!Ve?R(it):it()}},q=()=>{(j?A:G)||(Le(!0),F(()=>{Le(!1)}))},oe=de=>{X(vp,de,!0),X(vp,de,!1)},se=de=>{z(de)&&(A=j,j&&Le(!0))},we=[L,$,_,B,()=>T(),ft(J,"pointerover",se,{T:!0}),ft(J,"pointerenter",se),ft(J,"pointerleave",de=>{z(de)&&(A=!1,j&&Le(!1))}),ft(J,"pointermove",de=>{z(de)&&P&&q()}),ft(Y,"scroll",de=>{O(()=>{ce(),q()}),N(de),be()})],Oe=ca(ih);return[()=>Ne(An,bt(we,K())),({zt:de,At:Ve,Qt:it,Zt:dt})=>{const{tn:Te,nn:Pe,sn:Be,en:He}=dt||{},{Ct:le,ft:ye}=it||{},{B:re}=k,{k:ie,U:Me}=Io(),{cn:ge,j:ne}=S,[Q,ue]=de("showNativeOverlaidScrollbars"),[Ce,$e]=de("scrollbars.theme"),[Zt,ha]=de("scrollbars.visibility"),[qo,qt]=de("scrollbars.autoHide"),[yn,Po]=de("scrollbars.autoHideSuspend"),[Hr]=de("scrollbars.autoHideDelay"),[yu,bu]=de("scrollbars.dragScroll"),[wi,Qo]=de("scrollbars.clickScroll"),[ao,er]=de("overflow"),tr=ye&&!Ve,wu=ne.x||ne.y,zs=Te||Pe||He||le||Ve,ok=Be||ha||er,rk=Q&&ie.x&&ie.y,nm=!Me&&!Oe,ik=rk||nm,om=(xu,Cu,ak)=>{const rm=xu.includes(qi)&&(Zt===Mo||Zt==="auto"&&Cu===qi);return X(J5,rm,ak),rm};if(H=Hr,tr&&(yn&&wu?(oe(!1),T(),Z(()=>{T=ft(Y,"scroll",Ne(oe,!0),{T:!0})})):oe(!0)),(ue||nm)&&X("os-theme-none",ik),$e&&(X(M),X(Ce,!0),M=Ce),Po&&!yn&&oe(!0),qt&&(P=qo==="move",j=qo==="leave",G=qo==="never",Le(G,!0)),bu&&X(q5,yu),Qo&&X(K5,!!wi),ok){const xu=om(ao.x,ge.x,!0),Cu=om(ao.y,ge.y,!1);X(Y5,!(xu&&Cu))}zs&&(ce(),ae(),be(),He&&me(),X(Eg,!ne.x,!0),X(Eg,!ne.y,!1),X(Z5,re&&!ee))},{},D]})(e,t,m,l,u,r),C=I=>pn(I).some(b=>!!I[b]),w=(I,b)=>{if(n())return!1;const{dn:k,At:S,It:E,pn:N}=I,A=k||{},P=!!S||!i,j={zt:Tg(t,A,P),dn:A,At:P};if(N)return y(j),!1;const G=b||h(Xe({},j,{It:E})),M=c(Xe({},j,{un:m,Qt:G}));y(Xe({},j,{Qt:G,Zt:M}));const T=C(G),H=C(M),V=T||H||!Kf(A)||P;return i=!0,V&&o(I,{Qt:G,Zt:M}),V};return[()=>{const{ln:I,gt:b,St:k}=u,S=Cn(I),E=[f(),s(),g()],N=k();return ho(b,S),N(),Ne(An,E)},w,()=>({vn:m,gn:l}),{hn:u,bn:x},p]},bp=new WeakMap,Y1=e=>bp.get(e),Zn=(e,t,n)=>{const{tt:o}=Io(),r=tl(e),i=r?e:e.target,a=Y1(i);if(t&&!a){let s=!1;const c=[],l={},u=A=>{const P=I1(A),j=ca("__osOptionsValidationPlugin");return j?j(P,!0):P},p=Xe({},o(),u(t)),[f,h,m]=mp(),[g,y,x]=mp(n),C=(A,P)=>{x(A,P),m(A,P)},[w,I,b,k,S]=pS(e,p,()=>s,({dn:A,At:P},{Qt:j,Zt:G})=>{const{_t:M,Ct:T,$t:H,xt:V,Ht:z,ft:O}=j,{tn:B,nn:F,sn:$,en:Z}=G;C("updated",[N,{updateHints:{sizeChanged:!!M,directionChanged:!!T,heightIntrinsicChanged:!!H,overflowEdgeChanged:!!B,overflowAmountChanged:!!F,overflowStyleChanged:!!$,scrollCoordinatesChanged:!!Z,contentMutation:!!V,hostMutation:!!z,appear:!!O},changedOptions:A||{},force:!!P}])},A=>C("scroll",[N,A])),E=A=>{(P=>{bp.delete(P)})(i),An(c),s=!0,C("destroyed",[N,A]),h(),y()},N={options(A,P){if(A){const j=P?o():{},G=$1(p,Xe(j,u(A)));Kf(G)||(Xe(p,G),I({dn:G}))}return Xe({},p)},on:g,off:(A,P)=>{A&&P&&y(A,P)},state(){const{vn:A,gn:P}=b(),{B:j}=A,{Vt:G,Rt:M,cn:T,j:H,rn:V,fn:z,Dt:O}=P;return Xe({},{overflowEdge:G,overflowAmount:M,overflowStyle:T,hasOverflow:H,scrollCoordinates:{start:O.D,end:O.M},padding:V,paddingAbsolute:z,directionRTL:j,destroyed:s})},elements(){const{dt:A,vt:P,rn:j,L:G,ht:M,gt:T,Kt:H}=k.hn,{jt:V,Jt:z}=k.bn,O=F=>{const{Mt:$,Ut:Z,Lt:_}=F;return{scrollbar:_,track:Z,handle:$}},B=F=>{const{Xt:$,Yt:Z}=F,_=O($[0]);return Xe({},_,{clone:()=>{const R=O(Z());return I({pn:!0}),R}})};return Xe({},{target:A,host:P,padding:j||G,viewport:G,content:M||G,scrollOffsetElement:T,scrollEventElement:H,scrollbarHorizontal:B(V),scrollbarVertical:B(z)})},update:A=>I({At:A,It:!0}),destroy:Ne(E,!1),plugin:A=>l[pn(A)[0]]};return bt(c,[S]),((A,P)=>{bp.set(A,P)})(i,N),H1(D1,Zn,[N,f,l]),((A,P)=>{const{nativeScrollbarsOverlaid:j,body:G}=P||{},{k:M,U:T,K:H}=Io(),{nativeScrollbarsOverlaid:V,body:z}=H().cancel,O=j??V,B=Zf(G)?z:G,F=(M.x||M.y)&&O,$=A&&(Zl(B)?!T:B);return!!F||!!$})(k.hn.bt,!r&&e.cancel)?(E(!0),N):(bt(c,w()),C("initialized",[N]),N.update(),N)}return a};Zn.plugin=e=>{const t=Hn(e),n=t?e:[e],o=n.map(r=>H1(r,Zn)[0]);return(r=>{lt(r,i=>lt(i,(a,s)=>{D1[s]=i[s]}))})(n),t?o:o[0]},Zn.valid=e=>{const t=e&&e.elements,n=oo(t)&&t();return ns(n)&&!!Y1(n.target)},Zn.env=()=>{const{P:e,k:t,U:n,J:o,ot:r,st:i,K:a,Z:s,tt:c,nt:l}=Io();return Xe({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:o,staticDefaultInitialization:r,staticDefaultOptions:i,getDefaultInitialization:a,setDefaultInitialization:s,getDefaultOptions:c,setDefaultOptions:l})},Zn.nonce=e=>{Z1=e},Zn.trustedTypePolicy=e=>{P1=e};const fS=()=>{if(typeof window>"u"){const l=()=>{};return[l,l]}let e,t;const n=window,o=typeof n.requestIdleCallback=="function",r=n.requestAnimationFrame,i=n.cancelAnimationFrame,a=o?n.requestIdleCallback:r,s=o?n.cancelIdleCallback:i,c=()=>{s(e),i(t)};return[(l,u)=>{c(),e=a(o?()=>{c(),t=r(l)}:l,typeof u=="object"?u:{timeout:2233})},c]},K1=e=>{const{options:t,events:n,defer:o}=e||{},[r,i]=v.useMemo(fS,[]),a=v.useRef(null),s=v.useRef(o),c=v.useRef(t),l=v.useRef(n);return v.useEffect(()=>{s.current=o},[o]),v.useEffect(()=>{const{current:u}=a;c.current=t,Zn.valid(u)&&u.options(t||{},!0)},[t]),v.useEffect(()=>{const{current:u}=a;l.current=n,Zn.valid(u)&&u.on(n||{},!0)},[n]),v.useEffect(()=>()=>{var u;i(),(u=a.current)==null||u.destroy()},[]),v.useMemo(()=>[u=>{const p=a.current;if(Zn.valid(p))return;const f=s.current,h=c.current||{},m=l.current||{},g=()=>a.current=Zn(u,h,m);f?r(g,f):g()},()=>a.current],[])};v.forwardRef((e,t)=>{const{element:n="div",options:o,events:r,defer:i,children:a,...s}=e,c=n,l=v.useRef(null),u=v.useRef(null),[p,f]=K1({options:o,events:r,defer:i});return v.useEffect(()=>{const{current:h}=l,{current:m}=u;if(h)return p(n==="body"?{target:h,cancel:{body:null}}:{target:h,elements:{viewport:m,content:m}}),()=>{var g;return(g=f())==null?void 0:g.destroy()}},[p,n]),v.useImperativeHandle(t,()=>({osInstance:f,getElement:()=>l.current}),[]),v.createElement(c,{"data-overlayscrollbars-initialize":"",ref:l,...s},n==="body"?a:v.createElement("div",{"data-overlayscrollbars-contents":"",ref:u},a))});const Uo=v.forwardRef((e,t)=>{const{children:n,element:o="div",elementProps:r,wrapperClassName:i}=e,a=v.useRef(null),s=v.useRef(null),[c,l]=K1({options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},defer:!0}),u=v.useCallback(p=>{s.current=p,typeof t=="function"?t(p):t!==null&&(t.current=p)},[t]);return v.useEffect(()=>{if(s.current&&a.current&&(p=>!!p&&typeof p=="object"&&p.nodeType===Node.ELEMENT_NODE)(s.current))return c({target:a.current,elements:{viewport:s.current,content:!1}}),()=>{var p;return(p=l())==null?void 0:p.destroy()}},[c,l]),d.jsx("div",{"data-overlayscrollbars-initialize":"",ref:a,className:te("io-overlay-scrollbars-container",i),children:d.jsx(o,{"data-overlayscrollbars-contents":"",ref:u,...r,children:n})})});function As({text:e="Label",...t}){return d.jsx("label",{...t,children:e})}var hS=v[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],q1=0,mS=()=>q1++,Lg=0;function gS(e,t){t===void 0&&(t="🅰");var[n,o]=v.useState(Lg?mS:void 0);return hS(()=>{n===void 0&&o(q1++),Lg=1},[]),e||(n===void 0?n:t+n)}function ua(){return(typeof v.useId=="function"?v.useId:gS)()??""}const Es=v.forwardRef(({id:e,className:t,name:n="checkbox",align:o="left",label:r,checked:i,disabled:a,...s},c)=>{const l=ua(),u=e||`checkbox-${l}`,p=te("io-control-checkbox",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsxs("div",{className:p,children:[d.jsx("input",{type:"checkbox",id:u,className:"io-checkbox",ref:c,name:n,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&d.jsx(As,{htmlFor:u,text:r,"data-testid":s["data-testid"]?`${s["data-testid"]}-label`:void 0})]})});Es.displayName="Checkbox";const qn=v.forwardRef(({id:e,className:t,type:n="text",name:o="input",align:r="up",label:i,iconPrepend:a,iconPrependOnClick:s,iconAppend:c,iconAppendOnClick:l,placeholder:u,disabled:p,readOnly:f,errorMessage:h,errorDataTestId:m,...g},y)=>{const x=ua(),C=e||`input-${x}`,w=te("io-control-input",a&&"io-control-leading-icon",c&&"io-control-trailing-icon",p&&"io-control-disabled",f&&"io-control-readonly",h&&"io-control-error",r&&[`direction-${r}`],t),I=v.useCallback(k=>{p?k.preventDefault():s&&s(k)},[s,p]),b=v.useCallback(k=>{p?k.preventDefault():l&&l(k)},[l,p]);return d.jsxs("div",{className:w,children:[i&&d.jsx(As,{htmlFor:C,text:i}),a&&d.jsx(wt,{variant:a,onClick:k=>I(k)}),d.jsx("input",{id:C,className:"io-input",ref:y,type:n,name:o,tabIndex:0,placeholder:u??(()=>{switch(n){case"email":return"Enter your email here...";case"number":return"Enter number here...";case"password":return"Enter your password here...";case"tel":return"Enter your phone number here...";case"file":return"Select a file...";default:return"Enter text here..."}})(),"aria-label":i,disabled:p,readOnly:f,...h?{"aria-invalid":!0,"aria-describedby":`${C}-error`}:{},...g}),c&&d.jsx(wt,{variant:c,onClick:k=>b(k)}),h&&d.jsxs("div",{"data-testid":m,id:`${C}-error`,className:"io-input-error",children:[d.jsx(wt,{variant:"close"}),h]})]})});qn.displayName="Input";const vS=v.forwardRef(({id:e,className:t,name:n="radio",align:o="left",label:r,checked:i,disabled:a,...s},c)=>{const l=ua(),u=e||`radio-${l}`,p=te("io-control-radio",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsxs("div",{className:p,children:[d.jsx("input",{type:"radio",id:u,className:"io-radio",ref:c,name:n,tabIndex:a?-1:0,checked:i,disabled:a,"aria-checked":i,...s}),r&&d.jsx(As,{htmlFor:u,text:r})]})});function si(e){return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Q1(e){var t=function(n,o){if(si(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,o||"default");if(si(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}(e,"string");return si(t)=="symbol"?t:t+""}function Ma(e,t,n){return(t=Q1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_g(Object(n),!0).forEach(function(o){Ma(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_g(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function wp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ew(e,t){if(e){if(typeof e=="string")return wp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wp(e,t):void 0}}function Fo(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,o){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var i,a,s,c,l=[],u=!0,p=!1;try{if(s=(r=r.call(n)).next,o===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(i=s.call(r)).done)&&(l.push(i.value),l.length!==o);u=!0);}catch(f){p=!0,a=f}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw a}}return l}}(e,t)||ew(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tw(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Wo(e,t){if(e==null)return{};var n,o,r=tw(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}vS.displayName="Radio";var yS=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},je.apply(null,arguments)}function Mg(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q1(o.key),o)}}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},al(e,t)}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sl(e)}function nw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nw=function(){return!!e})()}function bS(e,t){if(t&&(si(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ah(e){return function(t){if(Array.isArray(t))return wp(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ew(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var wS=function(){function e(n){var o=this;this._insertTag=function(r){var i;i=o.tags.length===0?o.insertionPoint?o.insertionPoint.nextSibling:o.prepend?o.container.firstChild:o.before:o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0||n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(i){var a=document.createElement("style");return a.setAttribute("data-emotion",i.key),i.nonce!==void 0&&a.setAttribute("nonce",i.nonce),a.appendChild(document.createTextNode("")),a.setAttribute("data-s",""),a}(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(i){if(i.sheet)return i.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===i)return document.styleSheets[a]}(o);try{r.insertRule(n,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Qt="-ms-",Dg="-moz-",Ye="-webkit-",ow="comm",sh="rule",ch="decl",rw="@keyframes",xS=Math.abs,eu=String.fromCharCode,CS=Object.assign;function iw(e){return e.trim()}function Ke(e,t,n){return e.replace(t,n)}function xp(e,t){return e.indexOf(t)}function Ut(e,t){return 0|e.charCodeAt(t)}function as(e,t,n){return e.slice(t,n)}function lo(e){return e.length}function lh(e){return e.length}function tc(e,t){return t.push(e),e}var tu=1,ea=1,aw=0,vn=0,jt=0,da="";function nu(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:tu,column:ea,length:a,return:""}}function wa(e,t){return CS(nu("",null,null,"",null,null,0),e,{length:-e.length},t)}function IS(){return jt=vn>0?Ut(da,--vn):0,ea--,jt===10&&(ea=1,tu--),jt}function En(){return jt=vn<aw?Ut(da,vn++):0,ea++,jt===10&&(ea=1,tu++),jt}function yo(){return Ut(da,vn)}function Tc(){return vn}function js(e,t){return as(da,e,t)}function ss(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sw(e){return tu=ea=1,aw=lo(da=e),vn=0,[]}function cw(e){return da="",e}function Rc(e){return iw(js(vn-1,Cp(e===91?e+2:e===40?e+1:e)))}function kS(e){for(;(jt=yo())&&jt<33;)En();return ss(e)>2||ss(jt)>3?"":" "}function SS(e,t){for(;--t&&En()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return js(e,Tc()+(t<6&&yo()==32&&En()==32))}function Cp(e){for(;En();)switch(jt){case e:return vn;case 34:case 39:e!==34&&e!==39&&Cp(jt);break;case 40:e===41&&Cp(e);break;case 92:En()}return vn}function AS(e,t){for(;En()&&e+jt!==57&&(e+jt!==84||yo()!==47););return"/*"+js(t,vn-1)+"*"+eu(e===47?e:En())}function ES(e){for(;!ss(yo());)En();return js(e,vn)}function Bg(e){return cw(Lc("",null,null,null,[""],e=sw(e),0,[0],e))}function Lc(e,t,n,o,r,i,a,s,c){for(var l=0,u=0,p=a,f=0,h=0,m=0,g=1,y=1,x=1,C=0,w="",I=r,b=i,k=o,S=w;y;)switch(m=C,C=En()){case 40:if(m!=108&&Ut(S,p-1)==58){xp(S+=Ke(Rc(C),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:S+=Rc(C);break;case 9:case 10:case 13:case 32:S+=kS(m);break;case 92:S+=SS(Tc()-1,7);continue;case 47:switch(yo()){case 42:case 47:tc(jS(AS(En(),Tc()),t,n),c);break;default:S+="/"}break;case 123*g:s[l++]=lo(S)*x;case 125*g:case 59:case 0:switch(C){case 0:case 125:y=0;case 59+u:x==-1&&(S=Ke(S,/\f/g,"")),h>0&&lo(S)-p&&tc(h>32?Gg(S+";",o,n,p-1):Gg(Ke(S," ","")+";",o,n,p-2),c);break;case 59:S+=";";default:if(tc(k=Hg(S,t,n,l,u,r,s,w,I=[],b=[],p),i),C===123)if(u===0)Lc(S,t,k,k,I,i,p,s,b);else switch(f===99&&Ut(S,3)===110?100:f){case 100:case 108:case 109:case 115:Lc(e,k,k,o&&tc(Hg(e,k,k,0,0,r,s,w,r,I=[],p),b),r,b,p,s,o?I:b);break;default:Lc(S,k,k,k,[""],b,0,s,b)}}l=u=h=0,g=x=1,w=S="",p=a;break;case 58:p=1+lo(S),h=m;default:if(g<1){if(C==123)--g;else if(C==125&&g++==0&&IS()==125)continue}switch(S+=eu(C),C*g){case 38:x=u>0?1:(S+="\f",-1);break;case 44:s[l++]=(lo(S)-1)*x,x=1;break;case 64:yo()===45&&(S+=Rc(En())),f=yo(),u=p=lo(w=S+=ES(Tc())),C++;break;case 45:m===45&&lo(S)==2&&(g=0)}}return i}function Hg(e,t,n,o,r,i,a,s,c,l,u){for(var p=r-1,f=r===0?i:[""],h=lh(f),m=0,g=0,y=0;m<o;++m)for(var x=0,C=as(e,p+1,p=xS(g=a[m])),w=e;x<h;++x)(w=iw(g>0?f[x]+" "+C:Ke(C,/&\f/g,f[x])))&&(c[y++]=w);return nu(e,t,n,r===0?sh:s,c,l,u)}function jS(e,t,n){return nu(e,t,n,ow,eu(jt),as(e,2,-2),0)}function Gg(e,t,n,o){return nu(e,t,n,ch,as(e,0,o),as(e,o+1,-1),o)}function ci(e,t){for(var n="",o=lh(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function Wg(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case ch:return e.return=e.return||e.value;case ow:return"";case rw:return e.return=e.value+"{"+ci(e.children,o)+"}";case sh:e.value=e.props.join(",")}return lo(n=ci(e.children,o))?e.return=e.value+"{"+n+"}":""}function Vg(e){var t=lh(e);return function(n,o,r,i){for(var a="",s=0;s<t;s++)a+=e[s](n,o,r,i)||"";return a}}var Ip=typeof document<"u",PS=function(e,t,n){for(var o=0,r=0;o=r,r=yo(),o===38&&r===12&&(t[n]=1),!ss(r);)En();return js(e,vn)},NS=function(e,t){return cw(function(n,o){var r=-1,i=44;do switch(ss(i)){case 0:i===38&&yo()===12&&(o[r]=1),n[r]+=PS(vn-1,o,r);break;case 2:n[r]+=Rc(i);break;case 4:if(i===44){n[++r]=yo()===58?"&\f":"",o[r]=n[r].length;break}default:n[r]+=eu(i)}while(i=En());return n}(sw(e),t))},Fg=new WeakMap,OS=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(!(n=n.parent))return;if((e.props.length!==1||t.charCodeAt(0)===58||Fg.get(n))&&!o){Fg.set(e,!0);for(var r=[],i=NS(t,r),a=n.props,s=0,c=0;s<i.length;s++)for(var l=0;l<a.length;l++,c++)e.props[c]=r[s]?i[s].replace(/&\f/g,a[l]):a[l]+" "+i[s]}}},TS=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function lw(e,t){switch(function(n,o){return 45^Ut(n,0)?(((o<<2^Ut(n,0))<<2^Ut(n,1))<<2^Ut(n,2))<<2^Ut(n,3):0}(e,t)){case 5103:return Ye+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ye+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ye+e+Dg+e+Qt+e+e;case 6828:case 4268:return Ye+e+Qt+e+e;case 6165:return Ye+e+Qt+"flex-"+e+e;case 5187:return Ye+e+Ke(e,/(\w+).+(:[^]+)/,Ye+"box-$1$2"+Qt+"flex-$1$2")+e;case 5443:return Ye+e+Qt+"flex-item-"+Ke(e,/flex-|-self/,"")+e;case 4675:return Ye+e+Qt+"flex-line-pack"+Ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Ye+e+Qt+Ke(e,"shrink","negative")+e;case 5292:return Ye+e+Qt+Ke(e,"basis","preferred-size")+e;case 6060:return Ye+"box-"+Ke(e,"-grow","")+Ye+e+Qt+Ke(e,"grow","positive")+e;case 4554:return Ye+Ke(e,/([^-])(transform)/g,"$1"+Ye+"$2")+e;case 6187:return Ke(Ke(Ke(e,/(zoom-|grab)/,Ye+"$1"),/(image-set)/,Ye+"$1"),e,"")+e;case 5495:case 3959:return Ke(e,/(image-set\([^]*)/,Ye+"$1$`$1");case 4968:return Ke(Ke(e,/(.+:)(flex-)?(.*)/,Ye+"box-pack:$3"+Qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ye+e+e;case 4095:case 3583:case 4068:case 2532:return Ke(e,/(.+)-inline(.+)/,Ye+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(lo(e)-1-t>6)switch(Ut(e,t+1)){case 109:if(Ut(e,t+4)!==45)break;case 102:return Ke(e,/(.+:)(.+)-([^]+)/,"$1"+Ye+"$2-$3$1"+Dg+(Ut(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xp(e,"stretch")?lw(Ke(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ut(e,t+1)!==115)break;case 6444:switch(Ut(e,lo(e)-3-(~xp(e,"!important")&&10))){case 107:return Ke(e,":",":"+Ye)+e;case 101:return Ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ye+(Ut(e,14)===45?"inline-":"")+"box$3$1"+Ye+"$2$3$1"+Qt+"$2box$3")+e}break;case 5936:switch(Ut(e,t+11)){case 114:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ye+e+Qt+Ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ye+e+Qt+e+e}return e}var zg,nc,$g,Zg=Ip?void 0:(zg=function(){return e=function(){return{}},t=Object.create(null),function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]};var e,t},nc=new WeakMap,function(e){if(nc.has(e))return nc.get(e);var t=zg(e);return nc.set(e,t),t}),RS=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case ch:e.return=lw(e.value,e.length);break;case rw:return ci([wa(e,{value:Ke(e.value,"@","@"+Ye)})],o);case sh:if(e.length)return function(r,i){return r.map(i).join("")}(e.props,function(r){switch(function(i,a){return(i=a.exec(i))?i[0]:i}(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ci([wa(e,{props:[Ke(r,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return ci([wa(e,{props:[Ke(r,/:(plac\w+)/,":"+Ye+"input-$1")]}),wa(e,{props:[Ke(r,/:(plac\w+)/,":-moz-$1")]}),wa(e,{props:[Ke(r,/:(plac\w+)/,Qt+"input-$1")]})],o)}return""})}}],uw=function(e){var t=e.key;if(Ip&&t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(C){C.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var o,r,i=e.stylisPlugins||RS,a={},s=[];Ip&&(o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(C){for(var w=C.getAttribute("data-emotion").split(" "),I=1;I<w.length;I++)a[w[I]]=!0;s.push(C)}));var c,l=[OS,TS];if(Zg){var u=[Wg],p=Vg(l.concat(i,u)),f=Zg(i)(t),h=function(C,w){var I=w.name;return f[I]===void 0&&(f[I]=ci(Bg(C?C+"{"+w.styles+"}":w.styles),p)),f[I]};r=function(C,w,I,b){var k=w.name,S=h(C,w);return x.compat===void 0?(b&&(x.inserted[k]=!0),S):b?void(x.inserted[k]=S):S}}else{var m,g=[Wg,(c=function(C){m.insert(C)},function(C){C.root||(C=C.return)&&c(C)})],y=Vg(l.concat(i,g));r=function(C,w,I,b){m=I,ci(Bg(C?C+"{"+w.styles+"}":w.styles),y),b&&(x.inserted[w.name]=!0)}}var x={key:t,sheet:new wS({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return x.sheet.hydrate(s),x},kp={exports:{}},Qe={},Xg,at={};/** @license React v16.13.1
19
19
  * react-is.development.js
20
20
  *
21
21
  * Copyright (c) Facebook, Inc. and its affiliates.
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */process.env.NODE_ENV==="production"?kp.exports=function(){if(zg)return Qe;zg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return Qe.AsyncMode=c,Qe.ConcurrentMode=l,Qe.ContextConsumer=s,Qe.ContextProvider=a,Qe.Element=t,Qe.ForwardRef=u,Qe.Fragment=o,Qe.Lazy=m,Qe.Memo=h,Qe.Portal=n,Qe.Profiler=i,Qe.StrictMode=r,Qe.Suspense=p,Qe.isAsyncMode=function(b){return I(b)||w(b)===c},Qe.isConcurrentMode=I,Qe.isContextConsumer=function(b){return w(b)===s},Qe.isContextProvider=function(b){return w(b)===a},Qe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},Qe.isForwardRef=function(b){return w(b)===u},Qe.isFragment=function(b){return w(b)===o},Qe.isLazy=function(b){return w(b)===m},Qe.isMemo=function(b){return w(b)===h},Qe.isPortal=function(b){return w(b)===n},Qe.isProfiler=function(b){return w(b)===i},Qe.isStrictMode=function(b){return w(b)===r},Qe.isSuspense=function(b){return w(b)===p},Qe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},Qe.typeOf=w,Qe}():kp.exports=(Zg||(Zg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(P){if(typeof P=="object"&&P!==null){var B=P.$$typeof;switch(B){case t:var F=P.type;switch(F){case c:case l:case o:case i:case r:case p:return F;default:var $=F&&F.$$typeof;switch($){case s:case u:case m:case h:case a:return $;default:return B}}case n:return B}}}var I=c,b=l,k=s,S=a,E=t,O=u,A=o,N=m,j=h,G=n,M=i,T=r,H=p,V=!1;function z(P){return w(P)===l}at.AsyncMode=I,at.ConcurrentMode=b,at.ContextConsumer=k,at.ContextProvider=S,at.Element=E,at.ForwardRef=O,at.Fragment=A,at.Lazy=N,at.Memo=j,at.Portal=G,at.Profiler=M,at.StrictMode=T,at.Suspense=H,at.isAsyncMode=function(P){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(P)||w(P)===c},at.isConcurrentMode=z,at.isContextConsumer=function(P){return w(P)===s},at.isContextProvider=function(P){return w(P)===a},at.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===t},at.isForwardRef=function(P){return w(P)===u},at.isFragment=function(P){return w(P)===o},at.isLazy=function(P){return w(P)===m},at.isMemo=function(P){return w(P)===h},at.isPortal=function(P){return w(P)===n},at.isProfiler=function(P){return w(P)===i},at.isStrictMode=function(P){return w(P)===r},at.isSuspense=function(P){return w(P)===p},at.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===i||P===r||P===p||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===h||P.$$typeof===a||P.$$typeof===s||P.$$typeof===u||P.$$typeof===y||P.$$typeof===x||P.$$typeof===C||P.$$typeof===g)},at.typeOf=w}()),at);var Xg=kp.exports,Ug={};Ug[Xg.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ug[Xg.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var Sp=typeof document<"u",Jg=function(e,t,n){var o=e.key+"-"+t.name;(n===!1||Sp===!1&&e.compat!==void 0)&&e.registered[o]===void 0&&(e.registered[o]=t.styles)},_S={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function MS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var DS=/[A-Z]|^ms/g,BS=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uw=function(e){return e.charCodeAt(1)===45},Yg=function(e){return e!=null&&typeof e!="boolean"},Gu=MS(function(e){return uw(e)?e:e.replace(DS,"-$&").toLowerCase()}),Kg=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(BS,function(n,o,r){return uo={name:o,styles:r,next:uo},o})}return _S[e]===1||uw(e)||typeof t!="number"||t===0?t:t+"px"};function Fa(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":var r=n;if(r.anim===1)return uo={name:r.name,styles:r.styles,next:uo},r.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)uo={name:a.name,styles:a.styles,next:uo},a=a.next;return i.styles+";"}return function(l,u,p){var f="";if(Array.isArray(p))for(var h=0;h<p.length;h++)f+=Fa(l,u,p[h])+";";else for(var m in p){var g=p[m];if(typeof g!="object"){var y=g;Yg(y)&&(f+=Gu(m)+":"+Kg(m,y)+";")}else if(Array.isArray(g)&&typeof g[0]=="string"&&u==null)for(var x=0;x<g.length;x++)Yg(g[x])&&(f+=Gu(m)+":"+Kg(m,g[x])+";");else{var C=Fa(l,u,g);switch(m){case"animation":case"animationName":f+=Gu(m)+":"+C+";";break;default:f+=m+"{"+C+"}"}}}return f}(e,t,n);case"function":if(e!==void 0){var s=uo,c=n(e);return uo=s,Fa(e,t,c)}}return n}var uo,qg=/label:\s*([^\s;{]+)\s*(;|$)/g;function dw(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";uo=void 0;var i=e[0];i==null||i.raw===void 0?(o=!1,r+=Fa(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Fa(n,t,e[a]),o&&(r+=i[a]);qg.lastIndex=0;for(var s,c="";(s=qg.exec(r))!==null;)c+="-"+s[1];var l=function(u){for(var p,f=0,h=0,m=u.length;m>=4;++h,m-=4)p=1540483477*(65535&(p=255&u.charCodeAt(h)|(255&u.charCodeAt(++h))<<8|(255&u.charCodeAt(++h))<<16|(255&u.charCodeAt(++h))<<24))+(59797*(p>>>16)<<16),f=1540483477*(65535&(p^=p>>>24))+(59797*(p>>>16)<<16)^1540483477*(65535&f)+(59797*(f>>>16)<<16);switch(m){case 3:f^=(255&u.charCodeAt(h+2))<<16;case 2:f^=(255&u.charCodeAt(h+1))<<8;case 1:f=1540483477*(65535&(f^=255&u.charCodeAt(h)))+(59797*(f>>>16)<<16)}return(((f=1540483477*(65535&(f^=f>>>13))+(59797*(f>>>16)<<16))^f>>>15)>>>0).toString(36)}(r)+c;return{name:l,styles:r,next:uo}}var HS=typeof document<"u",GS=function(e){return e()},WS=!!W.useInsertionEffect&&W.useInsertionEffect,VS=HS&&WS||GS,pw=typeof document<"u",cl=W.createContext(typeof HTMLElement<"u"?lw({key:"css"}):null);cl.Provider;var fw=function(e){return v.forwardRef(function(t,n){var o=v.useContext(cl);return e(t,o,n)})};pw||(fw=function(e){return function(t){var n=v.useContext(cl);return n===null?(n=lw({key:"css"}),W.createElement(cl.Provider,{value:n},e(t,n))):e(t,n)}});var Wu,Qg,FS=W.createContext({}),Ap={}.hasOwnProperty,Ep="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zS=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;Jg(t,n,o);var r=VS(function(){return function(c,l,u){Jg(c,l,u);var p=c.key+"-"+l.name;if(c.inserted[l.name]===void 0){var f="",h=l;do{var m=c.insert(l===h?"."+p:"",h,c.sheet,!0);Sp||m===void 0||(f+=m),h=h.next}while(h!==void 0);if(!Sp&&f.length!==0)return f}}(t,n,o)});if(!pw&&r!==void 0){for(var i,a=n.name,s=n.next;s!==void 0;)a+=" "+s.name,s=s.next;return W.createElement("style",((i={})["data-emotion"]=t.key+" "+a,i.dangerouslySetInnerHTML={__html:r},i.nonce=t.sheet.nonce,i))}return null},$S=fw(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[Ep],i=[o],a="";typeof e.className=="string"?a=function(u,p,f){var h="";return f.split(" ").forEach(function(m){u[m]!==void 0?p.push(u[m]+";"):m&&(h+=m+" ")}),h}(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var s=dw(i,void 0,W.useContext(FS));a+=t.key+"-"+s.name;var c={};for(var l in e)Ap.call(e,l)&&l!=="css"&&l!==Ep&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),W.createElement(W.Fragment,null,W.createElement(zS,{cache:t,serialized:s,isStringTag:typeof r=="string"}),W.createElement(r,c))}),ZS=$S,Ie=function(e,t){var n=arguments;if(t==null||!Ap.call(t,"css"))return W.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=ZS,r[1]=function(a,s){var c={};for(var l in s)Ap.call(s,l)&&(c[l]=s[l]);return c[Ep]=a,c}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return W.createElement.apply(null,r)};function lh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return dw(t)}Wu=Ie||(Ie={}),Qg||(Qg=Wu.JSX||(Wu.JSX={}));var jp=typeof document<"u"?v.useLayoutEffect:function(){},XS=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ll=function(){};function US(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function JS(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(US(e,a)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var e0=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):si(e)==="object"&&e!==null?[e]:[];var t},hw=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Ae({},Wo(e,XS))},xt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(n??{},i(t,e),a)}};function ou(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function mw(e){return ou(e)?window.pageYOffset:e.scrollTop}function ul(e,t){ou(e)?window.scrollTo(0,t):e.scrollTop=t}function oc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ll,r=mw(e),i=t-r,a=0;(function s(){var c=function(l,u,p,f){return p*((l=l/f-1)*l*l+1)+u}(a+=10,r,i,n);ul(e,c),a<n?window.requestAnimationFrame(s):o(e)})()}function t0(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?ul(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&ul(e,Math.max(t.offsetTop-r,0))}function n0(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var gw=!1,YS={get passive(){return gw=!0}},rc=typeof window<"u"?window:{};rc.addEventListener&&rc.removeEventListener&&(rc.addEventListener("p",ll,YS),rc.removeEventListener("p",ll,!1));var KS=gw;function qS(e){return e!=null}function ic(e,t,n){return e?t:n}var QS=["children","innerProps"],eA=["children","innerProps"];function tA(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,c=function(T){var H=getComputedStyle(T),V=H.position==="absolute",z=/(auto|scroll)/;if(H.position==="fixed")return document.documentElement;for(var P=T;P=P.parentElement;)if(H=getComputedStyle(P),(!V||H.position!=="static")&&z.test(H.overflow+H.overflowY+H.overflowX))return P;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var u,p=c.getBoundingClientRect().height,f=n.getBoundingClientRect(),h=f.bottom,m=f.height,g=f.top,y=n.offsetParent.getBoundingClientRect().top,x=a||ou(u=c)?window.innerHeight:u.clientHeight,C=mw(c),w=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),b=y-I,k=x-g,S=b+C,E=p-C-g,O=h-x+C+w,A=C+g-I,N=160;switch(r){case"auto":case"bottom":if(k>=m)return{placement:"bottom",maxHeight:t};if(E>=m&&!a)return i&&oc(c,O,N),{placement:"bottom",maxHeight:t};if(!a&&E>=o||a&&k>=o)return i&&oc(c,O,N),{placement:"bottom",maxHeight:a?k-w:E-w};if(r==="auto"||a){var j=t,G=a?b:S;return G>=o&&(j=Math.min(G-w-s,t)),{placement:"top",maxHeight:j}}if(r==="bottom")return i&&ul(c,O),{placement:"bottom",maxHeight:t};break;case"top":if(b>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return i&&oc(c,A,N),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&b>=o){var M=t;return(!a&&S>=o||a&&b>=o)&&(M=a?b-I:S-I),i&&oc(c,A,N),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return l}var o0,vw=function(e){return e==="auto"?"bottom":e},yw=v.createContext(null),nA=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,c=(v.useContext(yw)||{}).setPortalPlacement,l=v.useRef(null),u=Fo(v.useState(o),2),p=u[0],f=u[1],h=Fo(v.useState(null),2),m=h[0],g=h[1],y=s.spacing.controlHeight;return jp(function(){var x=l.current;if(x){var C=i==="fixed",w=tA({maxHeight:o,menuEl:x,minHeight:n,placement:r,shouldScroll:a&&!C,isFixedPosition:C,controlHeight:y});f(w.maxHeight),g(w.placement),c==null||c(w.placement)}},[o,r,i,a,n,c,y]),t({ref:l,placerProps:Ae(Ae({},e),{},{placement:m||vw(r),maxHeight:p})})},oA=function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Ie("div",je({},xt(e,"menu",{menu:!0}),{ref:n},o),t)},bw=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return Ae({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},rA=bw,iA=bw,aA=["size"],sA=["innerProps","isRtl","size"],cA=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},ww=function(e){var t=e.size,n=Wo(e,aA);return Ie("svg",je({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cA},n))},Vu=function(e){return Ie(ww,je({size:20},e),Ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},r0=function(e){return Ie(ww,je({size:20},e),Ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},xw=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Ae({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},lA=xw,uA=xw,dA=function(){var e=lh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(o0||(o0=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([`
25
+ */process.env.NODE_ENV==="production"?kp.exports=function(){if($g)return Qe;$g=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return Qe.AsyncMode=c,Qe.ConcurrentMode=l,Qe.ContextConsumer=s,Qe.ContextProvider=a,Qe.Element=t,Qe.ForwardRef=u,Qe.Fragment=o,Qe.Lazy=m,Qe.Memo=h,Qe.Portal=n,Qe.Profiler=i,Qe.StrictMode=r,Qe.Suspense=p,Qe.isAsyncMode=function(b){return I(b)||w(b)===c},Qe.isConcurrentMode=I,Qe.isContextConsumer=function(b){return w(b)===s},Qe.isContextProvider=function(b){return w(b)===a},Qe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},Qe.isForwardRef=function(b){return w(b)===u},Qe.isFragment=function(b){return w(b)===o},Qe.isLazy=function(b){return w(b)===m},Qe.isMemo=function(b){return w(b)===h},Qe.isPortal=function(b){return w(b)===n},Qe.isProfiler=function(b){return w(b)===i},Qe.isStrictMode=function(b){return w(b)===r},Qe.isSuspense=function(b){return w(b)===p},Qe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},Qe.typeOf=w,Qe}():kp.exports=(Xg||(Xg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(O){if(typeof O=="object"&&O!==null){var B=O.$$typeof;switch(B){case t:var F=O.type;switch(F){case c:case l:case o:case i:case r:case p:return F;default:var $=F&&F.$$typeof;switch($){case s:case u:case m:case h:case a:return $;default:return B}}case n:return B}}}var I=c,b=l,k=s,S=a,E=t,N=u,A=o,P=m,j=h,G=n,M=i,T=r,H=p,V=!1;function z(O){return w(O)===l}at.AsyncMode=I,at.ConcurrentMode=b,at.ContextConsumer=k,at.ContextProvider=S,at.Element=E,at.ForwardRef=N,at.Fragment=A,at.Lazy=P,at.Memo=j,at.Portal=G,at.Profiler=M,at.StrictMode=T,at.Suspense=H,at.isAsyncMode=function(O){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(O)||w(O)===c},at.isConcurrentMode=z,at.isContextConsumer=function(O){return w(O)===s},at.isContextProvider=function(O){return w(O)===a},at.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},at.isForwardRef=function(O){return w(O)===u},at.isFragment=function(O){return w(O)===o},at.isLazy=function(O){return w(O)===m},at.isMemo=function(O){return w(O)===h},at.isPortal=function(O){return w(O)===n},at.isProfiler=function(O){return w(O)===i},at.isStrictMode=function(O){return w(O)===r},at.isSuspense=function(O){return w(O)===p},at.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===o||O===l||O===i||O===r||O===p||O===f||typeof O=="object"&&O!==null&&(O.$$typeof===m||O.$$typeof===h||O.$$typeof===a||O.$$typeof===s||O.$$typeof===u||O.$$typeof===y||O.$$typeof===x||O.$$typeof===C||O.$$typeof===g)},at.typeOf=w}()),at);var Ug=kp.exports,Jg={};Jg[Ug.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Jg[Ug.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var Sp=typeof document<"u",Yg=function(e,t,n){var o=e.key+"-"+t.name;(n===!1||Sp===!1&&e.compat!==void 0)&&e.registered[o]===void 0&&(e.registered[o]=t.styles)},LS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function _S(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var MS=/[A-Z]|^ms/g,DS=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dw=function(e){return e.charCodeAt(1)===45},Kg=function(e){return e!=null&&typeof e!="boolean"},Gu=_S(function(e){return dw(e)?e:e.replace(MS,"-$&").toLowerCase()}),qg=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(DS,function(n,o,r){return uo={name:o,styles:r,next:uo},o})}return LS[e]===1||dw(e)||typeof t!="number"||t===0?t:t+"px"};function Fa(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":var r=n;if(r.anim===1)return uo={name:r.name,styles:r.styles,next:uo},r.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)uo={name:a.name,styles:a.styles,next:uo},a=a.next;return i.styles+";"}return function(l,u,p){var f="";if(Array.isArray(p))for(var h=0;h<p.length;h++)f+=Fa(l,u,p[h])+";";else for(var m in p){var g=p[m];if(typeof g!="object"){var y=g;Kg(y)&&(f+=Gu(m)+":"+qg(m,y)+";")}else if(Array.isArray(g)&&typeof g[0]=="string"&&u==null)for(var x=0;x<g.length;x++)Kg(g[x])&&(f+=Gu(m)+":"+qg(m,g[x])+";");else{var C=Fa(l,u,g);switch(m){case"animation":case"animationName":f+=Gu(m)+":"+C+";";break;default:f+=m+"{"+C+"}"}}}return f}(e,t,n);case"function":if(e!==void 0){var s=uo,c=n(e);return uo=s,Fa(e,t,c)}}return n}var uo,Qg=/label:\s*([^\s;{]+)\s*(;|$)/g;function pw(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";uo=void 0;var i=e[0];i==null||i.raw===void 0?(o=!1,r+=Fa(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Fa(n,t,e[a]),o&&(r+=i[a]);Qg.lastIndex=0;for(var s,c="";(s=Qg.exec(r))!==null;)c+="-"+s[1];var l=function(u){for(var p,f=0,h=0,m=u.length;m>=4;++h,m-=4)p=1540483477*(65535&(p=255&u.charCodeAt(h)|(255&u.charCodeAt(++h))<<8|(255&u.charCodeAt(++h))<<16|(255&u.charCodeAt(++h))<<24))+(59797*(p>>>16)<<16),f=1540483477*(65535&(p^=p>>>24))+(59797*(p>>>16)<<16)^1540483477*(65535&f)+(59797*(f>>>16)<<16);switch(m){case 3:f^=(255&u.charCodeAt(h+2))<<16;case 2:f^=(255&u.charCodeAt(h+1))<<8;case 1:f=1540483477*(65535&(f^=255&u.charCodeAt(h)))+(59797*(f>>>16)<<16)}return(((f=1540483477*(65535&(f^=f>>>13))+(59797*(f>>>16)<<16))^f>>>15)>>>0).toString(36)}(r)+c;return{name:l,styles:r,next:uo}}var BS=typeof document<"u",HS=function(e){return e()},GS=!!W.useInsertionEffect&&W.useInsertionEffect,WS=BS&&GS||HS,fw=typeof document<"u",cl=W.createContext(typeof HTMLElement<"u"?uw({key:"css"}):null);cl.Provider;var hw=function(e){return v.forwardRef(function(t,n){var o=v.useContext(cl);return e(t,o,n)})};fw||(hw=function(e){return function(t){var n=v.useContext(cl);return n===null?(n=uw({key:"css"}),W.createElement(cl.Provider,{value:n},e(t,n))):e(t,n)}});var Wu,e0,VS=W.createContext({}),Ap={}.hasOwnProperty,Ep="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",FS=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;Yg(t,n,o);var r=WS(function(){return function(c,l,u){Yg(c,l,u);var p=c.key+"-"+l.name;if(c.inserted[l.name]===void 0){var f="",h=l;do{var m=c.insert(l===h?"."+p:"",h,c.sheet,!0);Sp||m===void 0||(f+=m),h=h.next}while(h!==void 0);if(!Sp&&f.length!==0)return f}}(t,n,o)});if(!fw&&r!==void 0){for(var i,a=n.name,s=n.next;s!==void 0;)a+=" "+s.name,s=s.next;return W.createElement("style",((i={})["data-emotion"]=t.key+" "+a,i.dangerouslySetInnerHTML={__html:r},i.nonce=t.sheet.nonce,i))}return null},zS=hw(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[Ep],i=[o],a="";typeof e.className=="string"?a=function(u,p,f){var h="";return f.split(" ").forEach(function(m){u[m]!==void 0?p.push(u[m]+";"):m&&(h+=m+" ")}),h}(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var s=pw(i,void 0,W.useContext(VS));a+=t.key+"-"+s.name;var c={};for(var l in e)Ap.call(e,l)&&l!=="css"&&l!==Ep&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),W.createElement(W.Fragment,null,W.createElement(FS,{cache:t,serialized:s,isStringTag:typeof r=="string"}),W.createElement(r,c))}),$S=zS,Ie=function(e,t){var n=arguments;if(t==null||!Ap.call(t,"css"))return W.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=$S,r[1]=function(a,s){var c={};for(var l in s)Ap.call(s,l)&&(c[l]=s[l]);return c[Ep]=a,c}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return W.createElement.apply(null,r)};function uh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pw(t)}Wu=Ie||(Ie={}),e0||(e0=Wu.JSX||(Wu.JSX={}));var jp=typeof document<"u"?v.useLayoutEffect:function(){},ZS=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ll=function(){};function XS(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function US(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(XS(e,a)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var t0=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):si(e)==="object"&&e!==null?[e]:[];var t},mw=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Ae({},Wo(e,ZS))},xt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(n??{},i(t,e),a)}};function ou(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function gw(e){return ou(e)?window.pageYOffset:e.scrollTop}function ul(e,t){ou(e)?window.scrollTo(0,t):e.scrollTop=t}function oc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ll,r=gw(e),i=t-r,a=0;(function s(){var c=function(l,u,p,f){return p*((l=l/f-1)*l*l+1)+u}(a+=10,r,i,n);ul(e,c),a<n?window.requestAnimationFrame(s):o(e)})()}function n0(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?ul(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&ul(e,Math.max(t.offsetTop-r,0))}function o0(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var vw=!1,JS={get passive(){return vw=!0}},rc=typeof window<"u"?window:{};rc.addEventListener&&rc.removeEventListener&&(rc.addEventListener("p",ll,JS),rc.removeEventListener("p",ll,!1));var YS=vw;function KS(e){return e!=null}function ic(e,t,n){return e?t:n}var qS=["children","innerProps"],QS=["children","innerProps"];function eA(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,c=function(T){var H=getComputedStyle(T),V=H.position==="absolute",z=/(auto|scroll)/;if(H.position==="fixed")return document.documentElement;for(var O=T;O=O.parentElement;)if(H=getComputedStyle(O),(!V||H.position!=="static")&&z.test(H.overflow+H.overflowY+H.overflowX))return O;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var u,p=c.getBoundingClientRect().height,f=n.getBoundingClientRect(),h=f.bottom,m=f.height,g=f.top,y=n.offsetParent.getBoundingClientRect().top,x=a||ou(u=c)?window.innerHeight:u.clientHeight,C=gw(c),w=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),b=y-I,k=x-g,S=b+C,E=p-C-g,N=h-x+C+w,A=C+g-I,P=160;switch(r){case"auto":case"bottom":if(k>=m)return{placement:"bottom",maxHeight:t};if(E>=m&&!a)return i&&oc(c,N,P),{placement:"bottom",maxHeight:t};if(!a&&E>=o||a&&k>=o)return i&&oc(c,N,P),{placement:"bottom",maxHeight:a?k-w:E-w};if(r==="auto"||a){var j=t,G=a?b:S;return G>=o&&(j=Math.min(G-w-s,t)),{placement:"top",maxHeight:j}}if(r==="bottom")return i&&ul(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(b>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return i&&oc(c,A,P),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&b>=o){var M=t;return(!a&&S>=o||a&&b>=o)&&(M=a?b-I:S-I),i&&oc(c,A,P),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return l}var r0,yw=function(e){return e==="auto"?"bottom":e},bw=v.createContext(null),tA=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,c=(v.useContext(bw)||{}).setPortalPlacement,l=v.useRef(null),u=Fo(v.useState(o),2),p=u[0],f=u[1],h=Fo(v.useState(null),2),m=h[0],g=h[1],y=s.spacing.controlHeight;return jp(function(){var x=l.current;if(x){var C=i==="fixed",w=eA({maxHeight:o,menuEl:x,minHeight:n,placement:r,shouldScroll:a&&!C,isFixedPosition:C,controlHeight:y});f(w.maxHeight),g(w.placement),c==null||c(w.placement)}},[o,r,i,a,n,c,y]),t({ref:l,placerProps:Ae(Ae({},e),{},{placement:m||yw(r),maxHeight:p})})},nA=function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Ie("div",je({},xt(e,"menu",{menu:!0}),{ref:n},o),t)},ww=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return Ae({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},oA=ww,rA=ww,iA=["size"],aA=["innerProps","isRtl","size"],sA=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},xw=function(e){var t=e.size,n=Wo(e,iA);return Ie("svg",je({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:sA},n))},Vu=function(e){return Ie(xw,je({size:20},e),Ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},i0=function(e){return Ie(xw,je({size:20},e),Ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Cw=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Ae({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},cA=Cw,lA=Cw,uA=function(){var e=uh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(r0||(r0=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([`
26
26
  0%, 80%, 100% { opacity: 0; }
27
27
  40% { opacity: 1; }
28
- `]))),Fu=function(e){var t=e.delay,n=e.offset;return Ie("span",{css:lh({animation:"".concat(dA," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},pA=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ie("div",je({ref:r},xt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},fA=["data"],hA=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,c=e.label,l=e.theme,u=e.selectProps;return Ie("div",je({},xt(e,"group",{group:!0}),s),Ie(i,je({},a,{selectProps:u,theme:l,getStyles:o,getClassNames:r,cx:n}),c),Ie("div",null,t))},mA=["innerRef","isDisabled","isHidden","inputClassName"],Cw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},gA={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ae({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Cw)},vA=function(e){return Ae({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Cw)},yA=function(e){var t=e.cx,n=e.value,o=hw(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,c=Wo(o,mA);return Ie("div",je({},xt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ie("input",je({className:t({input:!0},s),ref:r,style:vA(a),disabled:i},c)))},i0=function(e){var t=e.children,n=e.innerProps;return Ie("div",n,t)},bA=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,c=n.Container,l=n.Label,u=n.Remove;return Ie(c,{data:o,innerProps:Ae(Ae({},xt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Ie(l,{data:o,innerProps:Ae({},xt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ie(u,{data:o,innerProps:Ae(Ae({},xt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},wA=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Ie("div",je({},xt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},xA=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Ie("div",je({},xt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},uh={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ie(Vu,null))},Control:pA,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ie(r0,null))},DownChevron:r0,CrossIcon:Vu,Group:hA,GroupHeading:function(e){var t=hw(e);t.data;var n=Wo(t,fA);return Ie("div",je({},xt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ie("span",je({},t,xt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:yA,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=o===void 0?4:o,i=Wo(e,sA);return Ie("div",je({},xt(Ae(Ae({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ie(Fu,{delay:0,offset:n}),Ie(Fu,{delay:160,offset:!0}),Ie(Fu,{delay:320,offset:!n}))},Menu:oA,MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Ie("div",je({},xt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=v.useRef(null),c=v.useRef(null),l=Fo(v.useState(vw(i)),2),u=l[0],p=l[1],f=v.useMemo(function(){return{setPortalPlacement:p}},[]),h=Fo(v.useState(null),2),m=h[0],g=h[1],y=v.useCallback(function(){if(o){var I=function(S){var E=S.getBoundingClientRect();return{bottom:E.bottom,height:E.height,left:E.left,right:E.right,top:E.top,width:E.width}}(o),b=a==="fixed"?0:window.pageYOffset,k=I[u]+b;k===(m==null?void 0:m.offset)&&I.left===(m==null?void 0:m.rect.left)&&I.width===(m==null?void 0:m.rect.width)||g({offset:k,rect:I})}},[o,a,u,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);jp(function(){y()},[y]);var x=v.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),o&&s.current&&(c.current=Ny(o,s.current,y,{elementResize:"ResizeObserver"in window}))},[o,y]);jp(function(){x()},[x]);var C=v.useCallback(function(I){s.current=I,x()},[x]);if(!t&&a!=="fixed"||!m)return null;var w=Ie("div",je({ref:C},xt(Ae(Ae({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Ie(yw.Provider,{value:f},t?Bo.createPortal(w,t):w)},LoadingMessage:function(e){var t=e.children,n=t===void 0?"Loading...":t,o=e.innerProps,r=Wo(e,eA);return Ie("div",je({},xt(Ae(Ae({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=t===void 0?"No options":t,o=e.innerProps,r=Wo(e,QS);return Ie("div",je({},xt(Ae(Ae({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:bA,MultiValueContainer:i0,MultiValueLabel:i0,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({role:"button"},n),t||Ie(Vu,{size:14}))},Option:wA,Placeholder:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Ie("div",je({},xt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:xA,ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Ie("div",je({},xt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},a0=Number.isNaN||function(e){return typeof e=="number"&&e!=e};function CA(e,t){return e===t||!(!a0(e)||!a0(t))}function IA(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!CA(e[n],t[n]))return!1;return!0}for(var kA=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},s0=function(e){return Ie("span",je({css:kA},e))},SA={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=n===void 0?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=r===void 0?"":r,a=e.selectValue,s=e.isDisabled,c=e.isSelected,l=e.isAppleDevice,u=function(h,m){return h&&h.length?"".concat(h.indexOf(m)+1," of ").concat(h.length):""};if(t==="value"&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if(t==="menu"&&l){var p=s?" disabled":"",f="".concat(c?" selected":"").concat(p);return"".concat(i).concat(f,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},AA=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,c=e.id,l=e.isAppleDevice,u=s.ariaLiveMessages,p=s.getOptionLabel,f=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,g=s.isSearchable,y=s.menuIsOpen,x=s.options,C=s.screenReaderStatus,w=s.tabSelectsValue,I=s.isLoading,b=s["aria-label"],k=s["aria-live"],S=v.useMemo(function(){return Ae(Ae({},SA),u||{})},[u]),E=v.useMemo(function(){var M,T="";if(t&&S.onChange){var H=t.option,V=t.options,z=t.removedValue,P=t.removedValues,B=t.value,F=z||H||(M=B,Array.isArray(M)?null:M),$=F?p(F):"",Z=V||P||void 0,_=Z?Z.map(p):[],R=Ae({isDisabled:F&&m(F,a),label:$,labels:_},t);T=S.onChange(R)}return T},[t,S,m,a,p]),O=v.useMemo(function(){var M="",T=n||o,H=!!(n&&a&&a.includes(n));if(T&&S.onFocus){var V={focused:T,label:p(T),isDisabled:m(T,a),isSelected:H,options:r,context:T===n?"menu":"value",selectValue:a,isAppleDevice:l};M=S.onFocus(V)}return M},[n,o,p,m,S,r,a,l]),A=v.useMemo(function(){var M="";if(y&&x.length&&!I&&S.onFilter){var T=C({count:r.length});M=S.onFilter({inputValue:f,resultsMessage:T})}return M},[r,f,y,S,x,C,I]),N=(t==null?void 0:t.action)==="initial-input-focus",j=v.useMemo(function(){var M="";if(S.guidance){var T=o?"value":y?"menu":"input";M=S.guidance({"aria-label":b,context:T,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:N})}return M},[b,n,o,h,m,g,y,S,a,w,N]),G=Ie(v.Fragment,null,Ie("span",{id:"aria-selection"},E),Ie("span",{id:"aria-focused"},O),Ie("span",{id:"aria-results"},A),Ie("span",{id:"aria-guidance"},j));return Ie(v.Fragment,null,Ie(s0,{id:c},N&&G),Ie(s0,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&G))},zu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],EA=new RegExp("["+zu.map(function(e){return e.letters}).join("")+"]","g"),Iw={},$u=0;$u<zu.length;$u++)for(var Zu=zu[$u],Xu=0;Xu<Zu.letters.length;Xu++)Iw[Zu.letters[Xu]]=Zu.base;var kw=function(e){return e.replace(EA,function(t){return Iw[t]})},jA=function(e,t){t===void 0&&(t=IA);var n=null;function o(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return o.clear=function(){n=null},o}(kw),c0=function(e){return e.replace(/^\s+|\s+$/g,"")},NA=function(e){return"".concat(e.label," ").concat(e.value)},PA=["innerRef"];function OA(e){var t=e.innerRef,n=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s=Object.entries(o).filter(function(c){var l=Fo(c,1)[0];return!i.includes(l)});return s.reduce(function(c,l){var u=Fo(l,2),p=u[0],f=u[1];return c[p]=f,c},{})}(Wo(e,PA),"onExited","in","enter","exit","appear");return Ie("input",je({ref:t},n,{css:lh({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var l0=["boxSizing","height","overflow","paddingRight","position"],u0={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function d0(e){e.cancelable&&e.preventDefault()}function p0(e){e.stopPropagation()}function f0(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function h0(){return"ontouchstart"in window||navigator.maxTouchPoints}var m0=!(typeof window>"u"||!window.document||!window.document.createElement),xa=0,Ci={capture:!1,passive:!1},TA=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},RA=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function LA(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(a){var s=a.isEnabled,c=a.onBottomArrive,l=a.onBottomLeave,u=a.onTopArrive,p=a.onTopLeave,f=v.useRef(!1),h=v.useRef(!1),m=v.useRef(0),g=v.useRef(null),y=v.useCallback(function(k,S){if(g.current!==null){var E=g.current,O=E.scrollTop,A=E.scrollHeight,N=E.clientHeight,j=g.current,G=S>0,M=A-N-O,T=!1;M>S&&f.current&&(l&&l(k),f.current=!1),G&&h.current&&(p&&p(k),h.current=!1),G&&S>M?(c&&!f.current&&c(k),j.scrollTop=A,T=!0,f.current=!0):!G&&-S>O&&(u&&!h.current&&u(k),j.scrollTop=0,T=!0,h.current=!0),T&&function(H){H.cancelable&&H.preventDefault(),H.stopPropagation()}(k)}},[c,l,u,p]),x=v.useCallback(function(k){y(k,k.deltaY)},[y]),C=v.useCallback(function(k){m.current=k.changedTouches[0].clientY},[]),w=v.useCallback(function(k){var S=m.current-k.changedTouches[0].clientY;y(k,S)},[y]),I=v.useCallback(function(k){if(k){var S=!!KS&&{passive:!1};k.addEventListener("wheel",x,S),k.addEventListener("touchstart",C,S),k.addEventListener("touchmove",w,S)}},[w,C,x]),b=v.useCallback(function(k){k&&(k.removeEventListener("wheel",x,!1),k.removeEventListener("touchstart",C,!1),k.removeEventListener("touchmove",w,!1))},[w,C,x]);return v.useEffect(function(){if(s){var k=g.current;return I(k),function(){b(k)}}},[s,I,b]),function(k){g.current=k}}({isEnabled:o===void 0||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(a){var s=a.isEnabled,c=a.accountForScrollbars,l=c===void 0||c,u=v.useRef({}),p=v.useRef(null),f=v.useCallback(function(m){if(m0){var g=document.body,y=g&&g.style;if(l&&l0.forEach(function(I){var b=y&&y[I];u.current[I]=b}),l&&xa<1){var x=parseInt(u.current.paddingRight,10)||0,C=document.body?document.body.clientWidth:0,w=window.innerWidth-C+x||0;Object.keys(u0).forEach(function(I){var b=u0[I];y&&(y[I]=b)}),y&&(y.paddingRight="".concat(w,"px"))}g&&h0()&&(g.addEventListener("touchmove",d0,Ci),m&&(m.addEventListener("touchstart",f0,Ci),m.addEventListener("touchmove",p0,Ci))),xa+=1}},[l]),h=v.useCallback(function(m){if(m0){var g=document.body,y=g&&g.style;xa=Math.max(xa-1,0),l&&xa<1&&l0.forEach(function(x){var C=u.current[x];y&&(y[x]=C)}),g&&h0()&&(g.removeEventListener("touchmove",d0,Ci),m&&(m.removeEventListener("touchstart",f0,Ci),m.removeEventListener("touchmove",p0,Ci)))}},[l]);return v.useEffect(function(){if(s){var m=p.current;return f(m),function(){h(m)}}},[s,f,h]),function(m){p.current=m}}({isEnabled:n});return Ie(v.Fragment,null,n&&Ie("div",{onClick:TA,css:RA}),t(function(a){r(a),i(a)}))}var _A=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},MA=function(e){var t=e.name,n=e.onFocus;return Ie("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:_A,value:"",onChange:function(){}})};function Np(e){var t;return typeof window<"u"&&window.navigator!=null&&e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform)}function Sw(){return Np(/^Mac/i)}function DA(){return Np(/^iPhone/i)||Np(/^iPad/i)||Sw()&&navigator.maxTouchPoints>1}var BA={clearIndicator:uA,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return Ae({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:lA,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return Ae({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Ae({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return Ae(Ae({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},gA),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return Ae({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:iA,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return Ae((Ma(n={label:"menu"},function(c){return c?{bottom:"top",top:"bottom"}[c]:"bottom"}(o),"100%"),Ma(n,"position","absolute"),Ma(n,"width","100%"),Ma(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return Ae({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return Ae({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return Ae({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return Ae({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:rA,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return Ae({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return Ae({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return Ae({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Ae({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Uu={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},HA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:n0(),captureMenuScroll:!n0(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var o=Ae({ignoreCase:!0,ignoreAccents:!0,stringify:NA,trim:!0,matchFrom:"any"},e),r=o.ignoreCase,i=o.ignoreAccents,a=o.stringify,s=o.trim,c=o.matchFrom,l=s?c0(n):n,u=s?c0(a(t)):a(t);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),i&&(l=jA(l),u=kw(u)),c==="start"?u.substr(0,l.length)===l:u.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function g0(e,t,n,o){return{type:"option",data:t,isDisabled:Ew(e,t,n),isSelected:jw(e,t,n),label:Aw(e,t),value:dl(e,t),index:o}}function ac(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(a,s){return g0(e,a,t,s)}).filter(function(a){return b0(e,a)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=g0(e,n,t,o);return b0(e,i)?i:void 0}).filter(qS)}function v0(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ih(n.options.map(function(o){return o.data}))):t.push(n.data),t},[])}function y0(e,t){return e.reduce(function(n,o){return o.type==="group"?n.push.apply(n,ih(o.options.map(function(r){return{data:r.data,id:"".concat(t,"-").concat(o.index,"-").concat(r.index)}}))):n.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),n},[])}function b0(e,t){var n=e.inputValue,o=n===void 0?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!Pw(e)||!i)&&Nw(e,{label:a,value:s,data:r},o)}var Ju=function(e,t){var n;return((n=e.find(function(o){return o.data===t}))===null||n===void 0?void 0:n.id)||null},Aw=function(e,t){return e.getOptionLabel(t)},dl=function(e,t){return e.getOptionValue(t)};function Ew(e,t,n){return typeof e.isOptionDisabled=="function"&&e.isOptionDisabled(t,n)}function jw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var o=dl(e,t);return n.some(function(r){return dl(e,r)===o})}function Nw(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Pw=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},GA=1,Ow=function(){(function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&al(n,o)})(t,v.Component);var e=function(n){var o=tw();return function(){var r,i=sl(n);if(o){var a=sl(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return wS(this,r)}}(t);function t(n){var o;if(function(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}(this,t),(o=e.call(this,n)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(s){o.controlRef=s},o.focusedOptionRef=null,o.getFocusedOptionRef=function(s){o.focusedOptionRef=s},o.menuListRef=null,o.getMenuListRef=function(s){o.menuListRef=s},o.inputRef=null,o.getInputRef=function(s){o.inputRef=s},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(s,c){var l=o.props,u=l.onChange,p=l.name;c.name=p,o.ariaOnChange(s,c),u(s,c)},o.setValue=function(s,c,l){var u=o.props,p=u.closeMenuOnSelect,f=u.isMulti,h=u.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:h}),p&&(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(s,{action:c,option:l})},o.selectOption=function(s){var c=o.props,l=c.blurInputOnSelect,u=c.isMulti,p=c.name,f=o.state.selectValue,h=u&&o.isOptionSelected(s,f),m=o.isOptionDisabled(s,f);if(h){var g=o.getOptionValue(s);o.setValue(f.filter(function(y){return o.getOptionValue(y)!==g}),"deselect-option",s)}else{if(m)return void o.ariaOnChange(s,{action:"select-option",option:s,name:p});u?o.setValue([].concat(ih(f),[s]),"select-option",s):o.setValue(s,"select-option")}l&&o.blurInput()},o.removeValue=function(s){var c=o.props.isMulti,l=o.state.selectValue,u=o.getOptionValue(s),p=l.filter(function(h){return o.getOptionValue(h)!==u}),f=ic(c,p,p[0]||null);o.onChange(f,{action:"remove-value",removedValue:s}),o.focusInput()},o.clearValue=function(){var s=o.state.selectValue;o.onChange(ic(o.props.isMulti,[],null),{action:"clear",removedValues:s})},o.popValue=function(){var s=o.props.isMulti,c=o.state.selectValue,l=c[c.length-1],u=c.slice(0,c.length-1),p=ic(s,u,u[0]||null);l&&o.onChange(p,{action:"pop-value",removedValue:l})},o.getFocusedOptionId=function(s){return Ju(o.state.focusableOptionsWithIds,s)},o.getFocusableOptionsWithIds=function(){return y0(ac(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return JS.apply(void 0,[o.props.classNamePrefix].concat(c))},o.getOptionLabel=function(s){return Aw(o.props,s)},o.getOptionValue=function(s){return dl(o.props,s)},o.getStyles=function(s,c){var l=o.props.unstyled,u=BA[s](c,l);u.boxSizing="border-box";var p=o.props.styles[s];return p?p(u,c):u},o.getClassNames=function(s,c){var l,u;return(l=(u=o.props.classNames)[s])===null||l===void 0?void 0:l.call(u,c)},o.getElementId=function(s){return"".concat(o.state.instancePrefix,"-").concat(s)},o.getComponents=function(){return s=o.props,Ae(Ae({},uh),s.components);var s},o.buildCategorizedOptions=function(){return ac(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return v0(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(s,c){o.setState({ariaSelection:Ae({value:s},c)})},o.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(s){o.blockOptionHover=!1},o.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&o.onMenuClose():c&&o.openMenu("first"):(c&&(o.openAfterFocus=!0),o.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},o.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0||o.props.isDisabled)){var c=o.props,l=c.isMulti,u=c.menuIsOpen;o.focusInput(),u?(o.setState({inputIsHiddenAfterUpdate:!l}),o.onMenuClose()):o.openMenu("first"),s.preventDefault()}},o.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(o.clearValue(),s.preventDefault(),o.openAfterFocus=!1,s.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(s){typeof o.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&ou(s.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(s)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(s){var c=s.touches,l=c&&c.item(0);l&&(o.initialTouchX=l.clientX,o.initialTouchY=l.clientY,o.userIsDragging=!1)},o.onTouchMove=function(s){var c=s.touches,l=c&&c.item(0);if(l){var u=Math.abs(l.clientX-o.initialTouchX),p=Math.abs(l.clientY-o.initialTouchY);o.userIsDragging=u>5||p>5}},o.onTouchEnd=function(s){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(s.target)&&o.menuListRef&&!o.menuListRef.contains(s.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(s){o.userIsDragging||o.onControlMouseDown(s)},o.onClearIndicatorTouchEnd=function(s){o.userIsDragging||o.onClearIndicatorMouseDown(s)},o.onDropdownIndicatorTouchEnd=function(s){o.userIsDragging||o.onDropdownIndicatorMouseDown(s)},o.handleInputChange=function(s){var c=o.props.inputValue,l=s.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(l,{action:"input-change",prevInputValue:c}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(s){o.props.onFocus&&o.props.onFocus(s),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(s){var c=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(s),o.onInputChange("",{action:"input-blur",prevInputValue:c}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(s){if(!o.blockOptionHover&&o.state.focusedOption!==s){var c=o.getFocusableOptions().indexOf(s);o.setState({focusedOption:s,focusedOptionId:c>-1?o.getFocusedOptionId(s):null})}},o.shouldHideSelectedOptions=function(){return Pw(o.props)},o.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),o.focus()},o.onKeyDown=function(s){var c=o.props,l=c.isMulti,u=c.backspaceRemovesValue,p=c.escapeClearsValue,f=c.inputValue,h=c.isClearable,m=c.isDisabled,g=c.menuIsOpen,y=c.onKeyDown,x=c.tabSelectsValue,C=c.openMenuOnFocus,w=o.state,I=w.focusedOption,b=w.focusedValue,k=w.selectValue;if(!(m||typeof y=="function"&&(y(s),s.defaultPrevented))){switch(o.blockOptionHover=!0,s.key){case"ArrowLeft":if(!l||f)return;o.focusValue("previous");break;case"ArrowRight":if(!l||f)return;o.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(b)o.removeValue(b);else{if(!u)return;l?o.popValue():h&&o.clearValue()}break;case"Tab":if(o.isComposing||s.shiftKey||!g||!x||!I||C&&o.isOptionSelected(I,k))return;o.selectOption(I);break;case"Enter":if(s.keyCode===229)break;if(g){if(!I||o.isComposing)return;o.selectOption(I);break}return;case"Escape":g?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:f}),o.onMenuClose()):h&&p&&o.clearValue();break;case" ":if(f)return;if(!g){o.openMenu("first");break}if(!I)return;o.selectOption(I);break;case"ArrowUp":g?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":g?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!g)return;o.focusOption("pageup");break;case"PageDown":if(!g)return;o.focusOption("pagedown");break;case"Home":if(!g)return;o.focusOption("first");break;case"End":if(!g)return;o.focusOption("last");break;default:return}s.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++GA),o.state.selectValue=e0(n.value),n.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),a=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[a],o.state.focusedOptionId=Ju(r,i[a])}return o}return function(n,o,r){o&&_g(n.prototype,o),r&&_g(n,r),Object.defineProperty(n,"prototype",{writable:!1})}(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&t0(this.menuListRef,this.focusedOptionRef),(Sw()||DA())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(n){var o=this.props,r=o.isDisabled,i=o.menuIsOpen,a=this.state.isFocused;(a&&!r&&n.isDisabled||a&&i&&!n.menuIsOpen)&&this.focusInput(),a&&r&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):a||r||!n.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t0(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(n,o){this.props.onInputChange(n,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var o=this,r=this.state,i=r.selectValue,a=r.isFocused,s=this.buildFocusableOptions(),c=n==="first"?0:s.length-1;if(!this.props.isMulti){var l=s.indexOf(i[0]);l>-1&&(c=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:s[c],focusedOptionId:this.getFocusedOptionId(s[c])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(n){var o=this.state,r=o.selectValue,i=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=r.indexOf(i);i||(a=-1);var s=r.length-1,c=-1;if(r.length){switch(n){case"previous":c=a===0?0:a===-1?s:a-1;break;case"next":a>-1&&a<s&&(c=a+1)}this.setState({inputIsHidden:c!==-1,focusedValue:r[c]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,r=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var a=0,s=i.indexOf(r);r||(s=-1),n==="up"?a=s>0?s-1:i.length-1:n==="down"?a=(s+1)%i.length:n==="pageup"?(a=s-o)<0&&(a=0):n==="pagedown"?(a=s+o)>i.length-1&&(a=i.length-1):n==="last"&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[a])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Uu):Ae(Ae({},Uu),this.props.theme):Uu}},{key:"getCommonProps",value:function(){var n=this.clearValue,o=this.cx,r=this.getStyles,i=this.getClassNames,a=this.getValue,s=this.selectOption,c=this.setValue,l=this.props,u=l.isMulti,p=l.isRtl,f=l.options;return{clearValue:n,cx:o,getStyles:r,getClassNames:i,getValue:a,hasValue:this.hasValue(),isMulti:u,isRtl:p,options:f,selectOption:s,selectProps:l,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,o=n.isClearable,r=n.isMulti;return o===void 0?r:o}},{key:"isOptionDisabled",value:function(n,o){return Ew(this.props,n,o)}},{key:"isOptionSelected",value:function(n,o){return jw(this.props,n,o)}},{key:"filterOption",value:function(n,o){return Nw(this.props,n,o)}},{key:"formatOptionLabel",value:function(n,o){if(typeof this.props.formatOptionLabel=="function"){var r=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(n,{context:o,inputValue:r,selectValue:i})}return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var n=this.props,o=n.isDisabled,r=n.isSearchable,i=n.inputId,a=n.inputValue,s=n.tabIndex,c=n.form,l=n.menuIsOpen,u=n.required,p=this.getComponents().Input,f=this.state,h=f.inputIsHidden,m=f.ariaSelection,g=this.commonProps,y=i||this.getElementId("input"),x=Ae(Ae(Ae({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?W.createElement(p,je({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:c,type:"text",value:a},x)):W.createElement(OA,je({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ll,onFocus:this.onInputFocus,disabled:o,tabIndex:s,inputMode:"none",form:c,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,o=this.getComponents(),r=o.MultiValue,i=o.MultiValueContainer,a=o.MultiValueLabel,s=o.MultiValueRemove,c=o.SingleValue,l=o.Placeholder,u=this.commonProps,p=this.props,f=p.controlShouldRenderValue,h=p.isDisabled,m=p.isMulti,g=p.inputValue,y=p.placeholder,x=this.state,C=x.selectValue,w=x.focusedValue,I=x.isFocused;if(!this.hasValue()||!f)return g?null:W.createElement(l,je({},u,{key:"placeholder",isDisabled:h,isFocused:I,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return C.map(function(k,S){var E=k===w,O="".concat(n.getOptionLabel(k),"-").concat(n.getOptionValue(k));return W.createElement(r,je({},u,{components:{Container:i,Label:a,Remove:s},isFocused:E,isDisabled:h,key:O,index:S,removeProps:{onClick:function(){return n.removeValue(k)},onTouchEnd:function(){return n.removeValue(k)},onMouseDown:function(A){A.preventDefault()}},data:k}),n.formatOptionLabel(k,"value"))});if(g)return null;var b=C[0];return W.createElement(c,je({},u,{data:b,isDisabled:h}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents().ClearIndicator,o=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,s=this.state.isFocused;if(!this.isClearable()||!n||i||!this.hasValue()||a)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(n,je({},o,{innerProps:c,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents().LoadingIndicator,o=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,s=this.state.isFocused;return!n||!a?null:W.createElement(n,je({},o,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:s}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),o=n.DropdownIndicator,r=n.IndicatorSeparator;if(!o||!r)return null;var i=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused;return W.createElement(r,je({},i,{isDisabled:a,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents().DropdownIndicator;if(!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(n,je({},o,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderMenu",value:function(){var n=this,o=this.getComponents(),r=o.Group,i=o.GroupHeading,a=o.Menu,s=o.MenuList,c=o.MenuPortal,l=o.LoadingMessage,u=o.NoOptionsMessage,p=o.Option,f=this.commonProps,h=this.state.focusedOption,m=this.props,g=m.captureMenuScroll,y=m.inputValue,x=m.isLoading,C=m.loadingMessage,w=m.minMenuHeight,I=m.maxMenuHeight,b=m.menuIsOpen,k=m.menuPlacement,S=m.menuPosition,E=m.menuPortalTarget,O=m.menuShouldBlockScroll,A=m.menuShouldScrollIntoView,N=m.noOptionsMessage,j=m.onMenuScrollToTop,G=m.onMenuScrollToBottom;if(!b)return null;var M,T=function(B,F){var $=B.type,Z=B.data,_=B.isDisabled,R=B.isSelected,L=B.label,D=B.value,K=h===Z,J=_?void 0:function(){return n.onOptionHover(Z)},Y=_?void 0:function(){return n.selectOption(Z)},ee="".concat(n.getElementId("option"),"-").concat(F),X={id:ee,onClick:Y,onMouseMove:J,onMouseOver:J,tabIndex:-1,role:"option","aria-selected":n.state.isAppleDevice?void 0:R};return W.createElement(p,je({},f,{innerProps:X,data:Z,isDisabled:_,isSelected:R,key:ee,label:L,type:$,value:D,isFocused:K,innerRef:K?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(B.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var F=B.data,$=B.options,Z=B.index,_="".concat(n.getElementId("group"),"-").concat(Z),R="".concat(_,"-heading");return W.createElement(r,je({},f,{key:_,data:F,options:$,Heading:i,headingProps:{id:R,data:B.data},label:n.formatGroupLabel(B.data)}),B.options.map(function(L){return T(L,"".concat(Z,"-").concat(L.index))}))}if(B.type==="option")return T(B,"".concat(B.index))});else if(x){var H=C({inputValue:y});if(H===null)return null;M=W.createElement(l,f,H)}else{var V=N({inputValue:y});if(V===null)return null;M=W.createElement(u,f,V)}var z={minMenuHeight:w,maxMenuHeight:I,menuPlacement:k,menuPosition:S,menuShouldScrollIntoView:A},P=W.createElement(nA,je({},f,z),function(B){var F=B.ref,$=B.placerProps,Z=$.placement,_=$.maxHeight;return W.createElement(a,je({},f,z,{innerRef:F,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:x,placement:Z}),W.createElement(LA,{captureEnabled:g,onTopArrive:j,onBottomArrive:G,lockEnabled:O},function(R){return W.createElement(s,je({},f,{innerRef:function(L){n.getMenuListRef(L),R(L)},innerProps:{role:"listbox","aria-multiselectable":f.isMulti,id:n.getElementId("listbox")},isLoading:x,maxHeight:_,focusedOption:h}),M)}))});return E||S==="fixed"?W.createElement(c,je({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:k,menuPosition:S}),P):P}},{key:"renderFormField",value:function(){var n=this,o=this.props,r=o.delimiter,i=o.isDisabled,a=o.isMulti,s=o.name,c=o.required,l=this.state.selectValue;if(c&&!this.hasValue()&&!i)return W.createElement(MA,{name:s,onFocus:this.onValueInputFocus});if(s&&!i){if(a){if(r){var u=l.map(function(h){return n.getOptionValue(h)}).join(r);return W.createElement("input",{name:s,type:"hidden",value:u})}var p=l.length>0?l.map(function(h,m){return W.createElement("input",{key:"i-".concat(m),name:s,type:"hidden",value:n.getOptionValue(h)})}):W.createElement("input",{name:s,type:"hidden",value:""});return W.createElement("div",null,p)}var f=l[0]?this.getOptionValue(l[0]):"";return W.createElement("input",{name:s,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,o=this.state,r=o.ariaSelection,i=o.focusedOption,a=o.focusedValue,s=o.isFocused,c=o.selectValue,l=this.getFocusableOptions();return W.createElement(AA,je({},n,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:i,focusedValue:a,isFocused:s,selectValue:c,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),o=n.Control,r=n.IndicatorsContainer,i=n.SelectContainer,a=n.ValueContainer,s=this.props,c=s.className,l=s.id,u=s.isDisabled,p=s.menuIsOpen,f=this.state.isFocused,h=this.commonProps=this.getCommonProps();return W.createElement(i,je({},h,{className:c,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:f}),this.renderLiveRegion(),W.createElement(o,je({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:f,menuIsOpen:p}),W.createElement(a,je({},h,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),W.createElement(r,je({},h,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,o){var r=o.prevProps,i=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,s=o.ariaSelection,c=o.isFocused,l=o.prevWasFocused,u=o.instancePrefix,p=n.options,f=n.value,h=n.menuIsOpen,m=n.inputValue,g=n.isMulti,y=e0(f),x={};if(r&&(f!==r.value||p!==r.options||h!==r.menuIsOpen||m!==r.inputValue)){var C=h?function(O,A){return v0(ac(O,A))}(n,y):[],w=h?y0(ac(n,y),"".concat(u,"-option")):[],I=i?function(O,A){var N=O.focusedValue,j=O.selectValue.indexOf(N);if(j>-1){if(A.indexOf(N)>-1)return N;if(j<A.length)return A[j]}return null}(o,y):null,b=function(O,A){var N=O.focusedOption;return N&&A.indexOf(N)>-1?N:A[0]}(o,C);x={selectValue:y,focusedOption:b,focusedOptionId:Ju(w,b),focusableOptionsWithIds:w,focusedValue:I,clearFocusValueOnUpdate:!1}}var k=a!=null&&n!==r?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},S=s,E=c&&l;return c&&!E&&(S={value:ic(g,y,y[0]||null),options:y,action:"initial-input-focus"},E=!l),(s==null?void 0:s.action)==="initial-input-focus"&&(S=null),Ae(Ae(Ae({},x),k),{},{prevProps:n,ariaSelection:S,prevWasFocused:E})}}]),t}();Ow.defaultProps=HA;var WA=v.forwardRef(function(e,t){var n=function(o){var r=o.defaultInputValue,i=r===void 0?"":r,a=o.defaultMenuIsOpen,s=a!==void 0&&a,c=o.defaultValue,l=c===void 0?null:c,u=o.inputValue,p=o.menuIsOpen,f=o.onChange,h=o.onInputChange,m=o.onMenuClose,g=o.onMenuOpen,y=o.value,x=Wo(o,bS),C=Fo(v.useState(u!==void 0?u:i),2),w=C[0],I=C[1],b=Fo(v.useState(p!==void 0?p:s),2),k=b[0],S=b[1],E=Fo(v.useState(y!==void 0?y:l),2),O=E[0],A=E[1],N=v.useCallback(function(z,P){typeof f=="function"&&f(z,P),A(z)},[f]),j=v.useCallback(function(z,P){var B;typeof h=="function"&&(B=h(z,P)),I(B!==void 0?B:z)},[h]),G=v.useCallback(function(){typeof g=="function"&&g(),S(!0)},[g]),M=v.useCallback(function(){typeof m=="function"&&m(),S(!1)},[m]),T=u!==void 0?u:w,H=p!==void 0?p:k,V=y!==void 0?y:O;return Ae(Ae({},x),{},{inputValue:T,menuIsOpen:H,onChange:N,onInputChange:j,onMenuClose:M,onMenuOpen:G,value:V})}(e);return W.createElement(Ow,je({ref:t},n))}),VA=WA;const dh=v.forwardRef(({id:e,className:t,name:n="select",align:o="up",label:r,options:i=[],value:a,placeholder:s="Select...",isMulti:c=!1,isSearchable:l,isClearable:u,backspaceRemovesValue:p,disabled:f,onChange:h,onInputChange:m,menuIsOpen:g,closeMenuOnSelect:y,isLoading:x,components:C,errorMessage:w,errorDataTestId:I},b)=>{const k=ua(),S=e||`select-${k}`,E=te("io-control-select",f&&"io-control-disabled",w&&"io-control-error",o&&[`direction-${o}`],t),O=w?{"aria-invalid":!0,"aria-errormessage":`${S}-error`}:{};return d.jsxs("div",{className:E,children:[r&&d.jsx(As,{htmlFor:S,text:r}),d.jsx(VA,{ref:b,className:"io-select",classNamePrefix:"io-select",instanceId:S,isMulti:c,inputId:S,name:n,options:i,value:a,onChange:A=>c?h==null?void 0:h([...A??[]]):h==null?void 0:h(A),onInputChange:m,menuIsOpen:g,isLoading:x,components:C,placeholder:s,isDisabled:f,isSearchable:l,isClearable:u??c,backspaceRemovesValue:p,closeMenuOnSelect:y,"aria-label":r,...O}),w&&d.jsxs("div",{"data-testid":I,id:`${S}-error`,className:"io-input-error",children:[d.jsx(wt,{variant:"close"}),w]})]})});dh.displayName="Select";const Ns=v.forwardRef(({id:e,className:t,name:n="textarea",align:o="up",label:r,rows:i=4,placeholder:a="Enter text here...",disabled:s,readOnly:c,...l},u)=>{const p=ua(),f=e||`textarea-${p}`,h=te("io-control-textarea",s&&"io-control-disabled",c&&"io-control-readonly",o&&[`direction-${o}`],t);return d.jsxs("div",{className:h,children:[r&&d.jsx(As,{htmlFor:f,text:r}),d.jsx("textarea",{id:f,className:"io-textarea",ref:u,name:n,tabIndex:0,placeholder:a,"aria-label":r,disabled:s,readOnly:c,rows:i,...l})]})});Ns.displayName="Textarea";const FA=()=>{const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(null),o=v.useCallback(r=>{var i;return(i=e==null?void 0:e.themes)==null?void 0:i.select(r)},[e]);return v.useEffect(()=>{var a,s;if(!e)return;let r=!1;const i=c=>{r||n(c)};return(a=e.themes)==null||a.onChanged(i),(s=e.themes)==null||s.getCurrent().then(i).catch(console.warn),()=>{r=!0}},[e]),{currentTheme:t,selectTheme:o}};function ru(e,t=500){const[n,o]=v.useState(e);return v.useEffect(()=>{const r=setTimeout(()=>{o(e)},t);return()=>clearTimeout(r)},[e,t]),n}function qe(){return v.useMemo(()=>typeof window=="object"&&Zo(),[])}function zA(e,t){v.useEffect(()=>{const n=o=>{o.code===e&&t()};return document.addEventListener("keyup",n),()=>document.removeEventListener("keyup",n)},[e,t])}const $A=()=>{const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState([]);return v.useEffect(()=>{var o;e&&((o=e.themes)==null||o.list().then(n).catch(console.warn))},[e]),t},Pt=v.forwardRef(({id:e,className:t,name:n="toggle",align:o="left",label:r,checked:i,disabled:a,onKeyDown:s,"data-testid":c="toggle",...l},u)=>{const p=ua(),f=e||`toggle-${p}`,h=te("io-control-toggle",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsx("div",{className:h,children:d.jsxs("label",{className:"io-toggle",htmlFor:f,tabIndex:a?-1:0,onKeyDown:s,"data-testid":`${c}-label`,children:[d.jsx("input",{type:"checkbox",id:f,className:"io-checkbox",ref:u,name:n,checked:i,disabled:a,"aria-checked":i,tabIndex:-1,"data-testid":c,...l}),d.jsx("span",{className:"slider","data-testid":`${c}-slider`}),r]})})});function _c(e){return{name:e.name,title:e.title,hidden:e.isHidden,userProperties:e.customProperties}}function Mc(e){return{name:e.name,title:e.title,hidden:e.hidden,userProperties:e.userProperties}}Pt.displayName="Toggle";class ph extends Error{constructor(t){super(t),this.name="IoAppsSubApiMissingError"}}function Jr(e){if(!e.registry)throw new ph("io.apps is available but io.apps.registry is missing")}function w0(e){if(!e.instances)throw new ph("io.apps is available but io.apps.instances is missing")}async function x0(e,t){var o;if(!e||!t)return;const n=e.apps;n&&Jr(n);try{if(n){const i=await n.registry.get({name:t});return i?_c(i):void 0}const r=(o=e.appManager)==null?void 0:o.application(t);return r?Mc(r):void 0}catch(r){return void console.error(`Failed to get application "${t}"`,r)}}const wr={getMyApplication:async function(e){var t,n,o;if(e)try{const r=e.apps?(t=e.apps.my)==null?void 0:t.appName:(o=(n=e.appManager)==null?void 0:n.myApplication)==null?void 0:o.name;return r?await x0(e,r):void 0}catch(r){if(r instanceof ph)throw r;return void console.error("Failed to get my application",r)}},getApplication:x0,getApplications:async function(e){var n;if(!e)return[];const t=e.apps;t&&Jr(t);try{return t?(await t.registry.getMany()??[]).map(i=>_c(i)):(((n=e.appManager)==null?void 0:n.applications())??[]).map(r=>Mc(r))}catch(o){console.error("Failed to get applications",o)}return[]},getApplicationConfiguration:async function(e,t){var o;if(!e||!t)return;const n=e.apps;n&&Jr(n);try{if(n){const i=await n.registry.get({name:t,includeDefinition:!0});return i==null?void 0:i.definition}const r=(o=e.appManager)==null?void 0:o.application(t);return r?await r.getConfiguration():void 0}catch(r){return void console.error(`Failed to get configuration for application "${t}"`,r)}},startApplication:async function(e,t,n){var r;if(!e)return;const o=e.apps;o&&(Jr(o),w0(o));try{if(o)return await o.registry.get({name:t})?void await o.instances.start({name:t,...n}):void console.error(`Application "${t}" not found in registry`);const i=(r=e.appManager)==null?void 0:r.application(t);if(!i)return void console.error(`Application "${t}" not found`);await i.start(n)}catch(i){return void console.error(`Failed to start application "${t}"`,i)}},stopApplication:async function(e,t,n){if(!e)return;const o=e.apps;o&&w0(o);try{if(o)return void await o.instances.stop({id:t.id,force:n==null?void 0:n.force,reason:n==null?void 0:n.reason,timeout:n==null?void 0:n.timeout});const r=e.appManager.instances().find(i=>i.id===t.id);if(!r)return void console.error(`Instance "${t.id}" not found`);await r.stop()}catch(r){return void console.error(`Failed to stop application instance "${t.id}"`,r)}},onAppAdded:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onAdded(({app:i})=>{const a=_c(i);t(a)}):(o=e.appManager)==null?void 0:o.onAppAdded(i=>{const a=Mc(i);t(a)})}catch(r){return void console.error("Failed to subscribe to app added events",r)}},onAppRemoved:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onRemoved(({appName:i})=>{t({name:i})}):(o=e.appManager)==null?void 0:o.onAppRemoved(i=>{t({name:i.name})})}catch(r){return void console.error("Failed to subscribe to app removed events",r)}},onAppChanged:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onUpdated(i=>{const a=_c(i.app);t(a)}):(o=e.appManager)==null?void 0:o.onAppChanged(i=>{const a=Mc(i);t(a)})}catch(r){return void console.error("Failed to subscribe to app changed events",r)}},shutdownPlatform:async function(e,t=!0){var o,r;if(!e)return;const n={autoSave:t,showDialog:!0};try{if((o=e.platform)!=null&&o.shutdown)return void await e.platform.shutdown(n);await((r=e.appManager)==null?void 0:r.exit(n))}catch(i){console.error("Failed to shutdown platform",i)}},restartPlatform:async function(e,t=!0){var o,r;if(!e)return;const n={autoSave:t,showDialog:!0};try{if((o=e.platform)!=null&&o.restart)return void await e.platform.restart(n);await((r=e.appManager)==null?void 0:r.restart(n))}catch(i){console.error("Failed to restart platform",i)}}},ZA={minimizeWindow:async function(e){var t;if(e)try{const n=(t=e.windows)==null?void 0:t.my();await(n==null?void 0:n.minimize())}catch(n){console.error("Failed to minimize window",n)}},closeWindow:async function(e,t){var n;if(e)try{const o=(n=e.windows)==null?void 0:n.my();await(o==null?void 0:o.close(t))}catch(o){console.error("Failed to close window",o)}},restartPlatform:wr.restartPlatform,shutdownPlatform:wr.shutdownPlatform};v.createContext({theme:"dark"});const Tw=v.createContext(void 0),Rw=()=>{const e=v.useContext(Tw);if(!e)throw new Error("usePanelManagerContext must be used within a PanelManagerContext.Provider");return e},Lw=e=>{const{General:t,Launchpad:n,Layouts:o,Downloads:r,System:i}=zo();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(n,{}),d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{})]})},_w=({title:e="General",...t})=>{const{Theme:n}=zo();return d.jsx(Je,{title:e,...t,children:d.jsx(n,{})})},iu=({className:e,title:t="Theme",...n})=>{const{currentTheme:o,selectTheme:r}=FA(),i=$A();return d.jsxs("div",{className:te("flex jc-between ai-center",e),"data-testid":"theme-container",...n,children:[d.jsx("label",{className:"io-text-clipper","data-testid":"theme-label",children:t}),d.jsxs(fe,{variant:"light","data-testid":"theme-dropdown",children:[d.jsx(fe.Button,{text:(o==null?void 0:o.displayName)??"Dark","data-testid":"theme-dropdown-button"}),d.jsx(fe.Content,{"data-testid":"theme-dropdown-content",children:d.jsx(fe.List,{children:i.map(({displayName:a,name:s})=>d.jsx(fe.Item,{onClick:()=>r(s),"data-testid":`theme-dropdown-item-${s}`,children:a},s))})})]})]})},on=({prefKey:e,...t})=>{const{isLoading:n,value:o=!1,update:r}=St({prefKey:e});return d.jsx(Pt,{checked:o,disabled:n,onChange:i=>r(i.target.checked),...t})},Mw=({align:e="right",label:t="Minimize to tray",...n})=>d.jsx(on,{align:e,label:t,prefKey:ab,...n}),XA=({prefKey:e,options:t,disabled:n,...o})=>{const{isLoading:r,value:i="Select option",update:a}=St({prefKey:e});return d.jsxs(fe,{variant:"light",disabled:r||n,...o,children:[d.jsx(fe.Button,{children:i}),d.jsx(fe.Content,{children:d.jsx(fe.List,{children:t.map(s=>d.jsx(fe.Item,{onClick:()=>(async c=>{if(c!==i)try{await a(c)}catch(l){console.error("Failed to update platform preference:",l)}})(s),children:s},s))})})]})},Dw=({className:e,label:t="Pinned position",...n})=>d.jsx(Je,{className:te("io-block-list-gap",e),...n,children:d.jsxs("div",{className:"flex jc-between ai-center",children:[d.jsx("label",{className:"io-text-clipper",children:t}),d.jsx(XA,{className:e,prefKey:cb,options:["Left","Right"],...n})]})}),Bw=({align:e="right",label:t='Hide "Favorites"',...n})=>d.jsx(on,{align:e,label:t,prefKey:jf,...n}),Hw=({align:e="right",label:t="Allow docking to top",...n})=>d.jsx(on,{align:e,label:t,prefKey:lb,...n}),Gw=({align:e="right",label:t="Always on top",...n})=>d.jsx(on,{align:e,label:t,prefKey:ub,...n}),Ww=({align:e="right",label:t="Claim occupied space",...n})=>d.jsx(on,{align:e,label:t,prefKey:db,...n}),Vw=({align:e="right",label:t="Show the extended Launchpad area",...n})=>d.jsx(on,{align:e,label:t,prefKey:bs,...n}),Fw=({align:e="right",label:t="Hide labels",...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:pb,disabled:!o,...n})},zw=({align:e="right",label:t='Show "Favorites"',...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:fb,disabled:!o,...n})},$w=({align:e="right",label:t='Show "Recent"',...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:hb,disabled:!o,...n})},Zw=({title:e="Layouts",...t})=>{const{LayoutsSaveCurrentOnExit:n,LayoutsShowDeletePrompt:o,LayoutsShowUnsavedChangesPrompt:r,LayoutsShowHidden:i}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(r,{}),d.jsx(o,{}),d.jsx(i,{})]})},Xw=({align:e="right",label:t="Save current on exit",...n})=>d.jsx(on,{align:e,label:t,prefKey:gb,...n}),au=({align:e="right",label:t="Show prompt for unsaved changes",...n})=>d.jsx(on,{align:e,label:t,prefKey:vb,"data-testid":"layouts-show-unsaved-changes-prompt-toggle-button",...n}),su=({align:e="right",label:t="Show prompt for deleting",...n})=>d.jsx(on,{align:e,label:t,prefKey:Nf,"data-testid":"layouts-show-delete-prompt-toggle",...n}),Uw=({title:e="Downloads",...t})=>{const{DownloadsLocation:n}=zo();return d.jsx(Je,{title:e,...t,children:d.jsx(n,{})})};function Jw({title:e="Downloads"}){const{ItemSearch:t,HeaderButtons:n}=Ps();return d.jsxs("div",{className:"io-dm-header",children:[d.jsxs(cn,{draggable:!0,children:[d.jsx(cn.Title,{tag:"h1",text:e,size:"large"}),d.jsx(n,{className:"non-draggable"})]}),d.jsx(t,{})]})}const bn=window.glue42gd,Yw=v.createContext({configuration:{},items:[],removeItem:()=>{},pauseResumeItem:()=>{},cancelItem:()=>{},clearItems:()=>{},showItemInFolder:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},searchQuery:"",setSearch:()=>{},itemsCount:0,setCount:()=>{},setDownloadLocation:()=>{},setDownloadLocationWithDialog:()=>{},sortItems:()=>[],downloadLocationList:[],isDownloadLocationDialogVisible:!1}),Jo=()=>v.useContext(Yw);function Kw({className:e,placeholder:t="Search",iconPrepend:n="search",iconAppend:o="close",...r}){const i=te("io-header-search",e),a=v.useRef(null),{searchQuery:s,setSearch:c,itemsCount:l}=Jo(),u=s.length>0,p=v.useCallback(()=>{c(""),a.current&&a.current.focus()},[c]);return d.jsxs("div",{className:i,children:[d.jsx(qn,{ref:a,value:s,iconPrepend:n,iconAppend:u?o:void 0,iconAppendOnClick:u?p:void 0,placeholder:t,onChange:f=>c(f.target.value),...r}),u&&d.jsx("p",{className:"io-header-search-count",children:`${l} results`})]})}function qw({className:e,...t}){const{MoreButton:n,CloseButton:o,ExternalButton:r}=Ps();return d.jsxs(We,{className:e,align:"right",...t,children:[d.jsx(n,{}),d.jsx(r,{}),d.jsx(o,{})]})}function Qw({icon:e="ellipsis-vertical",...t}){const{items:n,clearItems:o,showSettings:r}=Jo(),i=n.length===0;return d.jsxs(fe,{variant:"light",...t,children:[d.jsx(fe.ButtonIcon,{icon:e,variant:"circle",size:"32"}),d.jsx(fe.Content,{children:d.jsxs(fe.List,{children:[d.jsx(fe.Item,{onClick:a=>(s=>{i?s.stopPropagation():o()})(a),disabled:i,children:"Clear All"}),d.jsx(fe.Item,{onClick:r,children:"Settings"})]})})]})}function ex({className:e,icon:t="pop-out",...n}){const o=v.useContext(Se.IOConnectContext),r=v.useCallback(()=>{wr.startApplication(o,"io-connect-download-manager").catch(i=>{console.error("Failed to open Download Manager",i)})},[o]);return d.jsx(Ue,{className:te("io-dm-compact-mode-only",e),icon:t,variant:"circle",size:"32",onClick:r,...n})}function tx({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const i=v.useContext(Se.IOConnectContext);return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:a=>{o?o(a):ZA.closeWindow(i).catch(s=>{console.error("Failed to close window:",s)})},...r})}function Ii(e,t=!1,n=!1,o=!1){const r=e.getDate(),i=["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()],a=e.getFullYear(),s=e.getHours(),c=e.getMinutes();let l="";return l=c<10?`0${c}`:`${c}`,t?t==="Today"?n?"Today":`Today at ${s}:${l}`:t==="Yesterday"?n?"Yesterday":`Yesterday at ${s}:${l}`:`${s}:${l}`:o?n?`${i} ${r}`:`${i} ${r} at ${s}:${l}`:n?`${i} ${r}, ${a}`:`${i} ${r}, ${a} at ${s}:${l}`}function nx(e,t={showTime:!0}){const n=new Date(1e3*e),o=new Date,r=Math.round((o-n)/1e3),i=Math.round(r/60),a=o.toDateString()===n.toDateString(),s=new Date(o.setDate(o.getDate()-1)).toDateString()===n.toDateString(),c=o.getFullYear()===n.getFullYear();return t.showTime?r<5?"Just Now":r<60?`${r} seconds ago`:r<90?"about a minute ago":i<60?`${i} minutes ago`:a?Ii(n,"Today",!1,!0):s?Ii(n,"Yesterday",!1,!0):c?Ii(n,!1,!1,!0):Ii(n):a?"Today":s?"Yesterday":c?Ii(n,!1,!0,!0):Ii(n,!1,!0)}function ox({className:e,...t}){const n=te("io-dm-body","io-panel-body",e),{DownloadListEmpty:o,ItemGroup:r,Item:i}=Ps(),{items:a,searchQuery:s,setCount:c,sortItems:l}=Jo(),u=l(a),p=ru(s),f=v.useMemo(()=>u.filter(g=>g.displayInfo.filename.toLowerCase().includes(p.toLowerCase())||g.displayInfo.url.toLowerCase().includes(p.toLowerCase())),[u,p]),h=v.useMemo(()=>f.map(g=>({...g,displayInfo:{...g.displayInfo,startTime:nx(g.displayInfo.startTime,{showTime:!1})}})),[f]),m=v.useMemo(()=>Object.values(h.reduce((g={},y)=>{var x;return g[y.displayInfo.startTime]=((x=g[y.displayInfo.startTime])==null?void 0:x.concat([]))??[],g[y.displayInfo.startTime].push(y),g},{})),[h]);return v.useEffect(()=>{c(f.length)},[f,c]),d.jsx(Uo,{elementProps:{className:n,...t},children:m&&m.length!==0?m.map(g=>d.jsx(r,{title:String(g[0].displayInfo.startTime)??null,children:g.map(y=>d.jsx(i,{item:y},y.id))},g[0].id??"")):d.jsx(o,{})})}function rx({className:e,icon:t="download",text:n="No downloads to display.",...o}){const r=te("io-dm-no-items",e);return d.jsxs("div",{className:r,...o,children:[d.jsx(wt,{variant:t}),d.jsx("p",{children:n})]})}function ix({className:e,title:t,children:n,...o}){const r=te("io-dm-item-group",e);return d.jsxs("div",{className:r,...o,children:[t&&d.jsx("p",{className:"io-dm-items-group-title",children:t}),n]})}function ax({className:e,item:t,...n}){const{ItemHeader:o,ItemBody:r,ItemFooter:i}=Ps(),{state:a,url:s,filename:c,receivedBytes:l,totalBytes:u,speed:p,timeRemaining:f}=t.displayInfo;if(!t)return d.jsx(d.Fragment,{});const h=te("io-dm-item",t.displayInfo.state&&[a],e);return d.jsxs("div",{className:h,...n,children:[d.jsx(o,{itemID:t.id,filename:c,state:a}),d.jsx(r,{state:a,url:s,bytesReceived:l,bytesTotal:u,speed:p,timeRemaining:f}),d.jsx(i,{itemID:t.id,state:a})]})}function fh({bytesReceived:e=0,bytesTotal:t=0,...n}){const o=v.useCallback(()=>e&&t?Math.round(e/t*100):0,[e,t]);return d.jsx(_5,{value:o(),...n})}function sx({className:e,itemID:t,filename:n,state:o,pauseResume:r,showInFolder:i,cancel:a,remove:s,...c}){const l=te("io-dm-item-header",e),{pauseResumeItem:u,showItemInFolder:p,cancelItem:f,removeItem:h}=Jo(),m=o==="progressing"||o==="paused",g=o==="interrupted"||o==="cancelled",y=m?"Cancel Download":"Remove Download",x=a??f,C=s??h,w=function(b,k,S,E){return b==="paused"||b==="progressing"?{statusIcon:b==="paused"?"play":"pause",onStatusActionClick:()=>S(k)}:b==="completed"?{statusIcon:"folder",onStatusActionClick:()=>E(k)}:null}(o,t,r??u,i??p),I=v.useCallback(()=>{m?x(t):C(t)},[m,x,t,C]);return d.jsxs("div",{className:l,...c,children:[d.jsx(bo,{text:n,style:{textDecoration:g?"line-through":"none"}}),d.jsxs(We,{children:[w&&d.jsx(Ue,{icon:w.statusIcon,iconSize:"12",onClick:w.onStatusActionClick,className:"io-dm-compact-mode-only"}),d.jsx(Ue,{icon:"close",iconSize:"12",title:y,onClick:I})]})]})}function cx({className:e,state:t,url:n,bytesReceived:o=0,bytesTotal:r=0,speed:i=0,timeRemaining:a=0,...s}){const c=te("io-dm-item-body",e),l=f=>{const h=["Bytes","KB","MB","GB","TB"];if(f===0)return"0";const m=Math.floor(Math.log(f)/Math.log(1024));return m===0?`${f}${h[m]}`:`${(f/1024**m).toFixed(1)}${h[m]}`};return d.jsxs("div",{className:c,...s,children:[d.jsx("p",{className:"io-text-small",children:n}),(p=t,p==="cancelled"||p==="interrupted"||p==="completed"?null:d.jsx(fh,{variant:p==="paused"?"paused":"active",bytesReceived:o,bytesTotal:r})),d.jsx("p",{className:"io-text-default-lh16",children:t==="completed"?`${l(o??0)} - Done`:t==="cancelled"||t==="interrupted"?`${l(o??0)}/${l(r??0)} - Failed`:`${l(o??0)}/${l(r??0)} (${u=i,(u?`${(u/1e6/8).toFixed(2)}MB/s`:0)??0}) - ${(f=>{const h=Math.floor(f/3600),m=Math.floor(f%3600/60);let g="";return h>0&&(g+=`${h} hour${h>1?"s":""}, `),m>0&&(g+=`${m} min${m>1?"s":""}, `),((f=Math.floor(f%60))>0||g==="")&&(g+=`${f} sec${f===1?"":"s"}`),`${g.trim()} left`})(a)??0}`})]});var u,p}const UA={success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function Yu({className:e,variant:t,text:n}){const o=te("io-dm-item-status",`io-dm-item-status-${t}`,e);return d.jsxs("div",{className:o,children:[t&&d.jsx(wt,{variant:UA[t],className:"icon-severity",size:"10"}),n&&d.jsx("p",{className:"io-text-smaller",children:n})]})}function lx({className:e,itemID:t,state:n,pauseResume:o,showInFolder:r,cancel:i,...a}){const s=te("io-dm-item-footer",e),{pauseResumeItem:c,showItemInFolder:l,cancelItem:u}=Jo(),p=v.useCallback(m=>{o?o(m):c(m)},[o,c]),f=v.useCallback(m=>{r?r(m):l(m)},[r,l]),h=v.useCallback(m=>{i?i(m):u(m)},[i,u]);return d.jsx("div",{className:s,...a,children:(()=>{switch(n){case"progressing":return d.jsxs(We,{align:"right",children:[d.jsx(We.Button,{variant:"primary",text:"Pause",onClick:()=>p(t)}),d.jsx(We.Button,{variant:"link",text:"Cancel",onClick:()=>h(t)})]});case"paused":return d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Resume",onClick:()=>p(t)})});case"completed":return d.jsxs(d.Fragment,{children:[d.jsx(Yu,{variant:"success",text:"Complete"}),d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Show in Folder",onClick:()=>f(t)})})]});case"cancelled":return d.jsx(Yu,{variant:"warning",text:"Cancelled"});case"interrupted":return d.jsxs(d.Fragment,{children:[d.jsx(Yu,{variant:"critical",text:"Failed"}),d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Retry",onClick:()=>p(t)})})]});default:return null}})()})}function ux({className:e,title:t="Download Settings",...n}){const o=te("io-dm-settings-panel",e),{configuration:{downloadFolder:r},hideSettings:i,setDownloadLocation:a,setDownloadLocationWithDialog:s,isDownloadLocationDialogVisible:c,downloadLocationList:l}=Jo();return d.jsxs(ze,{className:o,...n,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:t,tag:"h1"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(Ue,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:()=>{i()},disabled:c})})]}),d.jsx(ze.Body,{children:d.jsxs(We,{children:[d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{children:d.jsx("span",{className:"io-dm-settings-panel-download-location",children:r??l[0]})}),l.length>1&&d.jsx(fe.Content,{children:d.jsx(fe.List,{children:l.map((u,p)=>!u||p===0||p>3?null:d.jsx(fe.Item,{onClick:()=>{a(u)},children:u},u))})})]}),d.jsx(Ze,{className:"io-btn io-dm-settings-panel-download-location-btn",text:"Browse",onClick:()=>{s()},disabled:c})]})})]})}const dx={Header:Jw,ItemSearch:Kw,HeaderButtons:qw,MoreButton:Qw,ExternalButton:ex,CloseButton:tx,Body:ox,DownloadListEmpty:rx,ItemGroup:ix,Item:ax,ItemProgress:fh,ItemHeader:sx,ItemBody:cx,ItemFooter:lx,Settings:ux},px=v.createContext(dx),fx=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...dx,...t}),[t]);return d.jsx(px.Provider,{value:n,children:e})});fx.displayName="ComponentsStore";const Ps=()=>v.useContext(px);function JA({className:e,...t}){const n=te("io-dm",e),{Header:o,Body:r,Settings:i}=Ps(),{isSettingsVisible:a}=Jo();return d.jsxs(ze,{className:n,...t,children:[d.jsx(o,{}),d.jsx(r,{}),a&&d.jsx(i,{})]})}var YA=Object.freeze({__proto__:null,Body:ox,CloseButton:tx,DownloadListEmpty:rx,DownloadManager:function({components:e,...t}){return d.jsx(fx,{components:e,children:d.jsx(JA,{...t})})},DownloadManagerProvider:({children:e})=>{const{configuration:t,items:n,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:c,showSettings:l,hideSettings:u,searchQuery:p,setSearch:f,itemsCount:h,setCount:m,setDownloadLocation:g,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:C,downloadLocationList:w}=function(){const[b,k]=v.useState({}),[S,E]=v.useState([]),[O,A]=v.useState(0),[N,j]=v.useState([]),[G,M]=v.useState(""),[T,H]=v.useState(!1),[V,z]=v.useState(!1),[P,B]=v.useState({filePaths:[],canceled:!1});v.useEffect(()=>{if(!bn)return;const $=bn.downloads.onUpdate(_=>E(R=>F(R,_))),Z=bn.downloads.onConfigurationChanged(_=>{k(_)});return bn.downloads.list().then(E).catch(console.error),bn.downloads.getSavePathList().then(_=>{let R=null;const L=_==null?void 0:_.pathList;Array.isArray(_)?R=_.filter(D=>typeof D=="string"):Array.isArray(L)&&(R=L.filter(D=>typeof D=="string")),R!==null&&j(R)}).catch(console.error),()=>{$(),Z()}},[]),v.useEffect(()=>{z(!1)},[P]);const F=($,Z)=>{const _=$.findIndex(L=>L.id===Z.id);if(_===-1)return[Z,...$];const R=[...$];return R[_]=Z,R};return{items:S,setCount:$=>{A($)},sortItems:($,Z=!0)=>[...$].sort((_,R)=>{const L=_.displayInfo.startTime-R.displayInfo.startTime;return Z?-L:L}),setSearch:$=>{M($)},cancelItem:async $=>{try{await bn.downloads.cancel($)}catch(Z){console.error(Z)}},removeItem:async $=>{try{E(Z=>Z.filter(_=>_.id!==$)),await bn.downloads.removeItem($)}catch(Z){console.error(Z)}},clearItems:async()=>{try{E([]),await bn.downloads.clearDownloadList()}catch($){console.error($)}},itemsCount:O,searchQuery:G,showSettings:()=>{H(!0)},hideSettings:()=>{H(!1)},configuration:b,isSettingsVisible:T,pauseResumeItem:async $=>{try{await bn.downloads.pauseResume($)}catch(Z){console.error(Z)}},showItemInFolder:async $=>{try{await bn.downloads.showInFolder($)}catch(Z){console.error(Z)}},setDownloadLocation:async $=>{try{await bn.downloads.setSavePath($),j(Z=>{if(Z.includes($)){const _=Z.filter(R=>R!==$);return[$,..._]}return[$,...Z]})}catch(Z){console.error(Z)}},downloadLocationList:N,isDownloadLocationDialogVisible:V,setDownloadLocationWithDialog:async()=>{z(!0);try{const $=await bn.downloads.showOpenDialog();if(B($),!($!=null&&$.filePaths)||$.filePaths.length===0)return;await bn.downloads.setSavePath($.filePaths[0]),j(Z=>{if(Z.includes($.filePaths[0])){const _=Z.filter(R=>R!==$.filePaths[0]);return[$.filePaths[0],..._]}return[$.filePaths[0],...Z]})}catch($){console.error($)}}}}(),I=v.useMemo(()=>({configuration:t,items:n,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:c,showSettings:l,hideSettings:u,searchQuery:p,setSearch:f,itemsCount:h,setCount:m,setDownloadLocation:g,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:C,downloadLocationList:w}),[t,n,o,r,i,s,a,c,l,u,p,f,h,m,g,y,x,C,w]);return d.jsx(Yw.Provider,{value:I,children:e})},ExternalButton:ex,Header:Jw,HeaderButtons:qw,Item:ax,ItemBody:cx,ItemFooter:lx,ItemGroup:ix,ItemHeader:sx,ItemProgress:fh,ItemSearch:Kw,MoreButton:Qw,Settings:ux,useDownloadManagerContext:Jo});const hx=({className:e,label:t="Location",...n})=>{const{configuration:{downloadFolder:o},setDownloadLocationWithDialog:r,isDownloadLocationDialogVisible:i,downloadLocationList:a}=Jo();return d.jsxs(Je,{className:te("io-preferences-download-section",e),...n,children:[d.jsxs("div",{className:"flex jc-between ai-center",children:[d.jsx("label",{className:"io-text-clipper",children:t}),d.jsx(Ze,{text:"Change",onClick:r,disabled:i})]}),d.jsx("p",{children:o??(a==null?void 0:a[0])??"Not set"})]})},mx=({align:e="right",label:t="Ask where to save each file before downloading",...n})=>d.jsx(on,{align:e,label:t,prefKey:wb,...n}),gx=({title:e="System",...t})=>{const{SystemRestartSection:n,SystemShutdownSection:o}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(o,{})]})},C0="T42.GD.Execute",vx=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],yx=(e,t)=>e in t;function KA({time:e,frequency:t,day:n}){const[o,r]=e.split(":"),i=Number.parseInt(o,10),a=Number.parseInt(r,10);let s="*";return t==="weekly"&&n&&(s=function(c){const l={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};if(!yx(c,l))throw new Error(`Invalid day: ${c}`);return l[c]}(n).toString()),`${a} ${i} * * ${s}`}function qA(e){const t=v.useContext(Se.IOConnectContext),{value:n,update:o}=St({prefKey:sc(e)}),{value:r,update:i}=St({prefKey:sc(e,"Time")}),{value:a,update:s}=St({prefKey:sc(e,"Frequency")}),{value:c,update:l}=St({prefKey:sc(e,"Day")}),u=v.useCallback(async()=>{try{await t.interop.invoke(C0,{command:`cancel-${e}`})}catch(f){console.error(f)}},[t,e]),p=v.useCallback(async()=>{try{const f=KA({time:r??"12:00",frequency:a??"daily",day:a==="weekly"?c:"*"});await t.interop.invoke(C0,{command:`schedule-${e}`,args:{cronTime:f,discardUnsavedLayoutChanges:!1}})}catch(f){console.error(`Failed to update cron job for ${e}:`,f)}},[t,e,r,a,c]);return v.useEffect(()=>{t&&n&&p()},[t,n,r,a,c,p]),{enabled:n??!1,time:r??"12:00",frequency:a??"daily",day:c??"Monday",setEnabled:async f=>{f||await u();try{await o(f)}catch(h){console.error("Failed to update enabled state:",h)}},setTime:async f=>{try{await i(f)}catch(h){console.error("Failed to update time:",h)}},setFrequency:async f=>{try{await s(f),f==="daily"&&await l(void 0)}catch(h){console.error("Failed to update frequency:",h)}},setDay:async f=>{var h;if(h=f,vx.includes(h))try{await l(f)}catch(m){console.error("Failed to update day:",m)}else console.error("Invalid day provided")}}}function sc(e,t){const n=e==="restart"?"_system_scheduleRestart":"_system_scheduleShutdown";return t?`${n}${t}`:n}function bx({className:e,variant:t,...n}){const o=te("io-block-list-gap",t,e),{enabled:r,time:i,frequency:a,day:s,setEnabled:c,setTime:l,setFrequency:u,setDay:p}=qA(t);return d.jsxs(Je,{className:o,...n,children:[d.jsx(Pt,{label:`Schedule ${t}`,align:"right",onChange:f=>c(f.target.checked),checked:r}),d.jsxs("div",{className:"scheduler-controls",children:[d.jsx("div",{className:"io-control-input io-control-leading-icon direction-up",children:d.jsx("input",{type:"time",className:"io-input",value:i,onChange:f=>l(f.target.value)})}),d.jsxs(Yn,{text:a.charAt(0).toUpperCase()+a.slice(1),icon:"chevron-down",iconRight:!0,children:[d.jsx(Yn.Item,{onClick:()=>u("daily"),children:"Daily"}),d.jsx(Yn.Item,{onClick:()=>u("weekly"),children:"Weekly"})]}),a==="weekly"&&d.jsx(Yn,{text:s,icon:"chevron-down",iconRight:!0,children:vx.map(f=>d.jsx(Yn.Item,{onClick:()=>p(f),children:f},f))})]})]})}function wx({className:e,...t}){return d.jsx(bx,{...t,className:e,variant:"restart"})}function xx({className:e,...t}){return d.jsx(bx,{...t,className:e,variant:"shutdown"})}const Cx={Body:Lw,General:_w,Theme:iu,Launchpad:({title:e="Launchpad",...t})=>{const{MinimizeToTray:n,PinnedPosition:o,HideFavoritesFromLaunchpad:r,Docking:i,ExtendedArea:a}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{})]})},MinimizeToTray:Mw,PinnedPosition:Dw,HideFavoritesFromLaunchpad:Bw,Docking:({className:e,title:t="Docking",...n})=>{const o=te("io-preferences-panel-docking",e),{AllowDocking:r,DockedAlwaysOnTop:i,DockedClaimsSpace:a}=zo();return d.jsxs(Je,{className:o,title:t,...n,children:[d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{})]})},AllowDocking:Hw,DockedAlwaysOnTop:Gw,DockedClaimsSpace:Ww,ExtendedArea:({className:e,title:t="Extended Area",...n})=>{const o=te("io-preferences-panel-extended-area",e),{ShowExtendedArea:r,HideLabelsInExtendedArea:i,ShowFavoritesInExtendedArea:a,ShowRecentAppsInExtendedArea:s}=zo();return d.jsxs(Je,{className:o,title:t,...n,children:[d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),d.jsx(s,{})]})},ShowExtendedArea:Vw,HideLabelsInExtendedArea:Fw,ShowFavoritesInExtendedArea:zw,ShowRecentAppsInExtendedArea:$w,Layouts:Zw,LayoutsSaveCurrentOnExit:Xw,LayoutsShowUnsavedChangesPrompt:au,LayoutsShowDeletePrompt:su,LayoutsShowHidden:({align:e="right",label:t="Show hidden Layouts and Workspaces",...n})=>vi(v.useContext(Se.IOConnectContext))?d.jsx(on,{align:e,label:t,prefKey:ia,"data-testid":"layouts-show-hidden-toggle",...n}):null,Downloads:Uw,DownloadsLocation:hx,DownloadsAskForEachDownload:mx,System:gx,SystemRestartSection:wx,SystemShutdownSection:xx},Ix=v.createContext(Cx),kx=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...Cx,...t}),[t]);return d.jsx(Ix.Provider,{value:n,children:e})});kx.displayName="PreferencesPanelComponentsStoreProvider";const zo=()=>v.useContext(Ix),Sx=({className:e,onClose:t,title:n="Platform Preferences",children:o,...r})=>d.jsxs(ze,{className:te("io-preferences-panel",e),"data-testid":"preferences-panel",...r,children:[d.jsxs(ze.Header,{"data-testid":"preferences-panel-header",children:[d.jsx(ze.Header.Title,{size:"large",text:n,tag:"h1","data-testid":"preferences-panel-title"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:t,"data-testid":"preferences-panel-close-button"})})]}),o]}),QA=({onClose:e,title:t="Platform Preferences",...n})=>{const{Body:o}=zo();return d.jsx(Sx,{title:t,onClose:e,...n,children:d.jsx(o,{})})},Ax=({components:e,...t})=>d.jsx(kx,{components:e,children:d.jsx(QA,{...t})});function Ex({className:e,title:t="General",...n}){const o=te("io-notifications-settings-panel-general",e),{AllowNotifications:r,AllowNotificationToasts:i,ShowNotificationBadge:a,CloseNotificationOnClick:s,PanelAutoHide:c,HideToastsAfter:l}=yi(),u=qe();return d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[u&&d.jsx(r,{}),u&&d.jsx(i,{}),d.jsx(a,{}),u&&d.jsx(c,{}),u&&d.jsx(s,{}),u&&d.jsx(l,{})]})})}function Pp(e){if(e&&e.errorHandling&&typeof e.errorHandling!="function"&&e.errorHandling!=="log"&&e.errorHandling!=="silent"&&e.errorHandling!=="throw")throw new Error('Invalid options passed to createRegistry. Prop errorHandling should be ["log" | "silent" | "throw" | (err) => void], but '+typeof e.errorHandling+" was passed");var t=e&&typeof e.errorHandling=="function"&&e.errorHandling,n={};function o(r,i){var a=r instanceof Error?r:new Error(r);if(t)t(a);else{var s='[ERROR] callback-registry: User callback for key "'+i+'" failed: '+a.stack;if(e)switch(e.errorHandling){case"log":return console.error(s);case"silent":return;case"throw":throw new Error(s)}console.error(s)}}return{add:function(r,i,a){var s=n[r];return s||(s=[],n[r]=s),s.push(i),a&&setTimeout(function(){a.forEach(function(c){var l;if(!((l=n[r])===null||l===void 0)&&l.includes(i))try{Array.isArray(c)?i.apply(void 0,c):i.apply(void 0,[c])}catch(u){o(u,r)}})},0),function(){var c=n[r];c&&(c=c.reduce(function(l,u,p){return u===i&&l.length===p||l.push(u),l},[]),c.length===0?delete n[r]:n[r]=c)}},execute:function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var s=n[r];if(!s||s.length===0)return[];var c=[];return s.forEach(function(l){try{var u=l.apply(void 0,i);c.push(u)}catch(p){c.push(void 0),o(p,r)}}),c},clear:function(){n={}},clearKey:function(r){n[r]&&delete n[r]}}}Pp.default=Pp;var e4=hs(Pp),kt=new class{constructor(){Vn(this,"subscribed",!1);Vn(this,"io");Vn(this,"registry",e4());Vn(this,"logger");Vn(this,"isPanelVisible");Vn(this,"notifications",[]);Vn(this,"bulkActionsSupported",!1);Vn(this,"initPromise")}init(e){return this.initPromise!==void 0||(this.initPromise=(async()=>{var t;if(!this.subscribed){this.subscribed=!0,this.io=e,this.logger=this.io.logger.subLogger("notifications");try{await this.initializeLogger()}catch(n){console.error("Failed to initialize logger with app configuration",n)}this.getBulkActionsSupport();try{await this.subscribe()}catch(n){throw(t=this.logger)==null||t.error("Error during subscription:",n),n}}})()),this.initPromise}async initializeLogger(){var o,r,i,a,s,c;const e=await wr.getMyApplication(this.io),t=((r=(o=e==null?void 0:e.userProperties)==null?void 0:o.logger)==null?void 0:r.publishLevel)??"error",n=((a=(i=e==null?void 0:e.userProperties)==null?void 0:i.logger)==null?void 0:a.consoleLevel)??"info";(s=this.logger)==null||s.publishLevel(t),(c=this.logger)==null||c.consoleLevel(n)}onPanelVisibilityChanged(e){return this.registry.add("on-panel-visibility-changed",e)}onConfigurationChanged(e){return this.registry.add("on-configuration-changed",e)}onNotificationsChanged(e){return this.registry.add("on-notifications-changed",e)}onCounterChanged(e){return this.registry.add("on-counter-changed",e)}async getNotificationsList(){var t;const e=await((t=this.io)==null?void 0:t.notifications.list());if(!e)throw new Error("io.notifications.list is not supported in this environment.");return e.map(n=>this.attachHandlers(n))}async getConfiguration(){if(this.io)return await this.io.notifications.getConfiguration();throw new Error("io.notifications.getConfiguration is not supported in this environment.")}showPanel(){var e;if(this.isDesktopEnvironment())return(e=this.io)==null?void 0:e.notifications.panel.show()}hidePanel(){var e;if(this.isDesktopEnvironment())return(e=this.io)==null?void 0:e.notifications.panel.hide()}clearAll(){var e,t;return(e=this.logger)==null||e.trace("clearing all notifications"),(t=this.io)==null?void 0:t.notifications.clearAll()}clearAllOld(){var e,t;return(e=this.logger)==null||e.trace("clearing all old notifications"),(t=this.io)==null?void 0:t.notifications.clearOld()}clearMany(e){var n,o,r,i;const t=(n=this.io)==null?void 0:n.notifications;return this.isBulkActionSupported("clearMany")?e.length<1?((o=this.logger)==null||o.trace("no ids provided to clear notifications"),Promise.resolve()):((r=this.logger)==null||r.trace(`clearing notifications with ids ${JSON.stringify(e.join(", "))}`),((i=t.clearMany)==null?void 0:i.call(t,e))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}close(e){var t,n;return(t=this.logger)==null||t.trace(`closing notification with id ${e}`),(n=this.io)==null?void 0:n.notifications.clear(e)}snooze(e,t){var n,o;return(n=this.logger)==null||n.trace(`snoozing notification with id ${e} for ${t}ms`),(o=this.io)==null?void 0:o.notifications.snooze(e,t)}snoozeMany(e,t){var o,r,i,a;const n=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("snoozeMany")?e.length<1?((r=this.logger)==null||r.trace("no ids provided to snooze notifications"),Promise.resolve()):((i=this.logger)==null||i.trace(`snoozing notifications with ids ${JSON.stringify(e.join(", "))} for ${t}ms`),((a=n.snoozeMany)==null?void 0:a.call(n,e,t))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}setState(e,t){var n,o;return(n=this.logger)==null||n.trace(`setting state of ${e} to ${t}`),(o=this.io)==null?void 0:o.notifications.setState(e,t)}setStates(e,t){var o,r,i,a;const n=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("setStates")?e.length<1?((r=this.logger)==null||r.trace(`no ids provided to change state to ${t} for notifications`),Promise.resolve()):((i=this.logger)==null||i.trace(`setting state of ${JSON.stringify(e.join(", "))} to ${t}`),((a=n.setStates)==null?void 0:a.call(n,e,t))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}getBulkActionsSupport(){this.bulkActionsSupported=this.isBulkActionSupported("clearMany")&&this.isBulkActionSupported("setStates")&&this.isBulkActionSupported("snoozeMany")}setFilter(e){var t,n;return(t=this.logger)==null||t.trace(`setting filter to ${JSON.stringify(e)}`),(n=this.io)==null?void 0:n.notifications.setFilter(e)}configure(e){var t;return(t=this.io)==null?void 0:t.notifications.configure(e)}async resyncNotifications(){var e,t;try{const n=await this.getNotificationsList();this.notifications=n,this.registry.execute("on-notifications-changed",[...this.notifications]),(e=this.logger)==null||e.trace(`resynced notifications array with ${this.notifications.length} notifications`)}catch(n){(t=this.logger)==null||t.error("Error resyncing notifications list:",n)}}async subscribe(){var t,n,o,r,i,a,s,c,l;(t=this.io)==null||t.notifications.onRaised(u=>{var p;(p=this.logger)==null||p.trace(`received event indicating notification raise: ${JSON.stringify(u)}`),this.attachHandlers(u),this.notifications.unshift(u),this.registry.execute("on-notifications-changed",[...this.notifications])}),(n=this.io)==null||n.notifications.onStateChanged(({id:u},p)=>{var f;(f=this.logger)==null||f.trace(`received event for notification state is changed - "${u}" - "${p==null?void 0:p.toString()}"`),this.notifications=this.notifications.map(h=>{var m;return h.id===u?((m=this.logger)==null||m.trace(`${h.id} - the state is changed from "${h.state}" to "${p==null?void 0:p.toString()}"`),{...h,state:p}):h}),this.registry.execute("on-notifications-changed",this.notifications)});const e=(o=this.io)==null?void 0:o.notifications;e!=null&&e.onDataChanged&&e.onDataChanged((u,p)=>{var h;const f=u.id;(h=this.logger)==null||h.trace(`received event for notification data is changed - "${f}" - "${JSON.stringify(p)}"`),this.notifications=this.notifications.map(m=>{var g;return m.id===f?((g=this.logger)==null||g.trace(`${m.id} - the data is changed from "${JSON.stringify(m.data)}" to "${JSON.stringify(p)}"`),{...m,data:p}):m}),this.registry.execute("on-notifications-changed",this.notifications)}),(r=this.io)==null||r.notifications.onClosed(({id:u})=>{var p;(p=this.logger)==null||p.trace(`received event for notification is closed - "${u}".`),this.notifications=this.notifications.filter(f=>f.id!==u),this.registry.execute("on-notifications-changed",this.notifications)});try{const u=await this.getNotificationsList(),p=new Set(u.map(h=>h.id)),f=this.notifications.filter(h=>!p.has(h.id));this.notifications=[...f,...u],(i=this.logger)==null||i.trace(`initialized with ${u.length} fetched + ${f.length} from events = ${this.notifications.length} total`)}catch(u){(a=this.logger)==null||a.error("Error fetching initial notifications list:",u),(s=this.logger)==null||s.trace(`continuing with ${this.notifications.length} notifications from events`)}(c=this.io)==null||c.notifications.onConfigurationChanged(u=>{var p;(p=this.logger)==null||p.trace(`received event for configuration changed - ${JSON.stringify(u)}.`),this.registry.execute("on-configuration-changed",u)}),this.isDesktopEnvironment()&&((l=this.io)==null||l.notifications.panel.onVisibilityChanged(u=>{var p;(p=this.logger)==null||p.trace(`received event for panel visibility changed to "${u}".`),this.isPanelVisible=u,u&&this.resyncNotifications().catch(f=>{var h;(h=this.logger)==null||h.error("Error resyncing notifications on panel visibility:",f)}),this.registry.execute("on-panel-visibility-changed",u)}))}isDesktopEnvironment(){return typeof globalThis.window=="object"&&(!!globalThis.window.iodesktop||!!globalThis.window.glue42gd)}isBulkActionSupported(e){var n;const t=(n=this.io)==null?void 0:n.notifications;return typeof(t==null?void 0:t[e])=="function"}attachHandlers(e){var n;return(n=e.actions)==null||n.forEach(o=>{Object.assign(o,{onClick:async r=>{var i,a,s;try{(i=this.logger)==null||i.info(`${e.id}/${o.action} - was clicked.`),await((a=this.io)==null?void 0:a.notifications.click(e.id,o.action,r))}catch(c){(s=this.logger)==null||s.error("Error while clicking on action:",c)}}})}),Object.assign(e,{snooze:async(o=1e4)=>{var r,i;(r=this.logger)==null||r.trace(`${e.id} - request to change the state from ${e.state} to Snoozed with duration ${o}ms`),await((i=this.io)==null?void 0:i.notifications.snooze(e.id,o))},updateState:async o=>{var r,i;return(r=this.logger)==null||r.trace(`${e.id} - request to change the state from ${e.state} to ${o}`),(i=this.io)==null?void 0:i.notifications.setState(e.id,o)},updateData:async o=>{var i,a,s;(i=this.logger)==null||i.trace(`${e.id} - request to change the data to ${JSON.stringify(o)}`);const r=(a=this.io)==null?void 0:a.notifications;r!=null&&r.updateData?await r.updateData(e.id,o):(s=this.logger)==null||s.warn("'updateData' method is not supported")},onClick:async o=>{var r,i,a;try{(r=this.logger)==null||r.info(`${e.id} - was clicked.`),await((i=this.io)==null?void 0:i.notifications.click(e.id,void 0,o))}catch(s){(a=this.logger)==null||a.error(`Error while clicking on Notification: ${e.id}`,s)}},onShow:()=>{},close:async()=>{var o;return(o=this.logger)==null||o.info(`${e.id} - was closed.`),this.close(e.id)}})}};function hh(e){const t=v.useContext(Se.IOConnectContext),n=qe(),[o,r]=v.useState([]),[i,a]=v.useState(0),s="Platform",c=v.useCallback((p="asc")=>{if(n===null)return[];const f=[...o].sort((h,m)=>{const g=(h.title??h.name).toLowerCase(),y=(m.title??m.name).toLowerCase();return p==="asc"?g.localeCompare(y):y.localeCompare(g)});if(!n){const h=f.findIndex(m=>m.name===s);if(h!==-1){const[m]=f.splice(h,1);f.unshift(m)}}return f},[o,n]),l=v.useMemo(()=>c("asc"),[c]),u=v.useMemo(()=>c("desc"),[c]);return v.useEffect(()=>{if(n===null||n)return;const p={title:"System",name:s,hidden:!1,userProperties:{hidden:!1}};r(f=>f.some(h=>h.name===p.name)?f:[...f,p])},[n]),v.useEffect(()=>{if(!t)return;let p,f,h,m=!1;const g=C=>{r(w=>[...w.filter(I=>I.name!==C.name),{title:C.title??C.name,name:C.name,hidden:C.hidden,userProperties:C.userProperties}])},y=C=>{r(w=>w.filter(I=>I.name!==C.name))},x=C=>{r(w=>w.find(I=>I.name===C.name)?w.map(I=>I.name===C.name?{...I,title:C.title??I.title,hidden:C.hidden??I.hidden,userProperties:C.userProperties??I.userProperties}:I):w)};return(async()=>{const C=await wr.getApplications(t);if(m)return;r(k=>{const S=new Map;return k.forEach(E=>S.set(E.name,E)),C.forEach(E=>{S.set(E.name,{title:E.title??E.name,name:E.name,hidden:E.hidden,userProperties:E.userProperties})}),Array.from(S.values())});const[w,I,b]=await Promise.all([wr.onAppAdded(t,g),wr.onAppRemoved(t,y),wr.onAppChanged(t,x)]);if(m)return w==null||w(),I==null||I(),void(b==null?void 0:b());p=w,f=I,h=b})().catch(C=>{console.error("Failed to initialize apps",C)}),()=>{m=!0,p==null||p(),f==null||f(),h==null||h()}},[t]),{apps:v.useMemo(()=>{if(!(e!=null&&e.sourceFilter)||!Array.isArray(o))return o;const{allowed:p=[],blocked:f=[]}=e.sourceFilter,h=p.includes("*"),m=f.includes("*");let g=0;const y=o.map(x=>{const C=h||p.includes(x.name),w=!m&&C;return w&&g++,{...x,allowed:w}});return a(g),y},[e,o]),allowedApps:i,sortedAppsAsc:l,sortedAppsDesc:u,sortAppsAlphabetically:c}}function jx(e,t,n){var r;return{notificationStacks:v.useMemo(()=>{var l,u,p,f;if(!t.toastStacking)return[];const i=(a=t.stackBy)==="application"?"source":a==="severity"?"severity":"source";var a;const s=e.filter(h=>h.state==="Active"),c=new Map;for(const h of s){const m=h[i]??"";if(h.source&&((u=(l=n==null?void 0:n.sourceFilter)==null?void 0:l.muted)!=null&&u.includes(h.source))||(f=(p=n==null?void 0:n.sourceFilter)==null?void 0:p.muted)!=null&&f.includes("*"))continue;c.has(m)||c.set(m,{key:m,items:[]});const g=c.get(m);g&&g.items.unshift(h)}return Array.from(c.values()).filter(h=>h.items.some(m=>m.state==="Active"||m.state==="Stale"))},[e,t.toastStacking,t.stackBy,(r=n==null?void 0:n.sourceFilter)==null?void 0:r.muted])}}function Nx(e){const[t,n]=v.useState([]);return{selectedNotifications:t,selectNotification:(o,r)=>{const i=t;n(r?[...i,o]:i.filter(a=>a!==o))},selectAllNotifications:(o,r)=>{if(r){let i=[];switch(o){case"read":i=e.filter(a=>a.state==="Acknowledged"||a.state==="Seen").map(a=>a.id);break;case"unread":i=e.filter(a=>a.state==="Active"||a.state==="Stale").map(a=>a.id);break;case"snoozed":i=e.filter(a=>a.state==="Snoozed").map(a=>a.id);break;default:i=e.map(a=>a.id)}n(i)}else n([])}}}const I0=e=>{var t,n;return{enabledNotifications:e.enable,enabledToasts:e.enableToasts,toastStacking:((t=e.toasts)==null?void 0:t.mode)==="stacked",stackBy:(n=e.toasts)==null?void 0:n.stackBy,toastExpiry:e.toastExpiry,showNotificationBadge:e.showNotificationBadge,placement:e.placement,snooze:e.snooze,closeNotificationOnClick:e.closeNotificationOnClick,autoHidePanel:e.autoHidePanel}},k0=e=>Array.from(e.reduce((t,n)=>t.set(n.id,n),new Map).values());function t4(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState({}),[o,r]=v.useState({}),[i,a]=v.useState([]),[s,c]=v.useState(0),[l,u]=v.useState(!0),{apps:p,allowedApps:f}=hh(t),{notificationStacks:h}=jx(i,{toastStacking:o.toastStacking??!1,stackBy:o.stackBy??"source"},{sourceFilter:t.sourceFilter}),{selectedNotifications:m,selectNotification:g,selectAllNotifications:y}=Nx(i);v.useEffect(()=>{(async()=>{await kt.init(e),await(async()=>{try{const w=await kt.getConfiguration();n(w),r(I=>({...I,...I0(w)}))}catch(w){console.error("Error fetching configuration:",w)}})(),await(async()=>{try{const w=await kt.getNotificationsList();a(k0(w))}catch(w){console.error("Error fetching notifications:",w)}})()})().catch(w=>{console.error("Error in useNotifications fetch:",w)}),x()},[e]),v.useEffect(()=>{const w=kt.onNotificationsChanged(k=>{a(k0(k))}),I=kt.onConfigurationChanged(k=>{const S=I0(k);n(E=>({...E,...k})),r(E=>({...E,...S}))}),b=kt.onCounterChanged(k=>{c(k)});return()=>{w(),I(),b()}},[]);const x=()=>{u(kt.bulkActionsSupported)},C=async w=>{await kt.setFilter(w)};return{close:w=>kt.close(w),clearAll:()=>kt.clearAll(),settings:o,hidePanel:async()=>{await kt.hidePanel()},showPanel:async()=>{await kt.showPanel()},saveFilter:C,clearAllOld:()=>kt.clearAllOld(),saveSetting:async w=>{const I=((b,k)=>{const S=(A=>({enabledNotifications:N=>({enable:N}),enabledToasts:N=>({enableToasts:N}),toastStacking:N=>{var j;return{toasts:{mode:N?"stacked":"single",stackBy:(j=A.toasts)==null?void 0:j.stackBy}}},stackBy:N=>{var j;return{toasts:{mode:(j=A.toasts)==null?void 0:j.mode,stackBy:N}}},showNotificationBadge:N=>({showNotificationBadge:N}),toastExpiry:N=>({toastExpiry:N}),placement:N=>({placement:N}),snooze:N=>({snooze:N}),closeNotificationOnClick:N=>({closeNotificationOnClick:N}),autoHidePanel:N=>({autoHidePanel:N})}))(k),E=Object.keys(b)[0],O=b[E];return E&&O!==void 0&&S[E]?S[E](O):{}})(w,t);I&&await kt.configure(I)},allApps:p,saveAllFilter:async w=>{"subscribe"in w?await C({allowed:w.subscribe?["*"]:[],blocked:w.subscribe?[]:["*"]}):"mute"in w&&await C({muted:w.mute?["*"]:[]})},configuration:t,notifications:i,notificationStacks:h,notificationsCount:s,allApplications:t.allApplications??0,allowedApplications:f,isBulkActionsSupported:l,selectedNotifications:m,selectNotification:g,selectAllNotifications:y,clearMany:async w=>{await kt.clearMany(w)},snooze:async(w,I)=>{await kt.snooze(w,I)},snoozeMany:async(w,I)=>{await kt.snoozeMany(w,I)},setState:async(w,I)=>{await kt.setState(w,I)},setStates:async(w,I)=>{await kt.setStates(w,I)},setCount:w=>{c(w)},getNotificationsList:async()=>await kt.getNotificationsList()}}const Px=v.createContext({allApps:[],settings:{},configuration:{},notifications:[],notificationsCount:0,onClose:()=>{},allApplications:0,clearAll:()=>{},showPanel:()=>{},hidePanel:()=>{},saveFilter:()=>{},clearAllOld:()=>{},notificationStacks:[],saveSetting:()=>{},allowedApplications:0,saveAllFilter:()=>{},isBulkActionsSupported:!1,selectedNotifications:[],selectNotification:()=>{},selectAllNotifications:()=>{},clearMany:()=>{},snooze:()=>{},snoozeMany:()=>{},setState:()=>{},setStates:()=>{},setCount:()=>{}}),Ee=()=>v.useContext(Px);function Ox({label:e="Allow notifications",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=v.useCallback(s=>{r({enabledNotifications:s.target.checked})},[r]);return i?d.jsx(Pt,{label:e,align:t,onChange:a,checked:o.enabledNotifications??!1,...n}):null}function Tx({label:e="Allow notification toasts",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({enabledToasts:c.target.checked})},[r]);return i?d.jsx(Pt,{label:e,align:t,onChange:s,checked:o.enabledToasts??!1,disabled:a,...n}):null}function Rx({label:e="Show notification badge",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe()&&!o.enabledNotifications,a=v.useCallback(s=>{r({showNotificationBadge:s.target.checked})},[r]);return d.jsx(Pt,{label:e,align:t,onChange:a,checked:o.showNotificationBadge??!1,disabled:i,...n})}function Lx({label:e="Close notification on click",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({closeNotificationOnClick:c.target.checked})},[r]);return i?d.jsx(Pt,{label:e,align:t,onChange:s,checked:o.closeNotificationOnClick??!1,disabled:a,...n}):null}function _x({label:e="Auto hide panel",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=v.useCallback(s=>{r({autoHidePanel:s.target.checked})},[r]);return i?d.jsx(Pt,{label:e,align:t,onChange:a,checked:o.autoHidePanel??!1,...n}):null}const S0=(e,t)=>e?`${e} ${t}${e!==1?"s":""}`:"",pl=e=>{const t=Math.floor(e/60),n=e%60,o=S0(t,"minute"),r=S0(n,"second");return o+(o&&r?" ":"")+r};function Mx({className:e,title:t="Hide toasts after",items:n=[15,30,45,60],...o}){const r=te("flex","jc-between","ai-center",e),{settings:i,saveSetting:a}=Ee(),s=qe(),c=s&&!i.enabledNotifications,l=v.useCallback((u=15e3)=>{i.toastExpiry!==u&&a({toastExpiry:1e3*u})},[i.toastExpiry,a]);return s?d.jsxs("div",{className:r,...o,children:[d.jsx("div",{className:"io-text-clipper "+(c?"io-text-disabled":""),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{text:pl((i.toastExpiry??0)/1e3)}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:n.map(u=>d.jsx(fe.Item,{onClick:()=>{l(u)},children:pl(u)},u))})})]})]}):null}function Dx({className:e,title:t="Stacking",...n}){const o=te("io-notifications-settings-panel-stacking",e),{ToastStacking:r,ToastStackBy:i}=yi();return qe()?d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[d.jsx(r,{}),d.jsx(i,{})]})}):null}function Bx({label:e="Allow toast stacking",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({toastStacking:c.target.checked})},[r]);return i?d.jsx(Pt,{label:e,align:t,onChange:s,checked:o.toastStacking??!1,disabled:a,...n}):null}const Op={application:"Application",severity:"Priority"},n4=Object.fromEntries(Object.entries(Op).map(([e,t])=>[t,e]));function Hx({className:e,title:t="Group by",...n}){const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=a&&!r.enabledNotifications,c=v.useCallback((u="severity")=>{r.stackBy!==u&&i({stackBy:u.toLowerCase()})},[r.stackBy,i]);if(!a)return null;const l=Object.values(Op);return d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:te("io-text-clipper",{"io-text-disabled":s}),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:s,children:[d.jsx(fe.Button,{text:Op[r.stackBy??"severity"]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:l.map(u=>d.jsx(fe.Item,{onClick:()=>{const p=n4[u];c(p)},children:u},u))})})]})]})}function Gx({className:e,title:t="Placement",...n}){const o=te("io-notifications-settings-panel-placement",e),{PlacementPanel:r,PlacementToasts:i}=yi();return qe()?d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[d.jsx(r,{}),d.jsx(i,{})]})}):null}const Wx=e=>e.replace(/(^|-)\w/g,t=>t.toUpperCase().replace("-"," "));function Vx({className:e,title:t="Panel position",...n}){var c,l;const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=v.useCallback(u=>{var p;u||(u="right"),((p=r.placement)==null?void 0:p.panel)!==u&&i({placement:{...r.placement,panel:u.toLowerCase()}})},[r.placement,i]);return a?d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:"io-text-clipper",children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",children:[d.jsx(fe.Button,{text:(c=r.placement)!=null&&c.panel?Wx((l=r.placement)==null?void 0:l.panel):"Right"}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:["Right","Left"].map(u=>d.jsx(fe.Item,{onClick:()=>{s(u)},children:u},u))})})]})]}):null}function Fx({className:e,title:t="Toasts position",...n}){var c,l;const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=v.useCallback(u=>{var f;if(u||(u="bottom-right"),((f=r.placement)==null?void 0:f.toasts)===u)return;const p=u.replace(/\s+/g,"-").toLowerCase();i({placement:{...r.placement,toasts:p}})},[r.placement,i]);return a?d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:"io-text-clipper",children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",children:[d.jsx(fe.Button,{text:(c=r.placement)!=null&&c.toasts?Wx((l=r.placement)==null?void 0:l.toasts):"Bottom Right"}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:["Top Right","Top Left","Bottom Right","Bottom Left"].map(u=>d.jsx(fe.Item,{onClick:()=>{s(u)},children:u},u))})})]})]}):null}function zx({className:e,title:t="Snooze",...n}){var a;const o=te("io-notifications-settings-panel-snooze",e),{SnoozeDuration:r}=yi(),{settings:i}=Ee();return qe()&&((a=i.snooze)!=null&&a.enabled)?d.jsx("div",{className:o,...n,children:d.jsx(Je,{title:t,children:d.jsx(r,{})})}):null}function $x({className:e,title:t="Default duration",items:n=[60,120,180,300],...o}){var u,p;const r=te("flex","jc-between","ai-center",e),{settings:i,saveSetting:a}=Ee(),s=qe(),c=s&&!i.enabledNotifications,l=v.useCallback((f=6e4)=>{var h;i.snooze&&((h=i.snooze)==null?void 0:h.duration)!==f&&a({snooze:{...i.snooze,duration:1e3*f}})},[i.snooze,a]);return s&&((u=i.snooze)!=null&&u.enabled)?d.jsxs("div",{className:r,...o,children:[d.jsx("div",{className:te("io-text-clipper",{"io-text-disabled":c}),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{text:pl((((p=i.snooze)==null?void 0:p.duration)??0)/1e3)}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:n.map(f=>d.jsx(fe.Item,{onClick:()=>{l(f)},children:pl(f)},f))})})]})]}):null}function Zx({className:e,title:t,...n}){const o=te("io-notifications-settings-panel-subscriptions",e),{SubscribeAll:r,SubscribeApp:i,SubscribeMuteAll:a,SubscribeMuteApp:s}=yi(),{sortAppsAlphabetically:c}=hh(),l=qe(),u=c(),p="io-notifications-subscriptions-grid "+(l?"with-three-columns":"with-two-columns");return d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t??(l?"Subscribe & Mute":"Subscribe"),children:[d.jsxs("div",{className:p,children:[d.jsx("p",{className:"io-text-section",children:"Sources"}),d.jsx("p",{className:"io-text-section",children:"Subscribe"}),l&&d.jsx("p",{className:"io-text-section",children:"Mute"})]}),d.jsxs("div",{className:p,children:[d.jsx("p",{children:"All Sources"}),d.jsx(r,{label:""}),l&&d.jsx(a,{label:""})]}),u.map(f=>{var h;return!f||f.hidden||(h=f==null?void 0:f.userProperties)!=null&&h.hidden?null:d.jsxs("div",{className:p,children:[d.jsx("p",{children:f.title??f.name}),d.jsx(i,{app:f,label:""}),l&&d.jsx(s,{app:f,label:""})]},f.name)})]})})}function Xx({label:e="All apps",align:t="right",...n}){var c,l,u,p;const{settings:o,configuration:r,saveAllFilter:i}=Ee(),a=qe()&&!o.enabledNotifications,s=v.useCallback(f=>{i({subscribe:f.target.checked})},[i]);return d.jsx(Pt,{align:t,label:e,onChange:s,checked:(((l=(c=r.sourceFilter)==null?void 0:c.allowed)==null?void 0:l.includes("*"))&&((p=(u=r.sourceFilter)==null?void 0:u.blocked)==null?void 0:p.length)===0)??!1,disabled:a,...n})}function Ux({label:e="App",align:t="right",app:n,...o}){var u,p,f,h,m,g;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Ee(),c=qe()&&!i.enabledNotifications,l=v.useCallback((y,x)=>{var I,b,k,S,E,O;const C={...a.sourceFilter},w=(I=C.allowed)==null?void 0:I.indexOf("*");typeof w=="number"&&w>-1&&((b=C.allowed)==null||b.splice(w,1),r.forEach(A=>{var N;A.name!==x.name&&((N=C.allowed)==null||N.push(A.name))})),y?(C.allowed=[...new Set([...C.allowed??[],x.name])],C.blocked=(k=C.blocked)==null?void 0:k.filter(A=>A!==x.name)):(C.allowed=(S=C.allowed)==null?void 0:S.filter(A=>A!==x.name),C.blocked=[...new Set([...C.blocked??[],x.name])]),(E=C.allowed)!=null&&E.length&&((O=C.blocked)!=null&&O.includes("*"))&&C.blocked.splice(C.blocked.indexOf("*"),1),s(C)},[r,a.sourceFilter,s]);return d.jsx(Pt,{id:`subscribe-${n.name}`,label:e,align:t,onChange:y=>l(y.target.checked,n),checked:(((p=(u=a.sourceFilter)==null?void 0:u.allowed)==null?void 0:p.includes("*"))&&!((h=(f=a.sourceFilter)==null?void 0:f.blocked)!=null&&h.includes(n.name))||((g=(m=a.sourceFilter)==null?void 0:m.allowed)==null?void 0:g.includes(n.name)))??!1,disabled:c,...o})}function Jx({label:e="Mute all",align:t="right",...n}){var l,u,p,f;const{settings:o,configuration:r,saveAllFilter:i}=Ee(),a=qe(),s=a&&(!o.enabledNotifications||((u=(l=r.sourceFilter)==null?void 0:l.allowed)==null?void 0:u.indexOf("*"))===-1),c=v.useCallback(h=>{i({mute:h.target.checked})},[i]);return a?d.jsx(Pt,{align:t,label:e,onChange:c,checked:((f=(p=r.sourceFilter)==null?void 0:p.muted)==null?void 0:f.includes("*"))??!1,disabled:s??!1,...n}):null}function Yx({label:e="App",align:t="right",app:n,...o}){var p,f,h,m,g,y,x,C,w,I,b,k,S,E,O,A;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Ee(),c=qe(),l=c&&(!i.enabledNotifications||((f=(p=a.sourceFilter)==null?void 0:p.blocked)==null?void 0:f.includes("*"))||((m=(h=a.sourceFilter)==null?void 0:h.blocked)==null?void 0:m.includes(n.name))||((y=(g=a.sourceFilter)==null?void 0:g.allowed)==null?void 0:y.length)===0||((C=(x=a.sourceFilter)==null?void 0:x.allowed)==null?void 0:C.indexOf(n.name))===-1&&((I=(w=a.sourceFilter)==null?void 0:w.allowed)==null?void 0:I.indexOf("*"))===-1&&((k=(b=a.sourceFilter)==null?void 0:b.blocked)==null?void 0:k.length)===0),u=v.useCallback((N,j)=>{var T,H,V,z;const G={...a.sourceFilter},M=(T=G==null?void 0:G.muted)==null?void 0:T.indexOf("*");typeof M=="number"&&M>-1&&((H=G.muted)==null||H.splice(M,1),r.forEach(P=>{var B;P.name===j.name||P.hidden||((B=G.muted)==null||B.push(P.name))})),N?(V=G.muted)==null||V.push(j.name):G.muted=(z=G.muted)==null?void 0:z.filter(P=>P!==j.name),s(G)},[r,a.sourceFilter,s]);return!c||n.hidden?null:d.jsx(Pt,{id:`mute-${n.name}`,label:e,align:t,onChange:N=>u(N.target.checked,n),checked:(((E=(S=a.sourceFilter)==null?void 0:S.muted)==null?void 0:E.includes("*"))||((A=(O=a.sourceFilter)==null?void 0:O.muted)==null?void 0:A.includes(n.name)))??!1,disabled:l??!1,...o})}const Kx={Body:e=>{const{General:t,Placement:n,Stacking:o,Snooze:r,Subscriptions:i}=yi();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(o,{}),d.jsx(n,{}),d.jsx(r,{}),d.jsx(i,{})]})},General:Ex,AllowNotifications:Ox,AllowNotificationToasts:Tx,ShowNotificationBadge:Rx,CloseNotificationOnClick:Lx,PanelAutoHide:_x,HideToastsAfter:Mx,Stacking:Dx,ToastStacking:Bx,ToastStackBy:Hx,Placement:Gx,PlacementPanel:Vx,PlacementToasts:Fx,Snooze:zx,SnoozeDuration:$x,Subscriptions:Zx,SubscribeAll:Xx,SubscribeApp:Ux,SubscribeMuteAll:Jx,SubscribeMuteApp:Yx},qx=v.createContext(Kx),mh=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...Kx,...t}),[t]);return d.jsx(qx.Provider,{value:n,children:e})});mh.displayName="NotificationsSettingsPanelComponentsStoreProvider";const yi=()=>v.useContext(qx),o4=({className:e,onClose:t,title:n="Notification Settings",...o})=>{const{Body:r}=yi();return d.jsxs(ze,{className:te("io-notifications-settings-panel",e),"data-testid":"notifications-settings-panel",...o,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:n,tag:"h1"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:t})})]}),d.jsx(r,{})]})},gh=({components:e,...t})=>d.jsx(mh,{components:e,children:d.jsx(o4,{...t})}),r4=({name:e,value:t})=>d.jsxs("div",{className:"io-profile-section-item",children:[d.jsx("div",{className:"io-profile-section-item-name",children:e}),d.jsx("div",{className:"io-profile-section-item-value",children:t})]}),Qx=({className:e,items:t,title:n})=>d.jsxs("div",{className:te("io-profile-section-body",e),children:[n&&d.jsx(bo,{className:"io-profile-section-title",text:n}),t.map(({name:o,value:r})=>d.jsx(r4,{name:o,value:r},o))]}),vh=({className:e,items:t,title:n})=>d.jsxs("section",{className:te("io-profile-section",e),children:[d.jsx(Qx,{items:t,title:n}),d.jsx(ms,{className:"mt-8"})]}),e2=({title:e="License",...t})=>d.jsx(vh,{title:e,...t}),t2=({title:e="Version",...t})=>d.jsx(vh,{title:e,...t}),n2=({title:e="Plugins",...t})=>d.jsx(vh,{title:e,...t}),o2=({className:e})=>{const t=Zo()?"io.Connect Desktop":"io.Connect Browser";return d.jsxs("div",{className:te("io-trademark-container",e),children:[d.jsx("h4",{className:"io-trademark-title",children:t}),d.jsxs("p",{className:"io-trademark-text",children:[t,"® is a registered trademark of"," ",d.jsx("a",{href:"https://www.interop.io",rel:"noreferrer",target:"_blank",children:"Interop Inc©"})," ",new Date().getFullYear(),". All rights reserved."]})]})},r2=({avatarInitials:e=Zo()?"CD":"CB",className:t,items:n,onLogout:o,title:r})=>d.jsxs("section",{className:te("io-profile-section",t),children:[d.jsxs("div",{className:"io-user-details-container",children:[d.jsx("div",{className:"io-user-avatar",children:e}),d.jsx(Qx,{className:"mt-12",items:n,title:r})]}),o&&d.jsx(Ze,{className:"io-log-out-button",onClick:o,variant:"primary",icon:"arrow-right-from-bracket",children:"Log out"}),d.jsx(ms,{className:"mt-8"})]}),i2={LicenseSection:e2,ProductsInfoSection:t2,PluginsSection:n2,Trademark:o2,UserSection:r2},a2=v.createContext(i2),s2=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...i2,...t}),[t]);return d.jsx(a2.Provider,{value:n,children:e})});s2.displayName="ProfilePanelComponentsStoreProvider";const i4=e=>{const t=new Date(e);return[{day:"numeric"},{month:"short"},{year:"numeric"}].map(n=>t.toLocaleDateString("en",n)).join(" ")},a4=e=>{if(!e)return{items:[]};const t=[...e.email?[{name:"Email",value:e.email}]:[],...e.type?[{name:"User Type",value:e.type}]:[],...e.role?[{name:"User Role",value:e.role}]:[],{name:"User ID",value:e.id}];if(e.firstName||e.lastName){const n=[e.firstName,e.lastName].filter(o=>!!o);return{avatarInitials:n.map(o=>o.charAt(0)).join(""),items:t,title:n.join(" ")}}return e.username?{avatarInitials:e.username.charAt(0),items:t,title:e.username}:e.email?{avatarInitials:e.email.charAt(0),items:t}:{items:t}},s4=e=>{const t=new Date(2023,5,6),n=e.expiration<t.getTime()?1e3:1;return{items:[{name:"Type",value:e.type},{name:"Expiration Date",value:i4(e.expiration*n)}]}},c4=e=>({items:e.map(t=>({name:t.name,value:t.version}))}),l4=e=>{var n;const t={"@interopio/workspaces-ui-react":"Workspaces React Frame","@interopio/workspaces-ui-web-components":"Workspaces Web Components Frame"};return{items:[{name:"io.Connect Browser platform",value:e.platform.apiVersion},{name:"io.Connect Browser client",value:e.client.apiVersion},...e.workspaces?[{name:"Workspaces API",value:e.workspaces.apiVersion}]:[],...(n=e.workspaces)!=null&&n.container&&yx(e.workspaces.container.type,t)?[{name:t[e.workspaces.container.type],value:e.workspaces.container.version}]:[],...e.home?[{name:"Home UI",value:e.home.version}]:[],...e.search?[{name:"Search API",value:e.search.apiVersion}]:[],...e.modals?[{name:"Modals API",value:e.modals.apiVersion}]:[]]}},u4=()=>{const e=window.glue42gd??window.iodesktop;if(!e)throw new Error("both window.glue42gd and window.iodesktop are not available");const{user:t,env:n}=e,o=[{name:"Environment",value:n.env},{name:"Region",value:n.region}];return t?{avatarInitials:t.charAt(0),items:o,title:t}:{items:o}},d4=e=>({items:Object.entries(e??{}).map(([n,o])=>({name:n,value:o}))}),p4=(e=[])=>({items:e.map(({product:t,version:n})=>({name:t,value:n}))}),f4=e=>Zo()?(async t=>{const{licInfo:n,productInfo:o}=(await t.interop.invoke("T42.GD.GetInfo")).returned;return{user:u4(),license:d4(n),productsInfo:p4(o)}})(e):(async()=>{if(!window.iobrowser)throw new Error("window.iobrowser is not available");const t=await window.iobrowser.system.getProfileData();return{user:a4(t.user),license:s4(t.license),plugins:c4(t.plugins),productsInfo:l4(t.productsInfo)}})(),h4=({className:e,onClose:t,onLogout:n,title:o="Profile",...r})=>{var h;const{LicenseSection:i,ProductsInfoSection:a,PluginsSection:s,Trademark:c,UserSection:l}=v.useContext(a2),u=v.useContext(Se.IOConnectContext),[p,f]=v.useState(null);return v.useEffect(()=>{u&&(async()=>{const m=await f4(u);f(m)})().catch(console.error)},[u]),d.jsxs(ze,{className:te("io-profile-panel",e),"data-testid":"profile-panel",...r,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:o}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:t})})]}),d.jsxs(Uo,{element:ze.Body,children:[p!=null&&p.user.items.length||p!=null&&p.user.title?d.jsx(l,{avatarInitials:p.user.avatarInitials,items:p.user.items,onLogout:n,title:p.user.title}):null,d.jsxs("div",{className:"io-profile-sections-container",children:[p!=null&&p.license.items.length?d.jsx(i,{items:p.license.items}):null,p!=null&&p.productsInfo.items.length?d.jsx(a,{items:p.productsInfo.items}):null,(h=p==null?void 0:p.plugins)!=null&&h.items.length?d.jsx(s,{items:p.plugins.items}):null]}),d.jsx(c,{className:"mt-auto"})]})]})},c2=({components:e,...t})=>d.jsx(s2,{components:e,children:d.jsx(h4,{...t})}),m4=document.querySelector("#root")??document.body,g4={preferences:Ax,"notification-settings":gh,profile:c2},v4=()=>{const{panel:e,deselectPanel:t}=Rw();Md(()=>{e&&t()},["Escape"]);const n=e?g4[e]:null;return n?Bo.createPortal(d.jsx("div",{className:"io-panel-overlay",children:d.jsx(n,{onClose:t})}),m4):null};var y4=Object.freeze({__proto__:null,ActivePanelRenderer:v4,PanelManagerProvider:({children:e})=>{const[t,n]=v.useState(null),o=v.useCallback(a=>{n(a)},[]),r=v.useCallback(()=>{n(null)},[]),i=v.useMemo(()=>({panel:t,selectPanel:o,deselectPanel:r}),[t,o,r]);return d.jsx(Tw.Provider,{value:i,children:e})},usePanelManagerContext:Rw});v.createContext({theme:"dark"});const b4="var(--io-neutrals-0)",Ku="var(--io-neutrals-900)";function l2(e){var r;let t,n,o;if(e.startsWith("#")){let i=e.slice(1);i.length===3&&(i=i.split("").map(a=>a+a).join("")),t=parseInt(i.substring(0,2),16),n=parseInt(i.substring(2,4),16),o=parseInt(i.substring(4,6),16)}else{if(!e.startsWith("rgb")){const i=document.createElement("canvas").getContext("2d");return i?(i.fillStyle=e,l2(i.fillStyle)):Ku}{const i=(r=e.match(/\d+/g))==null?void 0:r.map(Number);if(!i||i.length<3)return Ku;[t,n,o]=i}}return(.2126*t+.7152*n+.0722*o)/255>.5?Ku:b4}function w4({className:e,channel:t,...n}){const o=te("io-channel-badge",e),r=v.useMemo(()=>l2(t.color),[t.color]);return d.jsx("div",{className:o,style:{color:r,backgroundColor:t.color},"data-testid":`channel-selector-badge-${t.color}`,...n,children:d.jsx("span",{className:"io-channel-selector-badge-label","data-testid":"channel-selector-label",children:t.label})})}function x4(){return d.jsx(wt,{variant:"check","data-testid":"channel-selector-channel-selected"})}function C4({channel:e,handleChannelRestricted:t,lockedChannelRestriction:n}){const o=(r,i)=>a=>{a.stopPropagation(),Wn(a)&&(a.preventDefault(),i||t({...e,[r]:!e[r]}))};return d.jsxs(d.Fragment,{children:[d.jsx("div",{children:e.isSelected&&d.jsx("span",{"data-testid":"channel-selector-channel-selected",children:"Active"})}),d.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-publish-toggle-container",children:d.jsx(Pt,{label:"Publish",checked:e.write,onChange:()=>{t({...e,write:!e.write})},onKeyDown:o("write",!e.isSelected||(n==null?void 0:n.write)),onClick:r=>r.stopPropagation(),disabled:!e.isSelected||(n==null?void 0:n.write)})}),d.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-subscribe-toggle-container",children:d.jsx(Pt,{label:"Subscribe",checked:e.read,onChange:()=>{t({...e,read:!e.read})},onKeyDown:o("read",!e.isSelected||(n==null?void 0:n.read)),disabled:!e.isSelected||(n==null?void 0:n.read)})})]})}const u2=v.createContext({});function I4({channel:e,isSelected:t,onChannelSelect:n,onChannelRestrict:o,...r}){const{variant:i,selectedChannels:a,lockedChannelRestrictions:s}=v.useContext(u2),c=t||e.isSelected||(a==null?void 0:a.includes(e)),l=s==null?void 0:s.find(h=>h.name===e.name),u=v.useCallback(()=>n==null?void 0:n({...e,isSelected:!c}),[e,n,c]),p=v.useCallback(h=>{const m=h.target;m.closest(".io-toggle")||m.classList.contains("io-toggle")||Wn(h)&&(h.preventDefault(),n==null||n({...e,isSelected:!c}))},[e,n,c]),f=v.useCallback(h=>{o==null||o(h)},[o]);return d.jsx(El,{prepend:d.jsx(w4,{channel:e}),append:i==="single"||i==="multi"?c&&d.jsx(x4,{}):d.jsx(C4,{channel:e,handleChannelRestricted:f,lockedChannelRestriction:l}),isSelected:c,onClick:u,onKeyDown:p,...r,children:e.name},e.name)}function k4({variant:e,onVariantChange:t,disabled:n=!1}){const o=e==="directionalSingle"||e==="directionalMulti",r=v.useCallback(()=>{t==null||t(!o)},[o,t]),i=v.useCallback(s=>{s.stopPropagation()},[]),a=v.useCallback(s=>{s.stopPropagation(),Wn(s)&&(s.preventDefault(),n||r())},[n,r]);return d.jsx(Pt,{label:"Directional",align:"right",checked:o,onChange:r,onClick:i,onKeyDown:a,disabled:n,"data-testid":`channel-selector-toggle-${e}`})}const S4=v.forwardRef(({className:e,variant:t="single",variantToggle:n=!1,channels:o=[],lockedChannelRestrictions:r=[],onVariantChange:i,onChannelSelect:a,onChannelRestrict:s,...c},l)=>{const u=te("io-list-channels","io-channel-selector-panel",(t==="directionalSingle"||t==="directionalMulti")&&"io-list-channels-directional io-channel-selector-panel-directional",e),p=v.useMemo(()=>({variant:t,selectedChannels:o.filter(f=>f.isSelected),lockedChannelRestrictions:r,onVariantChange:i,onChannelSelect:a,onChannelRestrict:s}),[o,t,r,i,a,s]);return d.jsx(u2.Provider,{value:p,children:d.jsx("div",{className:u,ref:l,children:d.jsxs(Lt,{...c,children:[d.jsx(Lt.ItemTitle,{"data-testid":"channel-selector-title",append:n&&d.jsx(k4,{variant:t,onVariantChange:i}),children:{single:"Select Channel",directionalSingle:"Select Directional Channel",multi:"Select Channels",directionalMulti:"Select Directional Channels"}[t]}),o==null?void 0:o.map(f=>d.jsx(I4,{channel:f,isSelected:f.isSelected,onChannelSelect:a,onChannelRestrict:s,"data-testid":`channel-selector-channel-${f.name}`},f.name))]})})})});S4.displayName="ChannelSelector";const A4=v.forwardRef(({className:e,title:t,ariaLabel:n,onClick:o,onKeyDown:r,children:i,disabled:a=!1,...s},c)=>d.jsx("div",{ref:c,className:te(e,{disabled:a}),title:t,role:"button",tabIndex:a?-1:0,"aria-label":n,"aria-disabled":a,onClick:l=>{!a&&o&&o(l)},onKeyDown:l=>{!a&&r&&r(l)},...s,children:i}));A4.displayName="ChannelSelectorButtonWrapper";function E4({actionButtons:e,actionButtonElementsRefs:t,isAutofocusButton:n,isButtonDisabled:o,onButtonClick:r}){return d.jsx(We,{"data-testid":"io-dialog-action-buttons-group",align:"right",children:e.map((i,a)=>{const{id:s,text:c,variant:l}=i,u=n(s);return d.jsx(Ze,{"data-testid":`io-dialog-action-button-${s}`,id:s,ref:p=>{a===0&&(t.current=[]),t.current[a]=p},className:u?"io-focus-button":void 0,disabled:o(s),onClick:()=>r(i),variant:l,children:c},s)})})}function yh({actionButtons:e,children:t,onCompletion:n,size:o,title:r=Zo()?"io.Connect Desktop":"io.Connect Browser",validationErrors:i=[]}){const{actionButtonElementsRefs:a,autofocusButtonId:s,hasAutofocusButtonLostInitialFocus:c}=(p=>{const f=v.useRef([]),h=v.useMemo(()=>{var x;return((x=p.find(C=>C.autofocus))==null?void 0:x.id)??null},[p]),m=v.useRef(h),[g,y]=v.useState(!m.current);return v.useLayoutEffect(()=>{if(g)return;if(h!==m.current)return void y(!0);const x=f.current.find(w=>(w==null?void 0:w.id)===h);if(!x)return;x.focus();const C=()=>{y(!0)};return x.addEventListener("blur",C),()=>{x.removeEventListener("blur",C)}},[h,g]),{actionButtonElementsRefs:f,autofocusButtonId:h,hasAutofocusButtonLostInitialFocus:g}})(e),l=()=>{n({isClosed:!0})},u={...o};return d.jsxs(Vo,{className:"io-dialog-template",closeFn:l,isOpen:!0,onCancel:p=>{p.preventDefault(),l()},onKeyDown:p=>{!Wn(p)||i.length||p.target instanceof HTMLButtonElement||p.key===" "&&p.target instanceof HTMLInputElement||n({isEnterPressed:!0})},style:u,title:r,draggable:!0,children:[d.jsx(Vo.Body,{children:t}),d.jsx(Vo.Footer,{children:d.jsx(E4,{actionButtonElementsRefs:a,actionButtons:e,isAutofocusButton:p=>s===p&&!c,isButtonDisabled:p=>i.some(f=>f.disabledButtonIds.some(h=>h===p)),onButtonClick:({id:p,text:f})=>{n({responseButtonClicked:{id:p,text:f}})}})})]})}function bh({children:e}){return d.jsx("h1",{"data-testid":"io-dialog-heading",className:"io-dialog-template-heading",children:e})}function j4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,heading:r,text:i,title:a}=n;return d.jsx(yh,{actionButtons:o,onCompletion:e,size:t,title:a,children:d.jsx(Vo.Body.Content,{children:d.jsxs("div",{children:[d.jsx(bh,{children:r}),d.jsx("p",{"data-testid":"io-dialog-text",children:i})]})})})}function N4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,checkbox:r,heading:i,text:a,title:s}=n,[c,l]=v.useState(r.initialValue),u=v.useCallback(()=>l(f=>!f),[]),p=[{id:r.id,type:"checkbox",checked:c}];return d.jsxs(yh,{actionButtons:o,onCompletion:f=>e({...f,inputs:p}),size:t,title:s,children:[d.jsx(Vo.Body.Content,{children:d.jsxs("div",{children:[d.jsx(bh,{children:i}),d.jsx("p",{"data-testid":"io-dialog-text",children:a})]})}),d.jsx(Es,{"data-testid":`io-dialog-checkbox-${r.id}`,checked:c,id:r.id,label:r.label,name:r.id,onChange:u})]})}function P4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,heading:r,input:i,title:a}=n,[s,c]=v.useState(i.initialValue??""),l=v.useRef(null),u=(p=s,!(f=i.validation)||new RegExp(f.regexPattern).test(p)?null:{disabledButtonIds:f.disabledButtonIds,message:f.errorMessage});var p,f;const h=[{id:i.id,type:"text",value:s}];return v.useLayoutEffect(()=>{var m;(m=l.current)==null||m.select()},[]),d.jsxs(yh,{actionButtons:o,onCompletion:m=>e({...m,inputs:h}),size:t,title:a,validationErrors:u?[u]:[],children:[d.jsx(Vo.Body.Content,{children:d.jsx(bh,{children:r})}),d.jsx(qn,{"data-testid":`io-dialog-input-${i.id}`,ref:l,errorDataTestId:`io-dialog-input-${i.id}-error-message`,errorMessage:u==null?void 0:u.message,id:i.id,label:i.label,name:i.id,onChange:m=>c(m.target.value),placeholder:i.placeholder,type:"text",value:s})]})}const wh=$t({width:Xm,height:Xm}),xh=tp().andThen(e=>((t,n)=>{const o=typeof t;return o==="function"?tp():H3(`The argument provided as "${n}" must be a function, received: ${o}`)})(e,"onCompletion")),Ch=$t({autofocus:xe(pt()),id:ut,text:ut,variant:ys(U("default"),U("primary"),U("critical"),U("outline"),U("link"))}),O4=$t({disabledButtonIds:wo(ut),errorMessage:ut,regexPattern:ut}),T4=$t({actionButtons:wo(Ch),heading:ln(),text:ln(),title:xe(ln())}),R4=$t({templateName:U("noInputsConfirmationDialog"),onCompletion:xh,size:xe(wh),variables:T4}),L4=$t({actionButtons:wo(Ch),checkbox:$t({id:ut,initialValue:xe(pt()),label:xe(ln())}),heading:ln(),text:ln(),title:xe(ln())}),_4=$t({templateName:U("singleCheckboxDialog"),onCompletion:xh,size:xe(wh),variables:L4}),M4=$t({actionButtons:wo(Ch),heading:ln(),input:$t({id:ut,initialValue:xe(ln()),label:xe(ln()),placeholder:xe(ln()),validation:xe(O4)}),title:xe(ln())}),D4=$t({templateName:U("singleTextInputDialog"),onCompletion:xh,size:xe(wh),variables:M4});R4.runWithException,_4.runWithException,D4.runWithException;v.createContext({config:{message:""},theme:"dark",setResult:()=>{}});const B4={env:"",region:"",version:"",buildVersion:"",theme:"",isError:!1,mailingList:"",createJiraTicket:!0,sendEmail:!1,attachments:[],applicationTitle:"",allowEditRecipients:!0,attachmentsViewMode:"category",environmentInfo:"",selectedCategories:[],errorMessage:"",showEnvironmentInfo:!1,context:{},technicalInfo:"",sendEmailClient:"Outlook"},H4=v.createContext({config:B4,onThemeChanged:()=>{},openUrl:()=>{},submit:()=>Promise.resolve({}),setBounds:()=>{},close:()=>{},showMailingList:!0,setShowMailingList:()=>{},attachmentCategories:[],submitInProgress:!1,setSubmitInProgress:()=>{},submitStatus:{type:"success",title:"",text:""},setSubmitStatus:()=>{},submitCompleted:!1,setSubmitCompleted:()=>{},jiraTicketURL:"",setJiraTicketURL:()=>{},submitFeedback:()=>{}}),ro=()=>v.useContext(H4);function G4({...e}){const{config:t,close:n}=ro(),{applicationTitle:o}=t;return d.jsxs(cn,{draggable:!0,...e,children:[d.jsx(cn.Title,{tag:"h1",text:o?`Feedback Form - ${o}`:"Feedback Form",size:"large"}),d.jsx(cn.ButtonGroup,{className:"non-draggable",children:d.jsx(cn.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:()=>n()})})]})}function W4({className:e,handleSubmit:t,...n}){const o=te("io-panel-body",e),{config:r,submitFeedback:i}=ro(),{IntroField:a,DescriptionField:s,TechInfoField:c,EnvInfoField:l,FileAttachmentsField:u,CategoryAttachmentsField:p,MailListField:f}=cu(),h=t??i,m=`Your feedback will be submitted to the ${r.buildVersion} team and some additional information will be automatically included to help us examine your issue.`;return d.jsxs("form",{className:o,id:"feedback",onSubmit:h,...n,children:[d.jsx(a,{children:d.jsx("p",{children:m})}),d.jsx(f,{}),d.jsx(s,{}),d.jsx(c,{readOnly:!0}),d.jsx(l,{readOnly:!0}),r.attachmentsViewMode==="file"?d.jsx(u,{}):d.jsx(p,{})]})}function V4({...e}){const{FooterButtons:t}=cu(),{openUrl:n,submitInProgress:o,submitStatus:r,jiraTicketURL:i}=ro();return d.jsx(hr,{...e,children:d.jsxs("div",o?{className:"flex ai-center jc-between",children:[d.jsx(Je,{children:d.jsx("p",{children:r.title})}),d.jsx(L5,{align:"right",size:"small"})]}:{className:"flex ai-center jc-between",children:[d.jsxs(Je,{children:[d.jsx("p",{className:r.type==="error"?"io-text-error":"",children:r.title}),i&&d.jsx("a",{href:i,onClick:a=>{a.preventDefault(),n(i)},children:i})]}),d.jsx(t,{})]})})}function F4({className:e,...t}){const{CloseButton:n}=cu(),{close:o}=ro(),r=te("non-draggable",e);return d.jsx(We,{className:r,...t,children:d.jsx(n,{onClick:()=>o()})})}function z4({className:e,...t}){const{SubmitButton:n,CancelButton:o,CloseButton:r}=cu(),{close:i,submitCompleted:a}=ro();return a?d.jsx(We,{className:e,...t,children:d.jsx(r,{text:"Close",onClick:()=>i()})}):d.jsxs(We,{className:e,...t,children:[d.jsx(n,{}),d.jsx(o,{onClick:()=>i()})]})}function $4({text:e="Submit",...t}){return d.jsx(Ze,{form:"feedback",type:"submit",variant:"primary",text:e,...t})}function Z4({text:e="Cancel",...t}){return d.jsx(Ze,{variant:"link",text:e,...t})}function X4({...e}){return d.jsx(Ze,{variant:"primary",...e})}function U4({showField:e=!0,className:t,title:n,hint:o,children:r,...i}){return e?d.jsx(Je,{className:t,title:n,hint:o,...i,children:r}):null}function J4({showField:e=!0,className:t,title:n="Description",hint:o,readOnly:r=!1,disabled:i,...a}){return e?d.jsx(Je,{className:t,hint:o,title:"",...a,children:d.jsx(Ns,{id:"description",name:"description",label:n,readOnly:r,disabled:i})}):null}function Y4({showField:e,className:t,title:n="Technical Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:c}=ro(),l=e??c.errorMessage,u=r??c.errorMessage;return l&&u?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(Ns,{id:"errorMessage",name:"errorMessage",label:n,value:u,readOnly:i,disabled:a})}):null}function K4({showField:e,className:t,title:n="Environment Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:c}=ro(),l=e??c.showEnvironmentInfo,u=r??c.environmentInfo;return l&&u?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(Ns,{id:"environmentInfo",name:"environmentInfo",label:n,value:u,readOnly:i,disabled:a})}):null}function q4({showField:e=!0,className:t,title:n="Attachments",hint:o,readOnly:r=!1,disabled:i,attachments:a,selectedCategories:s,...c}){const l=te("io-block-list-gap",t),{config:u}=ro(),p=a??u.attachments,f=s??u.selectedCategories,h=v.useCallback(m=>!!f&&f.indexOf(m)!==-1,[f]);return e?!p||p.length<=0?d.jsx(Je,{title:"Attachments",children:d.jsx("p",{children:"No Attachments"})}):d.jsx(Je,{className:l,title:n,hint:o,...c,children:d.jsx("div",{className:"file-attachments",children:p.map(m=>d.jsx(Es,{id:m.id,name:m.id,label:m.name,readOnly:r,disabled:i,defaultChecked:h(m.category)},m.id))})}):null}function Q4({showField:e=!0,className:t,title:n="Attachments",hint:o,readOnly:r=!1,disabled:i,categories:a,selectedCategories:s,...c}){const{config:l,attachmentCategories:u}=ro(),p=a??u,f=s??l.selectedCategories,h=v.useCallback(m=>!!f&&f.indexOf(m)!==-1,[f]);return e?!p||p.length<=0?d.jsx("p",{children:"No Attachments"}):d.jsx(Je,{className:t,title:n,hint:o,...c,children:d.jsx("div",{className:"category-attachments",children:p.map(m=>d.jsx(Pt,{id:m,name:m,align:"right",label:m,readOnly:r,disabled:i,defaultChecked:h(m)},m))})}):null}function eE({className:e,title:t,hint:n,showField:o=!0,showJiraTicketField:r,jiraTicketLabel:i="Create Jira Ticket",showSendEmailField:a,sendEmailLabel:s="Send Email",readOnly:c=!1,disabled:l,...u}){const p=te("io-block-list-gap",e),{config:f,showMailingList:h,setShowMailingList:m}=ro();if(!o)return null;const g=r??f.createJiraTicket,y=a??f.sendEmail;return d.jsxs(Je,{className:p,hint:n,title:t,...u,children:[g&&d.jsx(Pt,{id:"createJiraTicket",name:"createJiraTicket",label:i,align:"right",readOnly:c,disabled:l,defaultChecked:g}),y&&d.jsx(Pt,{onChange:()=>{m(!h)},id:"sendEmail",name:"sendEmail",label:s,align:"right",readOnly:c,disabled:l,defaultChecked:y})]})}function tE({showField:e=!0,className:t,title:n="Email List",hint:o="Separate with commas or semicolons.",placeholder:r="john.doe@somedomain.com; jane.doe@otherdomain.com",readOnly:i,disabled:a,...s}){const{config:c,showMailingList:l}=ro(),u=e??c.sendEmail,p=i??c.allowEditRecipients===!1;return u&&l?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(qn,{id:"mailingList",name:"mailingList",label:n,placeholder:r,readOnly:p,disabled:a,defaultValue:c.mailingList??""})}):null}const d2={Header:G4,Body:W4,Footer:V4,HeaderButtons:F4,FooterButtons:z4,SubmitButton:$4,CancelButton:Z4,CloseButton:X4,IntroField:U4,DescriptionField:J4,TechInfoField:Y4,EnvInfoField:K4,FileAttachmentsField:q4,CategoryAttachmentsField:Q4,SettingsField:eE,MailListField:tE},p2=v.createContext(d2),nE=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...d2,...t}),[t]);return d.jsx(p2.Provider,{value:n,children:e})});function cu(e){return{...v.useContext(p2),...e}}nE.displayName="ComponentsStore";const oE=v.createContext({variant:"share-layout",id:void 0,name:"",setName:()=>{},viewers:[],setViewers:()=>{},editors:[],setEditors:()=>{},publishWithContext:!1,setPublishWithContext:()=>{},updateWorkspaceSettings:!1,setUpdateWorkspaceSettings:()=>{},keepPrivateCopy:!0,setKeepPrivateCopy:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},folder:"",setFolder:()=>{},icon:"",setIcon:()=>{},description:"",setDescription:()=>{},hasChanges:!1,canPublish:!1,canUpdate:!1,sharingValidationError:void 0,publish:()=>{},applySettings:()=>{},close:()=>{}}),Kt=()=>v.useContext(oE);function A0(e){return e.startsWith("manage-")?"Manage":e.startsWith("details-")?"Details":e.startsWith("edit-")?"Edit":"Publish"}function rE({title:e,...t}){const{HeaderButtons:n}=pa(),{variant:o,name:r}=Kt(),i=e??(r?`${A0(o)} "${r}"`:function(a){return`${A0(a)} ${a.endsWith("-workspace")?"Workspace":"Layout"}`}(o));return d.jsxs(cn,{draggable:!0,...t,children:[d.jsx(cn.Title,{tag:"h1",text:i,size:"large"}),d.jsx(n,{})]})}function iE({className:e,onSubmit:t,...n}){const o=te("io-panel-body",e),{Name:r,Viewers:i,Editors:a,Folder:s,Icon:c,Description:l,KeepPrivateCopy:u}=pa(),{variant:p}=Kt(),f=p.startsWith("share-"),h=p.startsWith("details-"),m=p.startsWith("edit-");return d.jsx(Uo,{children:d.jsx("form",{className:o,onSubmit:g=>{g.preventDefault(),t==null||t(g)},...n,children:d.jsxs(d.Fragment,m?{children:[d.jsx(r,{}),d.jsx(s,{}),d.jsx(c,{}),d.jsx(l,{})]}:{children:[!h&&d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),h&&d.jsx(l,{}),f&&d.jsx(u,{})]})})})}function aE({...e}){const{FooterButtons:t}=pa(),{sharingValidationError:n}=Kt();return d.jsxs(hr,{...e,children:[n&&d.jsxs("p",{className:"io-layout-sharing-validation-error",children:[d.jsx(wt,{variant:"circle-info"}),n]}),d.jsx(t,{})]})}function sE({className:e,title:t="Additional Settings",...n}){const o=te("io-layout-sharing-settings-panel",e),{folder:r,icon:i,description:a,applySettings:s,hideSettings:c,close:l}=Kt(),{Folder:u,Icon:p,Description:f}=pa(),[h,m]=v.useState(r),[g,y]=v.useState(i),[x,C]=v.useState(a);return d.jsxs(ze,{className:o,...n,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"arrow-left-long",size:"32",onClick:c}),d.jsx(ze.Header.Title,{tag:"h1",text:t,size:"large"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:l})})]}),d.jsxs(Uo,{element:ze.Body,children:[d.jsx(u,{value:h,onChange:w=>m(w.target.value)}),d.jsx(p,{value:g,onChange:w=>y(w.target.value)}),d.jsx(f,{value:x,onChange:w=>C(w.target.value)})]}),d.jsx(ze.Footer,{children:d.jsx(We,{align:"right",children:d.jsx(Ze,{variant:"primary",text:"Apply",onClick:()=>s(h,g,x)})})})]})}function cE({className:e,...t}){const n=te("non-draggable",e),{HeaderCloseButton:o}=pa();return d.jsx(We,{className:n,...t,children:d.jsx(o,{})})}function lE({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const{close:i}=Kt();return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:o??i,...r})}function uE({className:e,...t}){const n=te("flex ai-center jc-between",e),{MoreSettingsButton:o,PublishButton:r,UpdateButton:i,CloseButton:a}=pa(),{variant:s}=Kt(),c=s.startsWith("manage-"),l=s.startsWith("edit-"),u=c||l;return d.jsxs("div",{className:n,...t,children:[d.jsx(o,{}),d.jsxs(We,{align:"right",children:[d.jsx(u?i:r,{}),d.jsx(a,{})]})]})}function dE({showButton:e,variant:t="link",text:n="More settings",onClick:o,...r}){const{variant:i,showSettings:a}=Kt(),s=i.startsWith("details-"),c=i.startsWith("edit-");return e??(!s&&!c)?d.jsx(Ze,{variant:t,text:n,onClick:o??a,...r}):null}function pE({showButton:e,variant:t="primary",text:n="Publish",onClick:o,disabled:r,...i}){const{variant:a,publish:s,canPublish:c}=Kt(),l=a.startsWith("details-");return e??!l?d.jsx(Ze,{variant:t,text:n,onClick:o??s,disabled:r??!c,...i}):null}function fE({showButton:e,variant:t="primary",text:n="Update",onClick:o,disabled:r,...i}){const{publish:a,canUpdate:s}=Kt();return e??!0?d.jsx(Ze,{variant:t,text:n,onClick:o??a,disabled:r??!s,...i}):null}function hE({text:e="Close",variant:t="outline",onClick:n,...o}){const{close:r}=Kt();return d.jsx(Ze,{variant:t,text:e,onClick:n??r,...o})}const mE={"share-layout":"Enter a Layout name","manage-layout":"Saved Layout name","share-workspace":"Enter a Workspace name","manage-workspace":"Saved Workspace name"};function gE({id:e="layout-sharing-name",label:t="Name",placeholder:n,value:o,showField:r=!0,readOnly:i,disabled:a,...s}){const{variant:c,name:l,setName:u}=Kt(),p=c.startsWith("manage-");if(!r)return null;const f=n??mE[c]??"",h=!p;return d.jsxs(Je,{className:"io-layout-sharing-name-field",children:[d.jsxs("div",{className:"flex ai-center jc-between",children:[d.jsx("label",{htmlFor:e,children:t}),h&&d.jsxs("p",{children:["Required ",d.jsx("span",{className:"io-text-danger",children:"*"})]})]}),d.jsx(qn,{id:e,name:e,required:h,placeholder:f,value:o??l,onChange:m=>u(m.target.value),readOnly:i,disabled:a,...s})]})}function f2(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(!1),[o,r]=v.useState(!0);v.useEffect(()=>{if(r(!0),!e)return console.warn("useManagerQueryUsers: io context is not available."),void r(!1);const a=e==null?void 0:e.manager;if(!(a!=null&&a.checkCapability))return console.warn("useManagerQueryUsers: io.manager.checkCapability is not available."),void r(!1);let s=!1;return(async()=>{try{const[c,l]=await Promise.all([a.checkCapability("ADVANCED_LAYOUTS"),a.checkCapability("API_METHOD_USERS_QUERY")]);if(s)return;n((c==null?void 0:c.available)===!0&&(l==null?void 0:l.available)===!0)}catch(c){if(s)return;console.error("useManagerQueryUsers: Failed to check capabilities.",c),n(!1)}finally{s||r(!1)}})(),()=>{s=!0}},[e]);const i=v.useCallback(async a=>t?(e==null?void 0:e.manager).users.query(a):(console.warn("useManagerQueryUsers: Required capabilities are not available."),{users:[]}),[e,t]);return{isSupported:t,isLoading:o,queryUsers:i}}function h2(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(!1),[o,r]=v.useState(!0);v.useEffect(()=>{if(r(!0),!e)return console.warn("useManagerQueryGroups: io context is not available."),void r(!1);const a=e==null?void 0:e.manager;if(!(a!=null&&a.checkCapability))return console.warn("useManagerQueryGroups: io.manager.checkCapability is not available."),void r(!1);let s=!1;return(async()=>{try{const[c,l]=await Promise.all([a.checkCapability("ADVANCED_LAYOUTS"),a.checkCapability("API_METHOD_GROUPS_QUERY")]);if(s)return;n((c==null?void 0:c.available)===!0&&(l==null?void 0:l.available)===!0)}catch(c){if(s)return;console.error("useManagerQueryGroups: Failed to check capabilities.",c),n(!1)}finally{s||r(!1)}})(),()=>{s=!0}},[e]);const i=v.useCallback(async a=>t?(e==null?void 0:e.manager).groups.query(a):(console.warn("useManagerQueryGroups: Required capabilities are not available."),{groups:[]}),[e,t]);return{isSupported:t,isLoading:o,queryGroups:i}}const vE=e=>d.jsx("div",{className:e.hasValue?"io-layout-sharing-users-with-access-input":void 0,style:e.hasValue?void 0:{display:"contents"},children:d.jsx(uh.Input,{...e,placeholder:e.hasValue?e.selectProps.placeholder:void 0})});function yE({id:e="layout-sharing-users-with-access",label:t="Viewers",placeholder:n="Add a user name or user group",options:o=[],value:r,showField:i=!0,disabled:a,...s}){const{variant:c,viewers:l,setViewers:u}=Kt(),[p,f]=v.useState(""),h=c.startsWith("details-"),{isSupported:m,isLoading:g,queryUsers:y}=f2(),{isSupported:x,isLoading:C,queryGroups:w}=h2(),[I,b]=v.useState([]),[k,S]=v.useState([]),[E,O]=v.useState(!1),A=ru(p,400),N=m||x||g||C;return v.useEffect(()=>{O(p.length>=3&&N)},[p,N]),v.useEffect(()=>{if(A.length<3)return b([]),void S([]);let j=!1;const G=[];return m&&G.push(y({name:A}).then(M=>{j||b(M.users.map(T=>({value:T.id,label:T.id,entityType:"user"})))}).catch(()=>{j||b([])})),x&&G.push(w({name:A}).then(M=>{j||S(M.groups.map(T=>({value:T.name,label:T.name,entityType:"group"})))}).catch(()=>{j||S([])})),Promise.allSettled(G).then(()=>{j||O(!1)}),()=>{j=!0}},[A,m,x,y,w]),i?d.jsxs(Je,{className:"io-layout-sharing-users-with-access-field",style:h?{pointerEvents:"none"}:void 0,children:[d.jsx("div",{className:"flex ai-center jc-between",children:d.jsx("label",{htmlFor:e,children:t})}),d.jsx(dh,{isMulti:!0,isSearchable:!0,id:e,name:e,placeholder:n,options:N?[...I,...k]:o,menuIsOpen:N?p.length>=3:void 0,value:r??l,onChange:j=>u(j),onInputChange:f,backspaceRemovesValue:!1,isLoading:E,components:{...h?{}:{Input:vE},DropdownIndicator:null},disabled:a,...s})]}):null}const bE=e=>d.jsx("div",{className:e.hasValue?"io-layout-sharing-users-with-access-input":void 0,style:e.hasValue?void 0:{display:"contents"},children:d.jsx(uh.Input,{...e,placeholder:e.hasValue?e.selectProps.placeholder:void 0})});function wE({id:e="layout-sharing-users-with-edit-permissions",label:t="Editors",placeholder:n="Add a user name or user group",options:o=[],value:r,showField:i=!0,disabled:a,...s}){const{variant:c,editors:l,setEditors:u}=Kt(),[p,f]=v.useState(""),h=c.startsWith("details-"),{isSupported:m,isLoading:g,queryUsers:y}=f2(),{isSupported:x,isLoading:C,queryGroups:w}=h2(),[I,b]=v.useState([]),[k,S]=v.useState([]),[E,O]=v.useState(!1),A=ru(p,400),N=m||x||g||C;return v.useEffect(()=>{O(p.length>=3&&N)},[p,N]),v.useEffect(()=>{if(A.length<3)return b([]),void S([]);let j=!1;const G=[];return m&&G.push(y({name:A}).then(M=>{j||b(M.users.map(T=>({value:T.id,label:T.id,entityType:"user"})))}).catch(()=>{j||b([])})),x&&G.push(w({name:A}).then(M=>{j||S(M.groups.map(T=>({value:T.name,label:T.name,entityType:"group"})))}).catch(()=>{j||S([])})),Promise.allSettled(G).then(()=>{j||O(!1)}),()=>{j=!0}},[A,m,x,y,w]),i?d.jsxs(Je,{className:"io-layout-sharing-users-with-edit-permissions-field",style:h?{pointerEvents:"none"}:void 0,children:[d.jsx("div",{className:"flex ai-center jc-between",children:d.jsx("label",{htmlFor:e,children:t})}),d.jsx(dh,{isMulti:!0,isSearchable:!0,id:e,name:e,placeholder:n,options:N?[...I,...k]:o,menuIsOpen:N?p.length>=3:void 0,value:r??l,onChange:j=>u(j),onInputChange:f,backspaceRemovesValue:!1,isLoading:E,components:{...h?{}:{Input:bE},DropdownIndicator:null},disabled:a,...s})]}):null}function xE({id:e="layout-sharing-folder",label:t="Folder",placeholder:n="Enter folder name",value:o,showField:r=!0,...i}){const{folder:a,setFolder:s}=Kt();return r?d.jsx(qn,{id:e,name:e,label:t,placeholder:n,value:o??a,onChange:c=>s(c.target.value),...i}):null}function CE({id:e="layout-sharing-icon",label:t="Icon",placeholder:n="Paste an icon URL",value:o,showField:r=!0,...i}){const{icon:a,setIcon:s}=Kt();return r?d.jsx(qn,{id:e,name:e,label:t,placeholder:n,value:o??a,onChange:c=>s(c.target.value),...i}):null}function IE({id:e="layout-sharing-description",label:t="Description",placeholder:n,value:o,showField:r=!0,...i}){const{variant:a,description:s,setDescription:c}=Kt(),l=a.startsWith("details-"),u=n??(a.includes("workspace")?"Enter a Workspace description":"Enter a Layout description");return r?d.jsx(Ns,{id:e,style:l?{pointerEvents:"none"}:void 0,name:e,label:t,placeholder:u,value:o??s,onChange:p=>c(p.target.value),readOnly:l,...i}):null}function kE({id:e="layout-sharing-keep-private-copy",label:t="Keep a private copy",showField:n=!0,...o}){const{keepPrivateCopy:r,setKeepPrivateCopy:i}=Kt();return n?d.jsx(Je,{className:"io-layout-sharing-keep-private-copy-field",children:d.jsx(Pt,{id:e,name:e,label:t,checked:r,onChange:a=>i(a.target.checked),...o})}):null}const m2={Header:rE,Body:iE,Footer:aE,Settings:sE,HeaderButtons:cE,HeaderCloseButton:lE,FooterButtons:uE,MoreSettingsButton:dE,PublishButton:pE,UpdateButton:fE,CloseButton:hE,Name:gE,Viewers:yE,Editors:wE,Folder:xE,Icon:CE,Description:IE,KeepPrivateCopy:kE},g2=v.createContext(m2),SE=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...m2,...t}),[t]);return d.jsx(g2.Provider,{value:n,children:e})});function pa(e){return{...v.useContext(g2),...e}}SE.displayName="ComponentsStore";var E0,Tp={exports:{}},qu={exports:{}},et={},j0,N0,Qu,P0,O0,T0,R0,L0,_0,M0,ed,D0,td,B0,st={};/** @license React v16.13.1
28
+ `]))),Fu=function(e){var t=e.delay,n=e.offset;return Ie("span",{css:uh({animation:"".concat(uA," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},dA=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ie("div",je({ref:r},xt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},pA=["data"],fA=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,c=e.label,l=e.theme,u=e.selectProps;return Ie("div",je({},xt(e,"group",{group:!0}),s),Ie(i,je({},a,{selectProps:u,theme:l,getStyles:o,getClassNames:r,cx:n}),c),Ie("div",null,t))},hA=["innerRef","isDisabled","isHidden","inputClassName"],Iw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mA={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ae({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Iw)},gA=function(e){return Ae({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Iw)},vA=function(e){var t=e.cx,n=e.value,o=mw(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,c=Wo(o,hA);return Ie("div",je({},xt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ie("input",je({className:t({input:!0},s),ref:r,style:gA(a),disabled:i},c)))},a0=function(e){var t=e.children,n=e.innerProps;return Ie("div",n,t)},yA=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,c=n.Container,l=n.Label,u=n.Remove;return Ie(c,{data:o,innerProps:Ae(Ae({},xt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Ie(l,{data:o,innerProps:Ae({},xt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ie(u,{data:o,innerProps:Ae(Ae({},xt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},bA=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Ie("div",je({},xt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},wA=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Ie("div",je({},xt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},dh={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ie(Vu,null))},Control:dA,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ie(i0,null))},DownChevron:i0,CrossIcon:Vu,Group:fA,GroupHeading:function(e){var t=mw(e);t.data;var n=Wo(t,pA);return Ie("div",je({},xt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ie("span",je({},t,xt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:vA,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=o===void 0?4:o,i=Wo(e,aA);return Ie("div",je({},xt(Ae(Ae({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ie(Fu,{delay:0,offset:n}),Ie(Fu,{delay:160,offset:!0}),Ie(Fu,{delay:320,offset:!n}))},Menu:nA,MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Ie("div",je({},xt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=v.useRef(null),c=v.useRef(null),l=Fo(v.useState(yw(i)),2),u=l[0],p=l[1],f=v.useMemo(function(){return{setPortalPlacement:p}},[]),h=Fo(v.useState(null),2),m=h[0],g=h[1],y=v.useCallback(function(){if(o){var I=function(S){var E=S.getBoundingClientRect();return{bottom:E.bottom,height:E.height,left:E.left,right:E.right,top:E.top,width:E.width}}(o),b=a==="fixed"?0:window.pageYOffset,k=I[u]+b;k===(m==null?void 0:m.offset)&&I.left===(m==null?void 0:m.rect.left)&&I.width===(m==null?void 0:m.rect.width)||g({offset:k,rect:I})}},[o,a,u,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);jp(function(){y()},[y]);var x=v.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),o&&s.current&&(c.current=Ny(o,s.current,y,{elementResize:"ResizeObserver"in window}))},[o,y]);jp(function(){x()},[x]);var C=v.useCallback(function(I){s.current=I,x()},[x]);if(!t&&a!=="fixed"||!m)return null;var w=Ie("div",je({ref:C},xt(Ae(Ae({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Ie(bw.Provider,{value:f},t?Bo.createPortal(w,t):w)},LoadingMessage:function(e){var t=e.children,n=t===void 0?"Loading...":t,o=e.innerProps,r=Wo(e,QS);return Ie("div",je({},xt(Ae(Ae({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=t===void 0?"No options":t,o=e.innerProps,r=Wo(e,qS);return Ie("div",je({},xt(Ae(Ae({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:yA,MultiValueContainer:a0,MultiValueLabel:a0,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({role:"button"},n),t||Ie(Vu,{size:14}))},Option:bA,Placeholder:function(e){var t=e.children,n=e.innerProps;return Ie("div",je({},xt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Ie("div",je({},xt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:wA,ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Ie("div",je({},xt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},s0=Number.isNaN||function(e){return typeof e=="number"&&e!=e};function xA(e,t){return e===t||!(!s0(e)||!s0(t))}function CA(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xA(e[n],t[n]))return!1;return!0}for(var IA=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},c0=function(e){return Ie("span",je({css:IA},e))},kA={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=n===void 0?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=r===void 0?"":r,a=e.selectValue,s=e.isDisabled,c=e.isSelected,l=e.isAppleDevice,u=function(h,m){return h&&h.length?"".concat(h.indexOf(m)+1," of ").concat(h.length):""};if(t==="value"&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if(t==="menu"&&l){var p=s?" disabled":"",f="".concat(c?" selected":"").concat(p);return"".concat(i).concat(f,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},SA=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,c=e.id,l=e.isAppleDevice,u=s.ariaLiveMessages,p=s.getOptionLabel,f=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,g=s.isSearchable,y=s.menuIsOpen,x=s.options,C=s.screenReaderStatus,w=s.tabSelectsValue,I=s.isLoading,b=s["aria-label"],k=s["aria-live"],S=v.useMemo(function(){return Ae(Ae({},kA),u||{})},[u]),E=v.useMemo(function(){var M,T="";if(t&&S.onChange){var H=t.option,V=t.options,z=t.removedValue,O=t.removedValues,B=t.value,F=z||H||(M=B,Array.isArray(M)?null:M),$=F?p(F):"",Z=V||O||void 0,_=Z?Z.map(p):[],R=Ae({isDisabled:F&&m(F,a),label:$,labels:_},t);T=S.onChange(R)}return T},[t,S,m,a,p]),N=v.useMemo(function(){var M="",T=n||o,H=!!(n&&a&&a.includes(n));if(T&&S.onFocus){var V={focused:T,label:p(T),isDisabled:m(T,a),isSelected:H,options:r,context:T===n?"menu":"value",selectValue:a,isAppleDevice:l};M=S.onFocus(V)}return M},[n,o,p,m,S,r,a,l]),A=v.useMemo(function(){var M="";if(y&&x.length&&!I&&S.onFilter){var T=C({count:r.length});M=S.onFilter({inputValue:f,resultsMessage:T})}return M},[r,f,y,S,x,C,I]),P=(t==null?void 0:t.action)==="initial-input-focus",j=v.useMemo(function(){var M="";if(S.guidance){var T=o?"value":y?"menu":"input";M=S.guidance({"aria-label":b,context:T,isDisabled:n&&m(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:P})}return M},[b,n,o,h,m,g,y,S,a,w,P]),G=Ie(v.Fragment,null,Ie("span",{id:"aria-selection"},E),Ie("span",{id:"aria-focused"},N),Ie("span",{id:"aria-results"},A),Ie("span",{id:"aria-guidance"},j));return Ie(v.Fragment,null,Ie(c0,{id:c},P&&G),Ie(c0,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!P&&G))},zu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],AA=new RegExp("["+zu.map(function(e){return e.letters}).join("")+"]","g"),kw={},$u=0;$u<zu.length;$u++)for(var Zu=zu[$u],Xu=0;Xu<Zu.letters.length;Xu++)kw[Zu.letters[Xu]]=Zu.base;var Sw=function(e){return e.replace(AA,function(t){return kw[t]})},EA=function(e,t){t===void 0&&(t=CA);var n=null;function o(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return o.clear=function(){n=null},o}(Sw),l0=function(e){return e.replace(/^\s+|\s+$/g,"")},jA=function(e){return"".concat(e.label," ").concat(e.value)},PA=["innerRef"];function NA(e){var t=e.innerRef,n=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s=Object.entries(o).filter(function(c){var l=Fo(c,1)[0];return!i.includes(l)});return s.reduce(function(c,l){var u=Fo(l,2),p=u[0],f=u[1];return c[p]=f,c},{})}(Wo(e,PA),"onExited","in","enter","exit","appear");return Ie("input",je({ref:t},n,{css:uh({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var u0=["boxSizing","height","overflow","paddingRight","position"],d0={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function p0(e){e.cancelable&&e.preventDefault()}function f0(e){e.stopPropagation()}function h0(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function m0(){return"ontouchstart"in window||navigator.maxTouchPoints}var g0=!(typeof window>"u"||!window.document||!window.document.createElement),xa=0,Ci={capture:!1,passive:!1},OA=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},TA=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function RA(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(a){var s=a.isEnabled,c=a.onBottomArrive,l=a.onBottomLeave,u=a.onTopArrive,p=a.onTopLeave,f=v.useRef(!1),h=v.useRef(!1),m=v.useRef(0),g=v.useRef(null),y=v.useCallback(function(k,S){if(g.current!==null){var E=g.current,N=E.scrollTop,A=E.scrollHeight,P=E.clientHeight,j=g.current,G=S>0,M=A-P-N,T=!1;M>S&&f.current&&(l&&l(k),f.current=!1),G&&h.current&&(p&&p(k),h.current=!1),G&&S>M?(c&&!f.current&&c(k),j.scrollTop=A,T=!0,f.current=!0):!G&&-S>N&&(u&&!h.current&&u(k),j.scrollTop=0,T=!0,h.current=!0),T&&function(H){H.cancelable&&H.preventDefault(),H.stopPropagation()}(k)}},[c,l,u,p]),x=v.useCallback(function(k){y(k,k.deltaY)},[y]),C=v.useCallback(function(k){m.current=k.changedTouches[0].clientY},[]),w=v.useCallback(function(k){var S=m.current-k.changedTouches[0].clientY;y(k,S)},[y]),I=v.useCallback(function(k){if(k){var S=!!YS&&{passive:!1};k.addEventListener("wheel",x,S),k.addEventListener("touchstart",C,S),k.addEventListener("touchmove",w,S)}},[w,C,x]),b=v.useCallback(function(k){k&&(k.removeEventListener("wheel",x,!1),k.removeEventListener("touchstart",C,!1),k.removeEventListener("touchmove",w,!1))},[w,C,x]);return v.useEffect(function(){if(s){var k=g.current;return I(k),function(){b(k)}}},[s,I,b]),function(k){g.current=k}}({isEnabled:o===void 0||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(a){var s=a.isEnabled,c=a.accountForScrollbars,l=c===void 0||c,u=v.useRef({}),p=v.useRef(null),f=v.useCallback(function(m){if(g0){var g=document.body,y=g&&g.style;if(l&&u0.forEach(function(I){var b=y&&y[I];u.current[I]=b}),l&&xa<1){var x=parseInt(u.current.paddingRight,10)||0,C=document.body?document.body.clientWidth:0,w=window.innerWidth-C+x||0;Object.keys(d0).forEach(function(I){var b=d0[I];y&&(y[I]=b)}),y&&(y.paddingRight="".concat(w,"px"))}g&&m0()&&(g.addEventListener("touchmove",p0,Ci),m&&(m.addEventListener("touchstart",h0,Ci),m.addEventListener("touchmove",f0,Ci))),xa+=1}},[l]),h=v.useCallback(function(m){if(g0){var g=document.body,y=g&&g.style;xa=Math.max(xa-1,0),l&&xa<1&&u0.forEach(function(x){var C=u.current[x];y&&(y[x]=C)}),g&&m0()&&(g.removeEventListener("touchmove",p0,Ci),m&&(m.removeEventListener("touchstart",h0,Ci),m.removeEventListener("touchmove",f0,Ci)))}},[l]);return v.useEffect(function(){if(s){var m=p.current;return f(m),function(){h(m)}}},[s,f,h]),function(m){p.current=m}}({isEnabled:n});return Ie(v.Fragment,null,n&&Ie("div",{onClick:OA,css:TA}),t(function(a){r(a),i(a)}))}var LA=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},_A=function(e){var t=e.name,n=e.onFocus;return Ie("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:LA,value:"",onChange:function(){}})};function Pp(e){var t;return typeof window<"u"&&window.navigator!=null&&e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform)}function Aw(){return Pp(/^Mac/i)}function MA(){return Pp(/^iPhone/i)||Pp(/^iPad/i)||Aw()&&navigator.maxTouchPoints>1}var DA={clearIndicator:lA,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return Ae({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:cA,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return Ae({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Ae({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return Ae(Ae({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},mA),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return Ae({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:rA,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return Ae((Ma(n={label:"menu"},function(c){return c?{bottom:"top",top:"bottom"}[c]:"bottom"}(o),"100%"),Ma(n,"position","absolute"),Ma(n,"width","100%"),Ma(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return Ae({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return Ae({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return Ae({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return Ae({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:oA,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return Ae({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return Ae({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return Ae({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Ae({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Uu={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},BA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:o0(),captureMenuScroll:!o0(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var o=Ae({ignoreCase:!0,ignoreAccents:!0,stringify:jA,trim:!0,matchFrom:"any"},e),r=o.ignoreCase,i=o.ignoreAccents,a=o.stringify,s=o.trim,c=o.matchFrom,l=s?l0(n):n,u=s?l0(a(t)):a(t);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),i&&(l=EA(l),u=Sw(u)),c==="start"?u.substr(0,l.length)===l:u.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function v0(e,t,n,o){return{type:"option",data:t,isDisabled:jw(e,t,n),isSelected:Pw(e,t,n),label:Ew(e,t),value:dl(e,t),index:o}}function ac(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(a,s){return v0(e,a,t,s)}).filter(function(a){return w0(e,a)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=v0(e,n,t,o);return w0(e,i)?i:void 0}).filter(KS)}function y0(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ah(n.options.map(function(o){return o.data}))):t.push(n.data),t},[])}function b0(e,t){return e.reduce(function(n,o){return o.type==="group"?n.push.apply(n,ah(o.options.map(function(r){return{data:r.data,id:"".concat(t,"-").concat(o.index,"-").concat(r.index)}}))):n.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),n},[])}function w0(e,t){var n=e.inputValue,o=n===void 0?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!Ow(e)||!i)&&Nw(e,{label:a,value:s,data:r},o)}var Ju=function(e,t){var n;return((n=e.find(function(o){return o.data===t}))===null||n===void 0?void 0:n.id)||null},Ew=function(e,t){return e.getOptionLabel(t)},dl=function(e,t){return e.getOptionValue(t)};function jw(e,t,n){return typeof e.isOptionDisabled=="function"&&e.isOptionDisabled(t,n)}function Pw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var o=dl(e,t);return n.some(function(r){return dl(e,r)===o})}function Nw(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Ow=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},HA=1,Tw=function(){(function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&al(n,o)})(t,v.Component);var e=function(n){var o=nw();return function(){var r,i=sl(n);if(o){var a=sl(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return bS(this,r)}}(t);function t(n){var o;if(function(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}(this,t),(o=e.call(this,n)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(s){o.controlRef=s},o.focusedOptionRef=null,o.getFocusedOptionRef=function(s){o.focusedOptionRef=s},o.menuListRef=null,o.getMenuListRef=function(s){o.menuListRef=s},o.inputRef=null,o.getInputRef=function(s){o.inputRef=s},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(s,c){var l=o.props,u=l.onChange,p=l.name;c.name=p,o.ariaOnChange(s,c),u(s,c)},o.setValue=function(s,c,l){var u=o.props,p=u.closeMenuOnSelect,f=u.isMulti,h=u.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:h}),p&&(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(s,{action:c,option:l})},o.selectOption=function(s){var c=o.props,l=c.blurInputOnSelect,u=c.isMulti,p=c.name,f=o.state.selectValue,h=u&&o.isOptionSelected(s,f),m=o.isOptionDisabled(s,f);if(h){var g=o.getOptionValue(s);o.setValue(f.filter(function(y){return o.getOptionValue(y)!==g}),"deselect-option",s)}else{if(m)return void o.ariaOnChange(s,{action:"select-option",option:s,name:p});u?o.setValue([].concat(ah(f),[s]),"select-option",s):o.setValue(s,"select-option")}l&&o.blurInput()},o.removeValue=function(s){var c=o.props.isMulti,l=o.state.selectValue,u=o.getOptionValue(s),p=l.filter(function(h){return o.getOptionValue(h)!==u}),f=ic(c,p,p[0]||null);o.onChange(f,{action:"remove-value",removedValue:s}),o.focusInput()},o.clearValue=function(){var s=o.state.selectValue;o.onChange(ic(o.props.isMulti,[],null),{action:"clear",removedValues:s})},o.popValue=function(){var s=o.props.isMulti,c=o.state.selectValue,l=c[c.length-1],u=c.slice(0,c.length-1),p=ic(s,u,u[0]||null);l&&o.onChange(p,{action:"pop-value",removedValue:l})},o.getFocusedOptionId=function(s){return Ju(o.state.focusableOptionsWithIds,s)},o.getFocusableOptionsWithIds=function(){return b0(ac(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return US.apply(void 0,[o.props.classNamePrefix].concat(c))},o.getOptionLabel=function(s){return Ew(o.props,s)},o.getOptionValue=function(s){return dl(o.props,s)},o.getStyles=function(s,c){var l=o.props.unstyled,u=DA[s](c,l);u.boxSizing="border-box";var p=o.props.styles[s];return p?p(u,c):u},o.getClassNames=function(s,c){var l,u;return(l=(u=o.props.classNames)[s])===null||l===void 0?void 0:l.call(u,c)},o.getElementId=function(s){return"".concat(o.state.instancePrefix,"-").concat(s)},o.getComponents=function(){return s=o.props,Ae(Ae({},dh),s.components);var s},o.buildCategorizedOptions=function(){return ac(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return y0(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(s,c){o.setState({ariaSelection:Ae({value:s},c)})},o.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(s){o.blockOptionHover=!1},o.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&o.onMenuClose():c&&o.openMenu("first"):(c&&(o.openAfterFocus=!0),o.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},o.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0||o.props.isDisabled)){var c=o.props,l=c.isMulti,u=c.menuIsOpen;o.focusInput(),u?(o.setState({inputIsHiddenAfterUpdate:!l}),o.onMenuClose()):o.openMenu("first"),s.preventDefault()}},o.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(o.clearValue(),s.preventDefault(),o.openAfterFocus=!1,s.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(s){typeof o.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&ou(s.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(s)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(s){var c=s.touches,l=c&&c.item(0);l&&(o.initialTouchX=l.clientX,o.initialTouchY=l.clientY,o.userIsDragging=!1)},o.onTouchMove=function(s){var c=s.touches,l=c&&c.item(0);if(l){var u=Math.abs(l.clientX-o.initialTouchX),p=Math.abs(l.clientY-o.initialTouchY);o.userIsDragging=u>5||p>5}},o.onTouchEnd=function(s){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(s.target)&&o.menuListRef&&!o.menuListRef.contains(s.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(s){o.userIsDragging||o.onControlMouseDown(s)},o.onClearIndicatorTouchEnd=function(s){o.userIsDragging||o.onClearIndicatorMouseDown(s)},o.onDropdownIndicatorTouchEnd=function(s){o.userIsDragging||o.onDropdownIndicatorMouseDown(s)},o.handleInputChange=function(s){var c=o.props.inputValue,l=s.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(l,{action:"input-change",prevInputValue:c}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(s){o.props.onFocus&&o.props.onFocus(s),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(s){var c=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(s),o.onInputChange("",{action:"input-blur",prevInputValue:c}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(s){if(!o.blockOptionHover&&o.state.focusedOption!==s){var c=o.getFocusableOptions().indexOf(s);o.setState({focusedOption:s,focusedOptionId:c>-1?o.getFocusedOptionId(s):null})}},o.shouldHideSelectedOptions=function(){return Ow(o.props)},o.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),o.focus()},o.onKeyDown=function(s){var c=o.props,l=c.isMulti,u=c.backspaceRemovesValue,p=c.escapeClearsValue,f=c.inputValue,h=c.isClearable,m=c.isDisabled,g=c.menuIsOpen,y=c.onKeyDown,x=c.tabSelectsValue,C=c.openMenuOnFocus,w=o.state,I=w.focusedOption,b=w.focusedValue,k=w.selectValue;if(!(m||typeof y=="function"&&(y(s),s.defaultPrevented))){switch(o.blockOptionHover=!0,s.key){case"ArrowLeft":if(!l||f)return;o.focusValue("previous");break;case"ArrowRight":if(!l||f)return;o.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(b)o.removeValue(b);else{if(!u)return;l?o.popValue():h&&o.clearValue()}break;case"Tab":if(o.isComposing||s.shiftKey||!g||!x||!I||C&&o.isOptionSelected(I,k))return;o.selectOption(I);break;case"Enter":if(s.keyCode===229)break;if(g){if(!I||o.isComposing)return;o.selectOption(I);break}return;case"Escape":g?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:f}),o.onMenuClose()):h&&p&&o.clearValue();break;case" ":if(f)return;if(!g){o.openMenu("first");break}if(!I)return;o.selectOption(I);break;case"ArrowUp":g?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":g?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!g)return;o.focusOption("pageup");break;case"PageDown":if(!g)return;o.focusOption("pagedown");break;case"Home":if(!g)return;o.focusOption("first");break;case"End":if(!g)return;o.focusOption("last");break;default:return}s.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++HA),o.state.selectValue=t0(n.value),n.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),a=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[a],o.state.focusedOptionId=Ju(r,i[a])}return o}return function(n,o,r){o&&Mg(n.prototype,o),r&&Mg(n,r),Object.defineProperty(n,"prototype",{writable:!1})}(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&n0(this.menuListRef,this.focusedOptionRef),(Aw()||MA())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(n){var o=this.props,r=o.isDisabled,i=o.menuIsOpen,a=this.state.isFocused;(a&&!r&&n.isDisabled||a&&i&&!n.menuIsOpen)&&this.focusInput(),a&&r&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):a||r||!n.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(n0(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(n,o){this.props.onInputChange(n,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var o=this,r=this.state,i=r.selectValue,a=r.isFocused,s=this.buildFocusableOptions(),c=n==="first"?0:s.length-1;if(!this.props.isMulti){var l=s.indexOf(i[0]);l>-1&&(c=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:s[c],focusedOptionId:this.getFocusedOptionId(s[c])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(n){var o=this.state,r=o.selectValue,i=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=r.indexOf(i);i||(a=-1);var s=r.length-1,c=-1;if(r.length){switch(n){case"previous":c=a===0?0:a===-1?s:a-1;break;case"next":a>-1&&a<s&&(c=a+1)}this.setState({inputIsHidden:c!==-1,focusedValue:r[c]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,r=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var a=0,s=i.indexOf(r);r||(s=-1),n==="up"?a=s>0?s-1:i.length-1:n==="down"?a=(s+1)%i.length:n==="pageup"?(a=s-o)<0&&(a=0):n==="pagedown"?(a=s+o)>i.length-1&&(a=i.length-1):n==="last"&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[a])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Uu):Ae(Ae({},Uu),this.props.theme):Uu}},{key:"getCommonProps",value:function(){var n=this.clearValue,o=this.cx,r=this.getStyles,i=this.getClassNames,a=this.getValue,s=this.selectOption,c=this.setValue,l=this.props,u=l.isMulti,p=l.isRtl,f=l.options;return{clearValue:n,cx:o,getStyles:r,getClassNames:i,getValue:a,hasValue:this.hasValue(),isMulti:u,isRtl:p,options:f,selectOption:s,selectProps:l,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,o=n.isClearable,r=n.isMulti;return o===void 0?r:o}},{key:"isOptionDisabled",value:function(n,o){return jw(this.props,n,o)}},{key:"isOptionSelected",value:function(n,o){return Pw(this.props,n,o)}},{key:"filterOption",value:function(n,o){return Nw(this.props,n,o)}},{key:"formatOptionLabel",value:function(n,o){if(typeof this.props.formatOptionLabel=="function"){var r=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(n,{context:o,inputValue:r,selectValue:i})}return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var n=this.props,o=n.isDisabled,r=n.isSearchable,i=n.inputId,a=n.inputValue,s=n.tabIndex,c=n.form,l=n.menuIsOpen,u=n.required,p=this.getComponents().Input,f=this.state,h=f.inputIsHidden,m=f.ariaSelection,g=this.commonProps,y=i||this.getElementId("input"),x=Ae(Ae(Ae({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?W.createElement(p,je({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:c,type:"text",value:a},x)):W.createElement(NA,je({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ll,onFocus:this.onInputFocus,disabled:o,tabIndex:s,inputMode:"none",form:c,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,o=this.getComponents(),r=o.MultiValue,i=o.MultiValueContainer,a=o.MultiValueLabel,s=o.MultiValueRemove,c=o.SingleValue,l=o.Placeholder,u=this.commonProps,p=this.props,f=p.controlShouldRenderValue,h=p.isDisabled,m=p.isMulti,g=p.inputValue,y=p.placeholder,x=this.state,C=x.selectValue,w=x.focusedValue,I=x.isFocused;if(!this.hasValue()||!f)return g?null:W.createElement(l,je({},u,{key:"placeholder",isDisabled:h,isFocused:I,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return C.map(function(k,S){var E=k===w,N="".concat(n.getOptionLabel(k),"-").concat(n.getOptionValue(k));return W.createElement(r,je({},u,{components:{Container:i,Label:a,Remove:s},isFocused:E,isDisabled:h,key:N,index:S,removeProps:{onClick:function(){return n.removeValue(k)},onTouchEnd:function(){return n.removeValue(k)},onMouseDown:function(A){A.preventDefault()}},data:k}),n.formatOptionLabel(k,"value"))});if(g)return null;var b=C[0];return W.createElement(c,je({},u,{data:b,isDisabled:h}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents().ClearIndicator,o=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,s=this.state.isFocused;if(!this.isClearable()||!n||i||!this.hasValue()||a)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(n,je({},o,{innerProps:c,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents().LoadingIndicator,o=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,s=this.state.isFocused;return!n||!a?null:W.createElement(n,je({},o,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:s}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),o=n.DropdownIndicator,r=n.IndicatorSeparator;if(!o||!r)return null;var i=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused;return W.createElement(r,je({},i,{isDisabled:a,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents().DropdownIndicator;if(!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.createElement(n,je({},o,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderMenu",value:function(){var n=this,o=this.getComponents(),r=o.Group,i=o.GroupHeading,a=o.Menu,s=o.MenuList,c=o.MenuPortal,l=o.LoadingMessage,u=o.NoOptionsMessage,p=o.Option,f=this.commonProps,h=this.state.focusedOption,m=this.props,g=m.captureMenuScroll,y=m.inputValue,x=m.isLoading,C=m.loadingMessage,w=m.minMenuHeight,I=m.maxMenuHeight,b=m.menuIsOpen,k=m.menuPlacement,S=m.menuPosition,E=m.menuPortalTarget,N=m.menuShouldBlockScroll,A=m.menuShouldScrollIntoView,P=m.noOptionsMessage,j=m.onMenuScrollToTop,G=m.onMenuScrollToBottom;if(!b)return null;var M,T=function(B,F){var $=B.type,Z=B.data,_=B.isDisabled,R=B.isSelected,L=B.label,D=B.value,K=h===Z,J=_?void 0:function(){return n.onOptionHover(Z)},Y=_?void 0:function(){return n.selectOption(Z)},ee="".concat(n.getElementId("option"),"-").concat(F),X={id:ee,onClick:Y,onMouseMove:J,onMouseOver:J,tabIndex:-1,role:"option","aria-selected":n.state.isAppleDevice?void 0:R};return W.createElement(p,je({},f,{innerProps:X,data:Z,isDisabled:_,isSelected:R,key:ee,label:L,type:$,value:D,isFocused:K,innerRef:K?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(B.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var F=B.data,$=B.options,Z=B.index,_="".concat(n.getElementId("group"),"-").concat(Z),R="".concat(_,"-heading");return W.createElement(r,je({},f,{key:_,data:F,options:$,Heading:i,headingProps:{id:R,data:B.data},label:n.formatGroupLabel(B.data)}),B.options.map(function(L){return T(L,"".concat(Z,"-").concat(L.index))}))}if(B.type==="option")return T(B,"".concat(B.index))});else if(x){var H=C({inputValue:y});if(H===null)return null;M=W.createElement(l,f,H)}else{var V=P({inputValue:y});if(V===null)return null;M=W.createElement(u,f,V)}var z={minMenuHeight:w,maxMenuHeight:I,menuPlacement:k,menuPosition:S,menuShouldScrollIntoView:A},O=W.createElement(tA,je({},f,z),function(B){var F=B.ref,$=B.placerProps,Z=$.placement,_=$.maxHeight;return W.createElement(a,je({},f,z,{innerRef:F,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:x,placement:Z}),W.createElement(RA,{captureEnabled:g,onTopArrive:j,onBottomArrive:G,lockEnabled:N},function(R){return W.createElement(s,je({},f,{innerRef:function(L){n.getMenuListRef(L),R(L)},innerProps:{role:"listbox","aria-multiselectable":f.isMulti,id:n.getElementId("listbox")},isLoading:x,maxHeight:_,focusedOption:h}),M)}))});return E||S==="fixed"?W.createElement(c,je({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:k,menuPosition:S}),O):O}},{key:"renderFormField",value:function(){var n=this,o=this.props,r=o.delimiter,i=o.isDisabled,a=o.isMulti,s=o.name,c=o.required,l=this.state.selectValue;if(c&&!this.hasValue()&&!i)return W.createElement(_A,{name:s,onFocus:this.onValueInputFocus});if(s&&!i){if(a){if(r){var u=l.map(function(h){return n.getOptionValue(h)}).join(r);return W.createElement("input",{name:s,type:"hidden",value:u})}var p=l.length>0?l.map(function(h,m){return W.createElement("input",{key:"i-".concat(m),name:s,type:"hidden",value:n.getOptionValue(h)})}):W.createElement("input",{name:s,type:"hidden",value:""});return W.createElement("div",null,p)}var f=l[0]?this.getOptionValue(l[0]):"";return W.createElement("input",{name:s,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,o=this.state,r=o.ariaSelection,i=o.focusedOption,a=o.focusedValue,s=o.isFocused,c=o.selectValue,l=this.getFocusableOptions();return W.createElement(SA,je({},n,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:i,focusedValue:a,isFocused:s,selectValue:c,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),o=n.Control,r=n.IndicatorsContainer,i=n.SelectContainer,a=n.ValueContainer,s=this.props,c=s.className,l=s.id,u=s.isDisabled,p=s.menuIsOpen,f=this.state.isFocused,h=this.commonProps=this.getCommonProps();return W.createElement(i,je({},h,{className:c,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:f}),this.renderLiveRegion(),W.createElement(o,je({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:f,menuIsOpen:p}),W.createElement(a,je({},h,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),W.createElement(r,je({},h,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,o){var r=o.prevProps,i=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,s=o.ariaSelection,c=o.isFocused,l=o.prevWasFocused,u=o.instancePrefix,p=n.options,f=n.value,h=n.menuIsOpen,m=n.inputValue,g=n.isMulti,y=t0(f),x={};if(r&&(f!==r.value||p!==r.options||h!==r.menuIsOpen||m!==r.inputValue)){var C=h?function(N,A){return y0(ac(N,A))}(n,y):[],w=h?b0(ac(n,y),"".concat(u,"-option")):[],I=i?function(N,A){var P=N.focusedValue,j=N.selectValue.indexOf(P);if(j>-1){if(A.indexOf(P)>-1)return P;if(j<A.length)return A[j]}return null}(o,y):null,b=function(N,A){var P=N.focusedOption;return P&&A.indexOf(P)>-1?P:A[0]}(o,C);x={selectValue:y,focusedOption:b,focusedOptionId:Ju(w,b),focusableOptionsWithIds:w,focusedValue:I,clearFocusValueOnUpdate:!1}}var k=a!=null&&n!==r?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},S=s,E=c&&l;return c&&!E&&(S={value:ic(g,y,y[0]||null),options:y,action:"initial-input-focus"},E=!l),(s==null?void 0:s.action)==="initial-input-focus"&&(S=null),Ae(Ae(Ae({},x),k),{},{prevProps:n,ariaSelection:S,prevWasFocused:E})}}]),t}();Tw.defaultProps=BA;var GA=v.forwardRef(function(e,t){var n=function(o){var r=o.defaultInputValue,i=r===void 0?"":r,a=o.defaultMenuIsOpen,s=a!==void 0&&a,c=o.defaultValue,l=c===void 0?null:c,u=o.inputValue,p=o.menuIsOpen,f=o.onChange,h=o.onInputChange,m=o.onMenuClose,g=o.onMenuOpen,y=o.value,x=Wo(o,yS),C=Fo(v.useState(u!==void 0?u:i),2),w=C[0],I=C[1],b=Fo(v.useState(p!==void 0?p:s),2),k=b[0],S=b[1],E=Fo(v.useState(y!==void 0?y:l),2),N=E[0],A=E[1],P=v.useCallback(function(z,O){typeof f=="function"&&f(z,O),A(z)},[f]),j=v.useCallback(function(z,O){var B;typeof h=="function"&&(B=h(z,O)),I(B!==void 0?B:z)},[h]),G=v.useCallback(function(){typeof g=="function"&&g(),S(!0)},[g]),M=v.useCallback(function(){typeof m=="function"&&m(),S(!1)},[m]),T=u!==void 0?u:w,H=p!==void 0?p:k,V=y!==void 0?y:N;return Ae(Ae({},x),{},{inputValue:T,menuIsOpen:H,onChange:P,onInputChange:j,onMenuClose:M,onMenuOpen:G,value:V})}(e);return W.createElement(Tw,je({ref:t},n))}),WA=GA;const ph=v.forwardRef(({id:e,className:t,name:n="select",align:o="up",label:r,options:i=[],value:a,placeholder:s="Select...",isMulti:c=!1,isSearchable:l,isClearable:u,backspaceRemovesValue:p,disabled:f,onChange:h,onInputChange:m,menuIsOpen:g,closeMenuOnSelect:y,isLoading:x,components:C,errorMessage:w,errorDataTestId:I},b)=>{const k=ua(),S=e||`select-${k}`,E=te("io-control-select",f&&"io-control-disabled",w&&"io-control-error",o&&[`direction-${o}`],t),N=w?{"aria-invalid":!0,"aria-errormessage":`${S}-error`}:{};return d.jsxs("div",{className:E,children:[r&&d.jsx(As,{htmlFor:S,text:r}),d.jsx(WA,{ref:b,className:"io-select",classNamePrefix:"io-select",instanceId:S,isMulti:c,inputId:S,name:n,options:i,value:a,onChange:A=>c?h==null?void 0:h([...A??[]]):h==null?void 0:h(A),onInputChange:m,menuIsOpen:g,isLoading:x,components:C,placeholder:s,isDisabled:f,isSearchable:l,isClearable:u??c,backspaceRemovesValue:p,closeMenuOnSelect:y,"aria-label":r,...N}),w&&d.jsxs("div",{"data-testid":I,id:`${S}-error`,className:"io-input-error",children:[d.jsx(wt,{variant:"close"}),w]})]})});ph.displayName="Select";const Ps=v.forwardRef(({id:e,className:t,name:n="textarea",align:o="up",label:r,rows:i=4,placeholder:a="Enter text here...",disabled:s,readOnly:c,...l},u)=>{const p=ua(),f=e||`textarea-${p}`,h=te("io-control-textarea",s&&"io-control-disabled",c&&"io-control-readonly",o&&[`direction-${o}`],t);return d.jsxs("div",{className:h,children:[r&&d.jsx(As,{htmlFor:f,text:r}),d.jsx("textarea",{id:f,className:"io-textarea",ref:u,name:n,tabIndex:0,placeholder:a,"aria-label":r,disabled:s,readOnly:c,rows:i,...l})]})});Ps.displayName="Textarea";const VA=()=>{const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(null),o=v.useCallback(r=>{var i;return(i=e==null?void 0:e.themes)==null?void 0:i.select(r)},[e]);return v.useEffect(()=>{var a,s;if(!e)return;let r=!1;const i=c=>{r||n(c)};return(a=e.themes)==null||a.onChanged(i),(s=e.themes)==null||s.getCurrent().then(i).catch(console.warn),()=>{r=!0}},[e]),{currentTheme:t,selectTheme:o}};function ru(e,t=500){const[n,o]=v.useState(e);return v.useEffect(()=>{const r=setTimeout(()=>{o(e)},t);return()=>clearTimeout(r)},[e,t]),n}function qe(){return v.useMemo(()=>typeof window=="object"&&Zo(),[])}function FA(e,t){v.useEffect(()=>{const n=o=>{o.code===e&&t()};return document.addEventListener("keyup",n),()=>document.removeEventListener("keyup",n)},[e,t])}const zA=()=>{const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState([]);return v.useEffect(()=>{var o;e&&((o=e.themes)==null||o.list().then(n).catch(console.warn))},[e]),t},Nt=v.forwardRef(({id:e,className:t,name:n="toggle",align:o="left",label:r,checked:i,disabled:a,onKeyDown:s,"data-testid":c="toggle",...l},u)=>{const p=ua(),f=e||`toggle-${p}`,h=te("io-control-toggle",i&&"io-control-checked",a&&"io-control-disabled",o&&[`direction-${o}`],t);return d.jsx("div",{className:h,children:d.jsxs("label",{className:"io-toggle",htmlFor:f,tabIndex:a?-1:0,onKeyDown:s,"data-testid":`${c}-label`,children:[d.jsx("input",{type:"checkbox",id:f,className:"io-checkbox",ref:u,name:n,checked:i,disabled:a,"aria-checked":i,tabIndex:-1,"data-testid":c,...l}),d.jsx("span",{className:"slider","data-testid":`${c}-slider`}),r]})})});function _c(e){return{name:e.name,title:e.title,hidden:e.isHidden,userProperties:e.customProperties}}function Mc(e){return{name:e.name,title:e.title,hidden:e.hidden,userProperties:e.userProperties}}Nt.displayName="Toggle";class fh extends Error{constructor(t){super(t),this.name="IoAppsSubApiMissingError"}}function Jr(e){if(!e.registry)throw new fh("io.apps is available but io.apps.registry is missing")}function x0(e){if(!e.instances)throw new fh("io.apps is available but io.apps.instances is missing")}async function C0(e,t){var o;if(!e||!t)return;const n=e.apps;n&&Jr(n);try{if(n){const i=await n.registry.get({name:t});return i?_c(i):void 0}const r=(o=e.appManager)==null?void 0:o.application(t);return r?Mc(r):void 0}catch(r){return void console.error(`Failed to get application "${t}"`,r)}}const wr={getMyApplication:async function(e){var t,n,o;if(e)try{const r=e.apps?(t=e.apps.my)==null?void 0:t.appName:(o=(n=e.appManager)==null?void 0:n.myApplication)==null?void 0:o.name;return r?await C0(e,r):void 0}catch(r){if(r instanceof fh)throw r;return void console.error("Failed to get my application",r)}},getApplication:C0,getApplications:async function(e){var n;if(!e)return[];const t=e.apps;t&&Jr(t);try{return t?(await t.registry.getMany()??[]).map(i=>_c(i)):(((n=e.appManager)==null?void 0:n.applications())??[]).map(r=>Mc(r))}catch(o){console.error("Failed to get applications",o)}return[]},getApplicationConfiguration:async function(e,t){var o;if(!e||!t)return;const n=e.apps;n&&Jr(n);try{if(n){const i=await n.registry.get({name:t,includeDefinition:!0});return i==null?void 0:i.definition}const r=(o=e.appManager)==null?void 0:o.application(t);return r?await r.getConfiguration():void 0}catch(r){return void console.error(`Failed to get configuration for application "${t}"`,r)}},startApplication:async function(e,t,n){var r;if(!e)return;const o=e.apps;o&&(Jr(o),x0(o));try{if(o)return await o.registry.get({name:t})?void await o.instances.start({name:t,...n}):void console.error(`Application "${t}" not found in registry`);const i=(r=e.appManager)==null?void 0:r.application(t);if(!i)return void console.error(`Application "${t}" not found`);await i.start(n)}catch(i){return void console.error(`Failed to start application "${t}"`,i)}},stopApplication:async function(e,t,n){if(!e)return;const o=e.apps;o&&x0(o);try{if(o)return void await o.instances.stop({id:t.id,force:n==null?void 0:n.force,reason:n==null?void 0:n.reason,timeout:n==null?void 0:n.timeout});const r=e.appManager.instances().find(i=>i.id===t.id);if(!r)return void console.error(`Instance "${t.id}" not found`);await r.stop()}catch(r){return void console.error(`Failed to stop application instance "${t.id}"`,r)}},onAppAdded:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onAdded(({app:i})=>{const a=_c(i);t(a)}):(o=e.appManager)==null?void 0:o.onAppAdded(i=>{const a=Mc(i);t(a)})}catch(r){return void console.error("Failed to subscribe to app added events",r)}},onAppRemoved:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onRemoved(({appName:i})=>{t({name:i})}):(o=e.appManager)==null?void 0:o.onAppRemoved(i=>{t({name:i.name})})}catch(r){return void console.error("Failed to subscribe to app removed events",r)}},onAppChanged:async function(e,t){var o;if(!e)return;const n=e.apps;n&&Jr(n);try{return n?await n.registry.onUpdated(i=>{const a=_c(i.app);t(a)}):(o=e.appManager)==null?void 0:o.onAppChanged(i=>{const a=Mc(i);t(a)})}catch(r){return void console.error("Failed to subscribe to app changed events",r)}},shutdownPlatform:async function(e,t=!0){var o,r;if(!e)return;const n={autoSave:t,showDialog:!0};try{if((o=e.platform)!=null&&o.shutdown)return void await e.platform.shutdown(n);await((r=e.appManager)==null?void 0:r.exit(n))}catch(i){console.error("Failed to shutdown platform",i)}},restartPlatform:async function(e,t=!0){var o,r;if(!e)return;const n={autoSave:t,showDialog:!0};try{if((o=e.platform)!=null&&o.restart)return void await e.platform.restart(n);await((r=e.appManager)==null?void 0:r.restart(n))}catch(i){console.error("Failed to restart platform",i)}}},$A={minimizeWindow:async function(e){var t;if(e)try{const n=(t=e.windows)==null?void 0:t.my();await(n==null?void 0:n.minimize())}catch(n){console.error("Failed to minimize window",n)}},closeWindow:async function(e,t){var n;if(e)try{const o=(n=e.windows)==null?void 0:n.my();await(o==null?void 0:o.close(t))}catch(o){console.error("Failed to close window",o)}},restartPlatform:wr.restartPlatform,shutdownPlatform:wr.shutdownPlatform};v.createContext({theme:"dark"});const Rw=v.createContext(void 0),Lw=()=>{const e=v.useContext(Rw);if(!e)throw new Error("usePanelManagerContext must be used within a PanelManagerContext.Provider");return e},_w=e=>{const{General:t,Launchpad:n,Layouts:o,Downloads:r,System:i}=zo();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(n,{}),d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{})]})},Mw=({title:e="General",...t})=>{const{Theme:n}=zo();return d.jsx(Je,{title:e,...t,children:d.jsx(n,{})})},iu=({className:e,title:t="Theme",...n})=>{const{currentTheme:o,selectTheme:r}=VA(),i=zA();return d.jsxs("div",{className:te("flex jc-between ai-center",e),"data-testid":"theme-container",...n,children:[d.jsx("label",{className:"io-text-clipper","data-testid":"theme-label",children:t}),d.jsxs(fe,{variant:"light","data-testid":"theme-dropdown",children:[d.jsx(fe.Button,{text:(o==null?void 0:o.displayName)??"Dark","data-testid":"theme-dropdown-button"}),d.jsx(fe.Content,{"data-testid":"theme-dropdown-content",children:d.jsx(fe.List,{children:i.map(({displayName:a,name:s})=>d.jsx(fe.Item,{onClick:()=>r(s),"data-testid":`theme-dropdown-item-${s}`,children:a},s))})})]})]})},on=({prefKey:e,...t})=>{const{isLoading:n,value:o=!1,update:r}=St({prefKey:e});return d.jsx(Nt,{checked:o,disabled:n,onChange:i=>r(i.target.checked),...t})},Dw=({align:e="right",label:t="Minimize to tray",...n})=>d.jsx(on,{align:e,label:t,prefKey:sb,...n}),ZA=({prefKey:e,options:t,disabled:n,...o})=>{const{isLoading:r,value:i="Select option",update:a}=St({prefKey:e});return d.jsxs(fe,{variant:"light",disabled:r||n,...o,children:[d.jsx(fe.Button,{children:i}),d.jsx(fe.Content,{children:d.jsx(fe.List,{children:t.map(s=>d.jsx(fe.Item,{onClick:()=>(async c=>{if(c!==i)try{await a(c)}catch(l){console.error("Failed to update platform preference:",l)}})(s),children:s},s))})})]})},Bw=({className:e,label:t="Pinned position",...n})=>d.jsx(Je,{className:te("io-block-list-gap",e),...n,children:d.jsxs("div",{className:"flex jc-between ai-center",children:[d.jsx("label",{className:"io-text-clipper",children:t}),d.jsx(ZA,{className:e,prefKey:lb,options:["Left","Right"],...n})]})}),Hw=({align:e="right",label:t='Hide "Favorites"',...n})=>d.jsx(on,{align:e,label:t,prefKey:Pf,...n}),Gw=({align:e="right",label:t="Allow docking to top",...n})=>d.jsx(on,{align:e,label:t,prefKey:ub,...n}),Ww=({align:e="right",label:t="Always on top",...n})=>d.jsx(on,{align:e,label:t,prefKey:db,...n}),Vw=({align:e="right",label:t="Claim occupied space",...n})=>d.jsx(on,{align:e,label:t,prefKey:pb,...n}),Fw=({align:e="right",label:t="Show the extended Launchpad area",...n})=>d.jsx(on,{align:e,label:t,prefKey:bs,...n}),zw=({align:e="right",label:t="Hide labels",...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:fb,disabled:!o,...n})},$w=({align:e="right",label:t='Show "Favorites"',...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:hb,disabled:!o,...n})},Zw=({align:e="right",label:t='Show "Recent"',...n})=>{const{value:o}=St({prefKey:bs});return d.jsx(on,{align:e,label:t,prefKey:mb,disabled:!o,...n})},Xw=({title:e="Layouts",...t})=>{const{LayoutsSaveCurrentOnExit:n,LayoutsShowDeletePrompt:o,LayoutsShowUnsavedChangesPrompt:r,LayoutsShowHidden:i}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(r,{}),d.jsx(o,{}),d.jsx(i,{})]})},Uw=({align:e="right",label:t="Save current on exit",...n})=>d.jsx(on,{align:e,label:t,prefKey:vb,...n}),au=({align:e="right",label:t="Show prompt for unsaved changes",...n})=>d.jsx(on,{align:e,label:t,prefKey:yb,"data-testid":"layouts-show-unsaved-changes-prompt-toggle-button",...n}),su=({align:e="right",label:t="Show prompt for deleting",...n})=>d.jsx(on,{align:e,label:t,prefKey:Nf,"data-testid":"layouts-show-delete-prompt-toggle",...n}),Jw=({title:e="Downloads",...t})=>{const{DownloadsLocation:n}=zo();return d.jsx(Je,{title:e,...t,children:d.jsx(n,{})})};function Yw({title:e="Downloads"}){const{ItemSearch:t,HeaderButtons:n}=Ns();return d.jsxs("div",{className:"io-dm-header",children:[d.jsxs(cn,{draggable:!0,children:[d.jsx(cn.Title,{tag:"h1",text:e,size:"large"}),d.jsx(n,{className:"non-draggable"})]}),d.jsx(t,{})]})}const bn=window.glue42gd,Kw=v.createContext({configuration:{},items:[],removeItem:()=>{},pauseResumeItem:()=>{},cancelItem:()=>{},clearItems:()=>{},showItemInFolder:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},searchQuery:"",setSearch:()=>{},itemsCount:0,setCount:()=>{},setDownloadLocation:()=>{},setDownloadLocationWithDialog:()=>{},sortItems:()=>[],downloadLocationList:[],isDownloadLocationDialogVisible:!1}),Jo=()=>v.useContext(Kw);function qw({className:e,placeholder:t="Search",iconPrepend:n="search",iconAppend:o="close",...r}){const i=te("io-header-search",e),a=v.useRef(null),{searchQuery:s,setSearch:c,itemsCount:l}=Jo(),u=s.length>0,p=v.useCallback(()=>{c(""),a.current&&a.current.focus()},[c]);return d.jsxs("div",{className:i,children:[d.jsx(qn,{ref:a,value:s,iconPrepend:n,iconAppend:u?o:void 0,iconAppendOnClick:u?p:void 0,placeholder:t,onChange:f=>c(f.target.value),...r}),u&&d.jsx("p",{className:"io-header-search-count",children:`${l} results`})]})}function Qw({className:e,...t}){const{MoreButton:n,CloseButton:o,ExternalButton:r}=Ns();return d.jsxs(We,{className:e,align:"right",...t,children:[d.jsx(n,{}),d.jsx(r,{}),d.jsx(o,{})]})}function ex({icon:e="ellipsis-vertical",...t}){const{items:n,clearItems:o,showSettings:r}=Jo(),i=n.length===0;return d.jsxs(fe,{variant:"light",...t,children:[d.jsx(fe.ButtonIcon,{icon:e,variant:"circle",size:"32"}),d.jsx(fe.Content,{children:d.jsxs(fe.List,{children:[d.jsx(fe.Item,{onClick:a=>(s=>{i?s.stopPropagation():o()})(a),disabled:i,children:"Clear All"}),d.jsx(fe.Item,{onClick:r,children:"Settings"})]})})]})}function tx({className:e,icon:t="pop-out",...n}){const o=v.useContext(Se.IOConnectContext),r=v.useCallback(()=>{wr.startApplication(o,"io-connect-download-manager").catch(i=>{console.error("Failed to open Download Manager",i)})},[o]);return d.jsx(Ue,{className:te("io-dm-compact-mode-only",e),icon:t,variant:"circle",size:"32",onClick:r,...n})}function nx({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const i=v.useContext(Se.IOConnectContext);return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:a=>{o?o(a):$A.closeWindow(i).catch(s=>{console.error("Failed to close window:",s)})},...r})}function Ii(e,t=!1,n=!1,o=!1){const r=e.getDate(),i=["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()],a=e.getFullYear(),s=e.getHours(),c=e.getMinutes();let l="";return l=c<10?`0${c}`:`${c}`,t?t==="Today"?n?"Today":`Today at ${s}:${l}`:t==="Yesterday"?n?"Yesterday":`Yesterday at ${s}:${l}`:`${s}:${l}`:o?n?`${i} ${r}`:`${i} ${r} at ${s}:${l}`:n?`${i} ${r}, ${a}`:`${i} ${r}, ${a} at ${s}:${l}`}function ox(e,t={showTime:!0}){const n=new Date(1e3*e),o=new Date,r=Math.round((o-n)/1e3),i=Math.round(r/60),a=o.toDateString()===n.toDateString(),s=new Date(o.setDate(o.getDate()-1)).toDateString()===n.toDateString(),c=o.getFullYear()===n.getFullYear();return t.showTime?r<5?"Just Now":r<60?`${r} seconds ago`:r<90?"about a minute ago":i<60?`${i} minutes ago`:a?Ii(n,"Today",!1,!0):s?Ii(n,"Yesterday",!1,!0):c?Ii(n,!1,!1,!0):Ii(n):a?"Today":s?"Yesterday":c?Ii(n,!1,!0,!0):Ii(n,!1,!0)}function rx({className:e,...t}){const n=te("io-dm-body","io-panel-body",e),{DownloadListEmpty:o,ItemGroup:r,Item:i}=Ns(),{items:a,searchQuery:s,setCount:c,sortItems:l}=Jo(),u=l(a),p=ru(s),f=v.useMemo(()=>u.filter(g=>g.displayInfo.filename.toLowerCase().includes(p.toLowerCase())||g.displayInfo.url.toLowerCase().includes(p.toLowerCase())),[u,p]),h=v.useMemo(()=>f.map(g=>({...g,displayInfo:{...g.displayInfo,startTime:ox(g.displayInfo.startTime,{showTime:!1})}})),[f]),m=v.useMemo(()=>Object.values(h.reduce((g={},y)=>{var x;return g[y.displayInfo.startTime]=((x=g[y.displayInfo.startTime])==null?void 0:x.concat([]))??[],g[y.displayInfo.startTime].push(y),g},{})),[h]);return v.useEffect(()=>{c(f.length)},[f,c]),d.jsx(Uo,{elementProps:{className:n,...t},children:m&&m.length!==0?m.map(g=>d.jsx(r,{title:String(g[0].displayInfo.startTime)??null,children:g.map(y=>d.jsx(i,{item:y},y.id))},g[0].id??"")):d.jsx(o,{})})}function ix({className:e,icon:t="download",text:n="No downloads to display.",...o}){const r=te("io-dm-no-items",e);return d.jsxs("div",{className:r,...o,children:[d.jsx(wt,{variant:t}),d.jsx("p",{children:n})]})}function ax({className:e,title:t,children:n,...o}){const r=te("io-dm-item-group",e);return d.jsxs("div",{className:r,...o,children:[t&&d.jsx("p",{className:"io-dm-items-group-title",children:t}),n]})}function sx({className:e,item:t,...n}){const{ItemHeader:o,ItemBody:r,ItemFooter:i}=Ns(),{state:a,url:s,filename:c,receivedBytes:l,totalBytes:u,speed:p,timeRemaining:f}=t.displayInfo;if(!t)return d.jsx(d.Fragment,{});const h=te("io-dm-item",t.displayInfo.state&&[a],e);return d.jsxs("div",{className:h,...n,children:[d.jsx(o,{itemID:t.id,filename:c,state:a}),d.jsx(r,{state:a,url:s,bytesReceived:l,bytesTotal:u,speed:p,timeRemaining:f}),d.jsx(i,{itemID:t.id,state:a})]})}function hh({bytesReceived:e=0,bytesTotal:t=0,...n}){const o=v.useCallback(()=>e&&t?Math.round(e/t*100):0,[e,t]);return d.jsx(L5,{value:o(),...n})}function cx({className:e,itemID:t,filename:n,state:o,pauseResume:r,showInFolder:i,cancel:a,remove:s,...c}){const l=te("io-dm-item-header",e),{pauseResumeItem:u,showItemInFolder:p,cancelItem:f,removeItem:h}=Jo(),m=o==="progressing"||o==="paused",g=o==="interrupted"||o==="cancelled",y=m?"Cancel Download":"Remove Download",x=a??f,C=s??h,w=function(b,k,S,E){return b==="paused"||b==="progressing"?{statusIcon:b==="paused"?"play":"pause",onStatusActionClick:()=>S(k)}:b==="completed"?{statusIcon:"folder",onStatusActionClick:()=>E(k)}:null}(o,t,r??u,i??p),I=v.useCallback(()=>{m?x(t):C(t)},[m,x,t,C]);return d.jsxs("div",{className:l,...c,children:[d.jsx(bo,{text:n,style:{textDecoration:g?"line-through":"none"}}),d.jsxs(We,{children:[w&&d.jsx(Ue,{icon:w.statusIcon,iconSize:"12",onClick:w.onStatusActionClick,className:"io-dm-compact-mode-only"}),d.jsx(Ue,{icon:"close",iconSize:"12",title:y,onClick:I})]})]})}function lx({className:e,state:t,url:n,bytesReceived:o=0,bytesTotal:r=0,speed:i=0,timeRemaining:a=0,...s}){const c=te("io-dm-item-body",e),l=f=>{const h=["Bytes","KB","MB","GB","TB"];if(f===0)return"0";const m=Math.floor(Math.log(f)/Math.log(1024));return m===0?`${f}${h[m]}`:`${(f/1024**m).toFixed(1)}${h[m]}`};return d.jsxs("div",{className:c,...s,children:[d.jsx("p",{className:"io-text-small",children:n}),(p=t,p==="cancelled"||p==="interrupted"||p==="completed"?null:d.jsx(hh,{variant:p==="paused"?"paused":"active",bytesReceived:o,bytesTotal:r})),d.jsx("p",{className:"io-text-default-lh16",children:t==="completed"?`${l(o??0)} - Done`:t==="cancelled"||t==="interrupted"?`${l(o??0)}/${l(r??0)} - Failed`:`${l(o??0)}/${l(r??0)} (${u=i,(u?`${(u/1e6/8).toFixed(2)}MB/s`:0)??0}) - ${(f=>{const h=Math.floor(f/3600),m=Math.floor(f%3600/60);let g="";return h>0&&(g+=`${h} hour${h>1?"s":""}, `),m>0&&(g+=`${m} min${m>1?"s":""}, `),((f=Math.floor(f%60))>0||g==="")&&(g+=`${f} sec${f===1?"":"s"}`),`${g.trim()} left`})(a)??0}`})]});var u,p}const XA={success:"check-solid",warning:"exclamation-mark",critical:"exclamation-mark"};function Yu({className:e,variant:t,text:n}){const o=te("io-dm-item-status",`io-dm-item-status-${t}`,e);return d.jsxs("div",{className:o,children:[t&&d.jsx(wt,{variant:XA[t],className:"icon-severity",size:"10"}),n&&d.jsx("p",{className:"io-text-smaller",children:n})]})}function ux({className:e,itemID:t,state:n,pauseResume:o,showInFolder:r,cancel:i,...a}){const s=te("io-dm-item-footer",e),{pauseResumeItem:c,showItemInFolder:l,cancelItem:u}=Jo(),p=v.useCallback(m=>{o?o(m):c(m)},[o,c]),f=v.useCallback(m=>{r?r(m):l(m)},[r,l]),h=v.useCallback(m=>{i?i(m):u(m)},[i,u]);return d.jsx("div",{className:s,...a,children:(()=>{switch(n){case"progressing":return d.jsxs(We,{align:"right",children:[d.jsx(We.Button,{variant:"primary",text:"Pause",onClick:()=>p(t)}),d.jsx(We.Button,{variant:"link",text:"Cancel",onClick:()=>h(t)})]});case"paused":return d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Resume",onClick:()=>p(t)})});case"completed":return d.jsxs(d.Fragment,{children:[d.jsx(Yu,{variant:"success",text:"Complete"}),d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Show in Folder",onClick:()=>f(t)})})]});case"cancelled":return d.jsx(Yu,{variant:"warning",text:"Cancelled"});case"interrupted":return d.jsxs(d.Fragment,{children:[d.jsx(Yu,{variant:"critical",text:"Failed"}),d.jsx(We,{align:"right",children:d.jsx(We.Button,{variant:"primary",text:"Retry",onClick:()=>p(t)})})]});default:return null}})()})}function dx({className:e,title:t="Download Settings",...n}){const o=te("io-dm-settings-panel",e),{configuration:{downloadFolder:r},hideSettings:i,setDownloadLocation:a,setDownloadLocationWithDialog:s,isDownloadLocationDialogVisible:c,downloadLocationList:l}=Jo();return d.jsxs(ze,{className:o,...n,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:t,tag:"h1"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(Ue,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:()=>{i()},disabled:c})})]}),d.jsx(ze.Body,{children:d.jsxs(We,{children:[d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{children:d.jsx("span",{className:"io-dm-settings-panel-download-location",children:r??l[0]})}),l.length>1&&d.jsx(fe.Content,{children:d.jsx(fe.List,{children:l.map((u,p)=>!u||p===0||p>3?null:d.jsx(fe.Item,{onClick:()=>{a(u)},children:u},u))})})]}),d.jsx(Ze,{className:"io-btn io-dm-settings-panel-download-location-btn",text:"Browse",onClick:()=>{s()},disabled:c})]})})]})}const px={Header:Yw,ItemSearch:qw,HeaderButtons:Qw,MoreButton:ex,ExternalButton:tx,CloseButton:nx,Body:rx,DownloadListEmpty:ix,ItemGroup:ax,Item:sx,ItemProgress:hh,ItemHeader:cx,ItemBody:lx,ItemFooter:ux,Settings:dx},fx=v.createContext(px),hx=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...px,...t}),[t]);return d.jsx(fx.Provider,{value:n,children:e})});hx.displayName="ComponentsStore";const Ns=()=>v.useContext(fx);function UA({className:e,...t}){const n=te("io-dm",e),{Header:o,Body:r,Settings:i}=Ns(),{isSettingsVisible:a}=Jo();return d.jsxs(ze,{className:n,...t,children:[d.jsx(o,{}),d.jsx(r,{}),a&&d.jsx(i,{})]})}var JA=Object.freeze({__proto__:null,Body:rx,CloseButton:nx,DownloadListEmpty:ix,DownloadManager:function({components:e,...t}){return d.jsx(hx,{components:e,children:d.jsx(UA,{...t})})},DownloadManagerProvider:({children:e})=>{const{configuration:t,items:n,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:c,showSettings:l,hideSettings:u,searchQuery:p,setSearch:f,itemsCount:h,setCount:m,setDownloadLocation:g,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:C,downloadLocationList:w}=function(){const[b,k]=v.useState({}),[S,E]=v.useState([]),[N,A]=v.useState(0),[P,j]=v.useState([]),[G,M]=v.useState(""),[T,H]=v.useState(!1),[V,z]=v.useState(!1),[O,B]=v.useState({filePaths:[],canceled:!1});v.useEffect(()=>{if(!bn)return;const $=bn.downloads.onUpdate(_=>E(R=>F(R,_))),Z=bn.downloads.onConfigurationChanged(_=>{k(_)});return bn.downloads.list().then(E).catch(console.error),bn.downloads.getSavePathList().then(_=>{let R=null;const L=_==null?void 0:_.pathList;Array.isArray(_)?R=_.filter(D=>typeof D=="string"):Array.isArray(L)&&(R=L.filter(D=>typeof D=="string")),R!==null&&j(R)}).catch(console.error),()=>{$(),Z()}},[]),v.useEffect(()=>{z(!1)},[O]);const F=($,Z)=>{const _=$.findIndex(L=>L.id===Z.id);if(_===-1)return[Z,...$];const R=[...$];return R[_]=Z,R};return{items:S,setCount:$=>{A($)},sortItems:($,Z=!0)=>[...$].sort((_,R)=>{const L=_.displayInfo.startTime-R.displayInfo.startTime;return Z?-L:L}),setSearch:$=>{M($)},cancelItem:async $=>{try{await bn.downloads.cancel($)}catch(Z){console.error(Z)}},removeItem:async $=>{try{E(Z=>Z.filter(_=>_.id!==$)),await bn.downloads.removeItem($)}catch(Z){console.error(Z)}},clearItems:async()=>{try{E([]),await bn.downloads.clearDownloadList()}catch($){console.error($)}},itemsCount:N,searchQuery:G,showSettings:()=>{H(!0)},hideSettings:()=>{H(!1)},configuration:b,isSettingsVisible:T,pauseResumeItem:async $=>{try{await bn.downloads.pauseResume($)}catch(Z){console.error(Z)}},showItemInFolder:async $=>{try{await bn.downloads.showInFolder($)}catch(Z){console.error(Z)}},setDownloadLocation:async $=>{try{await bn.downloads.setSavePath($),j(Z=>{if(Z.includes($)){const _=Z.filter(R=>R!==$);return[$,..._]}return[$,...Z]})}catch(Z){console.error(Z)}},downloadLocationList:P,isDownloadLocationDialogVisible:V,setDownloadLocationWithDialog:async()=>{z(!0);try{const $=await bn.downloads.showOpenDialog();if(B($),!($!=null&&$.filePaths)||$.filePaths.length===0)return;await bn.downloads.setSavePath($.filePaths[0]),j(Z=>{if(Z.includes($.filePaths[0])){const _=Z.filter(R=>R!==$.filePaths[0]);return[$.filePaths[0],..._]}return[$.filePaths[0],...Z]})}catch($){console.error($)}}}}(),I=v.useMemo(()=>({configuration:t,items:n,removeItem:o,pauseResumeItem:r,cancelItem:i,clearItems:a,showItemInFolder:s,isSettingsVisible:c,showSettings:l,hideSettings:u,searchQuery:p,setSearch:f,itemsCount:h,setCount:m,setDownloadLocation:g,setDownloadLocationWithDialog:y,sortItems:x,isDownloadLocationDialogVisible:C,downloadLocationList:w}),[t,n,o,r,i,s,a,c,l,u,p,f,h,m,g,y,x,C,w]);return d.jsx(Kw.Provider,{value:I,children:e})},ExternalButton:tx,Header:Yw,HeaderButtons:Qw,Item:sx,ItemBody:lx,ItemFooter:ux,ItemGroup:ax,ItemHeader:cx,ItemProgress:hh,ItemSearch:qw,MoreButton:ex,Settings:dx,useDownloadManagerContext:Jo});const mx=({className:e,label:t="Location",...n})=>{const{configuration:{downloadFolder:o},setDownloadLocationWithDialog:r,isDownloadLocationDialogVisible:i,downloadLocationList:a}=Jo();return d.jsxs(Je,{className:te("io-preferences-download-section",e),...n,children:[d.jsxs("div",{className:"flex jc-between ai-center",children:[d.jsx("label",{className:"io-text-clipper",children:t}),d.jsx(Ze,{text:"Change",onClick:r,disabled:i})]}),d.jsx("p",{children:o??(a==null?void 0:a[0])??"Not set"})]})},gx=({align:e="right",label:t="Ask where to save each file before downloading",...n})=>d.jsx(on,{align:e,label:t,prefKey:xb,...n}),vx=({title:e="System",...t})=>{const{SystemRestartSection:n,SystemShutdownSection:o}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(o,{})]})},I0="T42.GD.Execute",yx=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bx=(e,t)=>e in t;function YA({time:e,frequency:t,day:n}){const[o,r]=e.split(":"),i=Number.parseInt(o,10),a=Number.parseInt(r,10);let s="*";return t==="weekly"&&n&&(s=function(c){const l={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};if(!bx(c,l))throw new Error(`Invalid day: ${c}`);return l[c]}(n).toString()),`${a} ${i} * * ${s}`}function KA(e){const t=v.useContext(Se.IOConnectContext),{value:n,update:o}=St({prefKey:sc(e)}),{value:r,update:i}=St({prefKey:sc(e,"Time")}),{value:a,update:s}=St({prefKey:sc(e,"Frequency")}),{value:c,update:l}=St({prefKey:sc(e,"Day")}),u=v.useCallback(async()=>{try{await t.interop.invoke(I0,{command:`cancel-${e}`})}catch(f){console.error(f)}},[t,e]),p=v.useCallback(async()=>{try{const f=YA({time:r??"12:00",frequency:a??"daily",day:a==="weekly"?c:"*"});await t.interop.invoke(I0,{command:`schedule-${e}`,args:{cronTime:f,discardUnsavedLayoutChanges:!1}})}catch(f){console.error(`Failed to update cron job for ${e}:`,f)}},[t,e,r,a,c]);return v.useEffect(()=>{t&&n&&p()},[t,n,r,a,c,p]),{enabled:n??!1,time:r??"12:00",frequency:a??"daily",day:c??"Monday",setEnabled:async f=>{f||await u();try{await o(f)}catch(h){console.error("Failed to update enabled state:",h)}},setTime:async f=>{try{await i(f)}catch(h){console.error("Failed to update time:",h)}},setFrequency:async f=>{try{await s(f),f==="daily"&&await l(void 0)}catch(h){console.error("Failed to update frequency:",h)}},setDay:async f=>{var h;if(h=f,yx.includes(h))try{await l(f)}catch(m){console.error("Failed to update day:",m)}else console.error("Invalid day provided")}}}function sc(e,t){const n=e==="restart"?"_system_scheduleRestart":"_system_scheduleShutdown";return t?`${n}${t}`:n}function wx({className:e,variant:t,...n}){const o=te("io-block-list-gap",t,e),{enabled:r,time:i,frequency:a,day:s,setEnabled:c,setTime:l,setFrequency:u,setDay:p}=KA(t);return d.jsxs(Je,{className:o,...n,children:[d.jsx(Nt,{label:`Schedule ${t}`,align:"right",onChange:f=>c(f.target.checked),checked:r}),d.jsxs("div",{className:"scheduler-controls",children:[d.jsx("div",{className:"io-control-input io-control-leading-icon direction-up",children:d.jsx("input",{type:"time",className:"io-input",value:i,onChange:f=>l(f.target.value)})}),d.jsxs(Yn,{text:a.charAt(0).toUpperCase()+a.slice(1),icon:"chevron-down",iconRight:!0,children:[d.jsx(Yn.Item,{onClick:()=>u("daily"),children:"Daily"}),d.jsx(Yn.Item,{onClick:()=>u("weekly"),children:"Weekly"})]}),a==="weekly"&&d.jsx(Yn,{text:s,icon:"chevron-down",iconRight:!0,children:yx.map(f=>d.jsx(Yn.Item,{onClick:()=>p(f),children:f},f))})]})]})}function xx({className:e,...t}){return d.jsx(wx,{...t,className:e,variant:"restart"})}function Cx({className:e,...t}){return d.jsx(wx,{...t,className:e,variant:"shutdown"})}const Ix={Body:_w,General:Mw,Theme:iu,Launchpad:({title:e="Launchpad",...t})=>{const{MinimizeToTray:n,PinnedPosition:o,HideFavoritesFromLaunchpad:r,Docking:i,ExtendedArea:a}=zo();return d.jsxs(Je,{title:e,...t,children:[d.jsx(n,{}),d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{})]})},MinimizeToTray:Dw,PinnedPosition:Bw,HideFavoritesFromLaunchpad:Hw,Docking:({className:e,title:t="Docking",...n})=>{const o=te("io-preferences-panel-docking",e),{AllowDocking:r,DockedAlwaysOnTop:i,DockedClaimsSpace:a}=zo();return d.jsxs(Je,{className:o,title:t,...n,children:[d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{})]})},AllowDocking:Gw,DockedAlwaysOnTop:Ww,DockedClaimsSpace:Vw,ExtendedArea:({className:e,title:t="Extended Area",...n})=>{const o=te("io-preferences-panel-extended-area",e),{ShowExtendedArea:r,HideLabelsInExtendedArea:i,ShowFavoritesInExtendedArea:a,ShowRecentAppsInExtendedArea:s}=zo();return d.jsxs(Je,{className:o,title:t,...n,children:[d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),d.jsx(s,{})]})},ShowExtendedArea:Fw,HideLabelsInExtendedArea:zw,ShowFavoritesInExtendedArea:$w,ShowRecentAppsInExtendedArea:Zw,Layouts:Xw,LayoutsSaveCurrentOnExit:Uw,LayoutsShowUnsavedChangesPrompt:au,LayoutsShowDeletePrompt:su,LayoutsShowHidden:({align:e="right",label:t="Show hidden Layouts and Workspaces",...n})=>vi(v.useContext(Se.IOConnectContext))?d.jsx(on,{align:e,label:t,prefKey:ia,"data-testid":"layouts-show-hidden-toggle",...n}):null,Downloads:Jw,DownloadsLocation:mx,DownloadsAskForEachDownload:gx,System:vx,SystemRestartSection:xx,SystemShutdownSection:Cx},kx=v.createContext(Ix),Sx=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...Ix,...t}),[t]);return d.jsx(kx.Provider,{value:n,children:e})});Sx.displayName="PreferencesPanelComponentsStoreProvider";const zo=()=>v.useContext(kx),Ax=({className:e,onClose:t,title:n="Platform Preferences",children:o,...r})=>d.jsxs(ze,{className:te("io-preferences-panel",e),"data-testid":"preferences-panel",...r,children:[d.jsxs(ze.Header,{"data-testid":"preferences-panel-header",children:[d.jsx(ze.Header.Title,{size:"large",text:n,tag:"h1","data-testid":"preferences-panel-title"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:t,"data-testid":"preferences-panel-close-button"})})]}),o]}),qA=({onClose:e,title:t="Platform Preferences",...n})=>{const{Body:o}=zo();return d.jsx(Ax,{title:t,onClose:e,...n,children:d.jsx(o,{})})},Ex=({components:e,...t})=>d.jsx(Sx,{components:e,children:d.jsx(qA,{...t})});function jx({className:e,title:t="General",...n}){const o=te("io-notifications-settings-panel-general",e),{AllowNotifications:r,AllowNotificationToasts:i,ShowNotificationBadge:a,CloseNotificationOnClick:s,PanelAutoHide:c,HideToastsAfter:l}=yi(),u=qe();return d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[u&&d.jsx(r,{}),u&&d.jsx(i,{}),d.jsx(a,{}),u&&d.jsx(c,{}),u&&d.jsx(s,{}),u&&d.jsx(l,{})]})})}function Np(e){if(e&&e.errorHandling&&typeof e.errorHandling!="function"&&e.errorHandling!=="log"&&e.errorHandling!=="silent"&&e.errorHandling!=="throw")throw new Error('Invalid options passed to createRegistry. Prop errorHandling should be ["log" | "silent" | "throw" | (err) => void], but '+typeof e.errorHandling+" was passed");var t=e&&typeof e.errorHandling=="function"&&e.errorHandling,n={};function o(r,i){var a=r instanceof Error?r:new Error(r);if(t)t(a);else{var s='[ERROR] callback-registry: User callback for key "'+i+'" failed: '+a.stack;if(e)switch(e.errorHandling){case"log":return console.error(s);case"silent":return;case"throw":throw new Error(s)}console.error(s)}}return{add:function(r,i,a){var s=n[r];return s||(s=[],n[r]=s),s.push(i),a&&setTimeout(function(){a.forEach(function(c){var l;if(!((l=n[r])===null||l===void 0)&&l.includes(i))try{Array.isArray(c)?i.apply(void 0,c):i.apply(void 0,[c])}catch(u){o(u,r)}})},0),function(){var c=n[r];c&&(c=c.reduce(function(l,u,p){return u===i&&l.length===p||l.push(u),l},[]),c.length===0?delete n[r]:n[r]=c)}},execute:function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var s=n[r];if(!s||s.length===0)return[];var c=[];return s.forEach(function(l){try{var u=l.apply(void 0,i);c.push(u)}catch(p){c.push(void 0),o(p,r)}}),c},clear:function(){n={}},clearKey:function(r){n[r]&&delete n[r]}}}Np.default=Np;var QA=hs(Np),kt=new class{constructor(){Vn(this,"subscribed",!1);Vn(this,"io");Vn(this,"registry",QA());Vn(this,"logger");Vn(this,"isPanelVisible");Vn(this,"notifications",[]);Vn(this,"bulkActionsSupported",!1);Vn(this,"initPromise")}init(e){return this.initPromise!==void 0||(this.initPromise=(async()=>{var t;if(!this.subscribed){this.subscribed=!0,this.io=e,this.logger=this.io.logger.subLogger("notifications");try{await this.initializeLogger()}catch(n){console.error("Failed to initialize logger with app configuration",n)}this.getBulkActionsSupport();try{await this.subscribe()}catch(n){throw(t=this.logger)==null||t.error("Error during subscription:",n),n}}})()),this.initPromise}async initializeLogger(){var o,r,i,a,s,c;const e=await wr.getMyApplication(this.io),t=((r=(o=e==null?void 0:e.userProperties)==null?void 0:o.logger)==null?void 0:r.publishLevel)??"error",n=((a=(i=e==null?void 0:e.userProperties)==null?void 0:i.logger)==null?void 0:a.consoleLevel)??"info";(s=this.logger)==null||s.publishLevel(t),(c=this.logger)==null||c.consoleLevel(n)}onPanelVisibilityChanged(e){return this.registry.add("on-panel-visibility-changed",e)}onConfigurationChanged(e){return this.registry.add("on-configuration-changed",e)}onNotificationsChanged(e){return this.registry.add("on-notifications-changed",e)}onCounterChanged(e){return this.registry.add("on-counter-changed",e)}async getNotificationsList(){var t;const e=await((t=this.io)==null?void 0:t.notifications.list());if(!e)throw new Error("io.notifications.list is not supported in this environment.");return e.map(n=>this.attachHandlers(n))}async getConfiguration(){if(this.io)return await this.io.notifications.getConfiguration();throw new Error("io.notifications.getConfiguration is not supported in this environment.")}showPanel(){var e;if(this.isDesktopEnvironment())return(e=this.io)==null?void 0:e.notifications.panel.show()}hidePanel(){var e;if(this.isDesktopEnvironment())return(e=this.io)==null?void 0:e.notifications.panel.hide()}clearAll(){var e,t;return(e=this.logger)==null||e.trace("clearing all notifications"),(t=this.io)==null?void 0:t.notifications.clearAll()}clearAllOld(){var e,t;return(e=this.logger)==null||e.trace("clearing all old notifications"),(t=this.io)==null?void 0:t.notifications.clearOld()}clearMany(e){var n,o,r,i;const t=(n=this.io)==null?void 0:n.notifications;return this.isBulkActionSupported("clearMany")?e.length<1?((o=this.logger)==null||o.trace("no ids provided to clear notifications"),Promise.resolve()):((r=this.logger)==null||r.trace(`clearing notifications with ids ${JSON.stringify(e.join(", "))}`),((i=t.clearMany)==null?void 0:i.call(t,e))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}close(e){var t,n;return(t=this.logger)==null||t.trace(`closing notification with id ${e}`),(n=this.io)==null?void 0:n.notifications.clear(e)}snooze(e,t){var n,o;return(n=this.logger)==null||n.trace(`snoozing notification with id ${e} for ${t}ms`),(o=this.io)==null?void 0:o.notifications.snooze(e,t)}snoozeMany(e,t){var o,r,i,a;const n=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("snoozeMany")?e.length<1?((r=this.logger)==null||r.trace("no ids provided to snooze notifications"),Promise.resolve()):((i=this.logger)==null||i.trace(`snoozing notifications with ids ${JSON.stringify(e.join(", "))} for ${t}ms`),((a=n.snoozeMany)==null?void 0:a.call(n,e,t))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}setState(e,t){var n,o;return(n=this.logger)==null||n.trace(`setting state of ${e} to ${t}`),(o=this.io)==null?void 0:o.notifications.setState(e,t)}setStates(e,t){var o,r,i,a;const n=(o=this.io)==null?void 0:o.notifications;return this.isBulkActionSupported("setStates")?e.length<1?((r=this.logger)==null||r.trace(`no ids provided to change state to ${t} for notifications`),Promise.resolve()):((i=this.logger)==null||i.trace(`setting state of ${JSON.stringify(e.join(", "))} to ${t}`),((a=n.setStates)==null?void 0:a.call(n,e,t))??Promise.resolve()):Promise.reject(new Error("Bulk actions are not supported in this environment"))}getBulkActionsSupport(){this.bulkActionsSupported=this.isBulkActionSupported("clearMany")&&this.isBulkActionSupported("setStates")&&this.isBulkActionSupported("snoozeMany")}setFilter(e){var t,n;return(t=this.logger)==null||t.trace(`setting filter to ${JSON.stringify(e)}`),(n=this.io)==null?void 0:n.notifications.setFilter(e)}configure(e){var t;return(t=this.io)==null?void 0:t.notifications.configure(e)}async resyncNotifications(){var e,t;try{const n=await this.getNotificationsList();this.notifications=n,this.registry.execute("on-notifications-changed",[...this.notifications]),(e=this.logger)==null||e.trace(`resynced notifications array with ${this.notifications.length} notifications`)}catch(n){(t=this.logger)==null||t.error("Error resyncing notifications list:",n)}}async subscribe(){var t,n,o,r,i,a,s,c,l;(t=this.io)==null||t.notifications.onRaised(u=>{var p;(p=this.logger)==null||p.trace(`received event indicating notification raise: ${JSON.stringify(u)}`),this.attachHandlers(u),this.notifications.unshift(u),this.registry.execute("on-notifications-changed",[...this.notifications])}),(n=this.io)==null||n.notifications.onStateChanged(({id:u},p)=>{var f;(f=this.logger)==null||f.trace(`received event for notification state is changed - "${u}" - "${p==null?void 0:p.toString()}"`),this.notifications=this.notifications.map(h=>{var m;return h.id===u?((m=this.logger)==null||m.trace(`${h.id} - the state is changed from "${h.state}" to "${p==null?void 0:p.toString()}"`),{...h,state:p}):h}),this.registry.execute("on-notifications-changed",this.notifications)});const e=(o=this.io)==null?void 0:o.notifications;e!=null&&e.onDataChanged&&e.onDataChanged((u,p)=>{var h;const f=u.id;(h=this.logger)==null||h.trace(`received event for notification data is changed - "${f}" - "${JSON.stringify(p)}"`),this.notifications=this.notifications.map(m=>{var g;return m.id===f?((g=this.logger)==null||g.trace(`${m.id} - the data is changed from "${JSON.stringify(m.data)}" to "${JSON.stringify(p)}"`),{...m,data:p}):m}),this.registry.execute("on-notifications-changed",this.notifications)}),(r=this.io)==null||r.notifications.onClosed(({id:u})=>{var p;(p=this.logger)==null||p.trace(`received event for notification is closed - "${u}".`),this.notifications=this.notifications.filter(f=>f.id!==u),this.registry.execute("on-notifications-changed",this.notifications)});try{const u=await this.getNotificationsList(),p=new Set(u.map(h=>h.id)),f=this.notifications.filter(h=>!p.has(h.id));this.notifications=[...f,...u],(i=this.logger)==null||i.trace(`initialized with ${u.length} fetched + ${f.length} from events = ${this.notifications.length} total`)}catch(u){(a=this.logger)==null||a.error("Error fetching initial notifications list:",u),(s=this.logger)==null||s.trace(`continuing with ${this.notifications.length} notifications from events`)}(c=this.io)==null||c.notifications.onConfigurationChanged(u=>{var p;(p=this.logger)==null||p.trace(`received event for configuration changed - ${JSON.stringify(u)}.`),this.registry.execute("on-configuration-changed",u)}),this.isDesktopEnvironment()&&((l=this.io)==null||l.notifications.panel.onVisibilityChanged(u=>{var p;(p=this.logger)==null||p.trace(`received event for panel visibility changed to "${u}".`),this.isPanelVisible=u,u&&this.resyncNotifications().catch(f=>{var h;(h=this.logger)==null||h.error("Error resyncing notifications on panel visibility:",f)}),this.registry.execute("on-panel-visibility-changed",u)}))}isDesktopEnvironment(){return typeof globalThis.window=="object"&&(!!globalThis.window.iodesktop||!!globalThis.window.glue42gd)}isBulkActionSupported(e){var n;const t=(n=this.io)==null?void 0:n.notifications;return typeof(t==null?void 0:t[e])=="function"}attachHandlers(e){var n;return(n=e.actions)==null||n.forEach(o=>{Object.assign(o,{onClick:async r=>{var i,a,s;try{(i=this.logger)==null||i.info(`${e.id}/${o.action} - was clicked.`),await((a=this.io)==null?void 0:a.notifications.click(e.id,o.action,r))}catch(c){(s=this.logger)==null||s.error("Error while clicking on action:",c)}}})}),Object.assign(e,{snooze:async(o=1e4)=>{var r,i;(r=this.logger)==null||r.trace(`${e.id} - request to change the state from ${e.state} to Snoozed with duration ${o}ms`),await((i=this.io)==null?void 0:i.notifications.snooze(e.id,o))},updateState:async o=>{var r,i;return(r=this.logger)==null||r.trace(`${e.id} - request to change the state from ${e.state} to ${o}`),(i=this.io)==null?void 0:i.notifications.setState(e.id,o)},updateData:async o=>{var i,a,s;(i=this.logger)==null||i.trace(`${e.id} - request to change the data to ${JSON.stringify(o)}`);const r=(a=this.io)==null?void 0:a.notifications;r!=null&&r.updateData?await r.updateData(e.id,o):(s=this.logger)==null||s.warn("'updateData' method is not supported")},onClick:async o=>{var r,i,a;try{(r=this.logger)==null||r.info(`${e.id} - was clicked.`),await((i=this.io)==null?void 0:i.notifications.click(e.id,void 0,o))}catch(s){(a=this.logger)==null||a.error(`Error while clicking on Notification: ${e.id}`,s)}},onShow:()=>{},close:async()=>{var o;return(o=this.logger)==null||o.info(`${e.id} - was closed.`),this.close(e.id)}})}};function mh(e){const t=v.useContext(Se.IOConnectContext),n=qe(),[o,r]=v.useState([]),[i,a]=v.useState(0),s="Platform",c=v.useCallback((p="asc")=>{if(n===null)return[];const f=[...o].sort((h,m)=>{const g=(h.title??h.name).toLowerCase(),y=(m.title??m.name).toLowerCase();return p==="asc"?g.localeCompare(y):y.localeCompare(g)});if(!n){const h=f.findIndex(m=>m.name===s);if(h!==-1){const[m]=f.splice(h,1);f.unshift(m)}}return f},[o,n]),l=v.useMemo(()=>c("asc"),[c]),u=v.useMemo(()=>c("desc"),[c]);return v.useEffect(()=>{if(n===null||n)return;const p={title:"System",name:s,hidden:!1,userProperties:{hidden:!1}};r(f=>f.some(h=>h.name===p.name)?f:[...f,p])},[n]),v.useEffect(()=>{if(!t)return;let p,f,h,m=!1;const g=C=>{r(w=>[...w.filter(I=>I.name!==C.name),{title:C.title??C.name,name:C.name,hidden:C.hidden,userProperties:C.userProperties}])},y=C=>{r(w=>w.filter(I=>I.name!==C.name))},x=C=>{r(w=>w.find(I=>I.name===C.name)?w.map(I=>I.name===C.name?{...I,title:C.title??I.title,hidden:C.hidden??I.hidden,userProperties:C.userProperties??I.userProperties}:I):w)};return(async()=>{const C=await wr.getApplications(t);if(m)return;r(k=>{const S=new Map;return k.forEach(E=>S.set(E.name,E)),C.forEach(E=>{S.set(E.name,{title:E.title??E.name,name:E.name,hidden:E.hidden,userProperties:E.userProperties})}),Array.from(S.values())});const[w,I,b]=await Promise.all([wr.onAppAdded(t,g),wr.onAppRemoved(t,y),wr.onAppChanged(t,x)]);if(m)return w==null||w(),I==null||I(),void(b==null?void 0:b());p=w,f=I,h=b})().catch(C=>{console.error("Failed to initialize apps",C)}),()=>{m=!0,p==null||p(),f==null||f(),h==null||h()}},[t]),{apps:v.useMemo(()=>{if(!(e!=null&&e.sourceFilter)||!Array.isArray(o))return o;const{allowed:p=[],blocked:f=[]}=e.sourceFilter,h=p.includes("*"),m=f.includes("*");let g=0;const y=o.map(x=>{const C=h||p.includes(x.name),w=!m&&C;return w&&g++,{...x,allowed:w}});return a(g),y},[e,o]),allowedApps:i,sortedAppsAsc:l,sortedAppsDesc:u,sortAppsAlphabetically:c}}function Px(e,t,n){var r;return{notificationStacks:v.useMemo(()=>{var l,u,p,f;if(!t.toastStacking)return[];const i=(a=t.stackBy)==="application"?"source":a==="severity"?"severity":"source";var a;const s=e.filter(h=>h.state==="Active"),c=new Map;for(const h of s){const m=h[i]??"";if(h.source&&((u=(l=n==null?void 0:n.sourceFilter)==null?void 0:l.muted)!=null&&u.includes(h.source))||(f=(p=n==null?void 0:n.sourceFilter)==null?void 0:p.muted)!=null&&f.includes("*"))continue;c.has(m)||c.set(m,{key:m,items:[]});const g=c.get(m);g&&g.items.unshift(h)}return Array.from(c.values()).filter(h=>h.items.some(m=>m.state==="Active"||m.state==="Stale"))},[e,t.toastStacking,t.stackBy,(r=n==null?void 0:n.sourceFilter)==null?void 0:r.muted])}}function Nx(e){const[t,n]=v.useState([]);return{selectedNotifications:t,selectNotification:(o,r)=>{const i=t;n(r?[...i,o]:i.filter(a=>a!==o))},selectAllNotifications:(o,r)=>{if(r){let i=[];switch(o){case"read":i=e.filter(a=>a.state==="Acknowledged"||a.state==="Seen").map(a=>a.id);break;case"unread":i=e.filter(a=>a.state==="Active"||a.state==="Stale").map(a=>a.id);break;case"snoozed":i=e.filter(a=>a.state==="Snoozed").map(a=>a.id);break;default:i=e.map(a=>a.id)}n(i)}else n([])}}}const k0=e=>{var t,n;return{enabledNotifications:e.enable,enabledToasts:e.enableToasts,toastStacking:((t=e.toasts)==null?void 0:t.mode)==="stacked",stackBy:(n=e.toasts)==null?void 0:n.stackBy,toastExpiry:e.toastExpiry,showNotificationBadge:e.showNotificationBadge,placement:e.placement,snooze:e.snooze,closeNotificationOnClick:e.closeNotificationOnClick,autoHidePanel:e.autoHidePanel}},S0=e=>Array.from(e.reduce((t,n)=>t.set(n.id,n),new Map).values());function e4(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState({}),[o,r]=v.useState({}),[i,a]=v.useState([]),[s,c]=v.useState(0),[l,u]=v.useState(!0),{apps:p,allowedApps:f}=mh(t),{notificationStacks:h}=Px(i,{toastStacking:o.toastStacking??!1,stackBy:o.stackBy??"source"},{sourceFilter:t.sourceFilter}),{selectedNotifications:m,selectNotification:g,selectAllNotifications:y}=Nx(i);v.useEffect(()=>{(async()=>{await kt.init(e),await(async()=>{try{const w=await kt.getConfiguration();n(w),r(I=>({...I,...k0(w)}))}catch(w){console.error("Error fetching configuration:",w)}})(),await(async()=>{try{const w=await kt.getNotificationsList();a(S0(w))}catch(w){console.error("Error fetching notifications:",w)}})()})().catch(w=>{console.error("Error in useNotifications fetch:",w)}),x()},[e]),v.useEffect(()=>{const w=kt.onNotificationsChanged(k=>{a(S0(k))}),I=kt.onConfigurationChanged(k=>{const S=k0(k);n(E=>({...E,...k})),r(E=>({...E,...S}))}),b=kt.onCounterChanged(k=>{c(k)});return()=>{w(),I(),b()}},[]);const x=()=>{u(kt.bulkActionsSupported)},C=async w=>{await kt.setFilter(w)};return{close:w=>kt.close(w),clearAll:()=>kt.clearAll(),settings:o,hidePanel:async()=>{await kt.hidePanel()},showPanel:async()=>{await kt.showPanel()},saveFilter:C,clearAllOld:()=>kt.clearAllOld(),saveSetting:async w=>{const I=((b,k)=>{const S=(A=>({enabledNotifications:P=>({enable:P}),enabledToasts:P=>({enableToasts:P}),toastStacking:P=>{var j;return{toasts:{mode:P?"stacked":"single",stackBy:(j=A.toasts)==null?void 0:j.stackBy}}},stackBy:P=>{var j;return{toasts:{mode:(j=A.toasts)==null?void 0:j.mode,stackBy:P}}},showNotificationBadge:P=>({showNotificationBadge:P}),toastExpiry:P=>({toastExpiry:P}),placement:P=>({placement:P}),snooze:P=>({snooze:P}),closeNotificationOnClick:P=>({closeNotificationOnClick:P}),autoHidePanel:P=>({autoHidePanel:P})}))(k),E=Object.keys(b)[0],N=b[E];return E&&N!==void 0&&S[E]?S[E](N):{}})(w,t);I&&await kt.configure(I)},allApps:p,saveAllFilter:async w=>{"subscribe"in w?await C({allowed:w.subscribe?["*"]:[],blocked:w.subscribe?[]:["*"]}):"mute"in w&&await C({muted:w.mute?["*"]:[]})},configuration:t,notifications:i,notificationStacks:h,notificationsCount:s,allApplications:t.allApplications??0,allowedApplications:f,isBulkActionsSupported:l,selectedNotifications:m,selectNotification:g,selectAllNotifications:y,clearMany:async w=>{await kt.clearMany(w)},snooze:async(w,I)=>{await kt.snooze(w,I)},snoozeMany:async(w,I)=>{await kt.snoozeMany(w,I)},setState:async(w,I)=>{await kt.setState(w,I)},setStates:async(w,I)=>{await kt.setStates(w,I)},setCount:w=>{c(w)},getNotificationsList:async()=>await kt.getNotificationsList()}}const Ox=v.createContext({allApps:[],settings:{},configuration:{},notifications:[],notificationsCount:0,onClose:()=>{},allApplications:0,clearAll:()=>{},showPanel:()=>{},hidePanel:()=>{},saveFilter:()=>{},clearAllOld:()=>{},notificationStacks:[],saveSetting:()=>{},allowedApplications:0,saveAllFilter:()=>{},isBulkActionsSupported:!1,selectedNotifications:[],selectNotification:()=>{},selectAllNotifications:()=>{},clearMany:()=>{},snooze:()=>{},snoozeMany:()=>{},setState:()=>{},setStates:()=>{},setCount:()=>{}}),Ee=()=>v.useContext(Ox);function Tx({label:e="Allow notifications",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=v.useCallback(s=>{r({enabledNotifications:s.target.checked})},[r]);return i?d.jsx(Nt,{label:e,align:t,onChange:a,checked:o.enabledNotifications??!1,...n}):null}function Rx({label:e="Allow notification toasts",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({enabledToasts:c.target.checked})},[r]);return i?d.jsx(Nt,{label:e,align:t,onChange:s,checked:o.enabledToasts??!1,disabled:a,...n}):null}function Lx({label:e="Show notification badge",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe()&&!o.enabledNotifications,a=v.useCallback(s=>{r({showNotificationBadge:s.target.checked})},[r]);return d.jsx(Nt,{label:e,align:t,onChange:a,checked:o.showNotificationBadge??!1,disabled:i,...n})}function _x({label:e="Close notification on click",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({closeNotificationOnClick:c.target.checked})},[r]);return i?d.jsx(Nt,{label:e,align:t,onChange:s,checked:o.closeNotificationOnClick??!1,disabled:a,...n}):null}function Mx({label:e="Auto hide panel",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=v.useCallback(s=>{r({autoHidePanel:s.target.checked})},[r]);return i?d.jsx(Nt,{label:e,align:t,onChange:a,checked:o.autoHidePanel??!1,...n}):null}const A0=(e,t)=>e?`${e} ${t}${e!==1?"s":""}`:"",pl=e=>{const t=Math.floor(e/60),n=e%60,o=A0(t,"minute"),r=A0(n,"second");return o+(o&&r?" ":"")+r};function Dx({className:e,title:t="Hide toasts after",items:n=[15,30,45,60],...o}){const r=te("flex","jc-between","ai-center",e),{settings:i,saveSetting:a}=Ee(),s=qe(),c=s&&!i.enabledNotifications,l=v.useCallback((u=15e3)=>{i.toastExpiry!==u&&a({toastExpiry:1e3*u})},[i.toastExpiry,a]);return s?d.jsxs("div",{className:r,...o,children:[d.jsx("div",{className:"io-text-clipper "+(c?"io-text-disabled":""),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{text:pl((i.toastExpiry??0)/1e3)}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:n.map(u=>d.jsx(fe.Item,{onClick:()=>{l(u)},children:pl(u)},u))})})]})]}):null}function Bx({className:e,title:t="Stacking",...n}){const o=te("io-notifications-settings-panel-stacking",e),{ToastStacking:r,ToastStackBy:i}=yi();return qe()?d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[d.jsx(r,{}),d.jsx(i,{})]})}):null}function Hx({label:e="Allow toast stacking",align:t="right",...n}){const{settings:o,saveSetting:r}=Ee(),i=qe(),a=i&&!o.enabledNotifications,s=v.useCallback(c=>{r({toastStacking:c.target.checked})},[r]);return i?d.jsx(Nt,{label:e,align:t,onChange:s,checked:o.toastStacking??!1,disabled:a,...n}):null}const Op={application:"Application",severity:"Priority"},t4=Object.fromEntries(Object.entries(Op).map(([e,t])=>[t,e]));function Gx({className:e,title:t="Group by",...n}){const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=a&&!r.enabledNotifications,c=v.useCallback((u="severity")=>{r.stackBy!==u&&i({stackBy:u.toLowerCase()})},[r.stackBy,i]);if(!a)return null;const l=Object.values(Op);return d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:te("io-text-clipper",{"io-text-disabled":s}),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:s,children:[d.jsx(fe.Button,{text:Op[r.stackBy??"severity"]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:l.map(u=>d.jsx(fe.Item,{onClick:()=>{const p=t4[u];c(p)},children:u},u))})})]})]})}function Wx({className:e,title:t="Placement",...n}){const o=te("io-notifications-settings-panel-placement",e),{PlacementPanel:r,PlacementToasts:i}=yi();return qe()?d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t,children:[d.jsx(r,{}),d.jsx(i,{})]})}):null}const Vx=e=>e.replace(/(^|-)\w/g,t=>t.toUpperCase().replace("-"," "));function Fx({className:e,title:t="Panel position",...n}){var c,l;const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=v.useCallback(u=>{var p;u||(u="right"),((p=r.placement)==null?void 0:p.panel)!==u&&i({placement:{...r.placement,panel:u.toLowerCase()}})},[r.placement,i]);return a?d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:"io-text-clipper",children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",children:[d.jsx(fe.Button,{text:(c=r.placement)!=null&&c.panel?Vx((l=r.placement)==null?void 0:l.panel):"Right"}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:["Right","Left"].map(u=>d.jsx(fe.Item,{onClick:()=>{s(u)},children:u},u))})})]})]}):null}function zx({className:e,title:t="Toasts position",...n}){var c,l;const o=te("flex","jc-between","ai-center",e),{settings:r,saveSetting:i}=Ee(),a=qe(),s=v.useCallback(u=>{var f;if(u||(u="bottom-right"),((f=r.placement)==null?void 0:f.toasts)===u)return;const p=u.replace(/\s+/g,"-").toLowerCase();i({placement:{...r.placement,toasts:p}})},[r.placement,i]);return a?d.jsxs("div",{className:o,...n,children:[d.jsx("div",{className:"io-text-clipper",children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",children:[d.jsx(fe.Button,{text:(c=r.placement)!=null&&c.toasts?Vx((l=r.placement)==null?void 0:l.toasts):"Bottom Right"}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:["Top Right","Top Left","Bottom Right","Bottom Left"].map(u=>d.jsx(fe.Item,{onClick:()=>{s(u)},children:u},u))})})]})]}):null}function $x({className:e,title:t="Snooze",...n}){var a;const o=te("io-notifications-settings-panel-snooze",e),{SnoozeDuration:r}=yi(),{settings:i}=Ee();return qe()&&((a=i.snooze)!=null&&a.enabled)?d.jsx("div",{className:o,...n,children:d.jsx(Je,{title:t,children:d.jsx(r,{})})}):null}function Zx({className:e,title:t="Default duration",items:n=[60,120,180,300],...o}){var u,p;const r=te("flex","jc-between","ai-center",e),{settings:i,saveSetting:a}=Ee(),s=qe(),c=s&&!i.enabledNotifications,l=v.useCallback((f=6e4)=>{var h;i.snooze&&((h=i.snooze)==null?void 0:h.duration)!==f&&a({snooze:{...i.snooze,duration:1e3*f}})},[i.snooze,a]);return s&&((u=i.snooze)!=null&&u.enabled)?d.jsxs("div",{className:r,...o,children:[d.jsx("div",{className:te("io-text-clipper",{"io-text-disabled":c}),children:d.jsx("span",{children:t})}),d.jsxs(fe,{variant:"light",disabled:c,children:[d.jsx(fe.Button,{text:pl((((p=i.snooze)==null?void 0:p.duration)??0)/1e3)}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",children:n.map(f=>d.jsx(fe.Item,{onClick:()=>{l(f)},children:pl(f)},f))})})]})]}):null}function Xx({className:e,title:t,...n}){const o=te("io-notifications-settings-panel-subscriptions",e),{SubscribeAll:r,SubscribeApp:i,SubscribeMuteAll:a,SubscribeMuteApp:s}=yi(),{sortAppsAlphabetically:c}=mh(),l=qe(),u=c(),p="io-notifications-subscriptions-grid "+(l?"with-three-columns":"with-two-columns");return d.jsx("div",{className:o,...n,children:d.jsxs(Je,{title:t??(l?"Subscribe & Mute":"Subscribe"),children:[d.jsxs("div",{className:p,children:[d.jsx("p",{className:"io-text-section",children:"Sources"}),d.jsx("p",{className:"io-text-section",children:"Subscribe"}),l&&d.jsx("p",{className:"io-text-section",children:"Mute"})]}),d.jsxs("div",{className:p,children:[d.jsx("p",{children:"All Sources"}),d.jsx(r,{label:""}),l&&d.jsx(a,{label:""})]}),u.map(f=>{var h;return!f||f.hidden||(h=f==null?void 0:f.userProperties)!=null&&h.hidden?null:d.jsxs("div",{className:p,children:[d.jsx("p",{children:f.title??f.name}),d.jsx(i,{app:f,label:""}),l&&d.jsx(s,{app:f,label:""})]},f.name)})]})})}function Ux({label:e="All apps",align:t="right",...n}){var c,l,u,p;const{settings:o,configuration:r,saveAllFilter:i}=Ee(),a=qe()&&!o.enabledNotifications,s=v.useCallback(f=>{i({subscribe:f.target.checked})},[i]);return d.jsx(Nt,{align:t,label:e,onChange:s,checked:(((l=(c=r.sourceFilter)==null?void 0:c.allowed)==null?void 0:l.includes("*"))&&((p=(u=r.sourceFilter)==null?void 0:u.blocked)==null?void 0:p.length)===0)??!1,disabled:a,...n})}function Jx({label:e="App",align:t="right",app:n,...o}){var u,p,f,h,m,g;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Ee(),c=qe()&&!i.enabledNotifications,l=v.useCallback((y,x)=>{var I,b,k,S,E,N;const C={...a.sourceFilter},w=(I=C.allowed)==null?void 0:I.indexOf("*");typeof w=="number"&&w>-1&&((b=C.allowed)==null||b.splice(w,1),r.forEach(A=>{var P;A.name!==x.name&&((P=C.allowed)==null||P.push(A.name))})),y?(C.allowed=[...new Set([...C.allowed??[],x.name])],C.blocked=(k=C.blocked)==null?void 0:k.filter(A=>A!==x.name)):(C.allowed=(S=C.allowed)==null?void 0:S.filter(A=>A!==x.name),C.blocked=[...new Set([...C.blocked??[],x.name])]),(E=C.allowed)!=null&&E.length&&((N=C.blocked)!=null&&N.includes("*"))&&C.blocked.splice(C.blocked.indexOf("*"),1),s(C)},[r,a.sourceFilter,s]);return d.jsx(Nt,{id:`subscribe-${n.name}`,label:e,align:t,onChange:y=>l(y.target.checked,n),checked:(((p=(u=a.sourceFilter)==null?void 0:u.allowed)==null?void 0:p.includes("*"))&&!((h=(f=a.sourceFilter)==null?void 0:f.blocked)!=null&&h.includes(n.name))||((g=(m=a.sourceFilter)==null?void 0:m.allowed)==null?void 0:g.includes(n.name)))??!1,disabled:c,...o})}function Yx({label:e="Mute all",align:t="right",...n}){var l,u,p,f;const{settings:o,configuration:r,saveAllFilter:i}=Ee(),a=qe(),s=a&&(!o.enabledNotifications||((u=(l=r.sourceFilter)==null?void 0:l.allowed)==null?void 0:u.indexOf("*"))===-1),c=v.useCallback(h=>{i({mute:h.target.checked})},[i]);return a?d.jsx(Nt,{align:t,label:e,onChange:c,checked:((f=(p=r.sourceFilter)==null?void 0:p.muted)==null?void 0:f.includes("*"))??!1,disabled:s??!1,...n}):null}function Kx({label:e="App",align:t="right",app:n,...o}){var p,f,h,m,g,y,x,C,w,I,b,k,S,E,N,A;const{allApps:r,settings:i,configuration:a,saveFilter:s}=Ee(),c=qe(),l=c&&(!i.enabledNotifications||((f=(p=a.sourceFilter)==null?void 0:p.blocked)==null?void 0:f.includes("*"))||((m=(h=a.sourceFilter)==null?void 0:h.blocked)==null?void 0:m.includes(n.name))||((y=(g=a.sourceFilter)==null?void 0:g.allowed)==null?void 0:y.length)===0||((C=(x=a.sourceFilter)==null?void 0:x.allowed)==null?void 0:C.indexOf(n.name))===-1&&((I=(w=a.sourceFilter)==null?void 0:w.allowed)==null?void 0:I.indexOf("*"))===-1&&((k=(b=a.sourceFilter)==null?void 0:b.blocked)==null?void 0:k.length)===0),u=v.useCallback((P,j)=>{var T,H,V,z;const G={...a.sourceFilter},M=(T=G==null?void 0:G.muted)==null?void 0:T.indexOf("*");typeof M=="number"&&M>-1&&((H=G.muted)==null||H.splice(M,1),r.forEach(O=>{var B;O.name===j.name||O.hidden||((B=G.muted)==null||B.push(O.name))})),P?(V=G.muted)==null||V.push(j.name):G.muted=(z=G.muted)==null?void 0:z.filter(O=>O!==j.name),s(G)},[r,a.sourceFilter,s]);return!c||n.hidden?null:d.jsx(Nt,{id:`mute-${n.name}`,label:e,align:t,onChange:P=>u(P.target.checked,n),checked:(((E=(S=a.sourceFilter)==null?void 0:S.muted)==null?void 0:E.includes("*"))||((A=(N=a.sourceFilter)==null?void 0:N.muted)==null?void 0:A.includes(n.name)))??!1,disabled:l??!1,...o})}const n4={Body:e=>{const{General:t,Placement:n,Stacking:o,Snooze:r,Subscriptions:i}=yi();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(o,{}),d.jsx(n,{}),d.jsx(r,{}),d.jsx(i,{})]})},General:jx,AllowNotifications:Tx,AllowNotificationToasts:Rx,ShowNotificationBadge:Lx,CloseNotificationOnClick:_x,PanelAutoHide:Mx,HideToastsAfter:Dx,Stacking:Bx,ToastStacking:Hx,ToastStackBy:Gx,Placement:Wx,PlacementPanel:Fx,PlacementToasts:zx,Snooze:$x,SnoozeDuration:Zx,Subscriptions:Xx,SubscribeAll:Ux,SubscribeApp:Jx,SubscribeMuteAll:Yx,SubscribeMuteApp:Kx},Tp=v.createContext(n4),gh=v.memo(({children:e,components:t})=>{const n=v.useContext(Tp),o=v.useMemo(()=>({...n,...t}),[n,t]);return d.jsx(Tp.Provider,{value:o,children:e})});gh.displayName="NotificationsSettingsPanelComponentsStoreProvider";const yi=()=>v.useContext(Tp),o4=({className:e,onClose:t,title:n="Notification Settings",...o})=>{const{Body:r}=yi();return d.jsxs(ze,{className:te("io-notifications-settings-panel",e),"data-testid":"notifications-settings-panel",...o,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:n,tag:"h1"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"close",size:"32",onClick:t})})]}),d.jsx(r,{})]})},vh=({components:e,...t})=>d.jsx(gh,{components:e,children:d.jsx(o4,{...t})}),r4=({name:e,value:t})=>d.jsxs("div",{className:"io-profile-section-item",children:[d.jsx("div",{className:"io-profile-section-item-name",children:e}),d.jsx("div",{className:"io-profile-section-item-value",children:t})]}),qx=({className:e,items:t,title:n})=>d.jsxs("div",{className:te("io-profile-section-body",e),children:[n&&d.jsx(bo,{className:"io-profile-section-title",text:n}),t.map(({name:o,value:r})=>d.jsx(r4,{name:o,value:r},o))]}),yh=({className:e,items:t,title:n})=>d.jsxs("section",{className:te("io-profile-section",e),children:[d.jsx(qx,{items:t,title:n}),d.jsx(ms,{className:"mt-8"})]}),Qx=({title:e="License",...t})=>d.jsx(yh,{title:e,...t}),e2=({title:e="Version",...t})=>d.jsx(yh,{title:e,...t}),t2=({title:e="Plugins",...t})=>d.jsx(yh,{title:e,...t}),n2=({className:e})=>{const t=Zo()?"io.Connect Desktop":"io.Connect Browser";return d.jsxs("div",{className:te("io-trademark-container",e),children:[d.jsx("h4",{className:"io-trademark-title",children:t}),d.jsxs("p",{className:"io-trademark-text",children:[t,"® is a registered trademark of"," ",d.jsx("a",{href:"https://www.interop.io",rel:"noreferrer",target:"_blank",children:"Interop Inc©"})," ",new Date().getFullYear(),". All rights reserved."]})]})},o2=({avatarInitials:e=Zo()?"CD":"CB",className:t,items:n,onLogout:o,title:r})=>d.jsxs("section",{className:te("io-profile-section",t),children:[d.jsxs("div",{className:"io-user-details-container",children:[d.jsx("div",{className:"io-user-avatar",children:e}),d.jsx(qx,{className:"mt-12",items:n,title:r})]}),o&&d.jsx(Ze,{className:"io-log-out-button",onClick:o,variant:"primary",icon:"arrow-right-from-bracket",children:"Log out"}),d.jsx(ms,{className:"mt-8"})]}),r2={LicenseSection:Qx,ProductsInfoSection:e2,PluginsSection:t2,Trademark:n2,UserSection:o2},i2=v.createContext(r2),a2=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...r2,...t}),[t]);return d.jsx(i2.Provider,{value:n,children:e})});a2.displayName="ProfilePanelComponentsStoreProvider";const i4=e=>{const t=new Date(e);return[{day:"numeric"},{month:"short"},{year:"numeric"}].map(n=>t.toLocaleDateString("en",n)).join(" ")},a4=e=>{if(!e)return{items:[]};const t=[...e.email?[{name:"Email",value:e.email}]:[],...e.type?[{name:"User Type",value:e.type}]:[],...e.role?[{name:"User Role",value:e.role}]:[],{name:"User ID",value:e.id}];if(e.firstName||e.lastName){const n=[e.firstName,e.lastName].filter(o=>!!o);return{avatarInitials:n.map(o=>o.charAt(0)).join(""),items:t,title:n.join(" ")}}return e.username?{avatarInitials:e.username.charAt(0),items:t,title:e.username}:e.email?{avatarInitials:e.email.charAt(0),items:t}:{items:t}},s4=e=>{const t=new Date(2023,5,6),n=e.expiration<t.getTime()?1e3:1;return{items:[{name:"Type",value:e.type},{name:"Expiration Date",value:i4(e.expiration*n)}]}},c4=e=>({items:e.map(t=>({name:t.name,value:t.version}))}),l4=e=>{var n;const t={"@interopio/workspaces-ui-react":"Workspaces React Frame","@interopio/workspaces-ui-web-components":"Workspaces Web Components Frame"};return{items:[{name:"io.Connect Browser platform",value:e.platform.apiVersion},{name:"io.Connect Browser client",value:e.client.apiVersion},...e.workspaces?[{name:"Workspaces API",value:e.workspaces.apiVersion}]:[],...(n=e.workspaces)!=null&&n.container&&bx(e.workspaces.container.type,t)?[{name:t[e.workspaces.container.type],value:e.workspaces.container.version}]:[],...e.home?[{name:"Home UI",value:e.home.version}]:[],...e.search?[{name:"Search API",value:e.search.apiVersion}]:[],...e.modals?[{name:"Modals API",value:e.modals.apiVersion}]:[]]}},u4=()=>{const e=window.glue42gd??window.iodesktop;if(!e)throw new Error("both window.glue42gd and window.iodesktop are not available");const{user:t,env:n}=e,o=[{name:"Environment",value:n.env},{name:"Region",value:n.region}];return t?{avatarInitials:t.charAt(0),items:o,title:t}:{items:o}},d4=e=>({items:Object.entries(e??{}).map(([n,o])=>({name:n,value:o}))}),p4=(e=[])=>({items:e.map(({product:t,version:n})=>({name:t,value:n}))}),f4=e=>Zo()?(async t=>{const{licInfo:n,productInfo:o}=(await t.interop.invoke("T42.GD.GetInfo")).returned;return{user:u4(),license:d4(n),productsInfo:p4(o)}})(e):(async()=>{if(!window.iobrowser)throw new Error("window.iobrowser is not available");const t=await window.iobrowser.system.getProfileData();return{user:a4(t.user),license:s4(t.license),plugins:c4(t.plugins),productsInfo:l4(t.productsInfo)}})(),h4=({className:e,onClose:t,onLogout:n,title:o="Profile",...r})=>{var h;const{LicenseSection:i,ProductsInfoSection:a,PluginsSection:s,Trademark:c,UserSection:l}=v.useContext(i2),u=v.useContext(Se.IOConnectContext),[p,f]=v.useState(null);return v.useEffect(()=>{u&&(async()=>{const m=await f4(u);f(m)})().catch(console.error)},[u]),d.jsxs(ze,{className:te("io-profile-panel",e),"data-testid":"profile-panel",...r,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.Title,{size:"large",text:o}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:t})})]}),d.jsxs(Uo,{element:ze.Body,children:[p!=null&&p.user.items.length||p!=null&&p.user.title?d.jsx(l,{avatarInitials:p.user.avatarInitials,items:p.user.items,onLogout:n,title:p.user.title}):null,d.jsxs("div",{className:"io-profile-sections-container",children:[p!=null&&p.license.items.length?d.jsx(i,{items:p.license.items}):null,p!=null&&p.productsInfo.items.length?d.jsx(a,{items:p.productsInfo.items}):null,(h=p==null?void 0:p.plugins)!=null&&h.items.length?d.jsx(s,{items:p.plugins.items}):null]}),d.jsx(c,{className:"mt-auto"})]})]})},s2=({components:e,...t})=>d.jsx(a2,{components:e,children:d.jsx(h4,{...t})}),m4=document.querySelector("#root")??document.body,g4={preferences:Ex,"notification-settings":vh,profile:s2},v4=()=>{const{panel:e,deselectPanel:t}=Lw();Md(()=>{e&&t()},["Escape"]);const n=e?g4[e]:null;return n?Bo.createPortal(d.jsx("div",{className:"io-panel-overlay",children:d.jsx(n,{onClose:t})}),m4):null};var y4=Object.freeze({__proto__:null,ActivePanelRenderer:v4,PanelManagerProvider:({children:e})=>{const[t,n]=v.useState(null),o=v.useCallback(a=>{n(a)},[]),r=v.useCallback(()=>{n(null)},[]),i=v.useMemo(()=>({panel:t,selectPanel:o,deselectPanel:r}),[t,o,r]);return d.jsx(Rw.Provider,{value:i,children:e})},usePanelManagerContext:Lw});v.createContext({theme:"dark"});const b4="var(--io-neutrals-0)",Ku="var(--io-neutrals-900)";function c2(e){var r;let t,n,o;if(e.startsWith("#")){let i=e.slice(1);i.length===3&&(i=i.split("").map(a=>a+a).join("")),t=parseInt(i.substring(0,2),16),n=parseInt(i.substring(2,4),16),o=parseInt(i.substring(4,6),16)}else{if(!e.startsWith("rgb")){const i=document.createElement("canvas").getContext("2d");return i?(i.fillStyle=e,c2(i.fillStyle)):Ku}{const i=(r=e.match(/\d+/g))==null?void 0:r.map(Number);if(!i||i.length<3)return Ku;[t,n,o]=i}}return(.2126*t+.7152*n+.0722*o)/255>.5?Ku:b4}function w4({className:e,channel:t,...n}){const o=te("io-channel-badge",e),r=v.useMemo(()=>c2(t.color),[t.color]);return d.jsx("div",{className:o,style:{color:r,backgroundColor:t.color},"data-testid":`channel-selector-badge-${t.color}`,...n,children:d.jsx("span",{className:"io-channel-selector-badge-label","data-testid":"channel-selector-label",children:t.label})})}function x4(){return d.jsx(wt,{variant:"check","data-testid":"channel-selector-channel-selected"})}function C4({channel:e,handleChannelRestricted:t,lockedChannelRestriction:n}){const o=(r,i)=>a=>{a.stopPropagation(),Wn(a)&&(a.preventDefault(),i||t({...e,[r]:!e[r]}))};return d.jsxs(d.Fragment,{children:[d.jsx("div",{children:e.isSelected&&d.jsx("span",{"data-testid":"channel-selector-channel-selected",children:"Active"})}),d.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-publish-toggle-container",children:d.jsx(Nt,{label:"Publish",checked:e.write,onChange:()=>{t({...e,write:!e.write})},onKeyDown:o("write",!e.isSelected||(n==null?void 0:n.write)),onClick:r=>r.stopPropagation(),disabled:!e.isSelected||(n==null?void 0:n.write)})}),d.jsx("div",{role:"button",onClick:r=>r.stopPropagation(),"data-testid":"channel-selector-subscribe-toggle-container",children:d.jsx(Nt,{label:"Subscribe",checked:e.read,onChange:()=>{t({...e,read:!e.read})},onKeyDown:o("read",!e.isSelected||(n==null?void 0:n.read)),disabled:!e.isSelected||(n==null?void 0:n.read)})})]})}const l2=v.createContext({});function I4({channel:e,isSelected:t,onChannelSelect:n,onChannelRestrict:o,...r}){const{variant:i,selectedChannels:a,lockedChannelRestrictions:s}=v.useContext(l2),c=t||e.isSelected||(a==null?void 0:a.includes(e)),l=s==null?void 0:s.find(h=>h.name===e.name),u=v.useCallback(()=>n==null?void 0:n({...e,isSelected:!c}),[e,n,c]),p=v.useCallback(h=>{const m=h.target;m.closest(".io-toggle")||m.classList.contains("io-toggle")||Wn(h)&&(h.preventDefault(),n==null||n({...e,isSelected:!c}))},[e,n,c]),f=v.useCallback(h=>{o==null||o(h)},[o]);return d.jsx(El,{prepend:d.jsx(w4,{channel:e}),append:i==="single"||i==="multi"?c&&d.jsx(x4,{}):d.jsx(C4,{channel:e,handleChannelRestricted:f,lockedChannelRestriction:l}),isSelected:c,onClick:u,onKeyDown:p,...r,children:e.name},e.name)}function k4({variant:e,onVariantChange:t,disabled:n=!1}){const o=e==="directionalSingle"||e==="directionalMulti",r=v.useCallback(()=>{t==null||t(!o)},[o,t]),i=v.useCallback(s=>{s.stopPropagation()},[]),a=v.useCallback(s=>{s.stopPropagation(),Wn(s)&&(s.preventDefault(),n||r())},[n,r]);return d.jsx(Nt,{label:"Directional",align:"right",checked:o,onChange:r,onClick:i,onKeyDown:a,disabled:n,"data-testid":`channel-selector-toggle-${e}`})}const S4=v.forwardRef(({className:e,variant:t="single",variantToggle:n=!1,channels:o=[],lockedChannelRestrictions:r=[],onVariantChange:i,onChannelSelect:a,onChannelRestrict:s,...c},l)=>{const u=te("io-list-channels","io-channel-selector-panel",(t==="directionalSingle"||t==="directionalMulti")&&"io-list-channels-directional io-channel-selector-panel-directional",e),p=v.useMemo(()=>({variant:t,selectedChannels:o.filter(f=>f.isSelected),lockedChannelRestrictions:r,onVariantChange:i,onChannelSelect:a,onChannelRestrict:s}),[o,t,r,i,a,s]);return d.jsx(l2.Provider,{value:p,children:d.jsx("div",{className:u,ref:l,children:d.jsxs(Lt,{...c,children:[d.jsx(Lt.ItemTitle,{"data-testid":"channel-selector-title",append:n&&d.jsx(k4,{variant:t,onVariantChange:i}),children:{single:"Select Channel",directionalSingle:"Select Directional Channel",multi:"Select Channels",directionalMulti:"Select Directional Channels"}[t]}),o==null?void 0:o.map(f=>d.jsx(I4,{channel:f,isSelected:f.isSelected,onChannelSelect:a,onChannelRestrict:s,"data-testid":`channel-selector-channel-${f.name}`},f.name))]})})})});S4.displayName="ChannelSelector";const A4=v.forwardRef(({className:e,title:t,ariaLabel:n,onClick:o,onKeyDown:r,children:i,disabled:a=!1,...s},c)=>d.jsx("div",{ref:c,className:te(e,{disabled:a}),title:t,role:"button",tabIndex:a?-1:0,"aria-label":n,"aria-disabled":a,onClick:l=>{!a&&o&&o(l)},onKeyDown:l=>{!a&&r&&r(l)},...s,children:i}));A4.displayName="ChannelSelectorButtonWrapper";function E4({actionButtons:e,actionButtonElementsRefs:t,isAutofocusButton:n,isButtonDisabled:o,onButtonClick:r}){return d.jsx(We,{"data-testid":"io-dialog-action-buttons-group",align:"right",children:e.map((i,a)=>{const{id:s,text:c,variant:l}=i,u=n(s);return d.jsx(Ze,{"data-testid":`io-dialog-action-button-${s}`,id:s,ref:p=>{a===0&&(t.current=[]),t.current[a]=p},className:u?"io-focus-button":void 0,disabled:o(s),onClick:()=>r(i),variant:l,children:c},s)})})}function bh({actionButtons:e,children:t,onCompletion:n,size:o,title:r=Zo()?"io.Connect Desktop":"io.Connect Browser",validationErrors:i=[]}){const{actionButtonElementsRefs:a,autofocusButtonId:s,hasAutofocusButtonLostInitialFocus:c}=(p=>{const f=v.useRef([]),h=v.useMemo(()=>{var x;return((x=p.find(C=>C.autofocus))==null?void 0:x.id)??null},[p]),m=v.useRef(h),[g,y]=v.useState(!m.current);return v.useLayoutEffect(()=>{if(g)return;if(h!==m.current)return void y(!0);const x=f.current.find(w=>(w==null?void 0:w.id)===h);if(!x)return;x.focus();const C=()=>{y(!0)};return x.addEventListener("blur",C),()=>{x.removeEventListener("blur",C)}},[h,g]),{actionButtonElementsRefs:f,autofocusButtonId:h,hasAutofocusButtonLostInitialFocus:g}})(e),l=()=>{n({isClosed:!0})},u={...o};return d.jsxs(Vo,{className:"io-dialog-template",closeFn:l,isOpen:!0,onCancel:p=>{p.preventDefault(),l()},onKeyDown:p=>{!Wn(p)||i.length||p.target instanceof HTMLButtonElement||p.key===" "&&p.target instanceof HTMLInputElement||n({isEnterPressed:!0})},style:u,title:r,draggable:!0,children:[d.jsx(Vo.Body,{children:t}),d.jsx(Vo.Footer,{children:d.jsx(E4,{actionButtonElementsRefs:a,actionButtons:e,isAutofocusButton:p=>s===p&&!c,isButtonDisabled:p=>i.some(f=>f.disabledButtonIds.some(h=>h===p)),onButtonClick:({id:p,text:f})=>{n({responseButtonClicked:{id:p,text:f}})}})})]})}function wh({children:e}){return d.jsx("h1",{"data-testid":"io-dialog-heading",className:"io-dialog-template-heading",children:e})}function j4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,heading:r,text:i,title:a}=n;return d.jsx(bh,{actionButtons:o,onCompletion:e,size:t,title:a,children:d.jsx(Vo.Body.Content,{children:d.jsxs("div",{children:[d.jsx(wh,{children:r}),d.jsx("p",{"data-testid":"io-dialog-text",children:i})]})})})}function P4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,checkbox:r,heading:i,text:a,title:s}=n,[c,l]=v.useState(r.initialValue),u=v.useCallback(()=>l(f=>!f),[]),p=[{id:r.id,type:"checkbox",checked:c}];return d.jsxs(bh,{actionButtons:o,onCompletion:f=>e({...f,inputs:p}),size:t,title:s,children:[d.jsx(Vo.Body.Content,{children:d.jsxs("div",{children:[d.jsx(wh,{children:i}),d.jsx("p",{"data-testid":"io-dialog-text",children:a})]})}),d.jsx(Es,{"data-testid":`io-dialog-checkbox-${r.id}`,checked:c,id:r.id,label:r.label,name:r.id,onChange:u})]})}function N4({onCompletion:e,size:t,variables:n}){const{actionButtons:o,heading:r,input:i,title:a}=n,[s,c]=v.useState(i.initialValue??""),l=v.useRef(null),u=(p=s,!(f=i.validation)||new RegExp(f.regexPattern).test(p)?null:{disabledButtonIds:f.disabledButtonIds,message:f.errorMessage});var p,f;const h=[{id:i.id,type:"text",value:s}];return v.useLayoutEffect(()=>{var m;(m=l.current)==null||m.select()},[]),d.jsxs(bh,{actionButtons:o,onCompletion:m=>e({...m,inputs:h}),size:t,title:a,validationErrors:u?[u]:[],children:[d.jsx(Vo.Body.Content,{children:d.jsx(wh,{children:r})}),d.jsx(qn,{"data-testid":`io-dialog-input-${i.id}`,ref:l,errorDataTestId:`io-dialog-input-${i.id}-error-message`,errorMessage:u==null?void 0:u.message,id:i.id,label:i.label,name:i.id,onChange:m=>c(m.target.value),placeholder:i.placeholder,type:"text",value:s})]})}const xh=$t({width:Um,height:Um}),Ch=tp().andThen(e=>((t,n)=>{const o=typeof t;return o==="function"?tp():B3(`The argument provided as "${n}" must be a function, received: ${o}`)})(e,"onCompletion")),Ih=$t({autofocus:xe(pt()),id:ut,text:ut,variant:ys(U("default"),U("primary"),U("critical"),U("outline"),U("link"))}),O4=$t({disabledButtonIds:wo(ut),errorMessage:ut,regexPattern:ut}),T4=$t({actionButtons:wo(Ih),heading:ln(),text:ln(),title:xe(ln())}),R4=$t({templateName:U("noInputsConfirmationDialog"),onCompletion:Ch,size:xe(xh),variables:T4}),L4=$t({actionButtons:wo(Ih),checkbox:$t({id:ut,initialValue:xe(pt()),label:xe(ln())}),heading:ln(),text:ln(),title:xe(ln())}),_4=$t({templateName:U("singleCheckboxDialog"),onCompletion:Ch,size:xe(xh),variables:L4}),M4=$t({actionButtons:wo(Ih),heading:ln(),input:$t({id:ut,initialValue:xe(ln()),label:xe(ln()),placeholder:xe(ln()),validation:xe(O4)}),title:xe(ln())}),D4=$t({templateName:U("singleTextInputDialog"),onCompletion:Ch,size:xe(xh),variables:M4});R4.runWithException,_4.runWithException,D4.runWithException;v.createContext({config:{message:""},theme:"dark",setResult:()=>{}});const B4={env:"",region:"",version:"",buildVersion:"",theme:"",isError:!1,mailingList:"",createJiraTicket:!0,sendEmail:!1,attachments:[],applicationTitle:"",allowEditRecipients:!0,attachmentsViewMode:"category",environmentInfo:"",selectedCategories:[],errorMessage:"",showEnvironmentInfo:!1,context:{},technicalInfo:"",sendEmailClient:"Outlook"},H4=v.createContext({config:B4,onThemeChanged:()=>{},openUrl:()=>{},submit:()=>Promise.resolve({}),setBounds:()=>{},close:()=>{},showMailingList:!0,setShowMailingList:()=>{},attachmentCategories:[],submitInProgress:!1,setSubmitInProgress:()=>{},submitStatus:{type:"success",title:"",text:""},setSubmitStatus:()=>{},submitCompleted:!1,setSubmitCompleted:()=>{},jiraTicketURL:"",setJiraTicketURL:()=>{},submitFeedback:()=>{}}),ro=()=>v.useContext(H4);function G4({...e}){const{config:t,close:n}=ro(),{applicationTitle:o}=t;return d.jsxs(cn,{draggable:!0,...e,children:[d.jsx(cn.Title,{tag:"h1",text:o?`Feedback Form - ${o}`:"Feedback Form",size:"large"}),d.jsx(cn.ButtonGroup,{className:"non-draggable",children:d.jsx(cn.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:()=>n()})})]})}function W4({className:e,handleSubmit:t,...n}){const o=te("io-panel-body",e),{config:r,submitFeedback:i}=ro(),{IntroField:a,DescriptionField:s,TechInfoField:c,EnvInfoField:l,FileAttachmentsField:u,CategoryAttachmentsField:p,MailListField:f}=cu(),h=t??i,m=`Your feedback will be submitted to the ${r.buildVersion} team and some additional information will be automatically included to help us examine your issue.`;return d.jsxs("form",{className:o,id:"feedback",onSubmit:h,...n,children:[d.jsx(a,{children:d.jsx("p",{children:m})}),d.jsx(f,{}),d.jsx(s,{}),d.jsx(c,{readOnly:!0}),d.jsx(l,{readOnly:!0}),r.attachmentsViewMode==="file"?d.jsx(u,{}):d.jsx(p,{})]})}function V4({...e}){const{FooterButtons:t}=cu(),{openUrl:n,submitInProgress:o,submitStatus:r,jiraTicketURL:i}=ro();return d.jsx(hr,{...e,children:d.jsxs("div",o?{className:"flex ai-center jc-between",children:[d.jsx(Je,{children:d.jsx("p",{children:r.title})}),d.jsx(R5,{align:"right",size:"small"})]}:{className:"flex ai-center jc-between",children:[d.jsxs(Je,{children:[d.jsx("p",{className:r.type==="error"?"io-text-error":"",children:r.title}),i&&d.jsx("a",{href:i,onClick:a=>{a.preventDefault(),n(i)},children:i})]}),d.jsx(t,{})]})})}function F4({className:e,...t}){const{CloseButton:n}=cu(),{close:o}=ro(),r=te("non-draggable",e);return d.jsx(We,{className:r,...t,children:d.jsx(n,{onClick:()=>o()})})}function z4({className:e,...t}){const{SubmitButton:n,CancelButton:o,CloseButton:r}=cu(),{close:i,submitCompleted:a}=ro();return a?d.jsx(We,{className:e,...t,children:d.jsx(r,{text:"Close",onClick:()=>i()})}):d.jsxs(We,{className:e,...t,children:[d.jsx(n,{}),d.jsx(o,{onClick:()=>i()})]})}function $4({text:e="Submit",...t}){return d.jsx(Ze,{form:"feedback",type:"submit",variant:"primary",text:e,...t})}function Z4({text:e="Cancel",...t}){return d.jsx(Ze,{variant:"link",text:e,...t})}function X4({...e}){return d.jsx(Ze,{variant:"primary",...e})}function U4({showField:e=!0,className:t,title:n,hint:o,children:r,...i}){return e?d.jsx(Je,{className:t,title:n,hint:o,...i,children:r}):null}function J4({showField:e=!0,className:t,title:n="Description",hint:o,readOnly:r=!1,disabled:i,...a}){return e?d.jsx(Je,{className:t,hint:o,title:"",...a,children:d.jsx(Ps,{id:"description",name:"description",label:n,readOnly:r,disabled:i})}):null}function Y4({showField:e,className:t,title:n="Technical Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:c}=ro(),l=e??c.errorMessage,u=r??c.errorMessage;return l&&u?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(Ps,{id:"errorMessage",name:"errorMessage",label:n,value:u,readOnly:i,disabled:a})}):null}function K4({showField:e,className:t,title:n="Environment Information",hint:o,fieldValue:r,readOnly:i=!1,disabled:a,...s}){const{config:c}=ro(),l=e??c.showEnvironmentInfo,u=r??c.environmentInfo;return l&&u?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(Ps,{id:"environmentInfo",name:"environmentInfo",label:n,value:u,readOnly:i,disabled:a})}):null}function q4({showField:e=!0,className:t,title:n="Attachments",hint:o,readOnly:r=!1,disabled:i,attachments:a,selectedCategories:s,...c}){const l=te("io-block-list-gap",t),{config:u}=ro(),p=a??u.attachments,f=s??u.selectedCategories,h=v.useCallback(m=>!!f&&f.indexOf(m)!==-1,[f]);return e?!p||p.length<=0?d.jsx(Je,{title:"Attachments",children:d.jsx("p",{children:"No Attachments"})}):d.jsx(Je,{className:l,title:n,hint:o,...c,children:d.jsx("div",{className:"file-attachments",children:p.map(m=>d.jsx(Es,{id:m.id,name:m.id,label:m.name,readOnly:r,disabled:i,defaultChecked:h(m.category)},m.id))})}):null}function Q4({showField:e=!0,className:t,title:n="Attachments",hint:o,readOnly:r=!1,disabled:i,categories:a,selectedCategories:s,...c}){const{config:l,attachmentCategories:u}=ro(),p=a??u,f=s??l.selectedCategories,h=v.useCallback(m=>!!f&&f.indexOf(m)!==-1,[f]);return e?!p||p.length<=0?d.jsx("p",{children:"No Attachments"}):d.jsx(Je,{className:t,title:n,hint:o,...c,children:d.jsx("div",{className:"category-attachments",children:p.map(m=>d.jsx(Nt,{id:m,name:m,align:"right",label:m,readOnly:r,disabled:i,defaultChecked:h(m)},m))})}):null}function eE({className:e,title:t,hint:n,showField:o=!0,showJiraTicketField:r,jiraTicketLabel:i="Create Jira Ticket",showSendEmailField:a,sendEmailLabel:s="Send Email",readOnly:c=!1,disabled:l,...u}){const p=te("io-block-list-gap",e),{config:f,showMailingList:h,setShowMailingList:m}=ro();if(!o)return null;const g=r??f.createJiraTicket,y=a??f.sendEmail;return d.jsxs(Je,{className:p,hint:n,title:t,...u,children:[g&&d.jsx(Nt,{id:"createJiraTicket",name:"createJiraTicket",label:i,align:"right",readOnly:c,disabled:l,defaultChecked:g}),y&&d.jsx(Nt,{onChange:()=>{m(!h)},id:"sendEmail",name:"sendEmail",label:s,align:"right",readOnly:c,disabled:l,defaultChecked:y})]})}function tE({showField:e=!0,className:t,title:n="Email List",hint:o="Separate with commas or semicolons.",placeholder:r="john.doe@somedomain.com; jane.doe@otherdomain.com",readOnly:i,disabled:a,...s}){const{config:c,showMailingList:l}=ro(),u=e??c.sendEmail,p=i??c.allowEditRecipients===!1;return u&&l?d.jsx(Je,{className:t,hint:o,...s,children:d.jsx(qn,{id:"mailingList",name:"mailingList",label:n,placeholder:r,readOnly:p,disabled:a,defaultValue:c.mailingList??""})}):null}const u2={Header:G4,Body:W4,Footer:V4,HeaderButtons:F4,FooterButtons:z4,SubmitButton:$4,CancelButton:Z4,CloseButton:X4,IntroField:U4,DescriptionField:J4,TechInfoField:Y4,EnvInfoField:K4,FileAttachmentsField:q4,CategoryAttachmentsField:Q4,SettingsField:eE,MailListField:tE},d2=v.createContext(u2),nE=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...u2,...t}),[t]);return d.jsx(d2.Provider,{value:n,children:e})});function cu(e){return{...v.useContext(d2),...e}}nE.displayName="ComponentsStore";const oE=v.createContext({variant:"share-layout",id:void 0,name:"",setName:()=>{},viewers:[],setViewers:()=>{},editors:[],setEditors:()=>{},publishWithContext:!1,setPublishWithContext:()=>{},updateWorkspaceSettings:!1,setUpdateWorkspaceSettings:()=>{},keepPrivateCopy:!0,setKeepPrivateCopy:()=>{},isSettingsVisible:!1,showSettings:()=>{},hideSettings:()=>{},folder:"",setFolder:()=>{},icon:"",setIcon:()=>{},description:"",setDescription:()=>{},hasChanges:!1,canPublish:!1,canUpdate:!1,sharingValidationError:void 0,publish:()=>{},applySettings:()=>{},close:()=>{}}),Kt=()=>v.useContext(oE);function E0(e){return e.startsWith("manage-")?"Manage":e.startsWith("details-")?"Details":e.startsWith("edit-")?"Edit":"Publish"}function rE({title:e,...t}){const{HeaderButtons:n}=pa(),{variant:o,name:r}=Kt(),i=e??(r?`${E0(o)} "${r}"`:function(a){return`${E0(a)} ${a.endsWith("-workspace")?"Workspace":"Layout"}`}(o));return d.jsxs(cn,{draggable:!0,...t,children:[d.jsx(cn.Title,{tag:"h1",text:i,size:"large"}),d.jsx(n,{})]})}function iE({className:e,onSubmit:t,...n}){const o=te("io-panel-body",e),{Name:r,Viewers:i,Editors:a,Folder:s,Icon:c,Description:l,KeepPrivateCopy:u}=pa(),{variant:p}=Kt(),f=p.startsWith("share-"),h=p.startsWith("details-"),m=p.startsWith("edit-");return d.jsx(Uo,{children:d.jsx("form",{className:o,onSubmit:g=>{g.preventDefault(),t==null||t(g)},...n,children:d.jsxs(d.Fragment,m?{children:[d.jsx(r,{}),d.jsx(s,{}),d.jsx(c,{}),d.jsx(l,{})]}:{children:[!h&&d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),h&&d.jsx(l,{}),f&&d.jsx(u,{})]})})})}function aE({...e}){const{FooterButtons:t}=pa(),{sharingValidationError:n}=Kt();return d.jsxs(hr,{...e,children:[n&&d.jsxs("p",{className:"io-layout-sharing-validation-error",children:[d.jsx(wt,{variant:"circle-info"}),n]}),d.jsx(t,{})]})}function sE({className:e,title:t="Additional Settings",...n}){const o=te("io-layout-sharing-settings-panel",e),{folder:r,icon:i,description:a,applySettings:s,hideSettings:c,close:l}=Kt(),{Folder:u,Icon:p,Description:f}=pa(),[h,m]=v.useState(r),[g,y]=v.useState(i),[x,C]=v.useState(a);return d.jsxs(ze,{className:o,...n,children:[d.jsxs(ze.Header,{children:[d.jsx(ze.Header.ButtonIcon,{className:"non-draggable",variant:"circle",icon:"arrow-left-long",size:"32",onClick:c}),d.jsx(ze.Header.Title,{tag:"h1",text:t,size:"large"}),d.jsx(ze.Header.ButtonGroup,{children:d.jsx(ze.Header.ButtonIcon,{variant:"circle",icon:"close",size:"32",onClick:l})})]}),d.jsxs(Uo,{element:ze.Body,children:[d.jsx(u,{value:h,onChange:w=>m(w.target.value)}),d.jsx(p,{value:g,onChange:w=>y(w.target.value)}),d.jsx(f,{value:x,onChange:w=>C(w.target.value)})]}),d.jsx(ze.Footer,{children:d.jsx(We,{align:"right",children:d.jsx(Ze,{variant:"primary",text:"Apply",onClick:()=>s(h,g,x)})})})]})}function cE({className:e,...t}){const n=te("non-draggable",e),{HeaderCloseButton:o}=pa();return d.jsx(We,{className:n,...t,children:d.jsx(o,{})})}function lE({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const{close:i}=Kt();return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:o??i,...r})}function uE({className:e,...t}){const n=te("flex ai-center jc-between",e),{MoreSettingsButton:o,PublishButton:r,UpdateButton:i,CloseButton:a}=pa(),{variant:s}=Kt(),c=s.startsWith("manage-"),l=s.startsWith("edit-"),u=c||l;return d.jsxs("div",{className:n,...t,children:[d.jsx(o,{}),d.jsxs(We,{align:"right",children:[d.jsx(u?i:r,{}),d.jsx(a,{})]})]})}function dE({showButton:e,variant:t="link",text:n="More settings",onClick:o,...r}){const{variant:i,showSettings:a}=Kt(),s=i.startsWith("details-"),c=i.startsWith("edit-");return e??(!s&&!c)?d.jsx(Ze,{variant:t,text:n,onClick:o??a,...r}):null}function pE({showButton:e,variant:t="primary",text:n="Publish",onClick:o,disabled:r,...i}){const{variant:a,publish:s,canPublish:c}=Kt(),l=a.startsWith("details-");return e??!l?d.jsx(Ze,{variant:t,text:n,onClick:o??s,disabled:r??!c,...i}):null}function fE({showButton:e,variant:t="primary",text:n="Update",onClick:o,disabled:r,...i}){const{publish:a,canUpdate:s}=Kt();return e??!0?d.jsx(Ze,{variant:t,text:n,onClick:o??a,disabled:r??!s,...i}):null}function hE({text:e="Close",variant:t="outline",onClick:n,...o}){const{close:r}=Kt();return d.jsx(Ze,{variant:t,text:e,onClick:n??r,...o})}const mE={"share-layout":"Enter a Layout name","manage-layout":"Saved Layout name","share-workspace":"Enter a Workspace name","manage-workspace":"Saved Workspace name"};function gE({id:e="layout-sharing-name",label:t="Name",placeholder:n,value:o,showField:r=!0,readOnly:i,disabled:a,...s}){const{variant:c,name:l,setName:u}=Kt(),p=c.startsWith("manage-");if(!r)return null;const f=n??mE[c]??"",h=!p;return d.jsxs(Je,{className:"io-layout-sharing-name-field",children:[d.jsxs("div",{className:"flex ai-center jc-between",children:[d.jsx("label",{htmlFor:e,children:t}),h&&d.jsxs("p",{children:["Required ",d.jsx("span",{className:"io-text-danger",children:"*"})]})]}),d.jsx(qn,{id:e,name:e,required:h,placeholder:f,value:o??l,onChange:m=>u(m.target.value),readOnly:i,disabled:a,...s})]})}function p2(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(!1),[o,r]=v.useState(!0);v.useEffect(()=>{if(r(!0),!e)return console.warn("useManagerQueryUsers: io context is not available."),void r(!1);const a=e==null?void 0:e.manager;if(!(a!=null&&a.checkCapability))return console.warn("useManagerQueryUsers: io.manager.checkCapability is not available."),void r(!1);let s=!1;return(async()=>{try{const[c,l]=await Promise.all([a.checkCapability("ADVANCED_LAYOUTS"),a.checkCapability("API_METHOD_USERS_QUERY")]);if(s)return;n((c==null?void 0:c.available)===!0&&(l==null?void 0:l.available)===!0)}catch(c){if(s)return;console.error("useManagerQueryUsers: Failed to check capabilities.",c),n(!1)}finally{s||r(!1)}})(),()=>{s=!0}},[e]);const i=v.useCallback(async a=>t?(e==null?void 0:e.manager).users.query(a):(console.warn("useManagerQueryUsers: Required capabilities are not available."),{users:[]}),[e,t]);return{isSupported:t,isLoading:o,queryUsers:i}}function f2(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState(!1),[o,r]=v.useState(!0);v.useEffect(()=>{if(r(!0),!e)return console.warn("useManagerQueryGroups: io context is not available."),void r(!1);const a=e==null?void 0:e.manager;if(!(a!=null&&a.checkCapability))return console.warn("useManagerQueryGroups: io.manager.checkCapability is not available."),void r(!1);let s=!1;return(async()=>{try{const[c,l]=await Promise.all([a.checkCapability("ADVANCED_LAYOUTS"),a.checkCapability("API_METHOD_GROUPS_QUERY")]);if(s)return;n((c==null?void 0:c.available)===!0&&(l==null?void 0:l.available)===!0)}catch(c){if(s)return;console.error("useManagerQueryGroups: Failed to check capabilities.",c),n(!1)}finally{s||r(!1)}})(),()=>{s=!0}},[e]);const i=v.useCallback(async a=>t?(e==null?void 0:e.manager).groups.query(a):(console.warn("useManagerQueryGroups: Required capabilities are not available."),{groups:[]}),[e,t]);return{isSupported:t,isLoading:o,queryGroups:i}}const vE=e=>d.jsx("div",{className:e.hasValue?"io-layout-sharing-users-with-access-input":void 0,style:e.hasValue?void 0:{display:"contents"},children:d.jsx(dh.Input,{...e,placeholder:e.hasValue?e.selectProps.placeholder:void 0})});function yE({id:e="layout-sharing-users-with-access",label:t="Viewers",placeholder:n="Add a user name or user group",options:o=[],value:r,showField:i=!0,disabled:a,...s}){const{variant:c,viewers:l,setViewers:u}=Kt(),[p,f]=v.useState(""),h=c.startsWith("details-"),{isSupported:m,isLoading:g,queryUsers:y}=p2(),{isSupported:x,isLoading:C,queryGroups:w}=f2(),[I,b]=v.useState([]),[k,S]=v.useState([]),[E,N]=v.useState(!1),A=ru(p,400),P=m||x||g||C;return v.useEffect(()=>{N(p.length>=3&&P)},[p,P]),v.useEffect(()=>{if(A.length<3)return b([]),void S([]);let j=!1;const G=[];return m&&G.push(y({name:A}).then(M=>{j||b(M.users.map(T=>({value:T.id,label:T.id,entityType:"user"})))}).catch(()=>{j||b([])})),x&&G.push(w({name:A}).then(M=>{j||S(M.groups.map(T=>({value:T.name,label:T.name,entityType:"group"})))}).catch(()=>{j||S([])})),Promise.allSettled(G).then(()=>{j||N(!1)}),()=>{j=!0}},[A,m,x,y,w]),i?d.jsxs(Je,{className:"io-layout-sharing-users-with-access-field",style:h?{pointerEvents:"none"}:void 0,children:[d.jsx("div",{className:"flex ai-center jc-between",children:d.jsx("label",{htmlFor:e,children:t})}),d.jsx(ph,{isMulti:!0,isSearchable:!0,id:e,name:e,placeholder:n,options:P?[...I,...k]:o,menuIsOpen:P?p.length>=3:void 0,value:r??l,onChange:j=>u(j),onInputChange:f,backspaceRemovesValue:!1,isLoading:E,components:{...h?{}:{Input:vE},DropdownIndicator:null},disabled:a,...s})]}):null}const bE=e=>d.jsx("div",{className:e.hasValue?"io-layout-sharing-users-with-access-input":void 0,style:e.hasValue?void 0:{display:"contents"},children:d.jsx(dh.Input,{...e,placeholder:e.hasValue?e.selectProps.placeholder:void 0})});function wE({id:e="layout-sharing-users-with-edit-permissions",label:t="Editors",placeholder:n="Add a user name or user group",options:o=[],value:r,showField:i=!0,disabled:a,...s}){const{variant:c,editors:l,setEditors:u}=Kt(),[p,f]=v.useState(""),h=c.startsWith("details-"),{isSupported:m,isLoading:g,queryUsers:y}=p2(),{isSupported:x,isLoading:C,queryGroups:w}=f2(),[I,b]=v.useState([]),[k,S]=v.useState([]),[E,N]=v.useState(!1),A=ru(p,400),P=m||x||g||C;return v.useEffect(()=>{N(p.length>=3&&P)},[p,P]),v.useEffect(()=>{if(A.length<3)return b([]),void S([]);let j=!1;const G=[];return m&&G.push(y({name:A}).then(M=>{j||b(M.users.map(T=>({value:T.id,label:T.id,entityType:"user"})))}).catch(()=>{j||b([])})),x&&G.push(w({name:A}).then(M=>{j||S(M.groups.map(T=>({value:T.name,label:T.name,entityType:"group"})))}).catch(()=>{j||S([])})),Promise.allSettled(G).then(()=>{j||N(!1)}),()=>{j=!0}},[A,m,x,y,w]),i?d.jsxs(Je,{className:"io-layout-sharing-users-with-edit-permissions-field",style:h?{pointerEvents:"none"}:void 0,children:[d.jsx("div",{className:"flex ai-center jc-between",children:d.jsx("label",{htmlFor:e,children:t})}),d.jsx(ph,{isMulti:!0,isSearchable:!0,id:e,name:e,placeholder:n,options:P?[...I,...k]:o,menuIsOpen:P?p.length>=3:void 0,value:r??l,onChange:j=>u(j),onInputChange:f,backspaceRemovesValue:!1,isLoading:E,components:{...h?{}:{Input:bE},DropdownIndicator:null},disabled:a,...s})]}):null}function xE({id:e="layout-sharing-folder",label:t="Folder",placeholder:n="Enter folder name",value:o,showField:r=!0,...i}){const{folder:a,setFolder:s}=Kt();return r?d.jsx(qn,{id:e,name:e,label:t,placeholder:n,value:o??a,onChange:c=>s(c.target.value),...i}):null}function CE({id:e="layout-sharing-icon",label:t="Icon",placeholder:n="Paste an icon URL",value:o,showField:r=!0,...i}){const{icon:a,setIcon:s}=Kt();return r?d.jsx(qn,{id:e,name:e,label:t,placeholder:n,value:o??a,onChange:c=>s(c.target.value),...i}):null}function IE({id:e="layout-sharing-description",label:t="Description",placeholder:n,value:o,showField:r=!0,...i}){const{variant:a,description:s,setDescription:c}=Kt(),l=a.startsWith("details-"),u=n??(a.includes("workspace")?"Enter a Workspace description":"Enter a Layout description");return r?d.jsx(Ps,{id:e,style:l?{pointerEvents:"none"}:void 0,name:e,label:t,placeholder:u,value:o??s,onChange:p=>c(p.target.value),readOnly:l,...i}):null}function kE({id:e="layout-sharing-keep-private-copy",label:t="Keep a private copy",showField:n=!0,...o}){const{keepPrivateCopy:r,setKeepPrivateCopy:i}=Kt();return n?d.jsx(Je,{className:"io-layout-sharing-keep-private-copy-field",children:d.jsx(Nt,{id:e,name:e,label:t,checked:r,onChange:a=>i(a.target.checked),...o})}):null}const h2={Header:rE,Body:iE,Footer:aE,Settings:sE,HeaderButtons:cE,HeaderCloseButton:lE,FooterButtons:uE,MoreSettingsButton:dE,PublishButton:pE,UpdateButton:fE,CloseButton:hE,Name:gE,Viewers:yE,Editors:wE,Folder:xE,Icon:CE,Description:IE,KeepPrivateCopy:kE},m2=v.createContext(h2),SE=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...h2,...t}),[t]);return d.jsx(m2.Provider,{value:n,children:e})});function pa(e){return{...v.useContext(m2),...e}}SE.displayName="ComponentsStore";var j0,Rp={exports:{}},qu={exports:{}},et={},P0,N0,Qu,O0,T0,R0,L0,_0,M0,D0,ed,B0,td,H0,st={};/** @license React v16.13.1
29
29
  * react-is.development.js
30
30
  *
31
31
  * Copyright (c) Facebook, Inc. and its affiliates.
32
32
  *
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
- */function H0(){return N0||(N0=1,process.env.NODE_ENV==="production"?qu.exports=function(){if(E0)return et;E0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return et.AsyncMode=c,et.ConcurrentMode=l,et.ContextConsumer=s,et.ContextProvider=a,et.Element=t,et.ForwardRef=u,et.Fragment=o,et.Lazy=m,et.Memo=h,et.Portal=n,et.Profiler=i,et.StrictMode=r,et.Suspense=p,et.isAsyncMode=function(b){return I(b)||w(b)===c},et.isConcurrentMode=I,et.isContextConsumer=function(b){return w(b)===s},et.isContextProvider=function(b){return w(b)===a},et.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},et.isForwardRef=function(b){return w(b)===u},et.isFragment=function(b){return w(b)===o},et.isLazy=function(b){return w(b)===m},et.isMemo=function(b){return w(b)===h},et.isPortal=function(b){return w(b)===n},et.isProfiler=function(b){return w(b)===i},et.isStrictMode=function(b){return w(b)===r},et.isSuspense=function(b){return w(b)===p},et.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},et.typeOf=w,et}():qu.exports=(j0||(j0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(P){if(typeof P=="object"&&P!==null){var B=P.$$typeof;switch(B){case t:var F=P.type;switch(F){case c:case l:case o:case i:case r:case p:return F;default:var $=F&&F.$$typeof;switch($){case s:case u:case m:case h:case a:return $;default:return B}}case n:return B}}}var I=c,b=l,k=s,S=a,E=t,O=u,A=o,N=m,j=h,G=n,M=i,T=r,H=p,V=!1;function z(P){return w(P)===l}st.AsyncMode=I,st.ConcurrentMode=b,st.ContextConsumer=k,st.ContextProvider=S,st.Element=E,st.ForwardRef=O,st.Fragment=A,st.Lazy=N,st.Memo=j,st.Portal=G,st.Profiler=M,st.StrictMode=T,st.Suspense=H,st.isAsyncMode=function(P){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(P)||w(P)===c},st.isConcurrentMode=z,st.isContextConsumer=function(P){return w(P)===s},st.isContextProvider=function(P){return w(P)===a},st.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===t},st.isForwardRef=function(P){return w(P)===u},st.isFragment=function(P){return w(P)===o},st.isLazy=function(P){return w(P)===m},st.isMemo=function(P){return w(P)===h},st.isPortal=function(P){return w(P)===n},st.isProfiler=function(P){return w(P)===i},st.isStrictMode=function(P){return w(P)===r},st.isSuspense=function(P){return w(P)===p},st.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===i||P===r||P===p||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===h||P.$$typeof===a||P.$$typeof===s||P.$$typeof===u||P.$$typeof===y||P.$$typeof===x||P.$$typeof===C||P.$$typeof===g)},st.typeOf=w}()),st)),qu.exports}/*
35
+ */function G0(){return N0||(N0=1,process.env.NODE_ENV==="production"?qu.exports=function(){if(j0)return et;j0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return et.AsyncMode=c,et.ConcurrentMode=l,et.ContextConsumer=s,et.ContextProvider=a,et.Element=t,et.ForwardRef=u,et.Fragment=o,et.Lazy=m,et.Memo=h,et.Portal=n,et.Profiler=i,et.StrictMode=r,et.Suspense=p,et.isAsyncMode=function(b){return I(b)||w(b)===c},et.isConcurrentMode=I,et.isContextConsumer=function(b){return w(b)===s},et.isContextProvider=function(b){return w(b)===a},et.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},et.isForwardRef=function(b){return w(b)===u},et.isFragment=function(b){return w(b)===o},et.isLazy=function(b){return w(b)===m},et.isMemo=function(b){return w(b)===h},et.isPortal=function(b){return w(b)===n},et.isProfiler=function(b){return w(b)===i},et.isStrictMode=function(b){return w(b)===r},et.isSuspense=function(b){return w(b)===p},et.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},et.typeOf=w,et}():qu.exports=(P0||(P0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(O){if(typeof O=="object"&&O!==null){var B=O.$$typeof;switch(B){case t:var F=O.type;switch(F){case c:case l:case o:case i:case r:case p:return F;default:var $=F&&F.$$typeof;switch($){case s:case u:case m:case h:case a:return $;default:return B}}case n:return B}}}var I=c,b=l,k=s,S=a,E=t,N=u,A=o,P=m,j=h,G=n,M=i,T=r,H=p,V=!1;function z(O){return w(O)===l}st.AsyncMode=I,st.ConcurrentMode=b,st.ContextConsumer=k,st.ContextProvider=S,st.Element=E,st.ForwardRef=N,st.Fragment=A,st.Lazy=P,st.Memo=j,st.Portal=G,st.Profiler=M,st.StrictMode=T,st.Suspense=H,st.isAsyncMode=function(O){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(O)||w(O)===c},st.isConcurrentMode=z,st.isContextConsumer=function(O){return w(O)===s},st.isContextProvider=function(O){return w(O)===a},st.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},st.isForwardRef=function(O){return w(O)===u},st.isFragment=function(O){return w(O)===o},st.isLazy=function(O){return w(O)===m},st.isMemo=function(O){return w(O)===h},st.isPortal=function(O){return w(O)===n},st.isProfiler=function(O){return w(O)===i},st.isStrictMode=function(O){return w(O)===r},st.isSuspense=function(O){return w(O)===p},st.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===o||O===l||O===i||O===r||O===p||O===f||typeof O=="object"&&O!==null&&(O.$$typeof===m||O.$$typeof===h||O.$$typeof===a||O.$$typeof===s||O.$$typeof===u||O.$$typeof===y||O.$$typeof===x||O.$$typeof===C||O.$$typeof===g)},st.typeOf=w}()),st)),qu.exports}/*
36
36
  object-assign
37
37
  (c) Sindre Sorhus
38
38
  @license MIT
39
- */function AE(){if(P0)return Qu;P0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Qu=function(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var r={},i=0;i<10;i++)r["_"+String.fromCharCode(i)]=i;var a=Object.getOwnPropertyNames(r).map(function(c){return r[c]});if(a.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(c){s[c]=c}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(o,r){for(var i,a,s=function(p){if(p==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(p)}(o),c=1;c<arguments.length;c++){for(var l in i=Object(arguments[c]))t.call(i,l)&&(s[l]=i[l]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},Qu}function nd(){return T0?O0:(T0=1,O0="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function G0(){return L0?R0:(L0=1,R0=Function.call.bind(Object.prototype.hasOwnProperty))}if(process.env.NODE_ENV!=="production"){var EE=H0();Tp.exports=function(){if(D0)return ed;D0=1;var e=H0(),t=AE(),n=nd(),o=G0(),r=function(){if(M0)return _0;M0=1;var s=function(){};if(process.env.NODE_ENV!=="production"){var c=nd(),l={},u=G0();s=function(f){var h="Warning: "+f;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}}}function p(f,h,m,g,y){if(process.env.NODE_ENV!=="production"){for(var x in f)if(u(f,x)){var C;try{if(typeof f[x]!="function"){var w=Error((g||"React class")+": "+m+" type `"+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[x]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}C=f[x](h,x,g,m,null,c)}catch(b){C=b}if(!C||C instanceof Error||s((g||"React class")+": type specification of "+m+" `"+x+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in l)){l[C.message]=!0;var I=y?y():"";s("Failed "+m+" type: "+C.message+(I??""))}}}}return p.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(l={})},_0=p}(),i=function(){};function a(){return null}return process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}),ed=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:m(a),arrayOf:function(b){return m(function(k,S,E,O,A){if(typeof b!="function")return new h("Property `"+A+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var N=k[S];if(!Array.isArray(N))return new h("Invalid "+O+" `"+A+"` of type `"+C(N)+"` supplied to `"+E+"`, expected an array.");for(var j=0;j<N.length;j++){var G=b(N,j,E,O,A+"["+j+"]",n);if(G instanceof Error)return G}return null})},element:m(function(b,k,S,E,O){var A=b[k];return s(A)?null:new h("Invalid "+E+" `"+O+"` of type `"+C(A)+"` supplied to `"+S+"`, expected a single ReactElement.")}),elementType:m(function(b,k,S,E,O){var A=b[k];return e.isValidElementType(A)?null:new h("Invalid "+E+" `"+O+"` of type `"+C(A)+"` supplied to `"+S+"`, expected a single ReactElement type.")}),instanceOf:function(b){return m(function(k,S,E,O,A){if(!(k[S]instanceof b)){var N=b.name||u;return new h("Invalid "+O+" `"+A+"` of type `"+((j=k[S]).constructor&&j.constructor.name?j.constructor.name:u)+"` supplied to `"+E+"`, expected instance of `"+N+"`.")}var j;return null})},node:m(function(b,k,S,E,O){return x(b[k])?null:new h("Invalid "+E+" `"+O+"` supplied to `"+S+"`, expected a ReactNode.")}),objectOf:function(b){return m(function(k,S,E,O,A){if(typeof b!="function")return new h("Property `"+A+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var N=k[S],j=C(N);if(j!=="object")return new h("Invalid "+O+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected an object.");for(var G in N)if(o(N,G)){var M=b(N,G,E,O,A+"."+G,n);if(M instanceof Error)return M}return null})},oneOf:function(b){return Array.isArray(b)?m(function(k,S,E,O,A){for(var N=k[S],j=0;j<b.length;j++)if(f(N,b[j]))return null;var G=JSON.stringify(b,function(M,T){return w(T)==="symbol"?String(T):T});return new h("Invalid "+O+" `"+A+"` of value `"+String(N)+"` supplied to `"+E+"`, expected one of "+G+".")}):(process.env.NODE_ENV!=="production"&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var k=0;k<b.length;k++){var S=b[k];if(typeof S!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(S)+" at index "+k+"."),a}return m(function(E,O,A,N,j){for(var G=[],M=0;M<b.length;M++){var T=(0,b[M])(E,O,A,N,j,n);if(T==null)return null;T.data&&o(T.data,"expectedType")&&G.push(T.data.expectedType)}return new h("Invalid "+N+" `"+j+"` supplied to `"+A+"`"+(G.length>0?", expected one of type ["+G.join(", ")+"]":"")+".")})},shape:function(b){return m(function(k,S,E,O,A){var N=k[S],j=C(N);if(j!=="object")return new h("Invalid "+O+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected `object`.");for(var G in b){var M=b[G];if(typeof M!="function")return y(E,O,A,G,w(M));var T=M(N,G,E,O,A+"."+G,n);if(T)return T}return null})},exact:function(b){return m(function(k,S,E,O,A){var N=k[S],j=C(N);if(j!=="object")return new h("Invalid "+O+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected `object`.");var G=t({},k[S],b);for(var M in G){var T=b[M];if(o(b,M)&&typeof T!="function")return y(E,O,A,M,w(T));if(!T)return new h("Invalid "+O+" `"+A+"` key `"+M+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(k[S],null," ")+`
40
- Valid keys: `+JSON.stringify(Object.keys(b),null," "));var H=T(N,M,E,O,A+"."+M,n);if(H)return H}return null})}};function f(b,k){return b===k?b!==0||1/b==1/k:b!=b&&k!=k}function h(b,k){this.message=b,this.data=k&&typeof k=="object"?k:{},this.stack=""}function m(b){if(process.env.NODE_ENV!=="production")var k={},S=0;function E(A,N,j,G,M,T,H){if(G=G||u,T=T||j,H!==n){if(c){var V=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw V.name="Invariant Violation",V}if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var z=G+":"+j;!k[z]&&S<3&&(i("You are manually calling a React.PropTypes validation function for the `"+T+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[z]=!0,S++)}}return N[j]==null?A?N[j]===null?new h("The "+M+" `"+T+"` is marked as required in `"+G+"`, but its value is `null`."):new h("The "+M+" `"+T+"` is marked as required in `"+G+"`, but its value is `undefined`."):null:b(N,j,G,M,T)}var O=E.bind(null,!1);return O.isRequired=E.bind(null,!0),O}function g(b){return m(function(k,S,E,O,A,N){var j=k[S];return C(j)!==b?new h("Invalid "+O+" `"+A+"` of type `"+w(j)+"` supplied to `"+E+"`, expected `"+b+"`.",{expectedType:b}):null})}function y(b,k,S,E,O){return new h((b||"React class")+": "+k+" type `"+S+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function x(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(x);if(b===null||s(b))return!0;var k=function(A){var N=A&&(l&&A[l]||A["@@iterator"]);if(typeof N=="function")return N}(b);if(!k)return!1;var S,E=k.call(b);if(k!==b.entries){for(;!(S=E.next()).done;)if(!x(S.value))return!1}else for(;!(S=E.next()).done;){var O=S.value;if(O&&!x(O[1]))return!1}return!0;default:return!1}}function C(b){var k=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":function(S,E){return S==="symbol"||!!E&&(E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol)}(k,b)?"symbol":k}function w(b){if(b==null)return""+b;var k=C(b);if(k==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return k}function I(b){var k=w(b);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}return h.prototype=Error.prototype,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},ed}()(EE.isElement,!0)}else Tp.exports=function(){if(B0)return td;B0=1;var e=nd();function t(){}function n(){}return n.resetWarningCache=t,td=function(){function o(a,s,c,l,u,p){if(p!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function r(){return o}o.isRequired=o;var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},td}()();var ve=hs(Tp.exports);function Rp(e){return Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rp(e)}var jE=(typeof window>"u"?"undefined":Rp(window))==="object"&&window.Element||function(){};ve.oneOfType([ve.string,ve.func,function(e,t,n){if(!(e[t]instanceof jE))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")},ve.shape({current:ve.any})]);var NE=ve.oneOfType([ve.func,ve.string,ve.shape({$$typeof:ve.symbol,render:ve.func}),ve.arrayOf(ve.oneOfType([ve.func,ve.string,ve.shape({$$typeof:ve.symbol,render:ve.func})]))]),W0=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],PE="entering",OE="entered",TE="exiting",RE="exited",V0=!1,LE=process.env.NODE_ENV!=="production"?ve.oneOfType([ve.number,ve.shape({enter:ve.number,exit:ve.number,appear:ve.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ve.oneOfType([ve.string,ve.shape({enter:ve.string,exit:ve.string,active:ve.string}),ve.shape({enter:ve.string,enterDone:ve.string,enterActive:ve.string,exit:ve.string,exitDone:ve.string,exitActive:ve.string})]);var v2=v.createContext(null),Da="unmounted",Yr="exited",Kr="entering",Ni="entered",Lp="exiting",zn=function(e){function t(o,r){var i;i=e.call(this,o,r)||this;var a,s=r&&!r.isMounting?o.enter:o.appear;return i.appearStatus=null,o.in?s?(a=Yr,i.appearStatus=Kr):a=Ni:a=o.unmountOnExit||o.mountOnEnter?Da:Yr,i.state={status:a},i.nextCallback=null,i}(function(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,al(o,r)})(t,e),t.getDerivedStateFromProps=function(o,r){return o.in&&r.status===Da?{status:Yr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var r=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Kr&&i!==Ni&&(r=Kr):i!==Kr&&i!==Ni||(r=Lp)}this.updateStatus(!1,r)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o,r,i,a=this.props.timeout;return o=r=i=a,a!=null&&typeof a!="number"&&(o=a.exit,r=a.enter,i=a.appear!==void 0?a.appear:r),{exit:o,enter:r,appear:i}},n.updateStatus=function(o,r){if(o===void 0&&(o=!1),r!==null)if(this.cancelNextCallback(),r===Kr){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Bo.findDOMNode(this);i&&function(a){a.scrollTop}(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Yr&&this.setState({status:Da})},n.performEnter=function(o){var r=this,i=this.props.enter,a=this.context?this.context.isMounting:o,s=this.props.nodeRef?[a]:[Bo.findDOMNode(this),a],c=s[0],l=s[1],u=this.getTimeouts(),p=a?u.appear:u.enter;!o&&!i||V0?this.safeSetState({status:Ni},function(){r.props.onEntered(c)}):(this.props.onEnter(c,l),this.safeSetState({status:Kr},function(){r.props.onEntering(c,l),r.onTransitionEnd(p,function(){r.safeSetState({status:Ni},function(){r.props.onEntered(c,l)})})}))},n.performExit=function(){var o=this,r=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Bo.findDOMNode(this);r&&!V0?(this.props.onExit(a),this.safeSetState({status:Lp},function(){o.props.onExiting(a),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Yr},function(){o.props.onExited(a)})})})):this.safeSetState({status:Yr},function(){o.props.onExited(a)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,r){r=this.setNextCallback(r),this.setState(o,r)},n.setNextCallback=function(o){var r=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,r.nextCallback=null,o(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,r){this.setNextCallback(r);var i=this.props.nodeRef?this.props.nodeRef.current:Bo.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(i&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=s[0],l=s[1];this.props.addEndListener(c,l)}o!=null&&setTimeout(this.nextCallback,o)}else setTimeout(this.nextCallback,0)},n.render=function(){var o=this.state.status;if(o===Da)return null;var r=this.props,i=r.children;r.in,r.mountOnEnter,r.unmountOnExit,r.appear,r.enter,r.exit,r.timeout,r.addEndListener,r.onEnter,r.onEntering,r.onEntered,r.onExit,r.onExiting,r.onExited,r.nodeRef;var a=ew(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(v2.Provider,{value:null},typeof i=="function"?i(o,a):v.cloneElement(v.Children.only(i),a))},t}(v.Component);function ki(){}function _p(e){return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_p(e)}zn.contextType=v2,zn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ve.shape({current:typeof Element>"u"?ve.any:function(e,t,n,o,r,i){var a=e[t];return ve.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:ve.oneOfType([ve.func.isRequired,ve.element.isRequired]).isRequired,in:ve.bool,mountOnEnter:ve.bool,unmountOnExit:ve.bool,appear:ve.bool,enter:ve.bool,exit:ve.bool,timeout:function(e){var t=LE;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:ve.func,onEnter:ve.func,onEntering:ve.func,onEntered:ve.func,onExit:ve.func,onExiting:ve.func,onExited:ve.func}:{},zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ki,onEntering:ki,onEntered:ki,onExit:ki,onExiting:ki,onExited:ki},zn.UNMOUNTED=Da,zn.EXITED=Yr,zn.ENTERING=Kr,zn.ENTERED=Ni,zn.EXITING=Lp;var Ca,_E=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},fl.apply(this,arguments)}function ME(e,t){if(e==null)return{};var n,o,r=function(a,s){if(a==null)return{};var c,l,u={},p=Object.keys(a);for(l=0;l<p.length;l++)c=p[l],s.indexOf(c)>=0||(u[c]=a[c]);return u}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DE(e,t,n){return t&&function(o,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mp(e,t){return Mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Mp(e,t)}function BE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,o=hl(e);if(t){var r=hl(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(i,a){if(a&&(_p(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y2(i)}(this,n)}}function y2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hl(e)}function F0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F0(Object(n),!0).forEach(function(o){Mi(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F0(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HE=ta(ta({},zn.propTypes),{},{horizontal:ve.bool,isOpen:ve.bool,children:ve.oneOfType([ve.arrayOf(ve.node),ve.node]),tag:NE,className:ve.node,navbar:ve.bool,cssModule:ve.object,innerRef:ve.shape({current:ve.object})}),GE=ta(ta({},zn.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:350}),WE=(Mi(Ca={},PE,"collapsing"),Mi(Ca,OE,"collapse show"),Mi(Ca,TE,"collapsing"),Mi(Ca,RE,"collapse"),Ca),Dp=function(){(function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&Mp(n,o)})(t,v.Component);var e=BE(t);function t(n){var o;return function(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),(o=e.call(this,n)).state={dimension:null},o.nodeRef=n.innerRef||v.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(r){o[r]=o[r].bind(y2(o))}),o}return DE(t,[{key:"onEntering",value:function(n,o){var r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,o)}},{key:"onEntered",value:function(n,o){var r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,o)}},{key:"onExit",value:function(){var n=this.getNode();this.setState({dimension:this.getDimension(n)}),this.props.onExit(n)}},{key:"onExiting",value:function(){var n=this.getNode();this.getDimension(n),this.setState({dimension:0}),this.props.onExiting(n)}},{key:"onExited",value:function(){var n=this.getNode();this.setState({dimension:null}),this.props.onExited(n)}},{key:"getNode",value:function(){return this.nodeRef.current}},{key:"getDimension",value:function(n){return this.props.horizontal?n.scrollWidth:n.scrollHeight}},{key:"render",value:function(){var n=this,o=this.props,r=o.tag,i=o.horizontal,a=o.isOpen,s=o.className,c=o.navbar,l=o.cssModule,u=o.children;o.innerRef;var p,f,h,m=ME(o,_E),g=this.state.dimension,y=function(C,w){for(var I,b=Array.isArray(w)?w:[w],k=b.length,S={};k>0;)S[I=b[k-=1]]=C[I];return S}(m,W0),x=(p=m,f=W0,h={},Object.keys(p).forEach(function(C){f.indexOf(C)===-1&&(h[C]=p[C])}),h);return v.createElement(zn,fl({},y,{in:a,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(C){var w=function(k){return WE[k]||"collapse"}(C),I=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;return S?k.split(" ").map(function(E){return S[E]||E}).join(" "):k}(te(s,i&&"collapse-horizontal",w,c&&"navbar-collapse"),l),b=g===null?null:Mi({},i?"width":"height",g);return v.createElement(r,fl({},x,{style:ta(ta({},x.style),b),className:I,ref:n.nodeRef}),u)})}}]),t}();Dp.propTypes=HE,Dp.defaultProps=GE;const VE=({type:e,isOpen:t,title:n,iconData:o})=>o&&"src"in o?d.jsx(_l,{size:"16",src:o.src,alt:`${n} icon`,"data-testid":`${e}-image-icon`}):d.jsx(wt,{size:"16",variant:(o==null?void 0:o.variant)??(e==="folder"?t?"folder-open":"folder":"grid"),"data-testid":`${e}-icon`}),FE=e=>{const{className:t,isOpen:n,getIcon:o,showCollapseIcon:r,type:i,title:a,HeaderButton:s,...c}=e,l=d.jsxs(d.Fragment,{children:[r&&d.jsx(Ue,{className:te("collapse-icon",!n&&"collapsed"),iconSize:"10",size:"16",icon:"expand","data-testid":"base-section-header-collapse-icon"}),d.jsx(VE,{iconData:o==null?void 0:o(n),type:i,isOpen:n,title:a})]}),u=s?d.jsx(s,{}):null;return d.jsx(Lt.ItemHeader,{className:te("io-base-section-header",t),prepend:l,append:u,tooltip:a,...c,children:a})},zE=e=>{const{item:t,onClick:n,onKeyDown:o,isActive:r,isFocused:i,liRef:a,...s}=e,{description:c,icon:l="application",iconSrc:u,openInstances:p=0,title:f,tooltip:h,className:m,contextMenuActions:g=[],contextMenuSubtitle:y,isContextMenuButtonHidden:x=!1,isSelected:C=!1,statusPill:w}=t,I=g.length>0&&!x,b=d.jsxs(d.Fragment,{children:[d.jsx(wt,{className:te("check-icon",{"is-selected":C}),size:"12",variant:"check","data-testid":"base-section-item-check-icon"}),u?d.jsx(_l,{size:"16",src:u,alt:`${f} icon`,"data-testid":"base-section-item-icon"}):d.jsx(wt,{size:"16",variant:l,"data-testid":"base-section-item-icon"})]}),k=d.jsxs(d.Fragment,{children:[p!==0&&d.jsx("span",{className:"open-instances io-text-smaller","data-testid":"base-section-item-open-instances",children:p===1?"Opened":`${p} opened`}),w&&d.jsx(Ss,{variant:w.variant,"data-testid":"status-pill",children:w.text}),I&&d.jsx(Vf,{buttonSize:"24",iconSize:"12",icon:"ellipsis-vertical",title:f,subtitle:y,actions:g,onActionItemClick:n,isTabStop:i,placement:"bottom-end",strategy:"fixed",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"base-section-item-context-menu-button"})]});return d.jsx(Lt.Item,{ref:a,tabIndex:i?0:-1,className:te("io-base-section-item",{"is-selected":C},m),onKeyDown:S=>{if(Wn(S))return n(S),S.preventDefault(),void S.stopPropagation();o(S)},onClick:n,prepend:b,append:k,description:c,tooltip:h??f,descriptionTooltip:c,"data-cursor-menu-active":r||void 0,"data-testid":`base-section-item-${t.id}`,...s,children:f})},$E=new Rf,Ih=e=>{const{config:t,level:n=1,path:o=t.id,onItemClick:r,activeItemId:i}=e,{isCollapsible:a=!0,getIcon:s,HeaderButton:c}=t,[l,u]=v.useState(0),p=Gf(),{collapsedSections:f,toggleSection:h}=(()=>{const{value:I,update:b}=St({prefKey:ob});return{collapsedSections:I,toggleSection:v.useCallback(k=>$E.enqueue(()=>b((S=[])=>S.includes(k)?S.filter(E=>E!==k):[...S,k])),[b])}})(),m=v.useRef({}),g=[...t.items.filter(I=>yr(I)),...t.items.filter(I=>!yr(I))],y=v.useRef(),x=v.useRef(g),C=!a||!(f!=null&&f.includes(o)),w=I=>{var b,k;(k=(b=m.current[I])==null?void 0:b.querySelector("[tabIndex]"))==null||k.focus(),u(I)};return x.current=g,v.useEffect(()=>{const I=y.current;if(y.current=i,I&&!i){const b=x.current.findIndex(k=>!yr(k)&&rp(k)===I);b!==-1&&w(b)}},[i]),d.jsxs(Lt.ItemWithSubItems,{className:n===1?"main-section":void 0,"data-testid":`base-section-${t.id}`,children:[d.jsx(FE,{className:n===1?"io-list-item-title main-section-header":void 0,isOpen:C,onClick:async()=>{a&&await h(o)},showCollapseIcon:a,type:n===1?"section":"folder",getIcon:s,style:{paddingLeft:8+24*(n-1)+"px"},"data-testid":`base-section-header-${t.id}`,title:t.title,HeaderButton:c}),d.jsx(Dp,{isOpen:C,tag:Lt,children:g.map((I,b)=>yr(I)?d.jsx(Ih,{config:I,level:n+1,onItemClick:r,activeItemId:i,path:`${o}/${I.id}`},I.id):d.jsx(zE,{style:{paddingLeft:4+24*n+"px"},liRef:k=>m.current[b]=k,item:I,isActive:rp(I)===i,onClick:(k,S)=>r==null?void 0:r(k,{item:I,modifier:p,selectedContextMenuActionName:S==null?void 0:S.name}),onKeyDown:k=>{ff({event:k,moveFocus:w,currentIndex:l,min:0,max:g.length-1})},isFocused:l===b},I.id))})]})},b2=e=>`${e.type}-${e.id}`,w2=e=>e.reduce((t,n)=>yr(n)?{...t,...w2(n.items)}:{...t,[b2(n)]:n},{}),x2=v.createContext(void 0),ZE=({children:e})=>{const[t,n]=v.useState(null),o=v.useMemo(()=>[t,n],[t]);return d.jsx(x2.Provider,{value:o,children:e})},Os=({config:e,onItemClick:t})=>{const[n,o]=(()=>{const i=v.useContext(x2);if(i===void 0)throw new Error("useSection must be used within a SectionProvider");return i})(),r=ws();return v.useEffect(()=>{if(!t||!n)return;const{itemName:i,modifier:a,selectedContextMenuActionName:s}=n,c=(l=e.items,u=i,w2(l)[u]);var l,u;c&&(t({item:c,modifier:a,selectedContextMenuActionName:s}),o(null),a===eb||s||r())},[n,e.items,r,t,o]),d.jsx(Ih,{config:e,onItemClick:(i,a)=>{const{item:s,modifier:c,selectedContextMenuActionName:l}=a;o({itemName:b2(s),modifier:c,selectedContextMenuActionName:l})}})},C2="favorites-section",I2="workspaces-section",k2="applications-section",XE="layouts-section";function S2(e){const t=Wf(),n=jb(),o=(r=>{const{isSectionCollapsible:i,isFolderCollapsible:a,folderIconGetters:s,sectionIconSrc:c,sortOrder:l=ts.ASCENDING}=r,{favorites:u}=Eo(),p=Af(),f=Yy();return v.useMemo(()=>{const h=Of({items:p,sortOrder:l,ascendingCompare:l5,descendingCompare:u5}),m=u.filter(y=>y.type===Tr),g=h.reduce((y,x)=>{var b;const C=m.some(k=>k.id===x.id),w={id:x.id,title:x.title,description:x.caption,type:Tr,icon:"application",iconSrc:x.icon,openInstances:(b=f[x.name])==null?void 0:b.length,contextMenuActions:Tf(C)},I=x.userProperties.folder;return I?ip({items:y,newItem:w,settings:{isFolderCollapsible:a,isSectionCollapsible:i,sortOrder:l,folderIconGetters:s},path:I}):[...y,w]},[]);return{id:k2,title:"Apps",getIcon:()=>c?{src:c}:{variant:"apps"},items:g,isCollapsible:i}},[p,f,u,i,a,s,c,l])})(e);return d.jsx(Os,{config:o,onItemClick:r=>{const{item:i,modifier:a,selectedContextMenuActionName:s}=r;return s?n(i,s):t({id:i.id,title:i.title,modifier:a})}})}const UE=e=>{const{isSectionCollapsible:t,sectionIconSrc:n,sortOrder:o=ts.DISABLED}=e,{favorites:r}=Eo(),i=Pn(),{defaultLayout:a}=to(),{layouts:s}=ra(),{isLayoutHidden:c}=ks(),l=Cs(),{isWorkspaceHidden:u}=zl(),{value:p=!1}=St({prefKey:ia}),f=v.useMemo(()=>r.map(h=>h.type===no?((m,g,y,x,C,w)=>{var E;const I=g.find(O=>mt(O)===m.id);if(!I)return m;const b=y(I);if(b&&!x)return;const k=!!w&&mt(I)===mt(w),S={...I,isFavorite:!0,isHidden:b,isDefault:k};return{...m,className:b?"is-hidden-item":void 0,iconSrc:((E=I.metadata)==null?void 0:E.icon)||void 0,statusPill:k?{variant:"default",text:"Default"}:void 0,contextMenuSubtitle:Gl(S,C),contextMenuActions:Is(S,C)}})(h,s,c,p,i,a):h.type===Xo?((m,g,y,x,C)=>{var k;const w=g.find(S=>fi(S)===m.id);if(!w)return m;const I=y({id:fi(w),title:w.title});if(I&&!x)return;const b=w.accessInfo;return{...m,iconSrc:((k=w.metadata)==null?void 0:k.icon)||void 0,className:I?"is-hidden-item":void 0,contextMenuSubtitle:Mf(b,C),contextMenuActions:Fl(b,!0,C,I)}})(h,l,u,p,i):h).filter(h=>h!==void 0),[r,s,c,i,a,l,u,p]);return v.useMemo(()=>{const h=Of({items:f,sortOrder:o,ascendingCompare:Ab,descendingCompare:Eb});return{id:C2,title:"Favorites",getIcon:()=>n?{src:n}:{variant:"bookmark"},items:h,isCollapsible:t}},[f,o,t,n])},A2=e=>{const{isFavoritesSectionHidden:t}=(()=>{const{value:o,update:r,isLoading:i,error:a}=St({prefKey:jf}),s=v.useCallback(()=>r(c=>!c),[r]);return{error:a,isFavoritesSectionHidden:o,isLoading:i,toggle:s}})(),n=UE(e);return!t&&n.items.length>0?d.jsx(Os,{config:n}):null},E2=v.createContext(void 0),j2=()=>{const e=v.useContext(E2);if(e===void 0)throw new Error("useLaunchpadConfig must be used within an LaunchpadConfigProvider");return e},JE=({children:e,settings:t,components:n})=>{const o=v.useMemo(()=>({settings:t,components:n}),[t,n]);return d.jsx(E2.Provider,{value:o,children:e})},N2=v.createContext(void 0),P2=()=>{const e=v.useContext(N2);if(e===void 0)throw new Error("useLaunchpadSearch must be used within a LaunchpadSearchProvider");return e},YE=({children:e})=>{const[t,n]=v.useState(""),o=v.useMemo(()=>({searchTerm:t,setSearchTerm:n}),[t]);return d.jsx(N2.Provider,{value:o,children:e})},cc="io-connect-layout-sharing";function Ts(){const e=v.useContext(Se.IOConnectContext);return{shareLayout:v.useCallback(async({variant:n,id:o,workspaceId:r})=>{var i;try{const a=await e.apps.registry.get({name:cc});if(!(a!=null&&a.instances))return void console.error(`useShareLayout: App "${cc}" not found or has no instances.`);if(a.instances.length===0)return void await e.apps.instances.start({name:a.name,reuseInstance:!0,context:{variant:n,id:o,workspaceId:r}});const s=await e.apps.instances.get({id:a.instances[0].id}),c=(i=s==null?void 0:s.interopInstance)==null?void 0:i.windowId;if(!c)return void console.error(`useShareLayout: No windowId found for "${cc}" instance.`);const l=e.windows.findById(c);l==null||l.setContext({variant:n,id:o,workspaceId:r}),l==null||l.focus()}catch(a){console.error(`useShareLayout: Failed to launch "${cc}":`,a)}},[e])}}const O2=e=>{const{icon:t,tooltip:n,ariaLabel:o,onClick:r}=e;return d.jsx(Ue,{size:"32",iconSize:"16",variant:"circle",icon:t,tooltip:n,"aria-label":o,"data-testid":"base-section-header-button",onClick:i=>{i.stopPropagation(),r()}})},KE=()=>{const e=(()=>{const t=v.useContext(Se.IOConnectContext);return v.useCallback(async()=>{if(t.workspaces)try{await t.workspaces.createWorkspace({children:[],frame:{newFrame:!0}})}catch(o){await De({io:t,variant:ot,text:"Failed to create a new Workspace.",error:o})}},[t])})();return d.jsx(O2,{icon:"add-workspace",tooltip:"Create an empty Workspace in a new window",ariaLabel:"Create workspace",onClick:e})},qE=(e,t)=>{const{isSectionCollapsible:n,sectionIconSrc:o,sortOrder:r=ts.ASCENDING}=e,{favorites:i}=Eo(),a=Pn(),{hiddenWorkspaces:s}=zl(),{value:c}=St({prefKey:ia}),l=Cs(),u=v.useMemo(()=>new Set(s.map(m=>m.id)),[s]),p=v.useMemo(()=>((m,g,y,x=new Set,C=!1)=>Wb(m,g,{getAccessInfo:w=>w.accessInfo,getFolder:w=>{var I;return(I=w.metadata)==null?void 0:I.folder},toItemShell:N5,filterPublicItems:w=>w.filter(I=>C||!x.has(fi(I))),sortLeafItems:w=>Of({items:w,sortOrder:y,ascendingCompare:Ab,descendingCompare:Eb})}))(l,a,r,u,c),[l,a,r,u,c]),f=v.useMemo(()=>new Set(i.filter(m=>m.type===Xo).map(m=>m.id)),[i]),h=v.useMemo(()=>r1(p,{isFavorite:m=>f.has(m),getOpenInstances:m=>{var g;return(g=t.byTitle[m])==null?void 0:g.size},isWorkspaceSharingEnabled:a,hiddenWorkspaceIds:u}),[p,f,t,a,u]);return v.useMemo(()=>({id:I2,title:"Workspaces",getIcon:()=>o?{src:o}:{variant:"grid"},items:h,isCollapsible:n,HeaderButton:KE}),[h,n,o])},T2=e=>{const t=Dl(),n=i1(),{shareLayout:o}=Ts(),r=s1(),i=qE(e,r);return d.jsx(Os,{config:i,onItemClick:a=>{const{item:s,modifier:c,selectedContextMenuActionName:l}=a,u=l?o1(l):void 0;if(u){const p=a1(r,s.id);return o({variant:u,id:s.id,workspaceId:p})}return l?n(s,l):t({id:s.title,workspaceId:s.id,accessInfo:s.accessInfo,modifier:c})}})},QE=[{placementId:C2,Component:A2},{placementId:I2,Component:T2},{placementId:k2,Component:S2}],ej="getScreenDetails"in window,tj={header:{showHeader:!0,showSearch:!0},mode:"default"},nj=new Set([Tr,Xo,no]),oj=[0,6],rj=["top-start","right-start","left-start"],z0="viewport",R2=e=>nj.has(e),ij={[no]:"display",[Xo]:"grid",[Tr]:"apps"},aj=e=>{const{defaultLayout:t,activeLayout:n}=to(),{favorites:o}=Eo(),r=Pn(),{layouts:i}=ra(),{isLayoutHidden:a}=ks(),s=Cs(),{isWorkspaceHidden:c}=zl(),{value:l=!1}=St({prefKey:ia});return e.reduce((u,p)=>{const{type:f}=p,h=p.id||p.displayName;if(!h)return u;const m=p.displayName||h,g=S=>o.some(E=>E.type===f.name&&E.id===S),y=!!(p.action||R2(f.name)),x=({id:S=h,hasResolvedId:E=!1,accessInfo:O,className:A,iconSrc:N=p.iconURL,contextMenuActions:j=[],contextMenuSubtitle:G,statusPill:M}={},T=!0)=>({id:S,hasResolvedId:E,accessInfo:O,className:A,title:m,description:p.description,type:f.name,iconSrc:N,mainAction:T?p.action:void 0,contextMenuActions:j,contextMenuSubtitle:G,statusPill:M,isContextMenuButtonHidden:!y&&j.length>0}),C=(S,E)=>E===1||S===p.id;let w;if(f.name===Tr)w=[x({contextMenuActions:Tf(g(h))})];else if(f.name===Xo){const S=function(E,O,A,N){const j=E.filter(T=>T.title===A);if(!N)return[j.length===1?j[0]:void 0];const G=E.find(T=>T.id===O),M=G?[G,...j.filter(T=>T!==G)]:j;return M.length>0?M:[void 0]}(s,p.id,m,r);w=S.flatMap(E=>{const O=(({workspace:A,title:N,isFavorite:j,isLayoutSharingEnabled:G,isWorkspaceHidden:M,showHidden:T,fallbackIconSrc:H})=>{var P;const V=A?fi(A):N,z=!!A&&M({id:V,title:N});if(!z||T)return{id:V,hasResolvedId:!!(A!=null&&A.id),className:z?"is-hidden-item":void 0,accessInfo:A==null?void 0:A.accessInfo,contextMenuSubtitle:Mf(A==null?void 0:A.accessInfo,G),contextMenuActions:G&&!(A!=null&&A.id)?[]:Fl(A==null?void 0:A.accessInfo,j(V),G,z),iconSrc:((P=A==null?void 0:A.metadata)==null?void 0:P.icon)||H,statusPill:void 0}})({workspace:E,title:m,isFavorite:g,isLayoutSharingEnabled:r,isWorkspaceHidden:c,showHidden:l,fallbackIconSrc:p.iconURL});return O?[x(O,C(E==null?void 0:E.id,S.length))]:[]})}else if(f.name===no){const S=function(E,O,A,N){const j=E.filter(T=>T.name===A);if(!N)return[j.length===1?j[0]:void 0];const G=E.find(T=>T.id===O),M=G?[G,...j.filter(T=>T!==G)]:j;return M.length>0?M:[void 0]}(i,p.id,m,r);w=S.flatMap(E=>{const O=(({matchedLayout:A,title:N,isFavorite:j,isLayoutSharingEnabled:G,isLayoutHidden:M,showHidden:T,defaultLayout:H,activeLayout:V,fallbackIconSrc:z})=>{var $;const P=M({id:A==null?void 0:A.id,name:N});if(P&&!T)return;const B=A?mt(A):N,F={...A,name:N,isFavorite:j(B),isHidden:P,isDefault:!!H&&B===mt(H),isActive:!!V&&B===mt(V)};return{id:B,hasResolvedId:!!(A!=null&&A.id),className:P?"is-hidden-item":void 0,accessInfo:A==null?void 0:A.accessInfo,contextMenuSubtitle:Gl(F,G),contextMenuActions:G&&!(A!=null&&A.id)?[]:Is(F,G),statusPill:F.isDefault?{variant:"default",text:"Default"}:void 0,iconSrc:(($=F.metadata)==null?void 0:$.icon)||z}})({matchedLayout:E,title:m,isFavorite:g,isLayoutSharingEnabled:r,isLayoutHidden:a,showHidden:l,defaultLayout:t,activeLayout:n,fallbackIconSrc:p.iconURL});return O?[x(O,C(E==null?void 0:E.id,S.length))]:[]})}else w=[x({contextMenuActions:(p.secondaryActions??[]).map(({name:S,method:E,params:O,target:A})=>({name:S,interopParams:{method:E,params:O,target:A}}))})];const I=u.findIndex(({title:S})=>f.displayName?S===f.displayName:S===f.name),b=u[I],k=w.filter((S,E)=>w.findIndex(({id:O})=>O===S.id)===E&&!(b!=null&&b.items.some(({id:O})=>O===S.id)));return k.length===0?u:b?[...u.slice(0,I),{...b,items:[...b.items,...k]},...u.slice(I+1)]:[...u,{id:f.name,title:f.displayName||f.name,getIcon:()=>({variant:ij[f.name]??"grid"}),items:k}]},[])},sj=()=>{const e=Vl(),t=(()=>{const{defaultLayout:r,activeLayout:i}=to(),{layouts:a}=ra(),s=Pn();return(c,l)=>{const u=s?a.find(f=>f.id===c):a.find(f=>f.name===l),p={...u,id:u==null?void 0:u.id,name:l};return{...p,isDefault:!!r&&mt(p)===mt(r),isActive:!!i&&mt(p)===mt(i)}}})(),n=aa(),{shareLayout:o}=Ts();return async(r,i)=>{const{id:a,title:s}=r,c=_f(i);if(c)return void await o({variant:c,id:a});const l=t(a,s);await n(()=>e({layout:l,actionName:i}))}},cj=()=>{const e=jb(),t=(()=>{const o=i1(),{shareLayout:r}=Ts(),i=s1();return async(a,s)=>{const c=o1(s);if(c){const l=a1(i,a.hasResolvedId?a.id:void 0);return void await r({variant:c,id:a.id,workspaceId:l})}o(a,s)}})(),n=sj();return o=>o===Tr?e:o===Xo?t:o===no?n:void 0},lj=()=>{const e=v.useContext(Se.IOConnectContext),t=(()=>{const f=v.useContext(Se.IOConnectContext);return async h=>f.interop.methods().every(m=>m.name!==(h==null?void 0:h.method))?console.error("Interop method not found."):await f.interop.invoke(h.method,h.params,h.target).catch(m=>console.error({error:m}))})(),n=Dl(),o=Wf(),r=Ef(),i=Pn(),a=aa(),s=ws(),c=cj(),l=v.useCallback((f,h)=>{const m=c(f.type);m==null||m(f,h)},[c]),u=v.useCallback((f,h)=>{const{type:m,id:g,title:y,accessInfo:x,hasResolvedId:C,mainAction:w}=f;if(w)t(w);else switch(m){case Tr:return void o({id:g,title:y,modifier:h});case Xo:return i&&!C?void De({io:e,variant:ot,text:`Cannot determine which Workspace "${y}" to open - open it from the Workspaces list instead.`}):void n({id:y,workspaceId:g,accessInfo:x,modifier:h});case no:{if(i&&!C)return void De({io:e,variant:ot,text:`Cannot determine which Layout "${y}" to open - open it from the Layouts list instead.`});const I=C?g:void 0;return void a(()=>r({id:I,name:y}))}default:return}},[a,t,e,i,r,n,o]);return{executeItemAction:v.useCallback(async f=>{const{item:h,modifier:m,selectedContextMenuActionName:g}=f,y=((x,C)=>{var w;if(C)return(w=x.contextMenuActions)==null?void 0:w.find(I=>I.name===C)})(h,g);try{y!=null&&y.interopParams?await t(y.interopParams):g?l(h,g):u(h,m)}catch(x){return void console.error("Failed to execute search result action:",x)}((x,C)=>x===eb||!!C)(m,g)||s()},[s,u,l,t])}},uj=e=>{if("clientX"in e&&"clientY"in e)return{x:e.clientX,y:e.clientY};const{left:t,top:n,height:o}=e.currentTarget.getBoundingClientRect();return{x:t,y:n+o}},dj=()=>{const[e,t]=v.useState(null),[n,o]=v.useState(null),[r,i]=v.useState(null),a=v.useRef(null),s=v.useCallback(()=>{t(null),i(null)},[]),c=v.useCallback(g=>{a.current=g,o(g)},[o]),l=v.useMemo(()=>e?(g=>{const{x:y,y:x}=g;return{getBoundingClientRect:()=>({width:0,height:0,top:x,left:y,right:y,bottom:x,x:y,y:x,toJSON:()=>({})})}})(e.position):null,[e]),u=v.useMemo(()=>[{name:"offset",options:{offset:oj}},{name:"preventOverflow",options:{boundary:r??void 0,rootBoundary:z0,padding:8}},{name:"flip",options:{boundary:r??void 0,rootBoundary:z0,fallbackPlacements:rj}}],[r]),p=v.useMemo(()=>({strategy:"fixed",placement:"bottom-start",modifiers:u}),[u]),{styles:f,attributes:h}=Jy(l,n,p);Hf({eventType:"mouseup",handler:s,ref:a,skip:!e}),Bf({handler:s,skip:!e}),v.useEffect(()=>{if(!e)return;const g=y=>{y.key==="Escape"&&s()};return globalThis.addEventListener("blur",s),globalThis.addEventListener("keydown",g),globalThis.addEventListener("resize",s),globalThis.addEventListener("wheel",s),globalThis.addEventListener("touchmove",s),()=>{globalThis.removeEventListener("blur",s),globalThis.removeEventListener("keydown",g),globalThis.removeEventListener("resize",s),globalThis.removeEventListener("wheel",s),globalThis.removeEventListener("touchmove",s)}},[s,e]);const m=v.useCallback((g,y)=>{if(!(g.currentTarget instanceof HTMLElement))return void s();const x=(C=>{const w=C.closest(".launchpad-body")||C.closest(".launchpad");return w instanceof HTMLElement?w:null})(g.currentTarget);i(x),t({item:y,position:uj(g)})},[s]);return{cursorContextMenu:e,activeItemId:e?rp(e.item):void 0,closeCursorContextMenu:s,openCursorContextMenu:m,cursorMenuStyles:f,cursorMenuAttributes:h,setCursorMenuRef:c}};function pj(e){const{resultsToRender:t,isLoading:n}=T5(e.searchTerm),o=aj(t),{executeItemAction:r}=lj(),i=Gf(),{cursorContextMenu:a,activeItemId:s,closeCursorContextMenu:c,openCursorContextMenu:l,cursorMenuStyles:u,cursorMenuAttributes:p,setCursorMenuRef:f}=dj(),h=v.useCallback(async(g,y)=>{var b;const{item:x,selectedContextMenuActionName:C}=y,w=!!((b=x.contextMenuActions)!=null&&b.length),I=!!(x.mainAction||R2(x.type));(I||w)&&(C||I||!w?(c(),await r(y)):l(g,x))},[c,r,l]),m=v.useCallback(async(g,y)=>{a&&(g.stopPropagation(),c(),await r({item:a.item,modifier:i,selectedContextMenuActionName:y.name}))},[a,c,r,i]);return n?d.jsx("p",{className:"search-loading",children:"Loading..."}):t.length===0?d.jsx("p",{className:"search-no-results",children:"No results found. Try searching by app name, workspace title, or keywords."}):d.jsxs(d.Fragment,{children:[d.jsx(Lt,{children:o.map((g,y)=>d.jsx(Ih,{config:g,onItemClick:h,activeItemId:s},g.id||y))}),a&&d.jsx(Sf,{ref:f,className:"search-results-cursor-context-menu",actions:a.item.contextMenuActions??[],onActionItemClick:m,onClose:c,style:u.popper,...p.popper})]})}const L2=()=>{const e=v.useContext(Se.IOConnectContext),{setActiveLayout:t}=to(),n=Pn(),o=aa(),r=async()=>{var p;if(!("modals"in e)||!e.modals)return void console.error("Cannot create Layout because io dialogs are not enabled");const i="create",a="layout-name",{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await e.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:"Create Layout",input:{id:a,initialValue:"Create Layout",validation:{disabledButtonIds:[i],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Create",id:i},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(p=l==null?void 0:l.find(f=>f.id===a))==null?void 0:p.value;if(s||(c==null?void 0:c.id)===i)try{if(n){const f=zt(e);if(await Wl({io:e,type:"Global",name:u,targetAccessLevel:"private"})!=="available")return void await De({io:e,variant:ot,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});const h=await f.save({name:u,type:"Global"});t({id:h.id,name:u})}else{if((await e.layouts.getAll("Global")).some(f=>f.name===u))return void await De({io:e,variant:ot,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});await e.layouts.save({name:u,type:"Global"}),t({name:u})}await De({io:e,variant:Rn,text:`Layout "${u}" was created successfully.`})}catch(f){await De({io:e,variant:ot,text:`Failed to create Layout "${u}".`,error:f})}};return()=>o(r)},fj=()=>{const e=L2();return d.jsx(O2,{icon:"add",tooltip:"Create a new Layout",ariaLabel:"Create layout",onClick:e})},hj=()=>{const{activeLayout:e,defaultLayout:t}=to(),n=Pn(),{layouts:o}=ra(),{hiddenLayouts:r}=ks(),{favorites:i}=Eo(),{value:a}=St({prefKey:ia}),s=v.useMemo(()=>new Set(r.map(mt)),[r]),c=v.useMemo(()=>new Set(i.filter(p=>p.type===no).map(p=>p.id)),[i]),l=v.useMemo(()=>((p,f,h=new Set,m=!1)=>Wb(p,f,{getAccessInfo:g=>g.accessInfo,getFolder:g=>{var y;return(y=g.metadata)==null?void 0:y.folder},toItemShell:S5,filterPublicItems:g=>g.filter(y=>m||!h.has(mt(y)))}))(o,n,s,a),[o,n,s,a]),u=v.useMemo(()=>Vb(l,{activeLayout:e,defaultLayout:t,isLayoutSharingEnabled:n,hiddenLayoutIds:s,favoriteLayoutIds:c}),[l,e,t,n,s,c]);return v.useMemo(()=>({id:XE,title:"Layouts",getIcon:()=>({variant:"display"}),items:u,isCollapsible:!0,HeaderButton:fj}),[u])},mj=()=>{const e=Ef(),t=aa(),n=Vl(),{shareLayout:o}=Ts(),r=Pn(),i=hj();return d.jsx(Os,{config:i,onItemClick:a=>{const{item:s,selectedContextMenuActionName:c}=a,l=c?_f(c):void 0;if(l)return o({variant:l,id:s.id});const u={id:r?s.id:void 0,name:s.title,isActive:s.isSelected,isDefault:!!s.statusPill,accessInfo:s.accessInfo};return t(()=>c?n({layout:u,actionName:c}):e(u))}})},$0=()=>{const e=L2();return d.jsx(Ze,{variant:"primary",text:"Create Layout",onClick:e,"data-testid":"create-layout-button"})},gj=({isDefault:e,isLayoutSharingEnabled:t,accessInfo:n})=>{const o=Lf(n,t,"Layout")??"Layout";return d.jsxs("div",{className:"layouts-footer-active-layout-details",children:[d.jsx("span",{className:"layouts-footer-info","data-testid":"layout-type",children:o}),e&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"layouts-footer-dot-separator"}),d.jsx(Ss,{"data-testid":"default-pill",children:"Default"})]})]})},vj=({layout:e})=>{const t=Vl(),n=aa(),{shareLayout:o}=Ts(),r=Pn();return d.jsx(Vf,{buttonSize:"24",iconSize:"12",title:e.name,subtitle:Gl(e,r),icon:"ellipsis-vertical",actions:Is(e,r),onActionItemClick:async(i,a)=>{i.stopPropagation();const s=_f(a.name);if(s)return void await o({variant:s,id:mt(e)});await n(()=>t({layout:e,actionName:a.name}))},placement:"top-end",strategy:"fixed",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"active-layout-context-menu-button",contextMenuDataTestId:"active-layout-context-menu"})},yj=({layoutId:e,layoutName:t,accessInfo:n})=>{const o=v.useContext(Se.IOConnectContext),r=aa(),i=Vl(),a=!Pn()||Mb(n);return d.jsx(Ze,{variant:"primary",text:a?"Save":"Save as",onClick:a?s=>{s.stopPropagation(),r(async()=>{try{await Zb(o,{id:e,name:t}),await De({io:o,variant:Rn,text:`Layout "${t}" saved successfully`})}catch(c){await De({io:o,variant:ot,text:`Failed to save layout "${t}"`,error:c})}})}:s=>{s.stopPropagation();const c={id:e,name:t,isActive:!0,accessInfo:n};r(()=>i({layout:c,actionName:Tb}))},className:"layouts-footer-save-button","data-testid":"save-button"})},bj=({layoutId:e,layoutName:t,isDefault:n,isHidden:o,isFavorite:r,accessInfo:i})=>d.jsxs("div",{className:"layouts-footer-active-layout-buttons",children:[d.jsx(yj,{layoutId:e,layoutName:t,accessInfo:i}),d.jsx(vj,{layout:{id:e,name:t,isActive:!0,isDefault:n,isHidden:o,isFavorite:r,accessInfo:i}})]}),od=({heading:e,info:t,children:n})=>d.jsxs("div",{className:"layouts-footer-status",children:[d.jsx("div",{className:"layouts-footer-heading","data-testid":"layouts-footer-heading",children:e}),t&&d.jsx("div",{className:"layouts-footer-info","data-testid":"layouts-footer-info",children:t}),n]}),wj=()=>{const{activeLayout:e,defaultLayout:t}=to(),n=Pn(),{layouts:o}=ra(),{isLayoutHidden:r}=ks(),{favorites:i}=Eo();if(o.length===0)return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:"Start using layouts",info:"You don’t have any saved layouts"}),d.jsx($0,{})]});if(!e)return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:"No active layout",info:"Load a layout from your list of layouts or create new"}),d.jsx($0,{})]});const a=!!t&&mt(e)===mt(t),s=o.find(c=>mt(c)===mt(e));return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:e.name,children:d.jsx(gj,{isDefault:a,isLayoutSharingEnabled:n,accessInfo:s==null?void 0:s.accessInfo})}),d.jsx(bj,{layoutId:e.id,layoutName:e.name,isDefault:a,isHidden:r(e),isFavorite:i.some(c=>c.type===no&&c.id===mt(e)),accessInfo:s==null?void 0:s.accessInfo})]})},xj=()=>d.jsx("footer",{className:"layouts-footer","data-testid":"layouts-footer",children:d.jsx(wj,{})}),Z0=({className:e})=>{const{isLaunchpadCollapsed:t}=Df(),{isGlobalLayoutsAvailable:n}=to(),{components:o}=j2(),{searchTerm:r}=P2(),{sections:i=QE}=o;return d.jsxs("div",{className:te("launchpad-body",t?"collapsed":void 0,e),children:[d.jsx(Uo,{wrapperClassName:"launchpad-main-scrollable-container",element:"main",elementProps:{className:"launchpad-main"},children:tb(r)?d.jsx(pj,{searchTerm:r}):d.jsx(ZE,{children:d.jsxs(Lt,{children:[i.map(({Component:a,placementId:s})=>d.jsx(a,{},s)),n&&d.jsx(mj,{})]})})}),n&&d.jsx(xj,{})]})};var Cj=function(e){return function(t){return!!t&&typeof t=="object"}(e)&&!function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||function(o){return o.$$typeof===Ij}(t)}(e)},Ij=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function cs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?na((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function kj(e,t,n){return e.concat(t).map(function(o){return cs(o,n)})}function X0(e){return Object.keys(e).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}(e))}function U0(e,t){try{return t in e}catch{return!1}}function Sj(e,t,n){var o={};return n.isMergeableObject(e)&&X0(e).forEach(function(r){o[r]=cs(e[r],n)}),X0(t).forEach(function(r){(function(i,a){return U0(i,a)&&!(Object.hasOwnProperty.call(i,a)&&Object.propertyIsEnumerable.call(i,a))})(e,r)||(U0(e,r)&&n.isMergeableObject(t[r])?o[r]=function(i,a){if(!a.customMerge)return na;var s=a.customMerge(i);return typeof s=="function"?s:na}(r,n)(e[r],t[r],n):o[r]=cs(t[r],n))}),o}function na(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||kj,n.isMergeableObject=n.isMergeableObject||Cj,n.cloneUnlessOtherwiseSpecified=cs;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Sj(e,t,n):cs(t,n)}na.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return na(n,o,t)},{})};var Aj=hs(na);const J0=({settings:e={},components:t={},isOpen:n=!0,onClose:o,windowManagementPermissionState:r="granted",children:i,className:a,...s})=>{const c=ej&&r==="granted",l=v.useMemo(()=>Aj(tj,e),[e]);return d.jsx(z3,{close:o,isOpen:n,isGlobalLayoutsAvailable:c,children:d.jsx(JE,{settings:l,components:t,children:d.jsx(YE,{children:d.jsx("div",{className:te("launchpad",a),"data-testid":"launchpad",...s,children:i})})})})},_2=v.forwardRef((e,t)=>{const{onSearch:n,searchTerm:o,onClear:r,className:i}=e,a=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{var s;a&&"search"in a&&((s=a.search)==null||s.setDebounceMS(450))},[a]),d.jsx(qn,{id:"search-input",className:te("search-bar",i),ref:t,placeholder:"Find anything",value:o,onChange:n,autoComplete:"off",iconPrepend:"search",iconAppend:o.length?"close":void 0,iconAppendOnClick:r})});_2.displayName="SearchBar";const M2=({className:e})=>{const{isLaunchpadPinned:t,isLoading:n,toggle:o}=Hl();return d.jsx(Ue,{className:e,size:"32",variant:"circle",icon:t?"unpin":"pin",onClick:o,disabled:n})},Y0=({className:e})=>{const t=Ml(),{isOpen:n}=to(),{settings:o,components:r}=j2(),{isLaunchpadPinned:i}=Hl(),{isLaunchpadCollapsed:a,setIsLaunchpadCollapsed:s}=Df(),{searchTerm:c,setSearchTerm:l}=P2(),u=v.useRef(null),{showSearch:p,showHeader:f}=o.header??{},{BeforeSearch:h,AfterSearch:m}=r.header??{};return v.useEffect(()=>{var g;n&&((g=u.current)==null||g.focus())},[n]),v.useEffect(()=>{i&&s(!1)},[s,i]),f?d.jsxs("div",{className:te("launchpad-header",t||i?void 0:"draggable",e),"data-testid":"launchpad-header",children:[h&&d.jsx(h,{}),p&&d.jsx(_2,{ref:u,searchTerm:c,onSearch:g=>{const y=g.target.value;tb(y)&&a&&s(!1),l(y)},onClear:()=>{var g;l(""),(g=u.current)==null||g.focus()},className:t?void 0:"non-draggable"}),m&&d.jsx(m,{}),m===void 0&&(o==null?void 0:o.mode)!=="pinned"&&d.jsx(M2,{className:"ms-auto"})]}):null};var Dt=Object.freeze({__proto__:null,ApplicationsSection:S2,Body:Z0,ContentsContainer:J0,DIALOG_TEMPLATE_NAMES:Do,FavoritesSection:A2,Header:Y0,Panel:e=>d.jsxs(J0,{...e,children:[d.jsx(Y0,{}),d.jsx(Z0,{})]}),PinButton:M2,Section:Os,WorkspacesSection:T2,getWorkspaceIdentity:fi,useActiveLayout:qy,useApplications:Af,useApplicationsInstances:Yy,useFavorites:Eo,useFrameId:Ml,useIsLaunchpadCollapsed:Df,useIsLaunchpadPinned:Hl,useOnIframeFocus:Bf,useOnOutsideClick:Hf,usePressedKeys:Gf,useRestoreWorkspace:Dl,useStartApplication:Wf,useStorage:Ky,useWorkspaces:Cs,useWorkspacesAccessInfo:()=>{const[e,t]=v.useState(new Map),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=zt(n);if(!o)return;let r=!1;const i=[],a=()=>{o.getMany({includeAccessInfo:!0}).then(s=>{if(r)return;const c=s.filter(l=>l.type==="Workspace");t(new Map(c.map(l=>[l.name,{id:l.id,metadata:l.metadata,accessInfo:l.accessInfo}])))}).catch(s=>console.error("useWorkspacesAccessInfo: Failed to fetch V2 workspaces:",s))};return a(),Promise.all([o.onAdded(s=>{s.type!=="Workspace"||r||a()}),o.onRemoved(s=>{s.type!=="Workspace"||r||a()}),o.onRenamed(s=>{s.type!=="Workspace"||r||a()}),o.onChanged(s=>{s.type!=="Workspace"||r||a()})]).then(s=>{r?s.forEach(c=>c()):i.push(...s)}).catch(s=>console.error("useWorkspacesAccessInfo: Failed to subscribe to V2 workspace events:",s)),()=>{r=!0,i.forEach(s=>{try{s()}catch(c){console.error("useWorkspacesAccessInfo: Failed to unsubscribe from workspace events:",c)}})}},[n]),e}});v.createContext(null);const Ia={APPLICATION:"application",WORKSPACE:"workspace",LAYOUT:"layout"};v.createContext(null);function Ej({isOpen:e,onClose:t,container:n}){return e?Bo.createPortal(d.jsx(gh,{onClose:t}),n??document.querySelector("#root")??document.body):null}const D2=v.createContext({searchQuery:"",setSearch:()=>{},isPanelVisible:!1,sortNotificationsBy:"newest",setSortBy:()=>{},viewNotificationsBy:"all",setViewBy:()=>{},isBulkActionsVisible:!1,showBulkActions:()=>{},hideBulkActions:()=>{}}),nn=()=>v.useContext(D2);function B2({title:e,onOpenSettings:t,onClose:n,...o}){const{HeaderCaptionTitle:r,HeaderCaptionCount:i,HeaderCaptionButtonSettings:a,HeaderCaptionButtonClose:s,HeaderActions:c,HeaderBulkActions:l,HeaderSearch:u}=hi(),{isBulkActionsSupported:p,notificationsCount:f}=Ee(),{isBulkActionsVisible:h}=nn(),m=qe();return d.jsxs(pr,{...o,children:[d.jsxs("div",{className:"io-panel-header-caption",children:[d.jsx(r,{title:e}),d.jsx(i,{}),d.jsxs(pr.ButtonGroup,{children:[m&&d.jsx(a,{onClick:t}),d.jsx(s,{onClick:n})]})]}),d.jsx(u,{}),p?d.jsxs("div",{className:`io-panel-header-actions-wrapper ${h&&f>0?"io-panel-header-bulk-actions-opened":""} `,children:[d.jsx(c,{}),d.jsx(l,{})]}):d.jsx(c,{})]})}function H2({text:e="Notifications",counter:t,...n}){const{notificationsCount:o}=Ee();return d.jsx(bo,{text:e,size:"large",...n,children:(t??!0)&&d.jsxs("span",{children:["(",o,")"]})})}const G2="newest",jj="oldest",Nj="severity",rd=["None","Low","Medium","High","Critical"],K0={key:G2,descending:!0},W2=e=>[...e].sort((t,n)=>(n.timestamp||0)-(t.timestamp||0)),V2=e=>[...e].sort((t,n)=>(t.timestamp||0)-(n.timestamp||0)),F2=(e,t)=>{const n=rd[0];return[...e].sort((o,r)=>{const i=rd.indexOf(o.severity||n),a=rd.indexOf(r.severity||n);return(t?-1:1)*(i-a)})},Pj={[G2]:W2,[jj]:V2,[Nj]:F2},Oj={severity:"Priority",newest:"Newest",oldest:"Oldest"};function z2({...e}){const[t,n]=v.useState([]),{NotificationsList:o,Notification:r}=hi(),{notifications:i,setCount:a,notificationsCount:s}=Ee(),{sortNotificationsBy:c,viewNotificationsBy:l,searchQuery:u}=nn(),p=v.useRef(null),f=ru(u),h=v.useMemo(()=>((g,y)=>{if(!g)return[];switch(y){case"all":default:return g;case"unread":return g.filter(x=>x.state==="Active"||x.state==="Stale");case"read":return g.filter(x=>x.state==="Acknowledged"||x.state==="Seen");case"snoozed":return g.filter(x=>x.state==="Snoozed")}})(i,l).filter(g=>{var y,x;return g.title.toLowerCase().includes(f.toLowerCase())||((y=g.source)==null?void 0:y.toLowerCase().includes(f.toLowerCase()))||((x=g.body)==null?void 0:x.toLowerCase().includes(f.toLowerCase()))}),[f,i,l]);return v.useEffect(()=>{switch(c){case"newest":n(W2(h));break;case"oldest":n(V2(h));break;case"severity":n(F2(h,!0));break;default:n(h)}a(h.length)},[h,c,a]),v.useEffect(()=>{var m;p.current&&((m=p.current)==null||m.scrollTo({top:0,behavior:"smooth"}))},[f,s,c,l]),d.jsx(Uo,{ref:p,element:Yi,elementProps:e,children:d.jsx(o,{notifications:t,Notification:r})})}function $2({...e}){const{FooterButtons:t}=hi();return d.jsx(ji,{...e,children:d.jsx(t,{})})}function Z2({className:e,...t}){const{FooterButtonClearAll:n,FooterButtonClearAllOld:o}=hi(),{notifications:r}=Ee(),[i,a]=v.useState(!1);return v.useEffect(()=>{r.filter(s=>s.state==="Stale"||s.state==="Acknowledged").length>0?a(!0):a(!1)},[r]),d.jsxs(We,{className:e,align:"right",...t,children:[d.jsx(o,{disabled:!i}),d.jsx(n,{disabled:r.length<=0})]})}function X2({text:e="Clear All",...t}){const{clearAll:n}=Ee();return d.jsx(Ze,{text:e,onClick:()=>{n()},...t})}function U2({text:e="Clear Old",...t}){const{clearAllOld:n}=Ee();return d.jsx(Ze,{text:e,onClick:()=>{n()},...t})}function kh(e){const t=qe(),{onClose:n,settings:o}=Ee(),{isPanelVisible:r}=nn(),{id:i,onClick:a,updateState:s}=e,c=v.useCallback(async()=>{if(!a)return;if(!t){try{await a({close:!0})}catch(f){console.error(f)}return void n(i)}const u=(o==null?void 0:o.toastStacking)??!1;let p;p=r?(o==null?void 0:o.closeNotificationOnClick)??!0:!u&&null;try{p!==null?await a({close:p}):(await a({close:!1}),await s("Acknowledged"))}catch(f){console.error(f)}},[t,i,r,a,n,s,o==null?void 0:o.closeNotificationOnClick,o==null?void 0:o.toastStacking]),l=v.useCallback(async u=>{const p=u.target;p.closest("button")||p.closest("[role='button']")||p.closest("a")||p.closest(".io-dropdown-menu")||await c()},[c]);return{handleClick:c,handleWrapperClick:l}}function J2({className:e,notification:t,onClick:n,...o}){const r=te("io-notification-header",e),{HeaderCount:i,HeaderBadge:a,HeaderTitle:s,HeaderTimestamp:c,HeaderButtonSnooze:l,HeaderButtonClose:u}=lu(),{handleWrapperClick:p}=kh(t);return d.jsxs("div",{className:r,onClick:async f=>{await p(f),n==null||n(f)},...o,children:[d.jsx(a,{notification:t}),d.jsx(i,{notification:t}),d.jsx(s,{notification:t}),d.jsx(c,{notification:t}),d.jsxs(We,{children:[d.jsx(l,{notification:t}),d.jsx(u,{notification:t})]})]})}function Y2({notification:e,...t}){const{settings:n,notificationStacks:o}=Ee(),{isPanelVisible:r}=nn(),{toastStacking:i,stackBy:a}=n,s=a==="application"?"source":a??"source";let c=0;if(i){const l=o.find(u=>u.key===e[s]);c=(l==null?void 0:l.items.length)??0}return r||!i||c<=1?null:d.jsx(Ss,{...t,children:c>9?"9+":c})}function K2({className:e,notification:t,...n}){if(!(t!=null&&t.severity)||t.severity==="None")return null;const o=te("io-notification-header-badge",e);return d.jsx(Ss,{className:o,...n,children:t.severity})}function q2({className:e,state:t,severity:n="None",icon:o,...r}){const i=te("io-notification-header-icon",e),{isPanelVisible:a}=nn();return d.jsxs("div",{className:i,...r,children:[o&&d.jsx("span",{className:"io-notification-header-icon-image",children:d.jsx("img",{src:o,alt:`io-notification-header-icon-${o}`})}),d.jsx("span",{className:`io-notification-header-icon-badge color-${n.toLowerCase()}`,children:a&&t!=="Acknowledged"&&"New"})]})}function Q2({className:e,notification:{appTitle:t},...n}){const o=te("io-notification-header-title",e);return d.jsx("div",{className:o,...n,children:t})}function eC({className:e,notification:{timestamp:t,state:n,snooze:o},...r}){const i=te("io-notification-timestamp",e);return d.jsx("small",o&&n==="Snoozed"?{className:i,...r,children:"Snoozed"}:{className:i,...r,children:nx(t??0)??"Just Now"})}function tC({notification:{id:e,state:t},...n}){var a,s;const{settings:o,snooze:r}=Ee(),i=v.useCallback(c=>{var l;c.stopPropagation(),r&&r(e,((l=o.snooze)==null?void 0:l.duration)??0)},[e,r,(a=o.snooze)==null?void 0:a.duration]);return r&&t!=="Snoozed"&&((s=o.snooze)!=null&&s.enabled)?d.jsx(Ze,{icon:"snooze",variant:"link",text:"Snooze",tabIndex:-1,onClick:i,...n}):null}function nC({notification:{id:e,updateState:t},...n}){const o=qe(),{onClose:r}=Ee(),{isPanelVisible:i}=nn(),a=v.useCallback(s=>{s.stopPropagation(),!o||i?r(e):t("Acknowledged").catch(console.error)},[o,e,r,i,t]);return d.jsx(Ue,{icon:"close",iconSize:"10",tabIndex:-1,onClick:a,...n})}function oC({className:e,notification:t,...n}){const o=te("io-notification-body",e),{BodyIcon:r,BodyTitle:i,BodyDescription:a}=lu(),{icon:s,title:c,body:l}=t,{handleClick:u}=kh(t);return d.jsxs("div",{className:o,role:"button",tabIndex:0,onKeyDown:async p=>{Wn(p)&&await u()},onClick:u,...n,children:[d.jsx(r,{icon:s}),d.jsxs("div",{className:"io-notification-body-content",children:[d.jsx(i,{text:c}),d.jsx(a,{text:l})]})]})}function rC({className:e,icon:t,altText:n="notification icon",...o}){if(!t)return null;const r=te("io-notification-body-icon",e);return d.jsx("div",{className:r,...o,children:d.jsx("img",{src:t,alt:n})})}function iC({text:e,...t}){return d.jsx(bo,{text:e,...t})}function aC({className:e,text:t,...n}){const o=te("io-notification-body-description",e);return d.jsx("p",{className:o,...n,children:t})}function sC({className:e,notification:t}){const n=te("io-notification-footer",e),{FooterButton:o}=lu(),{handleWrapperClick:r}=kh(t),i=v.useMemo(()=>function(s){const c=[],l={};if(!s)return;s.forEach(p=>{var g;const{displayId:f,displayPath:h}=p,m={...p,children:[]};if(h&&h.length>0){let y;h.forEach((x,C)=>{var w;C===0?y=l[x]:y&&(y=(w=y.children)==null?void 0:w.find(I=>I.displayId===x))}),y&&((g=y.children)==null||g.push(m))}else f?(c.push(m),l[f]=m):c.push(m);f&&(l[f]=m)});const u=p=>{p.forEach(f=>{var h;((h=f.children)==null?void 0:h.length)===0?delete f.children:f.children&&u(f.children)})};return u(c),c}(t.actions),[t.actions]),a=(s,c)=>s.children?d.jsx(Yn,{text:s.title,children:s.children.map(a)},`${s.title}-${c}`):((l,u)=>d.jsx(Yn.Item,{children:d.jsx(o,{variant:"link",className:"io-dropdown-menu-item io-dropdown-menu-button",notificationAction:l})},`${l.title}-${u}`))(s,c);return d.jsx("div",{className:n,onClick:r,children:d.jsx(We,{align:"right",children:i==null?void 0:i.map((s,c)=>s.children?d.jsxs(We,{variant:"append",children:[d.jsx(o,{notificationAction:s,variant:c===0?"primary":"default"}),d.jsx(Yn,{variant:c===0?"primary":"default",icon:"ellipsis",children:s.children.map(a)})]},`${s.title}-${c}`):d.jsx(o,{notificationAction:s,variant:c===0?"primary":"link"},`${s.title}-${c}`))})})}function cC({notificationAction:e,...t}){const n=v.useCallback(o=>{o.stopPropagation(),e.onClick({close:!0})},[e]);return d.jsx(Ze,{text:e.title,onClick:n,...t})}const lC={Header:J2,HeaderCount:Y2,HeaderBadge:K2,HeaderIcon:q2,HeaderTitle:Q2,HeaderTimestamp:eC,HeaderButtonSnooze:tC,HeaderButtonClose:nC,Body:oC,BodyIcon:rC,BodyTitle:iC,BodyDescription:aC,Footer:sC,FooterButton:cC},uC=v.createContext(lC),dC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...lC,...t}),[t]);return d.jsx(uC.Provider,{value:n,children:e})});function lu(e){return{...v.useContext(uC),...e}}function Tj({className:e,notification:t,...n}){const{Header:o,Body:r,Footer:i}=lu(),{severity:a}=t,s=te("io-notification",`severity-${(a==null?void 0:a.toLowerCase())??"none"}`,t.state!=="Acknowledged"&&"state-new",e);return d.jsxs("div",{className:s,...n,children:[d.jsx(o,{notification:t}),d.jsx(r,{notification:t}),d.jsx(i,{notification:t})]})}function uu({components:e,notification:t,...n}){return d.jsx(dC,{components:e,children:d.jsx(Tj,{notification:t,...n})})}function pC({className:e,notifications:t,...n}){const[o,r]=v.useState(!1),i=t.length>=3?"large":"normal",a=t.length===2?"small":i,s=t[0].severity,c=te("io-notification-stack",o&&"io-notification-stack-open",a!=="normal"&&[`io-notification-stack-${a}`],s&&s!=="None"&&[`io-notification-stack-${s.toLowerCase()}`],e),l=v.useCallback(()=>{r(!0)},[]),u=v.useCallback(p=>{p.stopPropagation(),t.forEach(f=>{f.close()})},[t]);return d.jsxs("div",{className:c,onClick:l,...n,children:[o&&a!=="normal"&&d.jsx("div",{className:"io-notification-stack-btn",children:d.jsx(Ze,{icon:"close",onClick:p=>u(p),children:d.jsx("span",{className:"io-btn-text",children:"Clear Stack"})})}),t.map(p=>d.jsx(uu,{notification:p},p.id))]})}function Rj({...e}){const{notificationStacks:t}=Ee();return d.jsx(d.Fragment,{children:t.map(n=>d.jsx(pC,{notifications:n.items,...e},n.key))})}dC.displayName="ComponentsStoreProvider";const Lj=({notification:e,Notification:t,...n})=>{var h;const{configuration:o,isBulkActionsSupported:r,selectedNotifications:i,selectNotification:a}=Ee(),{isPanelVisible:s,isBulkActionsVisible:c}=nn(),l=((h=o.sourceFilter)==null?void 0:h.muted)??[],u=e.source&&l.includes(e.source)||l.includes("*");if(!s&&u)return null;const p=s&&r&&c,f=i.includes(e.id);return p?d.jsxs("div",{className:te("io-notification-list-bulk-action-item",{selected:f}),children:[d.jsx(Es,{checked:f,onChange:m=>a(e.id,m.target.checked)}),d.jsx(t,{notification:e,...n})]}):d.jsx(t,{notification:e,...n})};function Sh({className:e,Notification:t,notifications:n=[],noNotificationText:o="No notifications to display",...r}){const i=te("io-notification-list",e),{settings:a}=Ee(),{isPanelVisible:s}=nn(),{toastStacking:c}=a,l=c&&!s,u=n.length>0;return d.jsxs("div",{className:i,...r,children:[l&&d.jsx(Rj,{}),!l&&(u?n.map(p=>d.jsx(Lj,{notification:p,Notification:t,...r},p.id)):d.jsx("div",{className:"io-notification-list-no-notifications",children:o}))]})}const fC={Header:B2,HeaderCaptionTitle:H2,HeaderCaptionCount:function({variant:e="primary",...t}){const{notificationsCount:n=0}=Ee();return n===0?null:d.jsx(Jv,{variant:e,...t,children:n>99?"99+":n})},HeaderCaptionButtonSettings:function({icon:e="cog",size:t="32",variant:n="circle",...o}){return qe()?d.jsx(Ue,{icon:e,size:t,variant:n,...o}):null},HeaderCaptionButtonClose:function({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const{hidePanel:i}=Ee(),a=qe();return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:s=>{o?o(s):a&&i()},...r})},HeaderActions:function({className:e,...t}){const n=te("io-panel-header-actions",e),{HeaderActionSort:o,HeaderActionView:r,HeaderActionClear:i,HeaderActionEdit:a}=hi();return d.jsxs("div",{className:n,...t,children:[d.jsxs(We,{children:[d.jsx(o,{}),d.jsx(r,{})]}),d.jsxs(We,{children:[d.jsx(i,{}),d.jsx(a,{})]})]})},HeaderActionSort:function({text:e="Sort by",...t}){const{sortNotificationsBy:n,setSortBy:o}=nn(),{onNotificationsSort:r}=(()=>{const{notifications:i}=Ee(),[a,s]=v.useState(K0),{key:c,descending:l}=a,u=v.useMemo(()=>Pj[c](i,l),[i,c,l]);return{onNotificationsSort:v.useCallback(f=>{s(h=>({key:f,descending:h.key!==f?K0.descending:!h.descending}))},[]),sortedNotifications:u}})();return d.jsxs(fe,{variant:"light",...t,children:[d.jsxs(fe.Button,{variant:"link",children:[e," ",d.jsx("strong",{children:Oj[n].toLowerCase()})]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",checkIcon:"check",children:["Newest","Oldest","Priority"].map(i=>{const a=i==="Priority"?"severity":i.toLowerCase();return d.jsx(fe.Item,{isSelected:n===a,onClick:()=>{o(a),r(a)},children:i},i)})})})]})},HeaderActionView:function({text:e="View",...t}){var a;const{settings:n}=Ee(),{viewNotificationsBy:o,setViewBy:r}=nn(),i=(a=n.snooze)!=null&&a.enabled?["All","Read","Unread","Snoozed"]:["All","Read","Unread"];return d.jsxs(fe,{variant:"light",...t,children:[d.jsxs(fe.Button,{variant:"link",children:[e," ",d.jsx("strong",{children:o})]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",checkIcon:"check",children:i.map(s=>d.jsx(fe.Item,{isSelected:o===s.toLowerCase(),onClick:()=>r(s.toLowerCase()),children:s},s))})})]})},HeaderActionClear:function({text:e="Clear All",...t}){const{clearAll:n,notificationsCount:o}=Ee();return d.jsx(Ze,{variant:"link",text:e,onClick:n,disabled:o===0,...t})},HeaderActionEdit:function({tooltip:e="Bulk Edit",...t}){const{isBulkActionsSupported:n,notificationsCount:o}=Ee(),{showBulkActions:r}=nn();return n?d.jsx(Ue,{icon:"pen-to-square",title:e,size:"32",onClick:r,disabled:o===0,...t}):null},HeaderBulkActions:function({className:e,...t}){const n=te("io-panel-header-bulk-actions",e),{HeaderBulkActionSelect:o,HeaderBulkActionSelectDropdown:r,HeaderBulkActionMarkAsRead:i,HeaderBulkActionMarkAsUnread:a,HeaderBulkActionSnooze:s,HeaderBulkActionClear:c,HeaderBulkActionClose:l}=hi(),{isBulkActionsSupported:u}=Ee();return u?d.jsx("div",{className:n,...t,children:d.jsxs(We,{children:[d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),d.jsx(s,{}),d.jsx(c,{}),d.jsx(l,{})]})}):null},HeaderBulkActionSelect:function({...e}){const{isBulkActionsSupported:t,selectedNotifications:n,selectAllNotifications:o,notificationsCount:r}=Ee();return t?d.jsx(Es,{checked:r===n.length&&r>0,onChange:i=>o("all",i.target.checked),disabled:r===0,...e}):null},HeaderBulkActionSelectDropdown:function({...e}){const{isBulkActionsSupported:t,selectAllNotifications:n,notificationsCount:o}=Ee();return t?d.jsxs(fe,{variant:"light",...e,children:[d.jsx(fe.ButtonIcon,{variant:"default",icon:"chevron-down",size:"16",iconSize:"10",disabled:o===0}),d.jsx(qv,{children:d.jsxs(fe.List,{variant:"single",checkIcon:"check",children:[d.jsx(fe.ItemSection,{children:"Select"}),["All","Read","Unread","Snoozed"].map(r=>d.jsx(fe.Item,{onClick:()=>n(r.toLowerCase(),!0),children:r},r))]})})]}):null},HeaderBulkActionMarkAsRead:function({icon:e="envelope-open",size:t="32",variant:n="circle",tooltip:o="Mark as read",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a,"Seen")},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionMarkAsUnread:function({icon:e="envelope",size:t="32",variant:n="circle",tooltip:o="Mark as unread",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a,"Active")},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionSnooze:function({icon:e="snooze",size:t="32",variant:n="circle",tooltip:o="Snooze",...r}){var p,f;const{isBulkActionsSupported:i,selectedNotifications:a,snoozeMany:s,settings:c,notificationsCount:l}=Ee(),u=v.useCallback(()=>{var h;s(a,((h=c.snooze)==null?void 0:h.duration)??0)},[a,s,(p=c.snooze)==null?void 0:p.duration]);return i&&((f=c.snooze)!=null&&f.enabled)?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionClear:function({icon:e="trash",size:t="32",variant:n="circle",tooltip:o="Clear",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,clearMany:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a)},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionClose:function({text:e="Done",variant:t="primary",...n}){const{isBulkActionsSupported:o,notificationsCount:r}=Ee(),{hideBulkActions:i}=nn();return o?d.jsx(Ze,{variant:t,text:e,onClick:i,disabled:r===0,...n}):null},HeaderSearch:function({className:e,placeholder:t="Search",iconPrepend:n="search",iconAppend:o="close",...r}){const i=te("io-panel-header-search",e),a=v.useRef(null),{notificationsCount:s}=Ee(),{searchQuery:c,setSearch:l}=nn(),u=c.length>0,p=v.useCallback(()=>{l(""),a.current&&a.current.focus()},[l]);return d.jsxs("div",{className:i,children:[d.jsx(qn,{ref:a,value:c,iconPrepend:n,iconAppend:u?o:void 0,iconAppendOnClick:u?p:void 0,placeholder:t,onChange:f=>l(f.target.value),...r}),u&&d.jsx("p",{className:"io-panel-header-search-count",children:`${s} results`})]})},Body:z2,Footer:$2,FooterButtons:Z2,FooterButtonClearAll:X2,FooterButtonClearAllOld:U2,Notification:uu,NotificationsList:Sh},hC=v.createContext(fC),mC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...fC,...t}),[t]);return d.jsx(hC.Provider,{value:n,children:e})});function hi(e){return{...v.useContext(hC),...e}}mC.displayName="ComponentsStoreProvider";function gC(){var r,i;const e=v.useContext(Se.IOConnectContext),{settings:t}=Ee(),n=qe(),o=v.useCallback(async()=>{var c,l,u;const a=e.windows.my();if(!e||!a||!n)return;const s=a.placementSettings;await a.place({...s,snapped:!0,top:12,left:((c=t.placement)==null?void 0:c.panel)==="left"?12:void 0,right:((l=t.placement)==null?void 0:l.panel)==="right"?12:void 0,bottom:12,width:400,horizontalAlignment:(u=t.placement)==null?void 0:u.panel})},[e,n,(r=t.placement)==null?void 0:r.panel]);v.useEffect(()=>{var a;e&&((a=t.placement)!=null&&a.panel)&&n&&o().catch(console.error)},[e,n,o,(i=t.placement)==null?void 0:i.panel])}function _j({className:e,onClose:t,title:n="Notifications",...o}){var f,h;const{Header:r,Body:i}=hi(),{settings:a}=Ee(),{isPanelVisible:s}=nn(),[c,l]=v.useState(!1),u=qe(),p=te("io-notifications-panel",((f=a.placement)==null?void 0:f.panel)==="left"&&"io-panel-left",((h=a.placement)==null?void 0:h.panel)==="right"&&"io-panel-right",e);return gC(),v.useEffect(()=>{s||l(!1)},[s]),d.jsxs(d.Fragment,{children:[d.jsxs(ze,{className:p,...o,children:[d.jsx(r,{title:n,onClose:t,onOpenSettings:()=>l(!0)}),d.jsx(i,{})]}),u&&s&&d.jsx(Ej,{isOpen:c,onClose:()=>l(!1)})]})}const vC=({className:e,notifications:t,maxToasts:n=1,...o})=>{const r=te("io-toasts-body",e),{NotificationsList:i,Notification:a}=xC(),[s,c]=v.useState([]);return v.useEffect(()=>{const l=n<0?t.length:n,u=t.filter(p=>p.state==="Active").slice(0,l);for(const p of u)p.onShow();c(u)},[t,n]),d.jsx("div",{className:r,...o,children:d.jsx(i,{Notification:a,notifications:s,noNotificationText:""})})};vC.displayName="Body";const yC={Body:vC,Notification:uu,NotificationsList:Sh},bC=v.createContext(yC),wC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...yC,...t}),[t]);return d.jsx(bC.Provider,{value:n,children:e})});function xC(e){return{...v.useContext(bC),...e}}wC.displayName="ComponentsStoreProvider";function CC(){var r;const e=v.useContext(Se.IOConnectContext),{settings:t}=Ee(),n=(r=t.placement)==null?void 0:r.toasts,o=v.useCallback(async()=>{const i=e.windows.my();if(!e||!i)return;const a=i.placementSettings;await i.place({...a,snapped:!0,left:n==="top-left"||n==="bottom-left"?12:void 0,right:n==="top-right"||n==="bottom-right"?12:void 0,width:400,verticalAlignment:n==="top-left"||n==="top-right"?"top":"bottom",horizontalAlignment:n==="top-right"||n==="bottom-right"?"right":"left"})},[e,n]);v.useEffect(()=>{e&&n&&o().catch(console.error)},[e,o,n])}function Mj({className:e,maxToasts:t=10,...n}){var f;const{Header:o,Body:r,Footer:i}=xC(),{notifications:a,settings:s}=Ee(),c=v.useRef(null),l=function(h){const m=v.useContext(Se.IOConnectContext),g=v.useRef(null),y=v.useRef(0),[x,C]=v.useState(!1),w=v.useCallback(async I=>{if(!m)return;const b=m.windows.my();if(!b)return;let k=1080;try{k=(await m.displays.getPrimary()).workArea.height}catch(E){console.warn("Could not get primary display, using fallback height:",E)}const S=Math.min(Math.max(I,92),k);if(C(I>=k),!(Math.abs(S-y.current)<5)){y.current=S;try{const E=b.placementSettings;await b.place({...E,height:S})}catch(E){console.error("Error updating toasts window height:",E)}}},[m]);return v.useEffect(()=>{if(!h.current||!m)return;const I=h.current,b=new ResizeObserver(k=>{const S=k.at(-1);if(!S)return;const{height:E}=S.contentRect,O=getComputedStyle(I),A=Number.parseInt(O.paddingTop,10),N=Number.parseInt(O.paddingBottom,10),j=(Number.isNaN(A)?0:A)+E+(Number.isNaN(N)?0:N);g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{w(j).catch(console.error)},100)});return b.observe(I),()=>{b.disconnect(),g.current&&clearTimeout(g.current)}},[m,w]),x}(c),u=(f=s.placement)==null?void 0:f.toasts,p=te("io-toasts",(u==="top-left"||u==="top-right")&&"io-toasts-top",(u==="top-right"||u==="bottom-right")&&"io-toasts-right",(u==="bottom-left"||u==="bottom-right")&&"io-toasts-bottom",(u==="top-left"||u==="bottom-left")&&"io-toasts-left",l&&"io-toasts-max-height",e);return CC(),d.jsxs("div",{className:p,...n,children:[o&&d.jsx(o,{}),d.jsx("div",{ref:c,children:d.jsx(r,{notifications:a,maxToasts:t})}),i&&d.jsx(i,{})]})}var Ah=Object.freeze({__proto__:null,Notification:uu,NotificationBody:oC,NotificationBodyDescription:aC,NotificationBodyIcon:rC,NotificationBodyTitle:iC,NotificationFooter:sC,NotificationFooterButton:cC,NotificationHeader:J2,NotificationHeaderBadge:K2,NotificationHeaderButtonClose:nC,NotificationHeaderButtonSnooze:tC,NotificationHeaderCount:Y2,NotificationHeaderIcon:q2,NotificationHeaderTimestamp:eC,NotificationHeaderTitle:Q2,NotificationStack:pC,NotificationsList:Sh,NotificationsPanelProvider:({children:e})=>{const{searchQuery:t,setSearch:n,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:c,showBulkActions:l,hideBulkActions:u}=function(){const f=v.useContext(Se.IOConnectContext),[h,m]=v.useState(!1),[g,y]=v.useState("newest"),[x,C]=v.useState("all"),[w,I]=v.useState(""),[b,k]=v.useState(!1),S=qe(),{isBulkActionsSupported:E}=Ee();return v.useEffect(()=>{const O=kt.onPanelVisibilityChanged(A=>m(A));return()=>{O()}},[]),v.useEffect(()=>{S!==null&&S&&(async()=>{const O=await f.notifications.panel.isVisible();m(O)})()},[f.notifications.panel,S]),v.useEffect(()=>{h||(k(!1),C("all"))},[h]),{isPanelVisible:h,sortNotificationsBy:g,setSortBy:O=>{y(O)},viewNotificationsBy:x,setViewBy:O=>{C(O)},searchQuery:w,setSearch:O=>{I(O)},isBulkActionsVisible:b,showBulkActions:()=>{E&&k(!0)},hideBulkActions:()=>{E&&k(!1)}}}(),p=v.useMemo(()=>({searchQuery:t,setSearch:n,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:c,showBulkActions:l,hideBulkActions:u}),[t,n,o,r,i,a,s,c,l,u]);return d.jsx(D2.Provider,{value:p,children:e})},NotificationsProvider:({children:e})=>{const{notifications:t,notificationStacks:n,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:c,clearAll:l,clearAllOld:u,close:p,hidePanel:f,showPanel:h,saveSetting:m,saveFilter:g,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:C,selectNotification:w,selectAllNotifications:I,clearMany:b,snooze:k,snoozeMany:S,setState:E,setStates:O,setCount:A}=t4(),N=v.useMemo(()=>({notifications:t,notificationStacks:n,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:c,clearAll:l,clearAllOld:u,onClose:p,hidePanel:f,showPanel:h,saveSetting:m,saveFilter:g,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:C,selectNotification:w,selectAllNotifications:I,clearMany:b,snooze:k,snoozeMany:S,setState:E,setStates:O,setCount:A}),[t,n,o,r,i,a,s,c,l,u,p,f,h,m,g,y,x,C,w,I,b,k,S,E,O,A]);return d.jsx(Px.Provider,{value:N,children:e})},Panel:function({components:e,settings:t,...n}){return d.jsx(mh,{components:t,children:d.jsx(mC,{components:e,children:d.jsx(_j,{...n})})})},PanelBody:z2,PanelFooter:$2,PanelFooterButtonClearAll:X2,PanelFooterButtonClearAllOld:U2,PanelFooterButtons:Z2,PanelHeader:B2,PanelHeaderCaptionTitle:H2,SettingsAllowNotificationToasts:Tx,SettingsAllowNotifications:Ox,SettingsCloseNotificationOnClick:Lx,SettingsGeneral:Ex,SettingsHideToastsAfter:Mx,SettingsPanel:gh,SettingsPanelAutoHide:_x,SettingsPlacement:Gx,SettingsPlacementPanel:Vx,SettingsPlacementToasts:Fx,SettingsShowNotificationBadge:Rx,SettingsSnooze:zx,SettingsSnoozeDuration:$x,SettingsStacking:Dx,SettingsSubscribeAll:Xx,SettingsSubscribeApp:Ux,SettingsSubscribeMuteAll:Jx,SettingsSubscribeMuteApp:Yx,SettingsSubscriptions:Zx,SettingsToastStackBy:Hx,SettingsToastStacking:Bx,Toasts:function({components:e,...t}){return d.jsx(wC,{components:e,children:d.jsx(Mj,{...t})})},useAddRemoveApps:hh,useHidePanelOnFocusLost:function(e=!0){const t=v.useContext(Se.IOConnectContext),n=qe();return v.useEffect(()=>{var r;if(!t||!e||n===null||!n)return;const o=(r=t.windows.my())==null?void 0:r.onFocusChanged(i=>{i.isFocused||t.notifications.panel.hide().catch(a=>{console.error("Error hiding panel:",a)})});return()=>o==null?void 0:o()},[t,n,e]),t},useHidePanelOnKeyUp:function(e="Escape"){const{hidePanel:t}=Ee();zA(e,t)},useNotificationStacking:jx,useNotificationsContext:Ee,useNotificationsPanelContext:nn,usePanelWindowPlacement:gC,useSelectNotifications:Nx,useShowHidePanelWindow:function(e=!0){const t=v.useContext(Se.IOConnectContext),n=t==null?void 0:t.windows.my(),o=qe(),{isPanelVisible:r}=nn();return v.useEffect(()=>{t&&n&&o&&(r?n.show().then(()=>{e&&n.focus().catch(i=>{console.error("Error focusing window:",i)})}).catch(i=>console.error("Error showing window:",i)):n.hide().catch(i=>console.error("Error hiding window:",i)))},[t,n,o,r,e]),{myWindow:n}},useToastsWindowPlacement:CC}),Dj=Object.freeze({__proto__:null,AllowDocking:Hw,AutoClose:({align:e="right",label:t="Auto-close on starting apps and workspaces",...n})=>d.jsx(on,{align:e,label:t,prefKey:sb,disabled:!0,...n}),DockedAlwaysOnTop:Gw,DockedClaimsSpace:Ww,Downloads:Uw,DownloadsAskForEachDownload:mx,DownloadsLocation:hx,General:_w,HideFavoritesFromLaunchpad:Bw,HideLabelsInExtendedArea:Fw,Layouts:Zw,LayoutsRestoreLastSaved:({align:e="right",label:t="Restore last saved on startup",...n})=>d.jsx(on,{align:e,label:t,prefKey:mb,...n}),LayoutsSaveCurrentOnExit:Xw,LayoutsShowDeletePrompt:su,LayoutsShowUnsavedChangesPrompt:au,MinimizeToTray:Mw,Panel:Ax,PanelBody:Lw,PinnedPosition:Dw,ShowExtendedArea:Vw,ShowFavoritesInExtendedArea:zw,ShowRecentAppsInExtendedArea:$w,System:gx,SystemRestartSection:wx,SystemShutdownSection:xx,Theme:iu}),IC=Object.freeze({__proto__:null,LicenseSection:e2,Panel:c2,PluginsSection:n2,ProductsInfoSection:t2,Trademark:o2,UserSection:r2});v.createContext(null);v.memo(function({className:e,...t}){const{notificationsCount:n,showNotificationBadge:o,toggleNotificationPanel:r}=(()=>{const s=v.useContext(Se.IOConnectContext),{settings:c}=Ee(),[l,u]=v.useState(0);v.useEffect(()=>{const f=s==null?void 0:s.notifications;if(!f)return;const h=f.onCounterChanged(m=>{u(m.count)});return()=>h==null?void 0:h()},[s==null?void 0:s.notifications]);const p=v.useCallback(async()=>{var f;if((f=s==null?void 0:s.notifications)!=null&&f.panel)try{await s.notifications.panel.isVisible()?await s.notifications.panel.hide():await s.notifications.panel.show()}catch(h){console.error("Failed to toggle notifications panel:",h)}else console.error("Notifications panel API not available")},[s]);return{showNotificationBadge:c.showNotificationBadge,notificationsCount:l,toggleNotificationPanel:p}})(),i=o&&n>0,a=n>99?"99+":n;return d.jsxs("div",{className:te("notifications-button","non-draggable",e),...t,children:[i&&d.jsx(Jv,{variant:"primary",children:a}),d.jsx(Ue,{variant:"circle",icon:"bell",size:"32",title:"Notifications",onClick:r})]})});const{isClickKeypress:Bj}=fk;v.memo(function({id:e,title:t,type:n,icon:o,iconSrc:r,hasOpenInstance:i,workspaceId:a,onItemClick:s,onPerformAction:c}){const l=v.useCallback(async()=>{let h;h=n===Ia.APPLICATION?{kind:Ia.APPLICATION,id:e,modifier:null,title:t}:n===Ia.LAYOUT?{kind:Ia.LAYOUT,id:e,modifier:null}:{kind:Ia.WORKSPACE,id:e,modifier:null},await c({type:n,id:e,title:t,workspaceId:a}),s==null||s(h)},[e,t,n,a,s,c]),u=t,p=r?d.jsx(_l,{size:"16",src:r,alt:`${t} icon`}):d.jsx(wt,{size:"16",variant:o});return d.jsx(Lt.Item,{className:te({"io-list-item-active":i}),prepend:p,tooltip:u??t,title:t,onClick:l,tabIndex:0,"aria-label":t,onKeyDown:f=>{Bj(f)&&(f.preventDefault(),l())},children:d.jsx("span",{className:"launchpad-category-item-title",children:t})})});function Hj(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState();return v.useEffect(()=>{if(!e)return;let o=!1;return(async()=>{var r,i;try{const a=await((i=(r=e.windows)==null?void 0:r.my())==null?void 0:i.getContext());o||n(a)}catch(a){console.error("usePlaceholderAppStartupContext: failed to read context",a)}})(),()=>{o=!0}},[e]),t}const Gj=e=>(e==null?void 0:e.type)==="workspaces"?"Workspace Currently Unavailable":"App Currently Unavailable";function Wj(){return d.jsxs("svg",{className:"io-placeholder-app-indicator",width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[d.jsx("path",{className:"io-placeholder-app-indicator-badge",d:"M0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24Z"}),d.jsx("path",{className:"io-placeholder-app-indicator-glyph",d:"M18.5 18C18.2188 18 18 18.25 18 18.5V21.5C18 21.7812 18.2188 22 18.5 22H21.5C21.75 22 22 21.7812 22 21.5V18.5C22 18.25 21.75 18 21.5 18H18.5ZM17 18.5C17 17.6875 17.6562 17 18.5 17H21.5C22.3125 17 23 17.6875 23 18.5V21.5C23 22.3438 22.3125 23 21.5 23H18.5C17.6562 23 17 22.3438 17 21.5V18.5ZM18.5 26C18.2188 26 18 26.25 18 26.5V29.5C18 29.7812 18.2188 30 18.5 30H21.5C21.75 30 22 29.7812 22 29.5V26.5C22 26.25 21.75 26 21.5 26H18.5ZM17 26.5C17 25.6875 17.6562 25 18.5 25H21.5C22.3125 25 23 25.6875 23 26.5V29.5C23 30.3438 22.3125 31 21.5 31H18.5C17.6562 31 17 30.3438 17 29.5V26.5ZM29.5 18H26.5C26.2188 18 26 18.25 26 18.5V21.5C26 21.7812 26.2188 22 26.5 22H29.5C29.75 22 30 21.7812 30 21.5V18.5C30 18.25 29.75 18 29.5 18ZM26.5 17H29.5C30.3125 17 31 17.6875 31 18.5V21.5C31 22.3438 30.3125 23 29.5 23H26.5C25.6562 23 25 22.3438 25 21.5V18.5C25 17.6875 25.6562 17 26.5 17ZM26.5 26C26.2188 26 26 26.25 26 26.5V29.5C26 29.7812 26.2188 30 26.5 30H29.5C29.75 30 30 29.7812 30 29.5V26.5C30 26.25 29.75 26 29.5 26H26.5ZM25 26.5C25 25.6875 25.6562 25 26.5 25H29.5C30.3125 25 31 25.6875 31 26.5V29.5C31 30.3438 30.3125 31 29.5 31H26.5C25.6562 31 25 30.3438 25 29.5V26.5Z"})]})}function Vj({className:e,title:t,message:n,workspacesIndicator:o,...r}){var l;const i=(l=Hj())==null?void 0:l.originalApp,a=te("io-placeholder-app-header",e),s=n===void 0?(u=>{const{name:p,type:f}=u??{};return f==="workspaces"?p?`Workspace "${p}" couldn't be restored. It may be missing or incorrectly configured.`:"The workspace couldn't be restored. It may be missing or incorrectly configured.":p?`App "${p}" couldn't be loaded. It may be missing or incorrectly configured.`:"The app couldn't be loaded. It may be missing or incorrectly configured."})(i):n,c=o===void 0?d.jsx(Wj,{}):o;return d.jsxs("div",{className:a,...r,children:[(i==null?void 0:i.type)==="workspaces"&&c,d.jsx(bo,{tag:"h2",size:"large",text:t??Gj(i),className:"io-placeholder-app-title"}),s&&d.jsx("p",{className:"io-text-default-lh16 io-placeholder-app-message",children:s})]})}function Fj({className:e,text:t="If this was unexpected, contact your system administrator or support team.",...n}){const o=te("io-placeholder-app-support",e);return d.jsxs("div",{className:o,...n,children:[d.jsxs("svg",{className:"io-placeholder-app-support-icon",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[d.jsx("path",{className:"io-placeholder-app-support-icon-badge",d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z"}),d.jsx("path",{className:"io-placeholder-app-support-icon-glyph",d:"M9 16V17.5C9 17.7812 8.75 18 8.5 18C8.21875 18 8 17.7812 8 17.5V16C8 11.5938 11.5625 8 16 8C20.4062 8 24 11.5938 24 16V20.5312C24 21.9062 22.875 23.0312 21.5 23.0312L18.9062 23C18.6875 23.5938 18.125 24 17.5 24H15.5C14.6562 24 14 23.3438 14 22.5C14 21.6875 14.6562 21 15.5 21H17.5C18.125 21 18.6875 21.4375 18.9062 22L21.5 22.0312C22.3125 22.0312 23 21.3438 23 20.5312V16C23 12.1562 19.8438 9 16 9C12.125 9 9 12.1562 9 16ZM18 22.5C18 22.25 17.75 22 17.5 22H15.5C15.2188 22 15 22.25 15 22.5C15 22.7812 15.2188 23 15.5 23H17.5C17.75 23 18 22.7812 18 22.5ZM12.5 15C11.6562 15 11 15.6875 11 16.5V17.5C11 18.3438 11.6562 19 12.5 19H13V15H12.5ZM10 16.5C10 15.125 11.0938 14 12.5 14H13C13.5312 14 14 14.4688 14 15V19C14 19.5625 13.5312 20 13 20H12.5C11.0938 20 10 18.9062 10 17.5V16.5ZM19 15V19H19.5C20.3125 19 21 18.3438 21 17.5V16.5C21 15.6875 20.3125 15 19.5 15H19ZM19.5 14C20.875 14 22 15.125 22 16.5V17.5C22 18.9062 20.875 20 19.5 20H19C18.4375 20 18 19.5625 18 19V15C18 14.4688 18.4375 14 19 14H19.5Z"})]}),d.jsx("span",{className:"io-text-default-lh16 io-placeholder-app-support-text",children:t})]})}const kC={Header:Vj,SupportPanel:Fj},zj=v.createContext(kC),$j=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...kC,...t}),[t]);return d.jsx(zj.Provider,{value:n,children:e})});$j.displayName="ComponentsStore";const SC=e=>{const{General:t,Layouts:n}=du();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(n,{})]})},AC=({title:e="General",...t})=>{const{Theme:n}=du();return d.jsx(Je,{title:e,"data-testid":"preferences-panel-general-block",...t,children:d.jsx(n,{})})},EC=({title:e="Layouts",...t})=>{const{LayoutsShowDeletePrompt:n}=du();return d.jsx(Je,{title:e,"data-testid":"preferences-panel-layouts-block",...t,children:d.jsx(n,{})})},jC={Body:SC,General:AC,Theme:iu,Layouts:EC,LayoutsShowUnsavedChangesPrompt:au,LayoutsShowDeletePrompt:su},NC=v.createContext(jC),PC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...jC,...t}),[t]);return d.jsx(NC.Provider,{value:n,children:e})});PC.displayName="PreferencesPanelComponentsStoreProvider";const du=()=>v.useContext(NC),Zj=({onClose:e,title:t="Platform Preferences",...n})=>{const{Body:o}=du();return d.jsx(Sx,{title:t,onClose:e,...n,children:d.jsx(o,{})})};var Xj=Object.freeze({__proto__:null,General:AC,Layouts:EC,LayoutsShowDeletePrompt:su,LayoutsShowUnsavedChangesPrompt:au,Panel:({components:e,...t})=>d.jsx(PC,{components:e,children:d.jsx(Zj,{...t})}),PanelBody:SC,Theme:iu}),Uj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function OC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TC={exports:{}};/*!
39
+ */function AE(){if(O0)return Qu;O0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Qu=function(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var r={},i=0;i<10;i++)r["_"+String.fromCharCode(i)]=i;var a=Object.getOwnPropertyNames(r).map(function(c){return r[c]});if(a.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(c){s[c]=c}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(o,r){for(var i,a,s=function(p){if(p==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(p)}(o),c=1;c<arguments.length;c++){for(var l in i=Object(arguments[c]))t.call(i,l)&&(s[l]=i[l]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},Qu}function nd(){return R0?T0:(R0=1,T0="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function W0(){return _0?L0:(_0=1,L0=Function.call.bind(Object.prototype.hasOwnProperty))}if(process.env.NODE_ENV!=="production"){var EE=G0();Rp.exports=function(){if(B0)return ed;B0=1;var e=G0(),t=AE(),n=nd(),o=W0(),r=function(){if(D0)return M0;D0=1;var s=function(){};if(process.env.NODE_ENV!=="production"){var c=nd(),l={},u=W0();s=function(f){var h="Warning: "+f;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}}}function p(f,h,m,g,y){if(process.env.NODE_ENV!=="production"){for(var x in f)if(u(f,x)){var C;try{if(typeof f[x]!="function"){var w=Error((g||"React class")+": "+m+" type `"+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[x]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}C=f[x](h,x,g,m,null,c)}catch(b){C=b}if(!C||C instanceof Error||s((g||"React class")+": type specification of "+m+" `"+x+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in l)){l[C.message]=!0;var I=y?y():"";s("Failed "+m+" type: "+C.message+(I??""))}}}}return p.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(l={})},M0=p}(),i=function(){};function a(){return null}return process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}),ed=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:m(a),arrayOf:function(b){return m(function(k,S,E,N,A){if(typeof b!="function")return new h("Property `"+A+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var P=k[S];if(!Array.isArray(P))return new h("Invalid "+N+" `"+A+"` of type `"+C(P)+"` supplied to `"+E+"`, expected an array.");for(var j=0;j<P.length;j++){var G=b(P,j,E,N,A+"["+j+"]",n);if(G instanceof Error)return G}return null})},element:m(function(b,k,S,E,N){var A=b[k];return s(A)?null:new h("Invalid "+E+" `"+N+"` of type `"+C(A)+"` supplied to `"+S+"`, expected a single ReactElement.")}),elementType:m(function(b,k,S,E,N){var A=b[k];return e.isValidElementType(A)?null:new h("Invalid "+E+" `"+N+"` of type `"+C(A)+"` supplied to `"+S+"`, expected a single ReactElement type.")}),instanceOf:function(b){return m(function(k,S,E,N,A){if(!(k[S]instanceof b)){var P=b.name||u;return new h("Invalid "+N+" `"+A+"` of type `"+((j=k[S]).constructor&&j.constructor.name?j.constructor.name:u)+"` supplied to `"+E+"`, expected instance of `"+P+"`.")}var j;return null})},node:m(function(b,k,S,E,N){return x(b[k])?null:new h("Invalid "+E+" `"+N+"` supplied to `"+S+"`, expected a ReactNode.")}),objectOf:function(b){return m(function(k,S,E,N,A){if(typeof b!="function")return new h("Property `"+A+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var P=k[S],j=C(P);if(j!=="object")return new h("Invalid "+N+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected an object.");for(var G in P)if(o(P,G)){var M=b(P,G,E,N,A+"."+G,n);if(M instanceof Error)return M}return null})},oneOf:function(b){return Array.isArray(b)?m(function(k,S,E,N,A){for(var P=k[S],j=0;j<b.length;j++)if(f(P,b[j]))return null;var G=JSON.stringify(b,function(M,T){return w(T)==="symbol"?String(T):T});return new h("Invalid "+N+" `"+A+"` of value `"+String(P)+"` supplied to `"+E+"`, expected one of "+G+".")}):(process.env.NODE_ENV!=="production"&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var k=0;k<b.length;k++){var S=b[k];if(typeof S!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(S)+" at index "+k+"."),a}return m(function(E,N,A,P,j){for(var G=[],M=0;M<b.length;M++){var T=(0,b[M])(E,N,A,P,j,n);if(T==null)return null;T.data&&o(T.data,"expectedType")&&G.push(T.data.expectedType)}return new h("Invalid "+P+" `"+j+"` supplied to `"+A+"`"+(G.length>0?", expected one of type ["+G.join(", ")+"]":"")+".")})},shape:function(b){return m(function(k,S,E,N,A){var P=k[S],j=C(P);if(j!=="object")return new h("Invalid "+N+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected `object`.");for(var G in b){var M=b[G];if(typeof M!="function")return y(E,N,A,G,w(M));var T=M(P,G,E,N,A+"."+G,n);if(T)return T}return null})},exact:function(b){return m(function(k,S,E,N,A){var P=k[S],j=C(P);if(j!=="object")return new h("Invalid "+N+" `"+A+"` of type `"+j+"` supplied to `"+E+"`, expected `object`.");var G=t({},k[S],b);for(var M in G){var T=b[M];if(o(b,M)&&typeof T!="function")return y(E,N,A,M,w(T));if(!T)return new h("Invalid "+N+" `"+A+"` key `"+M+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(k[S],null," ")+`
40
+ Valid keys: `+JSON.stringify(Object.keys(b),null," "));var H=T(P,M,E,N,A+"."+M,n);if(H)return H}return null})}};function f(b,k){return b===k?b!==0||1/b==1/k:b!=b&&k!=k}function h(b,k){this.message=b,this.data=k&&typeof k=="object"?k:{},this.stack=""}function m(b){if(process.env.NODE_ENV!=="production")var k={},S=0;function E(A,P,j,G,M,T,H){if(G=G||u,T=T||j,H!==n){if(c){var V=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw V.name="Invariant Violation",V}if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var z=G+":"+j;!k[z]&&S<3&&(i("You are manually calling a React.PropTypes validation function for the `"+T+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[z]=!0,S++)}}return P[j]==null?A?P[j]===null?new h("The "+M+" `"+T+"` is marked as required in `"+G+"`, but its value is `null`."):new h("The "+M+" `"+T+"` is marked as required in `"+G+"`, but its value is `undefined`."):null:b(P,j,G,M,T)}var N=E.bind(null,!1);return N.isRequired=E.bind(null,!0),N}function g(b){return m(function(k,S,E,N,A,P){var j=k[S];return C(j)!==b?new h("Invalid "+N+" `"+A+"` of type `"+w(j)+"` supplied to `"+E+"`, expected `"+b+"`.",{expectedType:b}):null})}function y(b,k,S,E,N){return new h((b||"React class")+": "+k+" type `"+S+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function x(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(x);if(b===null||s(b))return!0;var k=function(A){var P=A&&(l&&A[l]||A["@@iterator"]);if(typeof P=="function")return P}(b);if(!k)return!1;var S,E=k.call(b);if(k!==b.entries){for(;!(S=E.next()).done;)if(!x(S.value))return!1}else for(;!(S=E.next()).done;){var N=S.value;if(N&&!x(N[1]))return!1}return!0;default:return!1}}function C(b){var k=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":function(S,E){return S==="symbol"||!!E&&(E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol)}(k,b)?"symbol":k}function w(b){if(b==null)return""+b;var k=C(b);if(k==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return k}function I(b){var k=w(b);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}return h.prototype=Error.prototype,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},ed}()(EE.isElement,!0)}else Rp.exports=function(){if(H0)return td;H0=1;var e=nd();function t(){}function n(){}return n.resetWarningCache=t,td=function(){function o(a,s,c,l,u,p){if(p!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function r(){return o}o.isRequired=o;var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},td}()();var ve=hs(Rp.exports);function Lp(e){return Lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lp(e)}var jE=(typeof window>"u"?"undefined":Lp(window))==="object"&&window.Element||function(){};ve.oneOfType([ve.string,ve.func,function(e,t,n){if(!(e[t]instanceof jE))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")},ve.shape({current:ve.any})]);var PE=ve.oneOfType([ve.func,ve.string,ve.shape({$$typeof:ve.symbol,render:ve.func}),ve.arrayOf(ve.oneOfType([ve.func,ve.string,ve.shape({$$typeof:ve.symbol,render:ve.func})]))]),V0=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],NE="entering",OE="entered",TE="exiting",RE="exited",F0=!1,LE=process.env.NODE_ENV!=="production"?ve.oneOfType([ve.number,ve.shape({enter:ve.number,exit:ve.number,appear:ve.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ve.oneOfType([ve.string,ve.shape({enter:ve.string,exit:ve.string,active:ve.string}),ve.shape({enter:ve.string,enterDone:ve.string,enterActive:ve.string,exit:ve.string,exitDone:ve.string,exitActive:ve.string})]);var g2=v.createContext(null),Da="unmounted",Yr="exited",Kr="entering",Pi="entered",_p="exiting",zn=function(e){function t(o,r){var i;i=e.call(this,o,r)||this;var a,s=r&&!r.isMounting?o.enter:o.appear;return i.appearStatus=null,o.in?s?(a=Yr,i.appearStatus=Kr):a=Pi:a=o.unmountOnExit||o.mountOnEnter?Da:Yr,i.state={status:a},i.nextCallback=null,i}(function(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,al(o,r)})(t,e),t.getDerivedStateFromProps=function(o,r){return o.in&&r.status===Da?{status:Yr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var r=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Kr&&i!==Pi&&(r=Kr):i!==Kr&&i!==Pi||(r=_p)}this.updateStatus(!1,r)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o,r,i,a=this.props.timeout;return o=r=i=a,a!=null&&typeof a!="number"&&(o=a.exit,r=a.enter,i=a.appear!==void 0?a.appear:r),{exit:o,enter:r,appear:i}},n.updateStatus=function(o,r){if(o===void 0&&(o=!1),r!==null)if(this.cancelNextCallback(),r===Kr){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Bo.findDOMNode(this);i&&function(a){a.scrollTop}(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Yr&&this.setState({status:Da})},n.performEnter=function(o){var r=this,i=this.props.enter,a=this.context?this.context.isMounting:o,s=this.props.nodeRef?[a]:[Bo.findDOMNode(this),a],c=s[0],l=s[1],u=this.getTimeouts(),p=a?u.appear:u.enter;!o&&!i||F0?this.safeSetState({status:Pi},function(){r.props.onEntered(c)}):(this.props.onEnter(c,l),this.safeSetState({status:Kr},function(){r.props.onEntering(c,l),r.onTransitionEnd(p,function(){r.safeSetState({status:Pi},function(){r.props.onEntered(c,l)})})}))},n.performExit=function(){var o=this,r=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Bo.findDOMNode(this);r&&!F0?(this.props.onExit(a),this.safeSetState({status:_p},function(){o.props.onExiting(a),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Yr},function(){o.props.onExited(a)})})})):this.safeSetState({status:Yr},function(){o.props.onExited(a)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,r){r=this.setNextCallback(r),this.setState(o,r)},n.setNextCallback=function(o){var r=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,r.nextCallback=null,o(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,r){this.setNextCallback(r);var i=this.props.nodeRef?this.props.nodeRef.current:Bo.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(i&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=s[0],l=s[1];this.props.addEndListener(c,l)}o!=null&&setTimeout(this.nextCallback,o)}else setTimeout(this.nextCallback,0)},n.render=function(){var o=this.state.status;if(o===Da)return null;var r=this.props,i=r.children;r.in,r.mountOnEnter,r.unmountOnExit,r.appear,r.enter,r.exit,r.timeout,r.addEndListener,r.onEnter,r.onEntering,r.onEntered,r.onExit,r.onExiting,r.onExited,r.nodeRef;var a=tw(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(g2.Provider,{value:null},typeof i=="function"?i(o,a):v.cloneElement(v.Children.only(i),a))},t}(v.Component);function ki(){}function Mp(e){return Mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mp(e)}zn.contextType=g2,zn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ve.shape({current:typeof Element>"u"?ve.any:function(e,t,n,o,r,i){var a=e[t];return ve.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:ve.oneOfType([ve.func.isRequired,ve.element.isRequired]).isRequired,in:ve.bool,mountOnEnter:ve.bool,unmountOnExit:ve.bool,appear:ve.bool,enter:ve.bool,exit:ve.bool,timeout:function(e){var t=LE;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:ve.func,onEnter:ve.func,onEntering:ve.func,onEntered:ve.func,onExit:ve.func,onExiting:ve.func,onExited:ve.func}:{},zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ki,onEntering:ki,onEntered:ki,onExit:ki,onExiting:ki,onExited:ki},zn.UNMOUNTED=Da,zn.EXITED=Yr,zn.ENTERING=Kr,zn.ENTERED=Pi,zn.EXITING=_p;var Ca,_E=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},fl.apply(this,arguments)}function ME(e,t){if(e==null)return{};var n,o,r=function(a,s){if(a==null)return{};var c,l,u={},p=Object.keys(a);for(l=0;l<p.length;l++)c=p[l],s.indexOf(c)>=0||(u[c]=a[c]);return u}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DE(e,t,n){return t&&function(o,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dp(e,t){return Dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Dp(e,t)}function BE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,o=hl(e);if(t){var r=hl(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(i,a){if(a&&(Mp(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v2(i)}(this,n)}}function v2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hl(e)}function z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(o){Mi(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HE=ta(ta({},zn.propTypes),{},{horizontal:ve.bool,isOpen:ve.bool,children:ve.oneOfType([ve.arrayOf(ve.node),ve.node]),tag:PE,className:ve.node,navbar:ve.bool,cssModule:ve.object,innerRef:ve.shape({current:ve.object})}),GE=ta(ta({},zn.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:350}),WE=(Mi(Ca={},NE,"collapsing"),Mi(Ca,OE,"collapse show"),Mi(Ca,TE,"collapsing"),Mi(Ca,RE,"collapse"),Ca),Bp=function(){(function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),o&&Dp(n,o)})(t,v.Component);var e=BE(t);function t(n){var o;return function(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),(o=e.call(this,n)).state={dimension:null},o.nodeRef=n.innerRef||v.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(r){o[r]=o[r].bind(v2(o))}),o}return DE(t,[{key:"onEntering",value:function(n,o){var r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,o)}},{key:"onEntered",value:function(n,o){var r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,o)}},{key:"onExit",value:function(){var n=this.getNode();this.setState({dimension:this.getDimension(n)}),this.props.onExit(n)}},{key:"onExiting",value:function(){var n=this.getNode();this.getDimension(n),this.setState({dimension:0}),this.props.onExiting(n)}},{key:"onExited",value:function(){var n=this.getNode();this.setState({dimension:null}),this.props.onExited(n)}},{key:"getNode",value:function(){return this.nodeRef.current}},{key:"getDimension",value:function(n){return this.props.horizontal?n.scrollWidth:n.scrollHeight}},{key:"render",value:function(){var n=this,o=this.props,r=o.tag,i=o.horizontal,a=o.isOpen,s=o.className,c=o.navbar,l=o.cssModule,u=o.children;o.innerRef;var p,f,h,m=ME(o,_E),g=this.state.dimension,y=function(C,w){for(var I,b=Array.isArray(w)?w:[w],k=b.length,S={};k>0;)S[I=b[k-=1]]=C[I];return S}(m,V0),x=(p=m,f=V0,h={},Object.keys(p).forEach(function(C){f.indexOf(C)===-1&&(h[C]=p[C])}),h);return v.createElement(zn,fl({},y,{in:a,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(C){var w=function(k){return WE[k]||"collapse"}(C),I=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;return S?k.split(" ").map(function(E){return S[E]||E}).join(" "):k}(te(s,i&&"collapse-horizontal",w,c&&"navbar-collapse"),l),b=g===null?null:Mi({},i?"width":"height",g);return v.createElement(r,fl({},x,{style:ta(ta({},x.style),b),className:I,ref:n.nodeRef}),u)})}}]),t}();Bp.propTypes=HE,Bp.defaultProps=GE;const VE=({type:e,isOpen:t,title:n,iconData:o})=>o&&"src"in o?d.jsx(_l,{size:"16",src:o.src,alt:`${n} icon`,"data-testid":`${e}-image-icon`}):d.jsx(wt,{size:"16",variant:(o==null?void 0:o.variant)??(e==="folder"?t?"folder-open":"folder":"grid"),"data-testid":`${e}-icon`}),FE=e=>{const{className:t,isOpen:n,getIcon:o,showCollapseIcon:r,type:i,title:a,HeaderButton:s,...c}=e,l=d.jsxs(d.Fragment,{children:[r&&d.jsx(Ue,{className:te("collapse-icon",!n&&"collapsed"),iconSize:"10",size:"16",icon:"expand","data-testid":"base-section-header-collapse-icon"}),d.jsx(VE,{iconData:o==null?void 0:o(n),type:i,isOpen:n,title:a})]}),u=s?d.jsx(s,{}):null;return d.jsx(Lt.ItemHeader,{className:te("io-base-section-header",t),prepend:l,append:u,tooltip:a,...c,children:a})},zE=e=>{const{item:t,onClick:n,onKeyDown:o,isActive:r,isFocused:i,liRef:a,...s}=e,{description:c,icon:l="application",iconSrc:u,openInstances:p=0,title:f,tooltip:h,className:m,contextMenuActions:g=[],contextMenuSubtitle:y,isContextMenuButtonHidden:x=!1,isSelected:C=!1,statusPill:w}=t,I=g.length>0&&!x,b=d.jsxs(d.Fragment,{children:[d.jsx(wt,{className:te("check-icon",{"is-selected":C}),size:"12",variant:"check","data-testid":"base-section-item-check-icon"}),u?d.jsx(_l,{size:"16",src:u,alt:`${f} icon`,"data-testid":"base-section-item-icon"}):d.jsx(wt,{size:"16",variant:l,"data-testid":"base-section-item-icon"})]}),k=d.jsxs(d.Fragment,{children:[p!==0&&d.jsx("span",{className:"open-instances io-text-smaller","data-testid":"base-section-item-open-instances",children:p===1?"Opened":`${p} opened`}),w&&d.jsx(Ss,{variant:w.variant,"data-testid":"status-pill",children:w.text}),I&&d.jsx(Ff,{buttonSize:"24",iconSize:"12",icon:"ellipsis-vertical",title:f,subtitle:y,actions:g,onActionItemClick:n,isTabStop:i,placement:"bottom-end",strategy:"fixed",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"base-section-item-context-menu-button"})]});return d.jsx(Lt.Item,{ref:a,tabIndex:i?0:-1,className:te("io-base-section-item",{"is-selected":C},m),onKeyDown:S=>{if(Wn(S))return n(S),S.preventDefault(),void S.stopPropagation();o(S)},onClick:n,prepend:b,append:k,description:c,tooltip:h??f,descriptionTooltip:c,"data-cursor-menu-active":r||void 0,"data-testid":`base-section-item-${t.id}`,...s,children:f})},$E=new Lf,kh=e=>{const{config:t,level:n=1,path:o=t.id,onItemClick:r,activeItemId:i}=e,{isCollapsible:a=!0,getIcon:s,HeaderButton:c}=t,[l,u]=v.useState(0),p=Wf(),{collapsedSections:f,toggleSection:h}=(()=>{const{value:I,update:b}=St({prefKey:rb});return{collapsedSections:I,toggleSection:v.useCallback(k=>$E.enqueue(()=>b((S=[])=>S.includes(k)?S.filter(E=>E!==k):[...S,k])),[b])}})(),m=v.useRef({}),g=[...t.items.filter(I=>yr(I)),...t.items.filter(I=>!yr(I))],y=v.useRef(),x=v.useRef(g),C=!a||!(f!=null&&f.includes(o)),w=I=>{var b,k;(k=(b=m.current[I])==null?void 0:b.querySelector("[tabIndex]"))==null||k.focus(),u(I)};return x.current=g,v.useEffect(()=>{const I=y.current;if(y.current=i,I&&!i){const b=x.current.findIndex(k=>!yr(k)&&rp(k)===I);b!==-1&&w(b)}},[i]),d.jsxs(Lt.ItemWithSubItems,{className:n===1?"main-section":void 0,"data-testid":`base-section-${t.id}`,children:[d.jsx(FE,{className:n===1?"io-list-item-title main-section-header":void 0,isOpen:C,onClick:async()=>{a&&await h(o)},showCollapseIcon:a,type:n===1?"section":"folder",getIcon:s,style:{paddingLeft:8+24*(n-1)+"px"},"data-testid":`base-section-header-${t.id}`,title:t.title,HeaderButton:c}),d.jsx(Bp,{isOpen:C,tag:Lt,children:g.map((I,b)=>yr(I)?d.jsx(kh,{config:I,level:n+1,onItemClick:r,activeItemId:i,path:`${o}/${I.id}`},I.id):d.jsx(zE,{style:{paddingLeft:4+24*n+"px"},liRef:k=>m.current[b]=k,item:I,isActive:rp(I)===i,onClick:(k,S)=>r==null?void 0:r(k,{item:I,modifier:p,selectedContextMenuActionName:S==null?void 0:S.name}),onKeyDown:k=>{hf({event:k,moveFocus:w,currentIndex:l,min:0,max:g.length-1})},isFocused:l===b},I.id))})]})},y2=e=>`${e.type}-${e.id}`,b2=e=>e.reduce((t,n)=>yr(n)?{...t,...b2(n.items)}:{...t,[y2(n)]:n},{}),w2=v.createContext(void 0),ZE=({children:e})=>{const[t,n]=v.useState(null),o=v.useMemo(()=>[t,n],[t]);return d.jsx(w2.Provider,{value:o,children:e})},Os=({config:e,onItemClick:t})=>{const[n,o]=(()=>{const i=v.useContext(w2);if(i===void 0)throw new Error("useSection must be used within a SectionProvider");return i})(),r=ws();return v.useEffect(()=>{if(!t||!n)return;const{itemName:i,modifier:a,selectedContextMenuActionName:s}=n,c=(l=e.items,u=i,b2(l)[u]);var l,u;c&&(t({item:c,modifier:a,selectedContextMenuActionName:s}),o(null),a===tb||s||r())},[n,e.items,r,t,o]),d.jsx(kh,{config:e,onItemClick:(i,a)=>{const{item:s,modifier:c,selectedContextMenuActionName:l}=a;o({itemName:y2(s),modifier:c,selectedContextMenuActionName:l})}})},x2="favorites-section",C2="workspaces-section",I2="applications-section",XE="layouts-section";function k2(e){const t=Vf(),n=Pb(),o=(r=>{const{isSectionCollapsible:i,isFolderCollapsible:a,folderIconGetters:s,sectionIconSrc:c,sortOrder:l=ts.ASCENDING}=r,{favorites:u}=Eo(),p=Ef(),f=Ky();return v.useMemo(()=>{const h=Tf({items:p,sortOrder:l,ascendingCompare:c5,descendingCompare:l5}),m=u.filter(y=>y.type===Tr),g=h.reduce((y,x)=>{var b;const C=m.some(k=>k.id===x.id),w={id:x.id,title:x.title,description:x.caption,type:Tr,icon:"application",iconSrc:x.icon,openInstances:(b=f[x.name])==null?void 0:b.length,contextMenuActions:Rf(C)},I=x.userProperties.folder;return I?ip({items:y,newItem:w,settings:{isFolderCollapsible:a,isSectionCollapsible:i,sortOrder:l,folderIconGetters:s},path:I}):[...y,w]},[]);return{id:I2,title:"Apps",getIcon:()=>c?{src:c}:{variant:"apps"},items:g,isCollapsible:i}},[p,f,u,i,a,s,c,l])})(e);return d.jsx(Os,{config:o,onItemClick:r=>{const{item:i,modifier:a,selectedContextMenuActionName:s}=r;return s?n(i,s):t({id:i.id,title:i.title,modifier:a})}})}const UE=e=>{const{isSectionCollapsible:t,sectionIconSrc:n,sortOrder:o=ts.DISABLED}=e,{favorites:r}=Eo(),i=Nn(),{defaultLayout:a}=to(),{layouts:s}=ra(),{isLayoutHidden:c}=ks(),l=Cs(),{isWorkspaceHidden:u}=zl(),{value:p=!1}=St({prefKey:ia}),f=v.useMemo(()=>r.map(h=>h.type===no?((m,g,y,x,C,w)=>{var E;const I=g.find(N=>mt(N)===m.id);if(!I)return m;const b=y(I);if(b&&!x)return;const k=!!w&&mt(I)===mt(w),S={...I,isFavorite:!0,isHidden:b,isDefault:k};return{...m,className:b?"is-hidden-item":void 0,iconSrc:((E=I.metadata)==null?void 0:E.icon)||void 0,statusPill:k?{variant:"default",text:"Default"}:void 0,contextMenuSubtitle:Gl(S,C),contextMenuActions:Is(S,C)}})(h,s,c,p,i,a):h.type===Xo?((m,g,y,x,C)=>{var k;const w=g.find(S=>fi(S)===m.id);if(!w)return m;const I=y({id:fi(w),title:w.title});if(I&&!x)return;const b=w.accessInfo;return{...m,iconSrc:((k=w.metadata)==null?void 0:k.icon)||void 0,className:I?"is-hidden-item":void 0,contextMenuSubtitle:Df(b,C),contextMenuActions:Fl(b,!0,C,I)}})(h,l,u,p,i):h).filter(h=>h!==void 0),[r,s,c,i,a,l,u,p]);return v.useMemo(()=>{const h=Tf({items:f,sortOrder:o,ascendingCompare:Eb,descendingCompare:jb});return{id:x2,title:"Favorites",getIcon:()=>n?{src:n}:{variant:"bookmark"},items:h,isCollapsible:t}},[f,o,t,n])},S2=e=>{const{isFavoritesSectionHidden:t}=(()=>{const{value:o,update:r,isLoading:i,error:a}=St({prefKey:Pf}),s=v.useCallback(()=>r(c=>!c),[r]);return{error:a,isFavoritesSectionHidden:o,isLoading:i,toggle:s}})(),n=UE(e);return!t&&n.items.length>0?d.jsx(Os,{config:n}):null},A2=v.createContext(void 0),E2=()=>{const e=v.useContext(A2);if(e===void 0)throw new Error("useLaunchpadConfig must be used within an LaunchpadConfigProvider");return e},JE=({children:e,settings:t,components:n})=>{const o=v.useMemo(()=>({settings:t,components:n}),[t,n]);return d.jsx(A2.Provider,{value:o,children:e})},j2=v.createContext(void 0),P2=()=>{const e=v.useContext(j2);if(e===void 0)throw new Error("useLaunchpadSearch must be used within a LaunchpadSearchProvider");return e},YE=({children:e})=>{const[t,n]=v.useState(""),o=v.useMemo(()=>({searchTerm:t,setSearchTerm:n}),[t]);return d.jsx(j2.Provider,{value:o,children:e})},cc="io-connect-layout-sharing";function Ts(){const e=v.useContext(Se.IOConnectContext);return{shareLayout:v.useCallback(async({variant:n,id:o,workspaceId:r})=>{var i;try{const a=await e.apps.registry.get({name:cc});if(!(a!=null&&a.instances))return void console.error(`useShareLayout: App "${cc}" not found or has no instances.`);if(a.instances.length===0)return void await e.apps.instances.start({name:a.name,reuseInstance:!0,context:{variant:n,id:o,workspaceId:r}});const s=await e.apps.instances.get({id:a.instances[0].id}),c=(i=s==null?void 0:s.interopInstance)==null?void 0:i.windowId;if(!c)return void console.error(`useShareLayout: No windowId found for "${cc}" instance.`);const l=e.windows.findById(c);l==null||l.setContext({variant:n,id:o,workspaceId:r}),l==null||l.focus()}catch(a){console.error(`useShareLayout: Failed to launch "${cc}":`,a)}},[e])}}const N2=e=>{const{icon:t,tooltip:n,ariaLabel:o,onClick:r}=e;return d.jsx(Ue,{size:"32",iconSize:"16",variant:"circle",icon:t,tooltip:n,"aria-label":o,"data-testid":"base-section-header-button",onClick:i=>{i.stopPropagation(),r()}})},KE=()=>{const e=(()=>{const t=v.useContext(Se.IOConnectContext);return v.useCallback(async()=>{if(t.workspaces)try{await t.workspaces.createWorkspace({children:[],frame:{newFrame:!0}})}catch(o){await De({io:t,variant:ot,text:"Failed to create a new Workspace.",error:o})}},[t])})();return d.jsx(N2,{icon:"add-workspace",tooltip:"Create an empty Workspace in a new window",ariaLabel:"Create workspace",onClick:e})},qE=(e,t)=>{const{isSectionCollapsible:n,sectionIconSrc:o,sortOrder:r=ts.ASCENDING}=e,{favorites:i}=Eo(),a=Nn(),{hiddenWorkspaces:s}=zl(),{value:c}=St({prefKey:ia}),l=Cs(),u=v.useMemo(()=>new Set(s.map(m=>m.id)),[s]),p=v.useMemo(()=>((m,g,y,x=new Set,C=!1)=>Vb(m,g,{getAccessInfo:w=>w.accessInfo,getFolder:w=>{var I;return(I=w.metadata)==null?void 0:I.folder},toItemShell:j5,filterPublicItems:w=>w.filter(I=>C||!x.has(fi(I))),sortLeafItems:w=>Tf({items:w,sortOrder:y,ascendingCompare:Eb,descendingCompare:jb})}))(l,a,r,u,c),[l,a,r,u,c]),f=v.useMemo(()=>new Set(i.filter(m=>m.type===Xo).map(m=>m.id)),[i]),h=v.useMemo(()=>i1(p,{isFavorite:m=>f.has(m),getOpenInstances:m=>{var g;return(g=t.byTitle[m])==null?void 0:g.size},isWorkspaceSharingEnabled:a,hiddenWorkspaceIds:u}),[p,f,t,a,u]);return v.useMemo(()=>({id:C2,title:"Workspaces",getIcon:()=>o?{src:o}:{variant:"grid"},items:h,isCollapsible:n,HeaderButton:KE}),[h,n,o])},O2=e=>{const t=Dl(),n=a1(),{shareLayout:o}=Ts(),r=c1(),i=qE(e,r);return d.jsx(Os,{config:i,onItemClick:a=>{const{item:s,modifier:c,selectedContextMenuActionName:l}=a,u=l?r1(l):void 0;if(u){const p=s1(r,s.id);return o({variant:u,id:s.id,workspaceId:p})}return l?n(s,l):t({id:s.title,workspaceId:s.id,accessInfo:s.accessInfo,modifier:c})}})},QE=[{placementId:x2,Component:S2},{placementId:C2,Component:O2},{placementId:I2,Component:k2}],ej="getScreenDetails"in window,tj={header:{showHeader:!0,showSearch:!0},mode:"default"},nj=new Set([Tr,Xo,no]),oj=[0,6],rj=["top-start","right-start","left-start"],$0="viewport",T2=e=>nj.has(e),ij={[no]:"display",[Xo]:"grid",[Tr]:"apps"},aj=e=>{const{defaultLayout:t,activeLayout:n}=to(),{favorites:o}=Eo(),r=Nn(),{layouts:i}=ra(),{isLayoutHidden:a}=ks(),s=Cs(),{isWorkspaceHidden:c}=zl(),{value:l=!1}=St({prefKey:ia});return e.reduce((u,p)=>{const{type:f}=p,h=p.id||p.displayName;if(!h)return u;const m=p.displayName||h,g=S=>o.some(E=>E.type===f.name&&E.id===S),y=!!(p.action||T2(f.name)),x=({id:S=h,hasResolvedId:E=!1,accessInfo:N,className:A,iconSrc:P=p.iconURL,contextMenuActions:j=[],contextMenuSubtitle:G,statusPill:M}={},T=!0)=>({id:S,hasResolvedId:E,accessInfo:N,className:A,title:m,description:p.description,type:f.name,iconSrc:P,mainAction:T?p.action:void 0,contextMenuActions:j,contextMenuSubtitle:G,statusPill:M,isContextMenuButtonHidden:!y&&j.length>0}),C=(S,E)=>E===1||S===p.id;let w;if(f.name===Tr)w=[x({contextMenuActions:Rf(g(h))})];else if(f.name===Xo){const S=function(E,N,A,P){const j=E.filter(T=>T.title===A);if(!P)return[j.length===1?j[0]:void 0];const G=E.find(T=>T.id===N),M=G?[G,...j.filter(T=>T!==G)]:j;return M.length>0?M:[void 0]}(s,p.id,m,r);w=S.flatMap(E=>{const N=(({workspace:A,title:P,isFavorite:j,isLayoutSharingEnabled:G,isWorkspaceHidden:M,showHidden:T,fallbackIconSrc:H})=>{var O;const V=A?fi(A):P,z=!!A&&M({id:V,title:P});if(!z||T)return{id:V,hasResolvedId:!!(A!=null&&A.id),className:z?"is-hidden-item":void 0,accessInfo:A==null?void 0:A.accessInfo,contextMenuSubtitle:Df(A==null?void 0:A.accessInfo,G),contextMenuActions:G&&!(A!=null&&A.id)?[]:Fl(A==null?void 0:A.accessInfo,j(V),G,z),iconSrc:((O=A==null?void 0:A.metadata)==null?void 0:O.icon)||H,statusPill:void 0}})({workspace:E,title:m,isFavorite:g,isLayoutSharingEnabled:r,isWorkspaceHidden:c,showHidden:l,fallbackIconSrc:p.iconURL});return N?[x(N,C(E==null?void 0:E.id,S.length))]:[]})}else if(f.name===no){const S=function(E,N,A,P){const j=E.filter(T=>T.name===A);if(!P)return[j.length===1?j[0]:void 0];const G=E.find(T=>T.id===N),M=G?[G,...j.filter(T=>T!==G)]:j;return M.length>0?M:[void 0]}(i,p.id,m,r);w=S.flatMap(E=>{const N=(({matchedLayout:A,title:P,isFavorite:j,isLayoutSharingEnabled:G,isLayoutHidden:M,showHidden:T,defaultLayout:H,activeLayout:V,fallbackIconSrc:z})=>{var $;const O=M({id:A==null?void 0:A.id,name:P});if(O&&!T)return;const B=A?mt(A):P,F={...A,name:P,isFavorite:j(B),isHidden:O,isDefault:!!H&&B===mt(H),isActive:!!V&&B===mt(V)};return{id:B,hasResolvedId:!!(A!=null&&A.id),className:O?"is-hidden-item":void 0,accessInfo:A==null?void 0:A.accessInfo,contextMenuSubtitle:Gl(F,G),contextMenuActions:G&&!(A!=null&&A.id)?[]:Is(F,G),statusPill:F.isDefault?{variant:"default",text:"Default"}:void 0,iconSrc:(($=F.metadata)==null?void 0:$.icon)||z}})({matchedLayout:E,title:m,isFavorite:g,isLayoutSharingEnabled:r,isLayoutHidden:a,showHidden:l,defaultLayout:t,activeLayout:n,fallbackIconSrc:p.iconURL});return N?[x(N,C(E==null?void 0:E.id,S.length))]:[]})}else w=[x({contextMenuActions:(p.secondaryActions??[]).map(({name:S,method:E,params:N,target:A})=>({name:S,interopParams:{method:E,params:N,target:A}}))})];const I=u.findIndex(({title:S})=>f.displayName?S===f.displayName:S===f.name),b=u[I],k=w.filter((S,E)=>w.findIndex(({id:N})=>N===S.id)===E&&!(b!=null&&b.items.some(({id:N})=>N===S.id)));return k.length===0?u:b?[...u.slice(0,I),{...b,items:[...b.items,...k]},...u.slice(I+1)]:[...u,{id:f.name,title:f.displayName||f.name,getIcon:()=>({variant:ij[f.name]??"grid"}),items:k}]},[])},sj=()=>{const e=Vl(),t=(()=>{const{defaultLayout:r,activeLayout:i}=to(),{layouts:a}=ra(),s=Nn();return(c,l)=>{const u=s?a.find(f=>f.id===c):a.find(f=>f.name===l),p={...u,id:u==null?void 0:u.id,name:l};return{...p,isDefault:!!r&&mt(p)===mt(r),isActive:!!i&&mt(p)===mt(i)}}})(),n=aa(),{shareLayout:o}=Ts();return async(r,i)=>{const{id:a,title:s}=r,c=Mf(i);if(c)return void await o({variant:c,id:a});const l=t(a,s);await n(()=>e({layout:l,actionName:i}))}},cj=()=>{const e=Pb(),t=(()=>{const o=a1(),{shareLayout:r}=Ts(),i=c1();return async(a,s)=>{const c=r1(s);if(c){const l=s1(i,a.hasResolvedId?a.id:void 0);return void await r({variant:c,id:a.id,workspaceId:l})}o(a,s)}})(),n=sj();return o=>o===Tr?e:o===Xo?t:o===no?n:void 0},lj=()=>{const e=v.useContext(Se.IOConnectContext),t=(()=>{const f=v.useContext(Se.IOConnectContext);return async h=>f.interop.methods().every(m=>m.name!==(h==null?void 0:h.method))?console.error("Interop method not found."):await f.interop.invoke(h.method,h.params,h.target).catch(m=>console.error({error:m}))})(),n=Dl(),o=Vf(),r=jf(),i=Nn(),a=aa(),s=ws(),c=cj(),l=v.useCallback((f,h)=>{const m=c(f.type);m==null||m(f,h)},[c]),u=v.useCallback((f,h)=>{const{type:m,id:g,title:y,accessInfo:x,hasResolvedId:C,mainAction:w}=f;if(w)t(w);else switch(m){case Tr:return void o({id:g,title:y,modifier:h});case Xo:return i&&!C?void De({io:e,variant:ot,text:`Cannot determine which Workspace "${y}" to open - open it from the Workspaces list instead.`}):void n({id:y,workspaceId:g,accessInfo:x,modifier:h});case no:{if(i&&!C)return void De({io:e,variant:ot,text:`Cannot determine which Layout "${y}" to open - open it from the Layouts list instead.`});const I=C?g:void 0;return void a(()=>r({id:I,name:y}))}default:return}},[a,t,e,i,r,n,o]);return{executeItemAction:v.useCallback(async f=>{const{item:h,modifier:m,selectedContextMenuActionName:g}=f,y=((x,C)=>{var w;if(C)return(w=x.contextMenuActions)==null?void 0:w.find(I=>I.name===C)})(h,g);try{y!=null&&y.interopParams?await t(y.interopParams):g?l(h,g):u(h,m)}catch(x){return void console.error("Failed to execute search result action:",x)}((x,C)=>x===tb||!!C)(m,g)||s()},[s,u,l,t])}},uj=e=>{if("clientX"in e&&"clientY"in e)return{x:e.clientX,y:e.clientY};const{left:t,top:n,height:o}=e.currentTarget.getBoundingClientRect();return{x:t,y:n+o}},dj=()=>{const[e,t]=v.useState(null),[n,o]=v.useState(null),[r,i]=v.useState(null),a=v.useRef(null),s=v.useCallback(()=>{t(null),i(null)},[]),c=v.useCallback(g=>{a.current=g,o(g)},[o]),l=v.useMemo(()=>e?(g=>{const{x:y,y:x}=g;return{getBoundingClientRect:()=>({width:0,height:0,top:x,left:y,right:y,bottom:x,x:y,y:x,toJSON:()=>({})})}})(e.position):null,[e]),u=v.useMemo(()=>[{name:"offset",options:{offset:oj}},{name:"preventOverflow",options:{boundary:r??void 0,rootBoundary:$0,padding:8}},{name:"flip",options:{boundary:r??void 0,rootBoundary:$0,fallbackPlacements:rj}}],[r]),p=v.useMemo(()=>({strategy:"fixed",placement:"bottom-start",modifiers:u}),[u]),{styles:f,attributes:h}=Yy(l,n,p);Gf({eventType:"mouseup",handler:s,ref:a,skip:!e}),Hf({handler:s,skip:!e}),v.useEffect(()=>{if(!e)return;const g=y=>{y.key==="Escape"&&s()};return globalThis.addEventListener("blur",s),globalThis.addEventListener("keydown",g),globalThis.addEventListener("resize",s),globalThis.addEventListener("wheel",s),globalThis.addEventListener("touchmove",s),()=>{globalThis.removeEventListener("blur",s),globalThis.removeEventListener("keydown",g),globalThis.removeEventListener("resize",s),globalThis.removeEventListener("wheel",s),globalThis.removeEventListener("touchmove",s)}},[s,e]);const m=v.useCallback((g,y)=>{if(!(g.currentTarget instanceof HTMLElement))return void s();const x=(C=>{const w=C.closest(".launchpad-body")||C.closest(".launchpad");return w instanceof HTMLElement?w:null})(g.currentTarget);i(x),t({item:y,position:uj(g)})},[s]);return{cursorContextMenu:e,activeItemId:e?rp(e.item):void 0,closeCursorContextMenu:s,openCursorContextMenu:m,cursorMenuStyles:f,cursorMenuAttributes:h,setCursorMenuRef:c}};function pj(e){const{resultsToRender:t,isLoading:n}=O5(e.searchTerm),o=aj(t),{executeItemAction:r}=lj(),i=Wf(),{cursorContextMenu:a,activeItemId:s,closeCursorContextMenu:c,openCursorContextMenu:l,cursorMenuStyles:u,cursorMenuAttributes:p,setCursorMenuRef:f}=dj(),h=v.useCallback(async(g,y)=>{var b;const{item:x,selectedContextMenuActionName:C}=y,w=!!((b=x.contextMenuActions)!=null&&b.length),I=!!(x.mainAction||T2(x.type));(I||w)&&(C||I||!w?(c(),await r(y)):l(g,x))},[c,r,l]),m=v.useCallback(async(g,y)=>{a&&(g.stopPropagation(),c(),await r({item:a.item,modifier:i,selectedContextMenuActionName:y.name}))},[a,c,r,i]);return n?d.jsx("p",{className:"search-loading",children:"Loading..."}):t.length===0?d.jsx("p",{className:"search-no-results",children:"No results found. Try searching by app name, workspace title, or keywords."}):d.jsxs(d.Fragment,{children:[d.jsx(Lt,{children:o.map((g,y)=>d.jsx(kh,{config:g,onItemClick:h,activeItemId:s},g.id||y))}),a&&d.jsx(Af,{ref:f,className:"search-results-cursor-context-menu",actions:a.item.contextMenuActions??[],onActionItemClick:m,onClose:c,style:u.popper,...p.popper})]})}const R2=()=>{const e=v.useContext(Se.IOConnectContext),{setActiveLayout:t}=to(),n=Nn(),o=aa(),r=async()=>{var p;if(!("modals"in e)||!e.modals)return void console.error("Cannot create Layout because io dialogs are not enabled");const i="create",a="layout-name",{isEnterPressed:s,responseButtonClicked:c,inputs:l}=await e.modals.dialogs.request({templateName:Do.SINGLE_TEXT_INPUT_DIALOG,variables:{heading:"Create Layout",input:{id:a,initialValue:"Create Layout",validation:{disabledButtonIds:[i],errorMessage:"Please provide a Layout name",regexPattern:Va}},actionButtons:[{variant:"primary",text:"Create",id:i},{variant:"outline",text:"Cancel",id:"cancel"}]}}),u=(p=l==null?void 0:l.find(f=>f.id===a))==null?void 0:p.value;if(s||(c==null?void 0:c.id)===i)try{if(n){const f=zt(e);if(await Wl({io:e,type:"Global",name:u,targetAccessLevel:"private"})!=="available")return void await De({io:e,variant:ot,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});const h=await f.save({name:u,type:"Global"});t({id:h.id,name:u})}else{if((await e.layouts.getAll("Global")).some(f=>f.name===u))return void await De({io:e,variant:ot,text:`Failed to create Layout "${u}". A Layout with this name already exists.`});await e.layouts.save({name:u,type:"Global"}),t({name:u})}await De({io:e,variant:Rn,text:`Layout "${u}" was created successfully.`})}catch(f){await De({io:e,variant:ot,text:`Failed to create Layout "${u}".`,error:f})}};return()=>o(r)},fj=()=>{const e=R2();return d.jsx(N2,{icon:"add",tooltip:"Create a new Layout",ariaLabel:"Create layout",onClick:e})},hj=()=>{const{activeLayout:e,defaultLayout:t}=to(),n=Nn(),{layouts:o}=ra(),{hiddenLayouts:r}=ks(),{favorites:i}=Eo(),{value:a}=St({prefKey:ia}),s=v.useMemo(()=>new Set(r.map(mt)),[r]),c=v.useMemo(()=>new Set(i.filter(p=>p.type===no).map(p=>p.id)),[i]),l=v.useMemo(()=>((p,f,h=new Set,m=!1)=>Vb(p,f,{getAccessInfo:g=>g.accessInfo,getFolder:g=>{var y;return(y=g.metadata)==null?void 0:y.folder},toItemShell:k5,filterPublicItems:g=>g.filter(y=>m||!h.has(mt(y)))}))(o,n,s,a),[o,n,s,a]),u=v.useMemo(()=>Fb(l,{activeLayout:e,defaultLayout:t,isLayoutSharingEnabled:n,hiddenLayoutIds:s,favoriteLayoutIds:c}),[l,e,t,n,s,c]);return v.useMemo(()=>({id:XE,title:"Layouts",getIcon:()=>({variant:"display"}),items:u,isCollapsible:!0,HeaderButton:fj}),[u])},mj=()=>{const e=jf(),t=aa(),n=Vl(),{shareLayout:o}=Ts(),r=Nn(),i=hj();return d.jsx(Os,{config:i,onItemClick:a=>{const{item:s,selectedContextMenuActionName:c}=a,l=c?Mf(c):void 0;if(l)return o({variant:l,id:s.id});const u={id:r?s.id:void 0,name:s.title,isActive:s.isSelected,isDefault:!!s.statusPill,accessInfo:s.accessInfo};return t(()=>c?n({layout:u,actionName:c}):e(u))}})},Z0=()=>{const e=R2();return d.jsx(Ze,{variant:"primary",text:"Create Layout",onClick:e,"data-testid":"create-layout-button"})},gj=({isDefault:e,isLayoutSharingEnabled:t,accessInfo:n})=>{const o=_f(n,t,"Layout")??"Layout";return d.jsxs("div",{className:"layouts-footer-active-layout-details",children:[d.jsx("span",{className:"layouts-footer-info","data-testid":"layout-type",children:o}),e&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"layouts-footer-dot-separator"}),d.jsx(Ss,{"data-testid":"default-pill",children:"Default"})]})]})},vj=({layout:e})=>{const t=Vl(),n=aa(),{shareLayout:o}=Ts(),r=Nn();return d.jsx(Ff,{buttonSize:"24",iconSize:"12",title:e.name,subtitle:Gl(e,r),icon:"ellipsis-vertical",actions:Is(e,r),onActionItemClick:async(i,a)=>{i.stopPropagation();const s=Mf(a.name);if(s)return void await o({variant:s,id:mt(e)});await n(()=>t({layout:e,actionName:a.name}))},placement:"top-end",strategy:"fixed",offset:[0,0],shouldCloseOnOutsideScroll:!0,shouldCloseOnWindowBlur:!0,shouldCloseOnWindowResize:!0,"data-testid":"active-layout-context-menu-button",contextMenuDataTestId:"active-layout-context-menu"})},yj=({layoutId:e,layoutName:t,accessInfo:n})=>{const o=v.useContext(Se.IOConnectContext),r=aa(),i=Vl(),a=!Nn()||Db(n);return d.jsx(Ze,{variant:"primary",text:a?"Save":"Save as",onClick:a?s=>{s.stopPropagation(),r(async()=>{try{await Xb(o,{id:e,name:t}),await De({io:o,variant:Rn,text:`Layout "${t}" saved successfully`})}catch(c){await De({io:o,variant:ot,text:`Failed to save layout "${t}"`,error:c})}})}:s=>{s.stopPropagation();const c={id:e,name:t,isActive:!0,accessInfo:n};r(()=>i({layout:c,actionName:Rb}))},className:"layouts-footer-save-button","data-testid":"save-button"})},bj=({layoutId:e,layoutName:t,isDefault:n,isHidden:o,isFavorite:r,accessInfo:i})=>d.jsxs("div",{className:"layouts-footer-active-layout-buttons",children:[d.jsx(yj,{layoutId:e,layoutName:t,accessInfo:i}),d.jsx(vj,{layout:{id:e,name:t,isActive:!0,isDefault:n,isHidden:o,isFavorite:r,accessInfo:i}})]}),od=({heading:e,info:t,children:n})=>d.jsxs("div",{className:"layouts-footer-status",children:[d.jsx("div",{className:"layouts-footer-heading","data-testid":"layouts-footer-heading",children:e}),t&&d.jsx("div",{className:"layouts-footer-info","data-testid":"layouts-footer-info",children:t}),n]}),wj=()=>{const{activeLayout:e,defaultLayout:t}=to(),n=Nn(),{layouts:o}=ra(),{isLayoutHidden:r}=ks(),{favorites:i}=Eo();if(o.length===0)return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:"Start using layouts",info:"You don’t have any saved layouts"}),d.jsx(Z0,{})]});if(!e)return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:"No active layout",info:"Load a layout from your list of layouts or create new"}),d.jsx(Z0,{})]});const a=!!t&&mt(e)===mt(t),s=o.find(c=>mt(c)===mt(e));return d.jsxs(d.Fragment,{children:[d.jsx(od,{heading:e.name,children:d.jsx(gj,{isDefault:a,isLayoutSharingEnabled:n,accessInfo:s==null?void 0:s.accessInfo})}),d.jsx(bj,{layoutId:e.id,layoutName:e.name,isDefault:a,isHidden:r(e),isFavorite:i.some(c=>c.type===no&&c.id===mt(e)),accessInfo:s==null?void 0:s.accessInfo})]})},xj=()=>d.jsx("footer",{className:"layouts-footer","data-testid":"layouts-footer",children:d.jsx(wj,{})}),X0=({className:e})=>{const{isLaunchpadCollapsed:t}=Bf(),{isGlobalLayoutsAvailable:n}=to(),{components:o}=E2(),{searchTerm:r}=P2(),{sections:i=QE}=o;return d.jsxs("div",{className:te("launchpad-body",t?"collapsed":void 0,e),children:[d.jsx(Uo,{wrapperClassName:"launchpad-main-scrollable-container",element:"main",elementProps:{className:"launchpad-main"},children:nb(r)?d.jsx(pj,{searchTerm:r}):d.jsx(ZE,{children:d.jsxs(Lt,{children:[i.map(({Component:a,placementId:s})=>d.jsx(a,{},s)),n&&d.jsx(mj,{})]})})}),n&&d.jsx(xj,{})]})};var Cj=function(e){return function(t){return!!t&&typeof t=="object"}(e)&&!function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||function(o){return o.$$typeof===Ij}(t)}(e)},Ij=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function cs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?na((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function kj(e,t,n){return e.concat(t).map(function(o){return cs(o,n)})}function U0(e){return Object.keys(e).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}(e))}function J0(e,t){try{return t in e}catch{return!1}}function Sj(e,t,n){var o={};return n.isMergeableObject(e)&&U0(e).forEach(function(r){o[r]=cs(e[r],n)}),U0(t).forEach(function(r){(function(i,a){return J0(i,a)&&!(Object.hasOwnProperty.call(i,a)&&Object.propertyIsEnumerable.call(i,a))})(e,r)||(J0(e,r)&&n.isMergeableObject(t[r])?o[r]=function(i,a){if(!a.customMerge)return na;var s=a.customMerge(i);return typeof s=="function"?s:na}(r,n)(e[r],t[r],n):o[r]=cs(t[r],n))}),o}function na(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||kj,n.isMergeableObject=n.isMergeableObject||Cj,n.cloneUnlessOtherwiseSpecified=cs;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Sj(e,t,n):cs(t,n)}na.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return na(n,o,t)},{})};var Aj=hs(na);const Y0=({settings:e={},components:t={},isOpen:n=!0,onClose:o,windowManagementPermissionState:r="granted",children:i,className:a,...s})=>{const c=ej&&r==="granted",l=v.useMemo(()=>Aj(tj,e),[e]);return d.jsx(F3,{close:o,isOpen:n,isGlobalLayoutsAvailable:c,children:d.jsx(JE,{settings:l,components:t,children:d.jsx(YE,{children:d.jsx("div",{className:te("launchpad",a),"data-testid":"launchpad",...s,children:i})})})})},L2=v.forwardRef((e,t)=>{const{onSearch:n,searchTerm:o,onClear:r,className:i}=e,a=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{var s;a&&"search"in a&&((s=a.search)==null||s.setDebounceMS(450))},[a]),d.jsx(qn,{id:"search-input",className:te("search-bar",i),ref:t,placeholder:"Find anything",value:o,onChange:n,autoComplete:"off",iconPrepend:"search",iconAppend:o.length?"close":void 0,iconAppendOnClick:r})});L2.displayName="SearchBar";const _2=({className:e})=>{const{isLaunchpadPinned:t,isLoading:n,toggle:o}=Hl();return d.jsx(Ue,{className:e,size:"32",variant:"circle",icon:t?"unpin":"pin",onClick:o,disabled:n})},K0=({className:e})=>{const t=Ml(),{isOpen:n}=to(),{settings:o,components:r}=E2(),{isLaunchpadPinned:i}=Hl(),{isLaunchpadCollapsed:a,setIsLaunchpadCollapsed:s}=Bf(),{searchTerm:c,setSearchTerm:l}=P2(),u=v.useRef(null),{showSearch:p,showHeader:f}=o.header??{},{BeforeSearch:h,AfterSearch:m}=r.header??{};return v.useEffect(()=>{var g;n&&((g=u.current)==null||g.focus())},[n]),v.useEffect(()=>{i&&s(!1)},[s,i]),f?d.jsxs("div",{className:te("launchpad-header",t||i?void 0:"draggable",e),"data-testid":"launchpad-header",children:[h&&d.jsx(h,{}),p&&d.jsx(L2,{ref:u,searchTerm:c,onSearch:g=>{const y=g.target.value;nb(y)&&a&&s(!1),l(y)},onClear:()=>{var g;l(""),(g=u.current)==null||g.focus()},className:t?void 0:"non-draggable"}),m&&d.jsx(m,{}),m===void 0&&(o==null?void 0:o.mode)!=="pinned"&&d.jsx(_2,{className:"ms-auto"})]}):null};var Dt=Object.freeze({__proto__:null,ApplicationsSection:k2,Body:X0,ContentsContainer:Y0,DIALOG_TEMPLATE_NAMES:Do,FavoritesSection:S2,Header:K0,Panel:e=>d.jsxs(Y0,{...e,children:[d.jsx(K0,{}),d.jsx(X0,{})]}),PinButton:_2,Section:Os,WorkspacesSection:O2,getWorkspaceIdentity:fi,useActiveLayout:Qy,useApplications:Ef,useApplicationsInstances:Ky,useFavorites:Eo,useFrameId:Ml,useIsLaunchpadCollapsed:Bf,useIsLaunchpadPinned:Hl,useOnIframeFocus:Hf,useOnOutsideClick:Gf,usePressedKeys:Wf,useRestoreWorkspace:Dl,useStartApplication:Vf,useStorage:qy,useWorkspaces:Cs,useWorkspacesAccessInfo:()=>{const[e,t]=v.useState(new Map),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=zt(n);if(!o)return;let r=!1;const i=[],a=()=>{o.getMany({includeAccessInfo:!0}).then(s=>{if(r)return;const c=s.filter(l=>l.type==="Workspace");t(new Map(c.map(l=>[l.name,{id:l.id,metadata:l.metadata,accessInfo:l.accessInfo}])))}).catch(s=>console.error("useWorkspacesAccessInfo: Failed to fetch V2 workspaces:",s))};return a(),Promise.all([o.onAdded(s=>{s.type!=="Workspace"||r||a()}),o.onRemoved(s=>{s.type!=="Workspace"||r||a()}),o.onRenamed(s=>{s.type!=="Workspace"||r||a()}),o.onChanged(s=>{s.type!=="Workspace"||r||a()})]).then(s=>{r?s.forEach(c=>c()):i.push(...s)}).catch(s=>console.error("useWorkspacesAccessInfo: Failed to subscribe to V2 workspace events:",s)),()=>{r=!0,i.forEach(s=>{try{s()}catch(c){console.error("useWorkspacesAccessInfo: Failed to unsubscribe from workspace events:",c)}})}},[n]),e}});v.createContext(null);const Ia={APPLICATION:"application",WORKSPACE:"workspace",LAYOUT:"layout"};v.createContext(null);function Ej({isOpen:e,onClose:t,container:n}){return e?Bo.createPortal(d.jsx(vh,{onClose:t}),n??document.querySelector("#root")??document.body):null}const M2=v.createContext({searchQuery:"",setSearch:()=>{},isPanelVisible:!1,sortNotificationsBy:"newest",setSortBy:()=>{},viewNotificationsBy:"all",setViewBy:()=>{},isBulkActionsVisible:!1,showBulkActions:()=>{},hideBulkActions:()=>{}}),nn=()=>v.useContext(M2);function D2({title:e,onOpenSettings:t,onClose:n,...o}){const{HeaderCaptionTitle:r,HeaderCaptionCount:i,HeaderCaptionButtonSettings:a,HeaderCaptionButtonClose:s,HeaderActions:c,HeaderBulkActions:l,HeaderSearch:u}=hi(),{isBulkActionsSupported:p,notificationsCount:f}=Ee(),{isBulkActionsVisible:h}=nn(),m=qe();return d.jsxs(pr,{...o,children:[d.jsxs("div",{className:"io-panel-header-caption",children:[d.jsx(r,{title:e}),d.jsx(i,{}),d.jsxs(pr.ButtonGroup,{children:[m&&d.jsx(a,{onClick:t}),d.jsx(s,{onClick:n})]})]}),d.jsx(u,{}),p?d.jsxs("div",{className:`io-panel-header-actions-wrapper ${h&&f>0?"io-panel-header-bulk-actions-opened":""} `,children:[d.jsx(c,{}),d.jsx(l,{})]}):d.jsx(c,{})]})}function B2({text:e="Notifications",counter:t,...n}){const{notificationsCount:o}=Ee();return d.jsx(bo,{text:e,size:"large",...n,children:(t??!0)&&d.jsxs("span",{children:["(",o,")"]})})}const H2="newest",jj="oldest",Pj="severity",rd=["None","Low","Medium","High","Critical"],q0={key:H2,descending:!0},G2=e=>[...e].sort((t,n)=>(n.timestamp||0)-(t.timestamp||0)),W2=e=>[...e].sort((t,n)=>(t.timestamp||0)-(n.timestamp||0)),V2=(e,t)=>{const n=rd[0];return[...e].sort((o,r)=>{const i=rd.indexOf(o.severity||n),a=rd.indexOf(r.severity||n);return(t?-1:1)*(i-a)})},Nj={[H2]:G2,[jj]:W2,[Pj]:V2},Oj={severity:"Priority",newest:"Newest",oldest:"Oldest"};function F2({...e}){const[t,n]=v.useState([]),{NotificationsList:o,Notification:r}=hi(),{notifications:i,setCount:a,notificationsCount:s}=Ee(),{sortNotificationsBy:c,viewNotificationsBy:l,searchQuery:u}=nn(),p=v.useRef(null),f=ru(u),h=v.useMemo(()=>((g,y)=>{if(!g)return[];switch(y){case"all":default:return g;case"unread":return g.filter(x=>x.state==="Active"||x.state==="Stale");case"read":return g.filter(x=>x.state==="Acknowledged"||x.state==="Seen");case"snoozed":return g.filter(x=>x.state==="Snoozed")}})(i,l).filter(g=>{var y,x;return g.title.toLowerCase().includes(f.toLowerCase())||((y=g.source)==null?void 0:y.toLowerCase().includes(f.toLowerCase()))||((x=g.body)==null?void 0:x.toLowerCase().includes(f.toLowerCase()))}),[f,i,l]);return v.useEffect(()=>{switch(c){case"newest":n(G2(h));break;case"oldest":n(W2(h));break;case"severity":n(V2(h,!0));break;default:n(h)}a(h.length)},[h,c,a]),v.useEffect(()=>{var m;p.current&&((m=p.current)==null||m.scrollTo({top:0,behavior:"smooth"}))},[f,s,c,l]),d.jsx(Uo,{ref:p,element:Yi,elementProps:e,children:d.jsx(o,{notifications:t,Notification:r})})}function z2({...e}){const{FooterButtons:t}=hi();return d.jsx(ji,{...e,children:d.jsx(t,{})})}function $2({className:e,...t}){const{FooterButtonClearAll:n,FooterButtonClearAllOld:o}=hi(),{notifications:r}=Ee(),[i,a]=v.useState(!1);return v.useEffect(()=>{r.filter(s=>s.state==="Stale"||s.state==="Acknowledged").length>0?a(!0):a(!1)},[r]),d.jsxs(We,{className:e,align:"right",...t,children:[d.jsx(o,{disabled:!i}),d.jsx(n,{disabled:r.length<=0})]})}function Z2({text:e="Clear All",...t}){const{clearAll:n}=Ee();return d.jsx(Ze,{text:e,onClick:()=>{n()},...t})}function X2({text:e="Clear Old",...t}){const{clearAllOld:n}=Ee();return d.jsx(Ze,{text:e,onClick:()=>{n()},...t})}function Sh(e){const t=qe(),{onClose:n,settings:o}=Ee(),{isPanelVisible:r}=nn(),{id:i,onClick:a,updateState:s}=e,c=v.useCallback(async()=>{if(!a)return;if(!t){try{await a({close:!0})}catch(f){console.error(f)}return void n(i)}const u=(o==null?void 0:o.toastStacking)??!1;let p;p=r?(o==null?void 0:o.closeNotificationOnClick)??!0:!u&&null;try{p!==null?await a({close:p}):(await a({close:!1}),await s("Acknowledged"))}catch(f){console.error(f)}},[t,i,r,a,n,s,o==null?void 0:o.closeNotificationOnClick,o==null?void 0:o.toastStacking]),l=v.useCallback(async u=>{const p=u.target;p.closest("button")||p.closest("[role='button']")||p.closest("a")||p.closest(".io-dropdown-menu")||await c()},[c]);return{handleClick:c,handleWrapperClick:l}}function U2({className:e,notification:t,onClick:n,...o}){const r=te("io-notification-header",e),{HeaderCount:i,HeaderBadge:a,HeaderTitle:s,HeaderTimestamp:c,HeaderButtonSnooze:l,HeaderButtonClose:u}=lu(),{handleWrapperClick:p}=Sh(t);return d.jsxs("div",{className:r,onClick:async f=>{await p(f),n==null||n(f)},...o,children:[d.jsx(a,{notification:t}),d.jsx(i,{notification:t}),d.jsx(s,{notification:t}),d.jsx(c,{notification:t}),d.jsxs(We,{children:[d.jsx(l,{notification:t}),d.jsx(u,{notification:t})]})]})}function J2({notification:e,...t}){const{settings:n,notificationStacks:o}=Ee(),{isPanelVisible:r}=nn(),{toastStacking:i,stackBy:a}=n,s=a==="application"?"source":a??"source";let c=0;if(i){const l=o.find(u=>u.key===e[s]);c=(l==null?void 0:l.items.length)??0}return r||!i||c<=1?null:d.jsx(Ss,{...t,children:c>9?"9+":c})}function Y2({className:e,notification:t,...n}){if(!(t!=null&&t.severity)||t.severity==="None")return null;const o=te("io-notification-header-badge",e);return d.jsx(Ss,{className:o,...n,children:t.severity})}function K2({className:e,state:t,severity:n="None",icon:o,...r}){const i=te("io-notification-header-icon",e),{isPanelVisible:a}=nn();return d.jsxs("div",{className:i,...r,children:[o&&d.jsx("span",{className:"io-notification-header-icon-image",children:d.jsx("img",{src:o,alt:`io-notification-header-icon-${o}`})}),d.jsx("span",{className:`io-notification-header-icon-badge color-${n.toLowerCase()}`,children:a&&t!=="Acknowledged"&&"New"})]})}function q2({className:e,notification:{appTitle:t},...n}){const o=te("io-notification-header-title",e);return d.jsx("div",{className:o,...n,children:t})}function Q2({className:e,notification:{timestamp:t,state:n,snooze:o},...r}){const i=te("io-notification-timestamp",e);return d.jsx("small",o&&n==="Snoozed"?{className:i,...r,children:"Snoozed"}:{className:i,...r,children:ox(t??0)??"Just Now"})}function eC({notification:{id:e,state:t},...n}){var a,s;const{settings:o,snooze:r}=Ee(),i=v.useCallback(c=>{var l;c.stopPropagation(),r&&r(e,((l=o.snooze)==null?void 0:l.duration)??0)},[e,r,(a=o.snooze)==null?void 0:a.duration]);return r&&t!=="Snoozed"&&((s=o.snooze)!=null&&s.enabled)?d.jsx(Ze,{icon:"snooze",variant:"link",text:"Snooze",tabIndex:-1,onClick:i,...n}):null}function tC({notification:{id:e,updateState:t},...n}){const o=qe(),{onClose:r}=Ee(),{isPanelVisible:i}=nn(),a=v.useCallback(s=>{s.stopPropagation(),!o||i?r(e):t("Acknowledged").catch(console.error)},[o,e,r,i,t]);return d.jsx(Ue,{icon:"close",iconSize:"10",tabIndex:-1,onClick:a,...n})}function nC({className:e,notification:t,...n}){const o=te("io-notification-body",e),{BodyIcon:r,BodyTitle:i,BodyDescription:a}=lu(),{icon:s,title:c,body:l}=t,{handleClick:u}=Sh(t);return d.jsxs("div",{className:o,role:"button",tabIndex:0,onKeyDown:async p=>{Wn(p)&&await u()},onClick:u,...n,children:[d.jsx(r,{icon:s}),d.jsxs("div",{className:"io-notification-body-content",children:[d.jsx(i,{text:c}),d.jsx(a,{text:l})]})]})}function oC({className:e,icon:t,altText:n="notification icon",...o}){if(!t)return null;const r=te("io-notification-body-icon",e);return d.jsx("div",{className:r,...o,children:d.jsx("img",{src:t,alt:n})})}function rC({text:e,...t}){return d.jsx(bo,{text:e,...t})}function iC({className:e,text:t,...n}){const o=te("io-notification-body-description",e);return d.jsx("p",{className:o,...n,children:t})}function aC({className:e,notification:t}){const n=te("io-notification-footer",e),{FooterButton:o}=lu(),{handleWrapperClick:r}=Sh(t),i=v.useMemo(()=>function(s){const c=[],l={};if(!s)return;s.forEach(p=>{var g;const{displayId:f,displayPath:h}=p,m={...p,children:[]};if(h&&h.length>0){let y;h.forEach((x,C)=>{var w;C===0?y=l[x]:y&&(y=(w=y.children)==null?void 0:w.find(I=>I.displayId===x))}),y&&((g=y.children)==null||g.push(m))}else f?(c.push(m),l[f]=m):c.push(m);f&&(l[f]=m)});const u=p=>{p.forEach(f=>{var h;((h=f.children)==null?void 0:h.length)===0?delete f.children:f.children&&u(f.children)})};return u(c),c}(t.actions),[t.actions]),a=(s,c)=>s.children?d.jsx(Yn,{text:s.title,children:s.children.map(a)},`${s.title}-${c}`):((l,u)=>d.jsx(Yn.Item,{children:d.jsx(o,{variant:"link",className:"io-dropdown-menu-item io-dropdown-menu-button",notificationAction:l})},`${l.title}-${u}`))(s,c);return d.jsx("div",{className:n,onClick:r,children:d.jsx(We,{align:"right",children:i==null?void 0:i.map((s,c)=>s.children?d.jsxs(We,{variant:"append",children:[d.jsx(o,{notificationAction:s,variant:c===0?"primary":"default"}),d.jsx(Yn,{variant:c===0?"primary":"default",icon:"ellipsis",children:s.children.map(a)})]},`${s.title}-${c}`):d.jsx(o,{notificationAction:s,variant:c===0?"primary":"link"},`${s.title}-${c}`))})})}function sC({notificationAction:e,...t}){const n=v.useCallback(o=>{o.stopPropagation(),e.onClick({close:!0})},[e]);return d.jsx(Ze,{text:e.title,onClick:n,...t})}const cC={Header:U2,HeaderCount:J2,HeaderBadge:Y2,HeaderIcon:K2,HeaderTitle:q2,HeaderTimestamp:Q2,HeaderButtonSnooze:eC,HeaderButtonClose:tC,Body:nC,BodyIcon:oC,BodyTitle:rC,BodyDescription:iC,Footer:aC,FooterButton:sC},lC=v.createContext(cC),uC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...cC,...t}),[t]);return d.jsx(lC.Provider,{value:n,children:e})});function lu(e){return{...v.useContext(lC),...e}}function Tj({className:e,notification:t,...n}){const{Header:o,Body:r,Footer:i}=lu(),{severity:a}=t,s=te("io-notification",`severity-${(a==null?void 0:a.toLowerCase())??"none"}`,t.state!=="Acknowledged"&&"state-new",e);return d.jsxs("div",{className:s,...n,children:[d.jsx(o,{notification:t}),d.jsx(r,{notification:t}),d.jsx(i,{notification:t})]})}function uu({components:e,notification:t,...n}){return d.jsx(uC,{components:e,children:d.jsx(Tj,{notification:t,...n})})}function dC({className:e,notifications:t,...n}){const[o,r]=v.useState(!1),i=t.length>=3?"large":"normal",a=t.length===2?"small":i,s=t[0].severity,c=te("io-notification-stack",o&&"io-notification-stack-open",a!=="normal"&&[`io-notification-stack-${a}`],s&&s!=="None"&&[`io-notification-stack-${s.toLowerCase()}`],e),l=v.useCallback(()=>{r(!0)},[]),u=v.useCallback(p=>{p.stopPropagation(),t.forEach(f=>{f.close()})},[t]);return d.jsxs("div",{className:c,onClick:l,...n,children:[o&&a!=="normal"&&d.jsx("div",{className:"io-notification-stack-btn",children:d.jsx(Ze,{icon:"close",onClick:p=>u(p),children:d.jsx("span",{className:"io-btn-text",children:"Clear Stack"})})}),t.map(p=>d.jsx(uu,{notification:p},p.id))]})}function Rj({...e}){const{notificationStacks:t}=Ee();return d.jsx(d.Fragment,{children:t.map(n=>d.jsx(dC,{notifications:n.items,...e},n.key))})}uC.displayName="ComponentsStoreProvider";const Lj=({notification:e,Notification:t,...n})=>{var h;const{configuration:o,isBulkActionsSupported:r,selectedNotifications:i,selectNotification:a}=Ee(),{isPanelVisible:s,isBulkActionsVisible:c}=nn(),l=((h=o.sourceFilter)==null?void 0:h.muted)??[],u=e.source&&l.includes(e.source)||l.includes("*");if(!s&&u)return null;const p=s&&r&&c,f=i.includes(e.id);return p?d.jsxs("div",{className:te("io-notification-list-bulk-action-item",{selected:f}),children:[d.jsx(Es,{checked:f,onChange:m=>a(e.id,m.target.checked)}),d.jsx(t,{notification:e,...n})]}):d.jsx(t,{notification:e,...n})};function Ah({className:e,Notification:t,notifications:n=[],noNotificationText:o="No notifications to display",...r}){const i=te("io-notification-list",e),{settings:a}=Ee(),{isPanelVisible:s}=nn(),{toastStacking:c}=a,l=c&&!s,u=n.length>0;return d.jsxs("div",{className:i,...r,children:[l&&d.jsx(Rj,{}),!l&&(u?n.map(p=>d.jsx(Lj,{notification:p,Notification:t,...r},p.id)):d.jsx("div",{className:"io-notification-list-no-notifications",children:o}))]})}const pC={Header:D2,HeaderCaptionTitle:B2,HeaderCaptionCount:function({variant:e="primary",...t}){const{notificationsCount:n=0}=Ee();return n===0?null:d.jsx(Yv,{variant:e,...t,children:n>99?"99+":n})},HeaderCaptionButtonSettings:function({icon:e="cog",size:t="32",variant:n="circle",...o}){return qe()?d.jsx(Ue,{icon:e,size:t,variant:n,...o}):null},HeaderCaptionButtonClose:function({icon:e="close",size:t="32",variant:n="circle",onClick:o,...r}){const{hidePanel:i}=Ee(),a=qe();return d.jsx(Ue,{icon:e,size:t,variant:n,onClick:s=>{o?o(s):a&&i()},...r})},HeaderActions:function({className:e,...t}){const n=te("io-panel-header-actions",e),{HeaderActionSort:o,HeaderActionView:r,HeaderActionClear:i,HeaderActionEdit:a}=hi();return d.jsxs("div",{className:n,...t,children:[d.jsxs(We,{children:[d.jsx(o,{}),d.jsx(r,{})]}),d.jsxs(We,{children:[d.jsx(i,{}),d.jsx(a,{})]})]})},HeaderActionSort:function({text:e="Sort by",...t}){const{sortNotificationsBy:n,setSortBy:o}=nn(),{onNotificationsSort:r}=(()=>{const{notifications:i}=Ee(),[a,s]=v.useState(q0),{key:c,descending:l}=a,u=v.useMemo(()=>Nj[c](i,l),[i,c,l]);return{onNotificationsSort:v.useCallback(f=>{s(h=>({key:f,descending:h.key!==f?q0.descending:!h.descending}))},[]),sortedNotifications:u}})();return d.jsxs(fe,{variant:"light",...t,children:[d.jsxs(fe.Button,{variant:"link",children:[e," ",d.jsx("strong",{children:Oj[n].toLowerCase()})]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",checkIcon:"check",children:["Newest","Oldest","Priority"].map(i=>{const a=i==="Priority"?"severity":i.toLowerCase();return d.jsx(fe.Item,{isSelected:n===a,onClick:()=>{o(a),r(a)},children:i},i)})})})]})},HeaderActionView:function({text:e="View",...t}){var a;const{settings:n}=Ee(),{viewNotificationsBy:o,setViewBy:r}=nn(),i=(a=n.snooze)!=null&&a.enabled?["All","Read","Unread","Snoozed"]:["All","Read","Unread"];return d.jsxs(fe,{variant:"light",...t,children:[d.jsxs(fe.Button,{variant:"link",children:[e," ",d.jsx("strong",{children:o})]}),d.jsx(fe.Content,{children:d.jsx(fe.List,{variant:"single",checkIcon:"check",children:i.map(s=>d.jsx(fe.Item,{isSelected:o===s.toLowerCase(),onClick:()=>r(s.toLowerCase()),children:s},s))})})]})},HeaderActionClear:function({text:e="Clear All",...t}){const{clearAll:n,notificationsCount:o}=Ee();return d.jsx(Ze,{variant:"link",text:e,onClick:n,disabled:o===0,...t})},HeaderActionEdit:function({tooltip:e="Bulk Edit",...t}){const{isBulkActionsSupported:n,notificationsCount:o}=Ee(),{showBulkActions:r}=nn();return n?d.jsx(Ue,{icon:"pen-to-square",title:e,size:"32",onClick:r,disabled:o===0,...t}):null},HeaderBulkActions:function({className:e,...t}){const n=te("io-panel-header-bulk-actions",e),{HeaderBulkActionSelect:o,HeaderBulkActionSelectDropdown:r,HeaderBulkActionMarkAsRead:i,HeaderBulkActionMarkAsUnread:a,HeaderBulkActionSnooze:s,HeaderBulkActionClear:c,HeaderBulkActionClose:l}=hi(),{isBulkActionsSupported:u}=Ee();return u?d.jsx("div",{className:n,...t,children:d.jsxs(We,{children:[d.jsx(o,{}),d.jsx(r,{}),d.jsx(i,{}),d.jsx(a,{}),d.jsx(s,{}),d.jsx(c,{}),d.jsx(l,{})]})}):null},HeaderBulkActionSelect:function({...e}){const{isBulkActionsSupported:t,selectedNotifications:n,selectAllNotifications:o,notificationsCount:r}=Ee();return t?d.jsx(Es,{checked:r===n.length&&r>0,onChange:i=>o("all",i.target.checked),disabled:r===0,...e}):null},HeaderBulkActionSelectDropdown:function({...e}){const{isBulkActionsSupported:t,selectAllNotifications:n,notificationsCount:o}=Ee();return t?d.jsxs(fe,{variant:"light",...e,children:[d.jsx(fe.ButtonIcon,{variant:"default",icon:"chevron-down",size:"16",iconSize:"10",disabled:o===0}),d.jsx(Qv,{children:d.jsxs(fe.List,{variant:"single",checkIcon:"check",children:[d.jsx(fe.ItemSection,{children:"Select"}),["All","Read","Unread","Snoozed"].map(r=>d.jsx(fe.Item,{onClick:()=>n(r.toLowerCase(),!0),children:r},r))]})})]}):null},HeaderBulkActionMarkAsRead:function({icon:e="envelope-open",size:t="32",variant:n="circle",tooltip:o="Mark as read",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a,"Seen")},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionMarkAsUnread:function({icon:e="envelope",size:t="32",variant:n="circle",tooltip:o="Mark as unread",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,setStates:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a,"Active")},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionSnooze:function({icon:e="snooze",size:t="32",variant:n="circle",tooltip:o="Snooze",...r}){var p,f;const{isBulkActionsSupported:i,selectedNotifications:a,snoozeMany:s,settings:c,notificationsCount:l}=Ee(),u=v.useCallback(()=>{var h;s(a,((h=c.snooze)==null?void 0:h.duration)??0)},[a,s,(p=c.snooze)==null?void 0:p.duration]);return i&&((f=c.snooze)!=null&&f.enabled)?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:u,disabled:l===0,...r}):null},HeaderBulkActionClear:function({icon:e="trash",size:t="32",variant:n="circle",tooltip:o="Clear",...r}){const{isBulkActionsSupported:i,selectedNotifications:a,clearMany:s,notificationsCount:c}=Ee(),l=v.useCallback(()=>{s(a)},[a,s]);return i?d.jsx(Ue,{icon:e,size:t,variant:n,title:o,onClick:l,disabled:c===0,...r}):null},HeaderBulkActionClose:function({text:e="Done",variant:t="primary",...n}){const{isBulkActionsSupported:o,notificationsCount:r}=Ee(),{hideBulkActions:i}=nn();return o?d.jsx(Ze,{variant:t,text:e,onClick:i,disabled:r===0,...n}):null},HeaderSearch:function({className:e,placeholder:t="Search",iconPrepend:n="search",iconAppend:o="close",...r}){const i=te("io-panel-header-search",e),a=v.useRef(null),{notificationsCount:s}=Ee(),{searchQuery:c,setSearch:l}=nn(),u=c.length>0,p=v.useCallback(()=>{l(""),a.current&&a.current.focus()},[l]);return d.jsxs("div",{className:i,children:[d.jsx(qn,{ref:a,value:c,iconPrepend:n,iconAppend:u?o:void 0,iconAppendOnClick:u?p:void 0,placeholder:t,onChange:f=>l(f.target.value),...r}),u&&d.jsx("p",{className:"io-panel-header-search-count",children:`${s} results`})]})},Body:F2,Footer:z2,FooterButtons:$2,FooterButtonClearAll:Z2,FooterButtonClearAllOld:X2,Notification:uu,NotificationsList:Ah},fC=v.createContext(pC),hC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...pC,...t}),[t]);return d.jsx(fC.Provider,{value:n,children:e})});function hi(e){return{...v.useContext(fC),...e}}hC.displayName="ComponentsStoreProvider";function mC(e=!0){var i,a;const t=v.useContext(Se.IOConnectContext),{settings:n}=Ee(),o=qe(),r=v.useCallback(async()=>{var l,u,p;const s=t.windows.my();if(!t||!s||!o)return;const c=s.placementSettings;await s.place({...c,snapped:!0,top:12,left:((l=n.placement)==null?void 0:l.panel)==="left"?12:void 0,right:((u=n.placement)==null?void 0:u.panel)==="right"?12:void 0,bottom:12,width:400,horizontalAlignment:(p=n.placement)==null?void 0:p.panel})},[t,o,(i=n.placement)==null?void 0:i.panel]);v.useEffect(()=>{var s;e&&t&&((s=n.placement)!=null&&s.panel)&&o&&r().catch(console.error)},[e,t,o,r,(a=n.placement)==null?void 0:a.panel])}function _j({className:e,onClose:t,title:n="Notifications",autoPlacement:o=!0,...r}){var h,m;const{Header:i,Body:a}=hi(),{settings:s}=Ee(),{isPanelVisible:c}=nn(),[l,u]=v.useState(!1),p=qe(),f=te("io-notifications-panel",((h=s.placement)==null?void 0:h.panel)==="left"&&"io-panel-left",((m=s.placement)==null?void 0:m.panel)==="right"&&"io-panel-right",e);return mC(o),v.useEffect(()=>{c||u(!1)},[c]),d.jsxs(d.Fragment,{children:[d.jsxs(ze,{className:f,...r,children:[d.jsx(i,{title:n,onClose:t,onOpenSettings:()=>u(!0)}),d.jsx(a,{})]}),p&&c&&d.jsx(Ej,{isOpen:l,onClose:()=>u(!1)})]})}const gC=({className:e,notifications:t,maxToasts:n=1,...o})=>{const r=te("io-toasts-body",e),{NotificationsList:i,Notification:a}=wC(),[s,c]=v.useState([]);return v.useEffect(()=>{const l=n<0?t.length:n,u=t.filter(p=>p.state==="Active").slice(0,l);for(const p of u)p.onShow();c(u)},[t,n]),d.jsx("div",{className:r,...o,children:d.jsx(i,{Notification:a,notifications:s,noNotificationText:""})})};gC.displayName="Body";const vC={Body:gC,Notification:uu,NotificationsList:Ah},yC=v.createContext(vC),bC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...vC,...t}),[t]);return d.jsx(yC.Provider,{value:n,children:e})});function wC(e){return{...v.useContext(yC),...e}}bC.displayName="ComponentsStoreProvider";function xC(e=!0){var i;const t=v.useContext(Se.IOConnectContext),{settings:n}=Ee(),o=(i=n.placement)==null?void 0:i.toasts,r=v.useCallback(async()=>{const a=t.windows.my();if(!t||!a)return;const s=a.placementSettings;await a.place({...s,snapped:!0,left:o==="top-left"||o==="bottom-left"?12:void 0,right:o==="top-right"||o==="bottom-right"?12:void 0,width:400,verticalAlignment:o==="top-left"||o==="top-right"?"top":"bottom",horizontalAlignment:o==="top-right"||o==="bottom-right"?"right":"left"})},[t,o]);v.useEffect(()=>{e&&t&&o&&r().catch(console.error)},[e,t,r,o])}function Mj({className:e,maxToasts:t=10,autoPlacement:n=!0,...o}){var h;const{Header:r,Body:i,Footer:a}=wC(),{notifications:s,settings:c}=Ee(),l=v.useRef(null),u=function(m,g=!0){const y=v.useContext(Se.IOConnectContext),x=v.useRef(null),C=v.useRef(0),[w,I]=v.useState(!1),b=v.useCallback(async(k,S)=>{if(!y)return;const E=y.windows.my();if(!E)return;let N=1080;try{N=(await y.displays.getPrimary()).workArea.height}catch(P){console.warn("Could not get primary display, using fallback height:",P)}if(S.current)return;const A=Math.min(Math.max(k,92),N);if(I(k>=N),!(Math.abs(A-C.current)<5)){C.current=A;try{const P=E.placementSettings;await E.place({...P,height:A})}catch(P){console.error("Error updating toasts window height:",P)}}},[y]);return v.useEffect(()=>{if(!g)return I(!1),void(C.current=0);if(!m.current||!y)return;const k=m.current,S={current:!1},E=new ResizeObserver(N=>{const A=N.at(-1);if(!A)return;const{height:P}=A.contentRect,j=getComputedStyle(k),G=Number.parseInt(j.paddingTop,10),M=Number.parseInt(j.paddingBottom,10),T=(Number.isNaN(G)?0:G)+P+(Number.isNaN(M)?0:M);x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{b(T,S).catch(console.error)},100)});return E.observe(k),()=>{S.current=!0,E.disconnect(),x.current&&clearTimeout(x.current)}},[g,y,b]),w}(l,n),p=(h=c.placement)==null?void 0:h.toasts,f=te("io-toasts",(p==="top-left"||p==="top-right")&&"io-toasts-top",(p==="top-right"||p==="bottom-right")&&"io-toasts-right",(p==="bottom-left"||p==="bottom-right")&&"io-toasts-bottom",(p==="top-left"||p==="bottom-left")&&"io-toasts-left",u&&"io-toasts-max-height",e);return xC(n),d.jsxs("div",{className:f,...o,children:[r&&d.jsx(r,{}),d.jsx("div",{ref:l,children:d.jsx(i,{notifications:s,maxToasts:t})}),a&&d.jsx(a,{})]})}var Eh=Object.freeze({__proto__:null,Notification:uu,NotificationBody:nC,NotificationBodyDescription:iC,NotificationBodyIcon:oC,NotificationBodyTitle:rC,NotificationFooter:aC,NotificationFooterButton:sC,NotificationHeader:U2,NotificationHeaderBadge:Y2,NotificationHeaderButtonClose:tC,NotificationHeaderButtonSnooze:eC,NotificationHeaderCount:J2,NotificationHeaderIcon:K2,NotificationHeaderTimestamp:Q2,NotificationHeaderTitle:q2,NotificationStack:dC,NotificationsList:Ah,NotificationsPanelProvider:({children:e})=>{const{searchQuery:t,setSearch:n,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:c,showBulkActions:l,hideBulkActions:u}=function(){const f=v.useContext(Se.IOConnectContext),[h,m]=v.useState(!1),[g,y]=v.useState("newest"),[x,C]=v.useState("all"),[w,I]=v.useState(""),[b,k]=v.useState(!1),S=qe(),{isBulkActionsSupported:E}=Ee();return v.useEffect(()=>{const N=kt.onPanelVisibilityChanged(A=>m(A));return()=>{N()}},[]),v.useEffect(()=>{S!==null&&S&&(async()=>{const N=await f.notifications.panel.isVisible();m(N)})()},[f.notifications.panel,S]),v.useEffect(()=>{h||(k(!1),C("all"))},[h]),{isPanelVisible:h,sortNotificationsBy:g,setSortBy:N=>{y(N)},viewNotificationsBy:x,setViewBy:N=>{C(N)},searchQuery:w,setSearch:N=>{I(N)},isBulkActionsVisible:b,showBulkActions:()=>{E&&k(!0)},hideBulkActions:()=>{E&&k(!1)}}}(),p=v.useMemo(()=>({searchQuery:t,setSearch:n,isPanelVisible:o,sortNotificationsBy:r,setSortBy:i,viewNotificationsBy:a,setViewBy:s,isBulkActionsVisible:c,showBulkActions:l,hideBulkActions:u}),[t,n,o,r,i,a,s,c,l,u]);return d.jsx(M2.Provider,{value:p,children:e})},NotificationsProvider:({children:e})=>{const{notifications:t,notificationStacks:n,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:c,clearAll:l,clearAllOld:u,close:p,hidePanel:f,showPanel:h,saveSetting:m,saveFilter:g,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:C,selectNotification:w,selectAllNotifications:I,clearMany:b,snooze:k,snoozeMany:S,setState:E,setStates:N,setCount:A}=e4(),P=v.useMemo(()=>({notifications:t,notificationStacks:n,notificationsCount:o,configuration:r,settings:i,allApplications:a,allApps:s,allowedApplications:c,clearAll:l,clearAllOld:u,onClose:p,hidePanel:f,showPanel:h,saveSetting:m,saveFilter:g,saveAllFilter:y,isBulkActionsSupported:x,selectedNotifications:C,selectNotification:w,selectAllNotifications:I,clearMany:b,snooze:k,snoozeMany:S,setState:E,setStates:N,setCount:A}),[t,n,o,r,i,a,s,c,l,u,p,f,h,m,g,y,x,C,w,I,b,k,S,E,N,A]);return d.jsx(Ox.Provider,{value:P,children:e})},Panel:function({components:e,settings:t,...n}){return d.jsx(gh,{components:t,children:d.jsx(hC,{components:e,children:d.jsx(_j,{...n})})})},PanelBody:F2,PanelFooter:z2,PanelFooterButtonClearAll:Z2,PanelFooterButtonClearAllOld:X2,PanelFooterButtons:$2,PanelHeader:D2,PanelHeaderCaptionTitle:B2,SettingsAllowNotificationToasts:Rx,SettingsAllowNotifications:Tx,SettingsCloseNotificationOnClick:_x,SettingsGeneral:jx,SettingsHideToastsAfter:Dx,SettingsPanel:vh,SettingsPanelAutoHide:Mx,SettingsPlacement:Wx,SettingsPlacementPanel:Fx,SettingsPlacementToasts:zx,SettingsShowNotificationBadge:Lx,SettingsSnooze:$x,SettingsSnoozeDuration:Zx,SettingsStacking:Bx,SettingsSubscribeAll:Ux,SettingsSubscribeApp:Jx,SettingsSubscribeMuteAll:Yx,SettingsSubscribeMuteApp:Kx,SettingsSubscriptions:Xx,SettingsToastStackBy:Gx,SettingsToastStacking:Hx,Toasts:function({components:e,...t}){return d.jsx(bC,{components:e,children:d.jsx(Mj,{...t})})},useAddRemoveApps:mh,useHidePanelOnFocusLost:function(e=!0){const t=v.useContext(Se.IOConnectContext),n=qe();return v.useEffect(()=>{var r;if(!t||!e||n===null||!n)return;const o=(r=t.windows.my())==null?void 0:r.onFocusChanged(i=>{i.isFocused||t.notifications.panel.hide().catch(a=>{console.error("Error hiding panel:",a)})});return()=>o==null?void 0:o()},[t,n,e]),t},useHidePanelOnKeyUp:function(e="Escape"){const{hidePanel:t}=Ee();FA(e,t)},useNotificationStacking:Px,useNotificationsContext:Ee,useNotificationsPanelContext:nn,usePanelWindowPlacement:mC,useSelectNotifications:Nx,useShowHidePanelWindow:function(e=!0){const t=v.useContext(Se.IOConnectContext),n=t==null?void 0:t.windows.my(),o=qe(),{isPanelVisible:r}=nn();return v.useEffect(()=>{t&&n&&o&&(r?n.show().then(()=>{e&&n.focus().catch(i=>{console.error("Error focusing window:",i)})}).catch(i=>console.error("Error showing window:",i)):n.hide().catch(i=>console.error("Error hiding window:",i)))},[t,n,o,r,e]),{myWindow:n}},useToastsWindowPlacement:xC}),Dj=Object.freeze({__proto__:null,AllowDocking:Gw,AutoClose:({align:e="right",label:t="Auto-close on starting apps and workspaces",...n})=>d.jsx(on,{align:e,label:t,prefKey:cb,disabled:!0,...n}),DockedAlwaysOnTop:Ww,DockedClaimsSpace:Vw,Downloads:Jw,DownloadsAskForEachDownload:gx,DownloadsLocation:mx,General:Mw,HideFavoritesFromLaunchpad:Hw,HideLabelsInExtendedArea:zw,Layouts:Xw,LayoutsRestoreLastSaved:({align:e="right",label:t="Restore last saved on startup",...n})=>d.jsx(on,{align:e,label:t,prefKey:gb,...n}),LayoutsSaveCurrentOnExit:Uw,LayoutsShowDeletePrompt:su,LayoutsShowUnsavedChangesPrompt:au,MinimizeToTray:Dw,Panel:Ex,PanelBody:_w,PinnedPosition:Bw,ShowExtendedArea:Fw,ShowFavoritesInExtendedArea:$w,ShowRecentAppsInExtendedArea:Zw,System:vx,SystemRestartSection:xx,SystemShutdownSection:Cx,Theme:iu}),CC=Object.freeze({__proto__:null,LicenseSection:Qx,Panel:s2,PluginsSection:t2,ProductsInfoSection:e2,Trademark:n2,UserSection:o2});v.createContext(null);v.memo(function({className:e,...t}){const{notificationsCount:n,showNotificationBadge:o,toggleNotificationPanel:r}=(()=>{const s=v.useContext(Se.IOConnectContext),{settings:c}=Ee(),[l,u]=v.useState(0);v.useEffect(()=>{const f=s==null?void 0:s.notifications;if(!f)return;const h=f.onCounterChanged(m=>{u(m.count)});return()=>h==null?void 0:h()},[s==null?void 0:s.notifications]);const p=v.useCallback(async()=>{var f;if((f=s==null?void 0:s.notifications)!=null&&f.panel)try{await s.notifications.panel.isVisible()?await s.notifications.panel.hide():await s.notifications.panel.show()}catch(h){console.error("Failed to toggle notifications panel:",h)}else console.error("Notifications panel API not available")},[s]);return{showNotificationBadge:c.showNotificationBadge,notificationsCount:l,toggleNotificationPanel:p}})(),i=o&&n>0,a=n>99?"99+":n;return d.jsxs("div",{className:te("notifications-button","non-draggable",e),...t,children:[i&&d.jsx(Yv,{variant:"primary",children:a}),d.jsx(Ue,{variant:"circle",icon:"bell",size:"32",title:"Notifications",onClick:r})]})});const{isClickKeypress:Bj}=pk;v.memo(function({id:e,title:t,type:n,icon:o,iconSrc:r,hasOpenInstance:i,workspaceId:a,onItemClick:s,onPerformAction:c}){const l=v.useCallback(async()=>{let h;h=n===Ia.APPLICATION?{kind:Ia.APPLICATION,id:e,modifier:null,title:t}:n===Ia.LAYOUT?{kind:Ia.LAYOUT,id:e,modifier:null}:{kind:Ia.WORKSPACE,id:e,modifier:null},await c({type:n,id:e,title:t,workspaceId:a}),s==null||s(h)},[e,t,n,a,s,c]),u=t,p=r?d.jsx(_l,{size:"16",src:r,alt:`${t} icon`}):d.jsx(wt,{size:"16",variant:o});return d.jsx(Lt.Item,{className:te({"io-list-item-active":i}),prepend:p,tooltip:u??t,title:t,onClick:l,tabIndex:0,"aria-label":t,onKeyDown:f=>{Bj(f)&&(f.preventDefault(),l())},children:d.jsx("span",{className:"launchpad-category-item-title",children:t})})});function Hj(){const e=v.useContext(Se.IOConnectContext),[t,n]=v.useState();return v.useEffect(()=>{if(!e)return;let o=!1;return(async()=>{var r,i;try{const a=await((i=(r=e.windows)==null?void 0:r.my())==null?void 0:i.getContext());o||n(a)}catch(a){console.error("usePlaceholderAppStartupContext: failed to read context",a)}})(),()=>{o=!0}},[e]),t}const Gj=e=>(e==null?void 0:e.type)==="workspaces"?"Workspace Currently Unavailable":"App Currently Unavailable";function Wj(){return d.jsxs("svg",{className:"io-placeholder-app-indicator",width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[d.jsx("path",{className:"io-placeholder-app-indicator-badge",d:"M0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24Z"}),d.jsx("path",{className:"io-placeholder-app-indicator-glyph",d:"M18.5 18C18.2188 18 18 18.25 18 18.5V21.5C18 21.7812 18.2188 22 18.5 22H21.5C21.75 22 22 21.7812 22 21.5V18.5C22 18.25 21.75 18 21.5 18H18.5ZM17 18.5C17 17.6875 17.6562 17 18.5 17H21.5C22.3125 17 23 17.6875 23 18.5V21.5C23 22.3438 22.3125 23 21.5 23H18.5C17.6562 23 17 22.3438 17 21.5V18.5ZM18.5 26C18.2188 26 18 26.25 18 26.5V29.5C18 29.7812 18.2188 30 18.5 30H21.5C21.75 30 22 29.7812 22 29.5V26.5C22 26.25 21.75 26 21.5 26H18.5ZM17 26.5C17 25.6875 17.6562 25 18.5 25H21.5C22.3125 25 23 25.6875 23 26.5V29.5C23 30.3438 22.3125 31 21.5 31H18.5C17.6562 31 17 30.3438 17 29.5V26.5ZM29.5 18H26.5C26.2188 18 26 18.25 26 18.5V21.5C26 21.7812 26.2188 22 26.5 22H29.5C29.75 22 30 21.7812 30 21.5V18.5C30 18.25 29.75 18 29.5 18ZM26.5 17H29.5C30.3125 17 31 17.6875 31 18.5V21.5C31 22.3438 30.3125 23 29.5 23H26.5C25.6562 23 25 22.3438 25 21.5V18.5C25 17.6875 25.6562 17 26.5 17ZM26.5 26C26.2188 26 26 26.25 26 26.5V29.5C26 29.7812 26.2188 30 26.5 30H29.5C29.75 30 30 29.7812 30 29.5V26.5C30 26.25 29.75 26 29.5 26H26.5ZM25 26.5C25 25.6875 25.6562 25 26.5 25H29.5C30.3125 25 31 25.6875 31 26.5V29.5C31 30.3438 30.3125 31 29.5 31H26.5C25.6562 31 25 30.3438 25 29.5V26.5Z"})]})}function Vj({className:e,title:t,message:n,workspacesIndicator:o,...r}){var l;const i=(l=Hj())==null?void 0:l.originalApp,a=te("io-placeholder-app-header",e),s=n===void 0?(u=>{const{name:p,type:f}=u??{};return f==="workspaces"?p?`Workspace "${p}" couldn't be restored. It may be missing or incorrectly configured.`:"The workspace couldn't be restored. It may be missing or incorrectly configured.":p?`App "${p}" couldn't be loaded. It may be missing or incorrectly configured.`:"The app couldn't be loaded. It may be missing or incorrectly configured."})(i):n,c=o===void 0?d.jsx(Wj,{}):o;return d.jsxs("div",{className:a,...r,children:[(i==null?void 0:i.type)==="workspaces"&&c,d.jsx(bo,{tag:"h2",size:"large",text:t??Gj(i),className:"io-placeholder-app-title"}),s&&d.jsx("p",{className:"io-text-default-lh16 io-placeholder-app-message",children:s})]})}function Fj({className:e,text:t="If this was unexpected, contact your system administrator or support team.",...n}){const o=te("io-placeholder-app-support",e);return d.jsxs("div",{className:o,...n,children:[d.jsxs("svg",{className:"io-placeholder-app-support-icon",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[d.jsx("path",{className:"io-placeholder-app-support-icon-badge",d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z"}),d.jsx("path",{className:"io-placeholder-app-support-icon-glyph",d:"M9 16V17.5C9 17.7812 8.75 18 8.5 18C8.21875 18 8 17.7812 8 17.5V16C8 11.5938 11.5625 8 16 8C20.4062 8 24 11.5938 24 16V20.5312C24 21.9062 22.875 23.0312 21.5 23.0312L18.9062 23C18.6875 23.5938 18.125 24 17.5 24H15.5C14.6562 24 14 23.3438 14 22.5C14 21.6875 14.6562 21 15.5 21H17.5C18.125 21 18.6875 21.4375 18.9062 22L21.5 22.0312C22.3125 22.0312 23 21.3438 23 20.5312V16C23 12.1562 19.8438 9 16 9C12.125 9 9 12.1562 9 16ZM18 22.5C18 22.25 17.75 22 17.5 22H15.5C15.2188 22 15 22.25 15 22.5C15 22.7812 15.2188 23 15.5 23H17.5C17.75 23 18 22.7812 18 22.5ZM12.5 15C11.6562 15 11 15.6875 11 16.5V17.5C11 18.3438 11.6562 19 12.5 19H13V15H12.5ZM10 16.5C10 15.125 11.0938 14 12.5 14H13C13.5312 14 14 14.4688 14 15V19C14 19.5625 13.5312 20 13 20H12.5C11.0938 20 10 18.9062 10 17.5V16.5ZM19 15V19H19.5C20.3125 19 21 18.3438 21 17.5V16.5C21 15.6875 20.3125 15 19.5 15H19ZM19.5 14C20.875 14 22 15.125 22 16.5V17.5C22 18.9062 20.875 20 19.5 20H19C18.4375 20 18 19.5625 18 19V15C18 14.4688 18.4375 14 19 14H19.5Z"})]}),d.jsx("span",{className:"io-text-default-lh16 io-placeholder-app-support-text",children:t})]})}const IC={Header:Vj,SupportPanel:Fj},zj=v.createContext(IC),$j=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...IC,...t}),[t]);return d.jsx(zj.Provider,{value:n,children:e})});$j.displayName="ComponentsStore";const kC=e=>{const{General:t,Layouts:n}=du();return d.jsxs(Uo,{element:Yi,elementProps:e,children:[d.jsx(t,{}),d.jsx(n,{})]})},SC=({title:e="General",...t})=>{const{Theme:n}=du();return d.jsx(Je,{title:e,"data-testid":"preferences-panel-general-block",...t,children:d.jsx(n,{})})},AC=({title:e="Layouts",...t})=>{const{LayoutsShowDeletePrompt:n}=du();return d.jsx(Je,{title:e,"data-testid":"preferences-panel-layouts-block",...t,children:d.jsx(n,{})})},EC={Body:kC,General:SC,Theme:iu,Layouts:AC,LayoutsShowUnsavedChangesPrompt:au,LayoutsShowDeletePrompt:su},jC=v.createContext(EC),PC=v.memo(({children:e,components:t})=>{const n=v.useMemo(()=>({...EC,...t}),[t]);return d.jsx(jC.Provider,{value:n,children:e})});PC.displayName="PreferencesPanelComponentsStoreProvider";const du=()=>v.useContext(jC),Zj=({onClose:e,title:t="Platform Preferences",...n})=>{const{Body:o}=du();return d.jsx(Ax,{title:t,onClose:e,...n,children:d.jsx(o,{})})};var Xj=Object.freeze({__proto__:null,General:SC,Layouts:AC,LayoutsShowDeletePrompt:su,LayoutsShowUnsavedChangesPrompt:au,Panel:({components:e,...t})=>d.jsx(PC,{components:e,children:d.jsx(Zj,{...t})}),PanelBody:kC,Theme:iu}),Uj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function NC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var OC={exports:{}};/*!
41
41
  Copyright (c) 2018 Jed Watson.
42
42
  Licensed under the MIT License (MIT), see
43
43
  http://jedwatson.github.io/classnames
44
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=r(i,o(s)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(TC);var Jj=TC.exports;const jo=OC(Jj),Yj=e=>{const{active:t,className:n,...o}=e;return d.jsx(Ue,{className:jo("launchpad-button",{active:t},n),"aria-label":"Launchpad",icon:"logo",variant:"circle",size:"32",title:t?"Close Launchpad":"Open Launchpad","data-testid":"launchpad-button",...o})},RC=v.createContext(void 0),LC=()=>{const e=v.useContext(RC);if(e===void 0)throw new Error("useWorkspaceComponentsContext must be used within an WorkspaceComponentsContextProvider");return e},jr={WINDOW_MANAGEMENT:"window-management",NOTIFICATIONS:"notifications"},Eh="getScreenDetails"in window,Kj=()=>{const e=Eh?[jr.NOTIFICATIONS,jr.WINDOW_MANAGEMENT]:[jr.NOTIFICATIONS];return Promise.all(e.map(async t=>{const n=await navigator.permissions.query({name:t});return n.stableName=t,n}))},qj=e=>{v.useEffect(()=>{var n;if(!((n=window.iobrowser)!=null&&n.platformStarted)||e)return;const t=o=>{o.preventDefault(),o.returnValue=!0};return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)},[e])},Qj=()=>{const[e,t]=v.useState(!1),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;let o;return(async()=>{var r;try{o=await((r=n.workspaces)==null?void 0:r.onWorkspaceOpened(()=>t(!0)))}catch(i){console.error(i)}})(),()=>o==null?void 0:o()},[n]),e};var Bp={exports:{}};(function(e,t){(function(n,o){var r="1.0.41",i="",a="?",s="function",c="undefined",l="object",u="string",p="major",f="model",h="name",m="type",g="vendor",y="version",x="architecture",C="console",w="mobile",I="tablet",b="smarttv",k="wearable",S="embedded",E=500,O="Amazon",A="Apple",N="ASUS",j="BlackBerry",G="Browser",M="Chrome",T="Edge",H="Firefox",V="Google",z="Honor",P="Huawei",B="Lenovo",F="LG",$="Microsoft",Z="Motorola",_="Nvidia",R="OnePlus",L="Opera",D="OPPO",K="Samsung",J="Sharp",Y="Sony",ee="Xiaomi",X="Zebra",ae="Facebook",ce="Chromium OS",me="Mac OS",be=" Browser",Le=function(le,ye){var re={};for(var ie in le)ye[ie]&&ye[ie].length%2===0?re[ie]=ye[ie].concat(le[ie]):re[ie]=le[ie];return re},q=function(le){for(var ye={},re=0;re<le.length;re++)ye[le[re].toUpperCase()]=le[re];return ye},oe=function(le,ye){return typeof le===u?se(ye).indexOf(se(le))!==-1:!1},se=function(le){return le.toLowerCase()},we=function(le){return typeof le===u?le.replace(/[^\d\.]/g,i).split(".")[0]:o},Oe=function(le,ye){if(typeof le===u)return le=le.replace(/^\s\s*/,i),typeof ye===c?le:le.substring(0,E)},de=function(le,ye){for(var re=0,ie,Me,ge,ne,Q,ue;re<ye.length&&!Q;){var Ce=ye[re],$e=ye[re+1];for(ie=Me=0;ie<Ce.length&&!Q&&Ce[ie];)if(Q=Ce[ie++].exec(le),Q)for(ge=0;ge<$e.length;ge++)ue=Q[++Me],ne=$e[ge],typeof ne===l&&ne.length>0?ne.length===2?typeof ne[1]==s?this[ne[0]]=ne[1].call(this,ue):this[ne[0]]=ne[1]:ne.length===3?typeof ne[1]===s&&!(ne[1].exec&&ne[1].test)?this[ne[0]]=ue?ne[1].call(this,ue,ne[2]):o:this[ne[0]]=ue?ue.replace(ne[1],ne[2]):o:ne.length===4&&(this[ne[0]]=ue?ne[3].call(this,ue.replace(ne[1],ne[2])):o):this[ne]=ue||o;re+=2}},Ve=function(le,ye){for(var re in ye)if(typeof ye[re]===l&&ye[re].length>0){for(var ie=0;ie<ye[re].length;ie++)if(oe(ye[re][ie],le))return re===a?o:re}else if(oe(ye[re],le))return re===a?o:re;return ye.hasOwnProperty("*")?ye["*"]:le},it={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},dt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Te={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[h,L+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[h,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+G]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[h,"Smart Lenovo "+G]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+G],y],[/\bfocus\/([\w\.]+)/i],[y,[h,H+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI"+be]],[/fxios\/([\w\.-]+)/i],[y,[h,H]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+be],y],[/samsungbrowser\/([\w\.]+)/i],[y,[h,K+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,y],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ae],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,M+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+G]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ve,it]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,H+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[h,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[x,/ower/,i,se]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[x,se]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,K],[m,I]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,K],[m,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,A],[m,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,A],[m,I]],[/(macintosh);/i],[f,[g,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,J],[m,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[f,[g,z],[m,I]],[/honor([-\w ]+)[;\)]/i],[f,[g,z],[m,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[f,[g,P],[m,I]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,P],[m,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[f,/_/g," "],[g,ee],[m,I]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[f,/_/g," "],[g,ee],[m,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,D],[m,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[f,[g,Ve,{OnePlus:["304","403","203"],"*":D}],[m,I]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[m,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[m,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,Z],[m,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,Z],[m,I]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,F],[m,I]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,F],[m,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[f,[g,B],[m,I]],[/(nokia) (t[12][01])/i],[g,f,[m,I]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[f,/_/g," "],[m,w],[g,"Nokia"]],[/(pixel (c|tablet))\b/i],[f,[g,V],[m,I]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,V],[m,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,Y],[m,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,Y],[m,I]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,R],[m,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,O],[m,I]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,O],[m,w]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[m,I]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,j],[m,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,N],[m,I]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,N],[m,w]],[/(nexus 9)/i],[f,[g,"HTC"],[m,I]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[m,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[g,"TCL"],[m,I]],[/(itel) ((\w+))/i],[[g,se],f,[m,Ve,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[m,I]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[m,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[g,"Ulefone"],[m,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[g,"Energizer"],[m,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[g,"Cat"],[m,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[g,"Smartfren"],[m,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[g,"Nothing"],[m,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[f,[g,"Archos"],[m,I]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[f,[g,"Archos"],[m,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[g,f,[m,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[m,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[m,I]],[/(surface duo)/i],[f,[g,$],[m,I]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[m,w]],[/(u304aa)/i],[f,[g,"AT&T"],[m,w]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[m,w]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[m,I]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[m,I]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[m,I]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[m,I]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[m,I]],[/\b(k88) b/i],[f,[g,"ZTE"],[m,I]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[m,w]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[m,w]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[m,I]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[m,I]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[m,I]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[m,I]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[m,I]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[m,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[m,w]],[/\b(ph-1) /i],[f,[g,"Essential"],[m,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[m,I]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[m,I]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[m,I]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[f,[g,_],[m,I]],[/(sprint) (\w+)/i],[g,f,[m,w]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,$],[m,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,X],[m,I]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,X],[m,w]],[/smart-tv.+(samsung)/i],[g,[m,b]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,K],[m,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,F],[m,b]],[/(apple) ?tv/i],[g,[f,A+" TV"],[m,b]],[/crkey/i],[[f,M+"cast"],[g,V],[m,b]],[/droid.+aft(\w+)( bui|\))/i],[f,[g,O],[m,b]],[/(shield \w+ tv)/i],[f,[g,_],[m,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,J],[m,b]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,Y],[m,b]],[/(mi(tv|box)-?\w+) bui/i],[f,[g,ee],[m,b]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[m,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,Oe],[f,Oe],[m,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[f,[m,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[m,C]],[/droid.+; (shield)( bui|\))/i],[f,[g,_],[m,C]],[/(playstation \w+)/i],[f,[g,Y],[m,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,$],[m,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[f,[g,K],[m,k]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[g,f,[m,k]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[f,[g,D],[m,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,A],[m,k]],[/(opwwe\d{3})/i],[f,[g,R],[m,k]],[/(moto 360)/i],[f,[g,Z],[m,k]],[/(smartwatch 3)/i],[f,[g,Y],[m,k]],[/(g watch r)/i],[f,[g,F],[m,k]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,X],[m,k]],[/droid.+; (glass) \d/i],[f,[g,V],[m,k]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,f,[m,k]],[/; (quest( \d| pro)?)/i],[f,[g,ae],[m,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[m,S]],[/(aeobc)\b/i],[f,[g,O],[m,S]],[/(homepod).+mac os/i],[f,[g,A],[m,S]],[/windows iot/i],[[m,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,I]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,I]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,T+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/ladybird\//i],[[h,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[h,[y,Ve,dt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,Ve,dt],[h,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,me],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(ubuntu) ([\w\.]+) like android/i],[[h,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[h,y],[/\(bb(10);/i],[y,[h,j]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,H+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,ce],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Ne=function(le,ye){if(typeof le===l&&(ye=le,le=o),!(this instanceof Ne))return new Ne(le,ye).getResult();var re=typeof n!==c&&n.navigator?n.navigator:o,ie=le||(re&&re.userAgent?re.userAgent:i),Me=re&&re.userAgentData?re.userAgentData:o,ge=ye?Le(Te,ye):Te,ne=re&&re.userAgent==ie;return this.getBrowser=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.browser),Q[p]=we(Q[y]),ne&&re&&re.brave&&typeof re.brave.isBrave==s&&(Q[h]="Brave"),Q},this.getCPU=function(){var Q={};return Q[x]=o,de.call(Q,ie,ge.cpu),Q},this.getDevice=function(){var Q={};return Q[g]=o,Q[f]=o,Q[m]=o,de.call(Q,ie,ge.device),ne&&!Q[m]&&Me&&Me.mobile&&(Q[m]=w),ne&&Q[f]=="Macintosh"&&re&&typeof re.standalone!==c&&re.maxTouchPoints&&re.maxTouchPoints>2&&(Q[f]="iPad",Q[m]=I),Q},this.getEngine=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.engine),Q},this.getOS=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.os),ne&&!Q[h]&&Me&&Me.platform&&Me.platform!="Unknown"&&(Q[h]=Me.platform.replace(/chrome os/i,ce).replace(/macos/i,me)),Q},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ie},this.setUA=function(Q){return ie=typeof Q===u&&Q.length>E?Oe(Q,E):Q,this},this.setUA(ie),this};Ne.VERSION=r,Ne.BROWSER=q([h,y,p]),Ne.CPU=q([x]),Ne.DEVICE=q([f,g,m,C,w,b,I,k,S]),Ne.ENGINE=Ne.OS=q([h,y]),e.exports&&(t=e.exports=Ne),t.UAParser=Ne;var Be=typeof n!==c&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var He=new Ne;Be.ua=He.getResult(),Be.ua.get=function(){return He.getUA()},Be.ua.set=function(le){He.setUA(le);var ye=He.getResult();for(var re in ye)Be.ua[re]=ye[re]}}})(typeof window=="object"?window:Uj)})(Bp,Bp.exports);var eN=Bp.exports;const qr=new eN.UAParser,tN=()=>W.useMemo(()=>({os:qr.getOS(),browser:qr.getBrowser(),cpu:qr.getCPU(),device:qr.getDevice(),engine:qr.getEngine(),ua:qr.getUA()}),[]),nN=()=>W.useMemo(()=>qr.getBrowser(),[]),jh=()=>{const{ua:e}=tN();return e.includes("io-connect-desktop")},_C=()=>{const[e,t]=v.useState([]),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.notifications.onRaised(a=>t(s=>[...s,a])),r=n.notifications.onClosed(a=>t(s=>s.filter(c=>c.id!==a.id))),i=n.notifications.onStateChanged(({id:a},s)=>{t(c=>{const l=c.findIndex(u=>u.id===a);return l===-1?c:[...c.slice(0,l),{...c[l],state:s},...c.slice(l+1)]})});return n.notifications.list().then(t).catch(console.error),()=>{o(),r(),i()}},[n]),e},oN=()=>{const[e,t]=v.useState({}),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.notifications.onConfigurationChanged(r=>t(r));return()=>{o()}},[n]),e},rN="interopio_home_ui_auth0_validation_error",iN="interopio_home_ui_user",aN="interopio_home_ui_platform_window",Rs="interopio_home_ui_platform_setup";var Gt=function(e){return{ok:!0,result:e}},Tt=function(e){return{ok:!1,error:e}},sN=function(e){return e.ok===!0?Promise.resolve(e.result):Promise.reject(e.error)},cN=function(e,t){return t.ok===!0?t.result:e},lN=function(e){if(e.ok===!0)return e.result;throw e.error},uN=function(e,t){return t.ok===!0?Gt(e(t.result)):t},q0=function(e,t,n){return t.ok===!1?t:n.ok===!1?n:Gt(e(t.result,n.result))},id=function(e,t){return t.ok===!0?t:Tt(e(t.error))},dN=function(e,t){return t.ok===!0?e(t.result):t};/*! *****************************************************************************
44
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=r(i,o(s)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(OC);var Jj=OC.exports;const jo=NC(Jj),Yj=e=>{const{active:t,className:n,...o}=e;return d.jsx(Ue,{className:jo("launchpad-button",{active:t},n),"aria-label":"Launchpad",icon:"logo",variant:"circle",size:"32",title:t?"Close Launchpad":"Open Launchpad","data-testid":"launchpad-button",...o})},TC=v.createContext(void 0),RC=()=>{const e=v.useContext(TC);if(e===void 0)throw new Error("useWorkspaceComponentsContext must be used within an WorkspaceComponentsContextProvider");return e},jr={WINDOW_MANAGEMENT:"window-management",NOTIFICATIONS:"notifications"},jh="getScreenDetails"in window,Kj=()=>{const e=jh?[jr.NOTIFICATIONS,jr.WINDOW_MANAGEMENT]:[jr.NOTIFICATIONS];return Promise.all(e.map(async t=>{const n=await navigator.permissions.query({name:t});return n.stableName=t,n}))},qj=e=>{v.useEffect(()=>{var n;if(!((n=window.iobrowser)!=null&&n.platformStarted)||e)return;const t=o=>{o.preventDefault(),o.returnValue=!0};return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)},[e])},Qj=()=>{const[e,t]=v.useState(!1),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;let o;return(async()=>{var r;try{o=await((r=n.workspaces)==null?void 0:r.onWorkspaceOpened(()=>t(!0)))}catch(i){console.error(i)}})(),()=>o==null?void 0:o()},[n]),e};var Hp={exports:{}};(function(e,t){(function(n,o){var r="1.0.41",i="",a="?",s="function",c="undefined",l="object",u="string",p="major",f="model",h="name",m="type",g="vendor",y="version",x="architecture",C="console",w="mobile",I="tablet",b="smarttv",k="wearable",S="embedded",E=500,N="Amazon",A="Apple",P="ASUS",j="BlackBerry",G="Browser",M="Chrome",T="Edge",H="Firefox",V="Google",z="Honor",O="Huawei",B="Lenovo",F="LG",$="Microsoft",Z="Motorola",_="Nvidia",R="OnePlus",L="Opera",D="OPPO",K="Samsung",J="Sharp",Y="Sony",ee="Xiaomi",X="Zebra",ae="Facebook",ce="Chromium OS",me="Mac OS",be=" Browser",Le=function(le,ye){var re={};for(var ie in le)ye[ie]&&ye[ie].length%2===0?re[ie]=ye[ie].concat(le[ie]):re[ie]=le[ie];return re},q=function(le){for(var ye={},re=0;re<le.length;re++)ye[le[re].toUpperCase()]=le[re];return ye},oe=function(le,ye){return typeof le===u?se(ye).indexOf(se(le))!==-1:!1},se=function(le){return le.toLowerCase()},we=function(le){return typeof le===u?le.replace(/[^\d\.]/g,i).split(".")[0]:o},Oe=function(le,ye){if(typeof le===u)return le=le.replace(/^\s\s*/,i),typeof ye===c?le:le.substring(0,E)},de=function(le,ye){for(var re=0,ie,Me,ge,ne,Q,ue;re<ye.length&&!Q;){var Ce=ye[re],$e=ye[re+1];for(ie=Me=0;ie<Ce.length&&!Q&&Ce[ie];)if(Q=Ce[ie++].exec(le),Q)for(ge=0;ge<$e.length;ge++)ue=Q[++Me],ne=$e[ge],typeof ne===l&&ne.length>0?ne.length===2?typeof ne[1]==s?this[ne[0]]=ne[1].call(this,ue):this[ne[0]]=ne[1]:ne.length===3?typeof ne[1]===s&&!(ne[1].exec&&ne[1].test)?this[ne[0]]=ue?ne[1].call(this,ue,ne[2]):o:this[ne[0]]=ue?ue.replace(ne[1],ne[2]):o:ne.length===4&&(this[ne[0]]=ue?ne[3].call(this,ue.replace(ne[1],ne[2])):o):this[ne]=ue||o;re+=2}},Ve=function(le,ye){for(var re in ye)if(typeof ye[re]===l&&ye[re].length>0){for(var ie=0;ie<ye[re].length;ie++)if(oe(ye[re][ie],le))return re===a?o:re}else if(oe(ye[re],le))return re===a?o:re;return ye.hasOwnProperty("*")?ye["*"]:le},it={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},dt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Te={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[h,L+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[h,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+G]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[h,"Smart Lenovo "+G]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+G],y],[/\bfocus\/([\w\.]+)/i],[y,[h,H+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI"+be]],[/fxios\/([\w\.-]+)/i],[y,[h,H]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+be],y],[/samsungbrowser\/([\w\.]+)/i],[y,[h,K+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,y],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,ae],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,M+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+G]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ve,it]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,H+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[h,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[x,/ower/,i,se]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[x,se]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,K],[m,I]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,K],[m,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,A],[m,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,A],[m,I]],[/(macintosh);/i],[f,[g,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,J],[m,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[f,[g,z],[m,I]],[/honor([-\w ]+)[;\)]/i],[f,[g,z],[m,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[f,[g,O],[m,I]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,O],[m,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[f,/_/g," "],[g,ee],[m,I]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[f,/_/g," "],[g,ee],[m,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,D],[m,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[f,[g,Ve,{OnePlus:["304","403","203"],"*":D}],[m,I]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[m,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[m,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,Z],[m,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,Z],[m,I]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,F],[m,I]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,F],[m,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[f,[g,B],[m,I]],[/(nokia) (t[12][01])/i],[g,f,[m,I]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[f,/_/g," "],[m,w],[g,"Nokia"]],[/(pixel (c|tablet))\b/i],[f,[g,V],[m,I]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,V],[m,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,Y],[m,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,Y],[m,I]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,R],[m,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,N],[m,I]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,N],[m,w]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[m,I]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,j],[m,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,P],[m,I]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,P],[m,w]],[/(nexus 9)/i],[f,[g,"HTC"],[m,I]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[m,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[g,"TCL"],[m,I]],[/(itel) ((\w+))/i],[[g,se],f,[m,Ve,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[m,I]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[m,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[g,"Ulefone"],[m,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[g,"Energizer"],[m,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[g,"Cat"],[m,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[g,"Smartfren"],[m,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[g,"Nothing"],[m,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[f,[g,"Archos"],[m,I]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[f,[g,"Archos"],[m,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[g,f,[m,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[m,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[m,I]],[/(surface duo)/i],[f,[g,$],[m,I]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[m,w]],[/(u304aa)/i],[f,[g,"AT&T"],[m,w]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[m,w]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[m,I]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[m,I]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[m,I]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[m,I]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[m,I]],[/\b(k88) b/i],[f,[g,"ZTE"],[m,I]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[m,w]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[m,w]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[m,I]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[m,I]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[m,I]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[m,I]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[m,I]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[m,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[m,w]],[/\b(ph-1) /i],[f,[g,"Essential"],[m,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[m,I]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[m,I]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[m,I]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[f,[g,_],[m,I]],[/(sprint) (\w+)/i],[g,f,[m,w]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,$],[m,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,X],[m,I]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,X],[m,w]],[/smart-tv.+(samsung)/i],[g,[m,b]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,K],[m,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,F],[m,b]],[/(apple) ?tv/i],[g,[f,A+" TV"],[m,b]],[/crkey/i],[[f,M+"cast"],[g,V],[m,b]],[/droid.+aft(\w+)( bui|\))/i],[f,[g,N],[m,b]],[/(shield \w+ tv)/i],[f,[g,_],[m,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,J],[m,b]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,Y],[m,b]],[/(mi(tv|box)-?\w+) bui/i],[f,[g,ee],[m,b]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[m,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,Oe],[f,Oe],[m,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[f,[m,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[m,C]],[/droid.+; (shield)( bui|\))/i],[f,[g,_],[m,C]],[/(playstation \w+)/i],[f,[g,Y],[m,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,$],[m,C]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[f,[g,K],[m,k]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[g,f,[m,k]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[f,[g,D],[m,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,A],[m,k]],[/(opwwe\d{3})/i],[f,[g,R],[m,k]],[/(moto 360)/i],[f,[g,Z],[m,k]],[/(smartwatch 3)/i],[f,[g,Y],[m,k]],[/(g watch r)/i],[f,[g,F],[m,k]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,X],[m,k]],[/droid.+; (glass) \d/i],[f,[g,V],[m,k]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,f,[m,k]],[/; (quest( \d| pro)?)/i],[f,[g,ae],[m,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[m,S]],[/(aeobc)\b/i],[f,[g,N],[m,S]],[/(homepod).+mac os/i],[f,[g,A],[m,S]],[/windows iot/i],[[m,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,I]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,I]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,T+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/ladybird\//i],[[h,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[h,[y,Ve,dt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,Ve,dt],[h,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,me],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(ubuntu) ([\w\.]+) like android/i],[[h,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[h,y],[/\(bb(10);/i],[y,[h,j]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,H+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,ce],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Pe=function(le,ye){if(typeof le===l&&(ye=le,le=o),!(this instanceof Pe))return new Pe(le,ye).getResult();var re=typeof n!==c&&n.navigator?n.navigator:o,ie=le||(re&&re.userAgent?re.userAgent:i),Me=re&&re.userAgentData?re.userAgentData:o,ge=ye?Le(Te,ye):Te,ne=re&&re.userAgent==ie;return this.getBrowser=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.browser),Q[p]=we(Q[y]),ne&&re&&re.brave&&typeof re.brave.isBrave==s&&(Q[h]="Brave"),Q},this.getCPU=function(){var Q={};return Q[x]=o,de.call(Q,ie,ge.cpu),Q},this.getDevice=function(){var Q={};return Q[g]=o,Q[f]=o,Q[m]=o,de.call(Q,ie,ge.device),ne&&!Q[m]&&Me&&Me.mobile&&(Q[m]=w),ne&&Q[f]=="Macintosh"&&re&&typeof re.standalone!==c&&re.maxTouchPoints&&re.maxTouchPoints>2&&(Q[f]="iPad",Q[m]=I),Q},this.getEngine=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.engine),Q},this.getOS=function(){var Q={};return Q[h]=o,Q[y]=o,de.call(Q,ie,ge.os),ne&&!Q[h]&&Me&&Me.platform&&Me.platform!="Unknown"&&(Q[h]=Me.platform.replace(/chrome os/i,ce).replace(/macos/i,me)),Q},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ie},this.setUA=function(Q){return ie=typeof Q===u&&Q.length>E?Oe(Q,E):Q,this},this.setUA(ie),this};Pe.VERSION=r,Pe.BROWSER=q([h,y,p]),Pe.CPU=q([x]),Pe.DEVICE=q([f,g,m,C,w,b,I,k,S]),Pe.ENGINE=Pe.OS=q([h,y]),e.exports&&(t=e.exports=Pe),t.UAParser=Pe;var Be=typeof n!==c&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var He=new Pe;Be.ua=He.getResult(),Be.ua.get=function(){return He.getUA()},Be.ua.set=function(le){He.setUA(le);var ye=He.getResult();for(var re in ye)Be.ua[re]=ye[re]}}})(typeof window=="object"?window:Uj)})(Hp,Hp.exports);var eP=Hp.exports;const qr=new eP.UAParser,tP=()=>W.useMemo(()=>({os:qr.getOS(),browser:qr.getBrowser(),cpu:qr.getCPU(),device:qr.getDevice(),engine:qr.getEngine(),ua:qr.getUA()}),[]),nP=()=>W.useMemo(()=>qr.getBrowser(),[]),Ph=()=>{const{ua:e}=tP();return e.includes("io-connect-desktop")},LC=()=>{const[e,t]=v.useState([]),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.notifications.onRaised(a=>t(s=>[...s,a])),r=n.notifications.onClosed(a=>t(s=>s.filter(c=>c.id!==a.id))),i=n.notifications.onStateChanged(({id:a},s)=>{t(c=>{const l=c.findIndex(u=>u.id===a);return l===-1?c:[...c.slice(0,l),{...c[l],state:s},...c.slice(l+1)]})});return n.notifications.list().then(t).catch(console.error),()=>{o(),r(),i()}},[n]),e},oP=()=>{const[e,t]=v.useState({}),n=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{if(!n)return;const o=n.notifications.onConfigurationChanged(r=>t(r));return()=>{o()}},[n]),e},rP="interopio_home_ui_auth0_validation_error",iP="interopio_home_ui_user",aP="interopio_home_ui_platform_window",Rs="interopio_home_ui_platform_setup";var Gt=function(e){return{ok:!0,result:e}},Tt=function(e){return{ok:!1,error:e}},sP=function(e){return e.ok===!0?Promise.resolve(e.result):Promise.reject(e.error)},cP=function(e,t){return t.ok===!0?t.result:e},lP=function(e){if(e.ok===!0)return e.result;throw e.error},uP=function(e,t){return t.ok===!0?Gt(e(t.result)):t},Q0=function(e,t,n){return t.ok===!1?t:n.ok===!1?n:Gt(e(t.result,n.result))},id=function(e,t){return t.ok===!0?t:Tt(e(t.error))},dP=function(e,t){return t.ok===!0?e(t.result):t};/*! *****************************************************************************
45
45
  Copyright (c) Microsoft Corporation.
46
46
 
47
47
  Permission to use, copy, modify, and/or distribute this software for any
@@ -54,36 +54,36 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
54
54
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
55
55
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
56
56
  PERFORMANCE OF THIS SOFTWARE.
57
- ***************************************************************************** */var Hp=function(){return Hp=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Hp.apply(this,arguments)};function pN(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Gp(e,t){if(e===t||e===null&&t===null)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="object"){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gp(e[n],t[n]))return!1;return!0}var o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(var n=0;n<o.length;n++)if(!t.hasOwnProperty(o[n])||!Gp(e[o[n]],t[o[n]]))return!1;return!0}}var Ba=function(e){return Array.isArray(e)},lc=function(e){return typeof e=="object"&&e!==null&&!Ba(e)},fN=function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}},Oo=function(e,t){return"expected "+e+", got "+fN(t)},ka=function(e){return e.map(function(t){return typeof t=="string"?"."+t:"["+t+"]"}).join("")},Sa=function(e,t){var n=t.at,o=pN(t,["at"]);return Hp({at:e+(n||"")},o)},Bt=function(){function e(t){var n=this;this.decode=t,this.run=function(o){return id(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},n.decode(o))},this.runPromise=function(o){return sN(n.run(o))},this.runWithException=function(o){return lN(n.run(o))},this.map=function(o){return new e(function(r){return uN(o,n.decode(r))})},this.andThen=function(o){return new e(function(r){return dN(function(i){return o(i).decode(r)},n.decode(r))})},this.where=function(o,r){return n.andThen(function(i){return o(i)?e.succeed(i):e.fail(r)})}}return e.string=function(){return new e(function(t){return typeof t=="string"?Gt(t):Tt({message:Oo("a string",t)})})},e.number=function(){return new e(function(t){return typeof t=="number"?Gt(t):Tt({message:Oo("a number",t)})})},e.boolean=function(){return new e(function(t){return typeof t=="boolean"?Gt(t):Tt({message:Oo("a boolean",t)})})},e.constant=function(t){return new e(function(n){return Gp(n,t)?Gt(t):Tt({message:"expected "+JSON.stringify(t)+", got "+JSON.stringify(n)})})},e.object=function(t){return new e(function(n){if(lc(n)&&t){var o={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r].decode(n[r]);if(i.ok===!0)i.result!==void 0&&(o[r]=i.result);else return n[r]===void 0?Tt({message:"the key '"+r+"' is required but was not present"}):Tt(Sa("."+r,i.error))}return Gt(o)}else return lc(n)?Gt(n):Tt({message:Oo("an object",n)})})},e.array=function(t){return new e(function(n){if(Ba(n)&&t){var o=function(r,i){return id(function(a){return Sa("["+i+"]",a)},t.decode(r))};return n.reduce(function(r,i,a){return q0(function(s,c){return s.concat([c])},r,o(i,a))},Gt([]))}else return Ba(n)?Gt(n):Tt({message:Oo("an array",n)})})},e.tuple=function(t){return new e(function(n){if(Ba(n)){if(n.length!==t.length)return Tt({message:"expected a tuple of length "+t.length+", got one of length "+n.length});for(var o=[],r=0;r<t.length;r++){var i=t[r].decode(n[r]);if(i.ok)o[r]=i.result;else return Tt(Sa("["+r+"]",i.error))}return Gt(o)}else return Tt({message:Oo("a tuple of length "+t.length,n)})})},e.union=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return e.oneOf.apply(e,[t,n].concat(o))},e.intersection=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new e(function(i){return[t,n].concat(o).reduce(function(a,s){return q0(Object.assign,a,s.decode(i))},Gt({}))})},e.anyJson=function(){return new e(function(t){return Gt(t)})},e.unknownJson=function(){return new e(function(t){return Gt(t)})},e.dict=function(t){return new e(function(n){if(lc(n)){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=t.decode(n[r]);if(i.ok===!0)o[r]=i.result;else return Tt(Sa("."+r,i.error))}return Gt(o)}else return Tt({message:Oo("an object",n)})})},e.optional=function(t){return new e(function(n){return n==null?Gt(void 0):t.decode(n)})},e.oneOf=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(function(o){for(var r=[],i=0;i<t.length;i++){var a=t[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(c){return"at error"+(c.at||"")+": "+c.message}).join('", "');return Tt({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},e.withDefault=function(t,n){return new e(function(o){return Gt(cN(t,n.decode(o)))})},e.valueAt=function(t,n){return new e(function(o){for(var r=o,i=0;i<t.length;i++){if(r===void 0)return Tt({at:ka(t.slice(0,i+1)),message:"path does not exist"});if(typeof t[i]=="string"&&!lc(r))return Tt({at:ka(t.slice(0,i+1)),message:Oo("an object",r)});if(typeof t[i]=="number"&&!Ba(r))return Tt({at:ka(t.slice(0,i+1)),message:Oo("an array",r)});r=r[t[i]]}return id(function(a){return r===void 0?{at:ka(t),message:"path does not exist"}:Sa(ka(t),a)},n.decode(r))})},e.succeed=function(t){return new e(function(n){return Gt(t)})},e.fail=function(t){return new e(function(n){return Tt({message:t})})},e.lazy=function(t){return new e(function(n){return t().decode(n)})},e}(),hN=Bt.string,mN=Bt.number,ls=Bt.boolean,rn=Bt.anyJson;Bt.unknownJson;var Rr=Bt.constant,It=Bt.object,gN=Bt.array;Bt.tuple;Bt.dict;var Ge=Bt.optional,us=Bt.oneOf;Bt.union;Bt.intersection;Bt.withDefault;Bt.valueAt;Bt.succeed;var vN=Bt.fail;Bt.lazy;const xn=hN().where(e=>e.length>0,"Expected a non-empty string"),yN=mN().where(e=>e>=0,"Expected a non-negative number"),Nn=(e,t)=>{const n=typeof e;return n==="function"?rn():vN(`The provided argument as ${t} should be of type function, provided: ${typeof n}`)},bN=It({name:xn}),Ls=It({isCompleted:ls()}),wN=Dt.useStorage,Nh=()=>{const[e,t]=wN("sessionStorage",aN,bN);return{isPlatformWindow:!e||window.name===e.name,setPlatformWindow:t}},xN=Dt.useIsLaunchpadPinned,MC=Dt.useOnIframeFocus,DC=Dt.useOnOutsideClick,CN=Dt.usePressedKeys,mi=Dt.useStorage,BC=v.createContext(void 0),Dr=()=>{const e=v.useContext(BC);if(e===void 0)throw new Error("useIOConnectHome must be used within an IOConnectHomeProvider");return e},IN=({children:e})=>{const[t,n]=mi("localStorage",Rs,Ls),[o,r]=v.useState([]),i=v.useMemo(()=>o.reduce((p,f)=>({...p,[f.stableName]:{state:f.state}}),{}),[o]),a={isLoading:o.length===0,statuses:i},[s,c]=v.useState(!1),l={isLoggingOut:s,setIsLoggingOut:c};v.useEffect(()=>{let p=!1;const f=Kj().then(h=>{if(p)return;r(h);const m=[];let g=!1;return h.forEach((y,x)=>{const C=w=>{if(p||!w.target||g)return;const I=w.target;if(I.state==="prompt")return n({isCompleted:!1}),g=!0,window.location.reload();r(k=>[...k.slice(0,x),I,...k.slice(x+1)])};y.addEventListener("change",C),m.push(()=>y.removeEventListener("change",C))}),m}).catch(console.warn);return()=>{p=!0,f.then(h=>{h==null||h.forEach(m=>m())})}},[n]);const u=v.useMemo(()=>({permission:a,login:l}),[a,l]);return d.jsx(BC.Provider,{value:u,children:e})},kN=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,fill:"#3C3E3F",rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),d.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,stroke:"#4B4E4F",strokeMiterlimit:10,rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),d.jsx("path",{fill:"#36A86B",d:"M125.31 100.086c-1.656 0-3-1.41-3-3.149 0-1.74 1.344-3.15 3-3.15 1.657 0 3 1.41 3 3.15s-1.343 3.149-3 3.149Z"}),d.jsx("rect",{width:21.694,height:6.057,fill:"#AAB0B0",rx:3.028,transform:"matrix(1 0 0 -1 132.72 99.844)"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("rect",{width:64,height:64,x:53,y:24,fill:"#36AA6C",rx:32}),d.jsx("path",{fill:"#fff",d:"M84.068 42.02c0-.466.408-.932.932-.932.466 0 .932.466.932.932v.99c4.66.467 8.388 4.428 8.388 9.262v1.748a9.57 9.57 0 0 0 2.796 6.756l.174.175c.466.466.758 1.165.758 1.806a2.61 2.61 0 0 1-2.621 2.621H74.514c-1.456-.058-2.563-1.165-2.563-2.621 0-.7.233-1.34.758-1.806l.116-.175c1.806-1.805 2.854-4.252 2.854-6.757v-1.747a9.3 9.3 0 0 1 8.388-9.261v-.99ZM85 44.816c-4.136 0-7.456 3.379-7.456 7.456v1.748c0 3.028-1.223 5.94-3.378 8.096l-.175.117a.94.94 0 0 0-.175.524c0 .408.291.699.7.699h20.91c.408 0 .758-.291.758-.7 0-.174-.117-.349-.233-.523l-.175-.117a11.502 11.502 0 0 1-3.378-8.155v-1.689c0-4.077-3.32-7.456-7.456-7.456H85Zm-1.806 23.008c.291.758.99 1.224 1.806 1.224.757 0 1.456-.466 1.747-1.224.175-.466.7-.757 1.165-.582a.976.976 0 0 1 .583 1.223A3.717 3.717 0 0 1 85 70.912c-1.631 0-3.029-.99-3.553-2.447a.976.976 0 0 1 .582-1.223c.466-.175.99.116 1.165.582Z"}),d.jsx("path",{fill:"#36A86B",d:"M113.791 86.146c-1.922 0-3.48-1.62-3.48-3.62 0-1.999 1.558-3.62 3.48-3.62s3.481 1.621 3.481 3.62c0 2-1.559 3.62-3.481 3.62Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),SN=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v94H0z",transform:"translate(0 20)"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:113,x:.5,y:20.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#3C3E3F",stroke:"#5D5D5D",strokeMiterlimit:10,d:"M22.338.5h125.324c2.746 0 4.941 2.144 4.941 4.75v76.938c0 2.608-2.195 4.751-4.941 4.751H22.338c-2.746 0-4.94-2.143-4.94-4.75V5.25c0-2.607 2.194-4.751 4.94-4.751Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M116.905 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533ZM127.206 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M137.505 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),d.jsx("circle",{cx:46.208,cy:58.882,r:20.294,fill:"#36AA6C"}),d.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M45.501 53.17a1 1 0 0 1 1.414 0l6.364 6.363a1 1 0 0 1-1.414 1.415l-4.657-4.657v48.23a1 1 0 0 1-2 0v-48.23l-4.657 4.657a1 1 0 0 1-1.414-1.415l6.364-6.364Z",clipRule:"evenodd"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:114,y:20,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:50.521,y1:5.735,y2:95.406,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),AN=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeLinejoin:"round",strokeMiterlimit:10,d:"M27.449 103.584a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.495 1.495 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5V88.6h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V66.37h.5V64.35h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V42.12h.5V40.1h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5V19.89h-.5V17.87h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5V40.1h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5V88.6h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M128 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"M143.015 89.758a6.667 6.667 0 0 0 5.823-3.379c1.237-2.082 1.237-4.646 0-6.758-1.207-2.082-3.409-3.38-5.823-3.38a6.742 6.742 0 0 0-5.853 3.38c-1.237 2.112-1.237 4.676 0 6.758 1.207 2.112 3.409 3.38 5.853 3.38Zm0-14.482c2.746 0 5.28 1.479 6.668 3.862 1.388 2.414 1.388 5.34 0 7.724a7.666 7.666 0 0 1-6.668 3.862 7.678 7.678 0 0 1-6.698-3.862c-1.388-2.384-1.388-5.31 0-7.724a7.741 7.741 0 0 1 6.698-3.862Zm.724 2.897a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-1.689 7.723c0 .543.422.966.965.966a.973.973 0 0 0 .966-.966.993.993 0 0 0-.966-.965.972.972 0 0 0-.965.965Zm-.966 0c0-1.056.845-1.93 1.931-1.93.513 0 .996.21 1.328.573l3.228-1.931a.478.478 0 0 1 .664.15c.15.242.06.544-.151.664l-3.228 1.931c.06.181.09.362.09.543 0 1.087-.875 1.931-1.931 1.931a1.906 1.906 0 0 1-1.931-1.93Zm6.034-6.275a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-8.93 2.655c.392 0 .724.332.724.724a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.301-.724.724-.724Zm2.172-2.655a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M12 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"M27.351 76.62a.804.804 0 0 0-.73 0L21.45 78.81c-.322.117-.556.438-.526.789 0 2.746 1.139 7.596 5.697 9.787a.804.804 0 0 0 .73 0c4.558-2.19 5.697-7.04 5.727-9.787a.855.855 0 0 0-.556-.789l-5.17-2.191Zm-1.08-.877a1.816 1.816 0 0 1 1.46 0l5.142 2.192c.643.292 1.14.905 1.14 1.665-.03 2.922-1.228 8.21-6.253 10.635a1.798 1.798 0 0 1-1.548 0c-5.026-2.425-6.223-7.713-6.223-10.635-.03-.76.467-1.373 1.11-1.665l5.171-2.192Z"}),d.jsx("rect",{width:30,height:30,fill:"#5A5C5C",rx:15,transform:"matrix(1 0 0 -1 12 45.46)"}),d.jsx("path",{fill:"#DDD",d:"M18.653 23.886c.132-.184.422-.237.58-.079l16.033 12.657a.394.394 0 0 1 .08.58c-.133.185-.396.212-.58.08L18.732 24.466a.42.42 0 0 1-.08-.58Zm10.416 6.065-1.45-1.16a7.74 7.74 0 0 1 4.746 2.189c.159.184.159.448 0 .606a.447.447 0 0 1-.606 0 6.555 6.555 0 0 0-2.69-1.635Zm-5.01.343a6.346 6.346 0 0 0-1.82 1.292.447.447 0 0 1-.606 0 .414.414 0 0 1 0-.58 7.975 7.975 0 0 1 1.688-1.292l.738.58Zm-.184-4.43-.791-.633a11.395 11.395 0 0 1 3.928-.686c3.218 0 6.17 1.319 8.307 3.428.158.159.158.422 0 .607-.158.158-.422.158-.607 0a10.84 10.84 0 0 0-7.7-3.19c-1.107 0-2.135.157-3.137.474ZM19.84 26.97l.686.528c-.449.343-.844.685-1.24 1.08a.447.447 0 0 1-.606 0c-.159-.184-.159-.447 0-.606.369-.369.765-.685 1.16-1.002Zm5.801 8.702a1.699 1.699 0 0 1-.21-1.687c.263-.554.79-.95 1.397-1.002a1.662 1.662 0 0 1 1.53.712c.369.5.448 1.134.21 1.687-.263.554-.79.95-1.397 1.002a1.662 1.662 0 0 1-1.53-.712Zm2.215-1.002a.868.868 0 0 0-.844-.843.85.85 0 0 0-.843.843c0 .475.369.844.843.844a.85.85 0 0 0 .844-.844Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M128 30c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"m142.001 23.885-.424 1.457c-.091.364-.364.637-.668.789-.243.121-.455.242-.667.364a1.232 1.232 0 0 1-1.032.212l-1.456-.364h-.122a3.276 3.276 0 0 0-.455.668l-.152.212a7.838 7.838 0 0 0-.333.728c0 .03.03.091.06.122l1.062 1.061c.243.273.364.668.334 1.002v.758c.03.334-.091.698-.334.971l-1.062 1.092a.231.231 0 0 0-.06.122c.091.242.212.485.333.728l.122.212c.152.213.303.456.455.668h.152l1.456-.364c.364-.091.759 0 1.032.182.212.151.424.273.667.394.304.152.577.425.668.79l.424 1.456c0 .03.031.06.061.09.304.061.607.061.941.061.303 0 .607 0 .91-.06.03-.03.061-.061.061-.091l.424-1.457c.091-.364.364-.637.668-.789a4.79 4.79 0 0 0 .667-.394c.304-.182.668-.273 1.032-.182l1.456.364h.152c.152-.212.304-.455.455-.668l.122-.212c.121-.243.242-.486.333-.728 0-.03-.03-.091-.06-.122l-1.062-1.092a1.316 1.316 0 0 1-.334-.97c0-.122.03-.244.03-.395 0-.122-.03-.243-.03-.364-.03-.334.091-.729.334-1.002l1.062-1.061c.03-.03.06-.092.06-.122a7.838 7.838 0 0 0-.333-.728l-.122-.212a12.155 12.155 0 0 0-.455-.668h-.152l-1.456.364c-.364.091-.728 0-1.032-.182a4.789 4.789 0 0 0-.667-.394c-.304-.152-.577-.425-.668-.79l-.424-1.456a.233.233 0 0 0-.061-.121 9.146 9.146 0 0 0-.91-.06c-.334 0-.637.03-.941.06a.233.233 0 0 0-.061.121Zm1.002-1.153c.394 0 .758.03 1.153.091.06.03.091.03.151.061.273.152.516.425.607.728l.425 1.457c0 .06.061.151.152.182.273.121.546.273.789.455.091.06.182.09.242.06l1.487-.364c.303-.09.668-.03.941.152l.121.122c.212.242.394.546.576.849l.152.212v.03c.152.304.304.608.425.911.03.06.03.091.03.152.031.334-.091.667-.333.91l-1.062 1.092c-.031.03-.061.122-.061.213 0 .151.03.303.03.455 0 .151-.03.303-.03.455 0 .121.03.212.061.243l1.062 1.092c.242.243.364.576.333.91 0 .03 0 .091-.03.152-.121.303-.273.607-.425.91l-.152.243a5.476 5.476 0 0 1-.606.85c-.031.06-.061.09-.091.12a1.206 1.206 0 0 1-.971.152l-1.457-.364c-.06-.03-.151 0-.242.061-.243.152-.516.303-.789.455-.091.03-.152.121-.152.182l-.425 1.426a1.277 1.277 0 0 1-.607.759c-.06.03-.091.03-.151.06-.395.03-.759.061-1.153.061-.395 0-.789-.03-1.184-.06-.06-.03-.091-.03-.151-.061a1.277 1.277 0 0 1-.607-.759l-.425-1.426c0-.06-.061-.151-.152-.182a4.11 4.11 0 0 1-.789-.455c-.091-.06-.182-.06-.242-.06l-1.457.363c-.333.091-.667.03-.94-.151-.061-.03-.091-.06-.122-.091-.242-.273-.424-.577-.606-.88l-.122-.213-.03-.03a11.98 11.98 0 0 1-.425-.91c0-.06-.03-.091-.03-.152 0-.334.091-.667.334-.91l1.061-1.092c.031-.03.061-.122.061-.243v-.91c0-.091-.03-.182-.061-.213l-1.061-1.092c-.243-.243-.334-.576-.334-.91 0-.061.03-.091.03-.152.121-.303.273-.607.425-.91l.03-.03.122-.213a6.09 6.09 0 0 1 .606-.85.24.24 0 0 1 .122-.12c.273-.183.607-.244.94-.153l1.457.364c.06.03.151 0 .242-.06.243-.152.516-.334.789-.455.091-.03.152-.122.152-.182l.425-1.457c.091-.303.334-.576.607-.728.06-.03.091-.03.151-.06.395-.061.789-.092 1.184-.092Zm-1.699 7.768c0 .637.303 1.183.849 1.486.516.304 1.153.304 1.699 0 .516-.303.85-.85.85-1.486 0-.607-.334-1.153-.85-1.457-.546-.303-1.183-.303-1.699 0-.546.304-.849.85-.849 1.457Zm4.369 0c0 .97-.516 1.85-1.335 2.336a2.781 2.781 0 0 1-2.67 0c-.85-.485-1.335-1.365-1.335-2.336 0-.94.485-1.82 1.335-2.306a2.781 2.781 0 0 1 2.67 0 2.702 2.702 0 0 1 1.335 2.306Z"}),d.jsx("circle",{cx:85,cy:57.277,r:32,fill:"#36AA6C"}),d.jsx("path",{fill:"#fff",d:"M72.313 42.777h9.968v1.812h-9.969c-1.019 0-1.812.85-1.812 1.813v16.312a1.79 1.79 0 0 0 1.813 1.813h25.374c.963 0 1.813-.793 1.813-1.813V46.402c0-.963-.85-1.813-1.813-1.813H87.72v-1.812h9.969c1.982 0 3.624 1.642 3.624 3.625v16.312a3.613 3.613 0 0 1-3.624 3.625H89.19l.623 3.625h3.342c.453 0 .906.453.906.907 0 .51-.453.906-.906.906H76.844a.895.895 0 0 1-.906-.906c0-.454.396-.907.906-.907h3.285l.623-3.625h-8.44c-2.039 0-3.624-1.586-3.624-3.625V46.402a3.614 3.614 0 0 1 3.624-3.625Zm10.251 23.562-.623 3.625h6.061l-.623-3.625h-4.815Zm3.342-22.656v12.348l2.946-3.002c.34-.34.962-.34 1.302 0 .34.34.34.963 0 1.302l-4.531 4.532c-.34.34-.963.34-1.303 0l-4.53-4.532c-.34-.34-.34-.962 0-1.302.339-.34.962-.34 1.302 0l3.002 3.002V43.683c0-.453.396-.906.906-.906.453 0 .906.453.906.906Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),EN=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeMiterlimit:10,d:"M27.449 103.138a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.493 1.493 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.022h-.5v-2.02h.5V80.07h-.5V78.05h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V57.84h.5v-2.02h-.5V53.8h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V33.59h.5V31.57h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5V53.8h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.029v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#36AA6C",d:"M114.756 28.708H55.244c-1.427 0-2.584 1.512-2.584 3.377v49.491c0 1.866 1.157 3.378 2.584 3.378h59.512c1.427 0 2.584-1.512 2.584-3.378v-49.49c0-1.866-1.157-3.378-2.584-3.378Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M98.8 37.185a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM104.076 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M109.351 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 18.367H43.32c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H10.803c-.193 0-.41-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.13-.808.317-1.06.186-.254.402-.36.595-.36Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M26.192 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM31.468 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M36.743 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 18.367h32.517c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H126.63c-.193 0-.409-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.131-.808.317-1.06.186-.254.402-.36.595-.36Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M142.019 26.344a1.416 1.416 0 1 0 0-2.832 1.416 1.416 0 0 0 0 2.832ZM147.294 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M152.569 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 63.694H43.32c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H10.803c-.193 0-.41-.106-.595-.359-.186-.253-.317-.626-.317-1.06V65.113c0-.435.13-.808.317-1.061.186-.253.402-.358.595-.358Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M27.192 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM32.468 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M37.743 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 63.694h32.517c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H126.63c-.193 0-.409-.106-.595-.359s-.317-.626-.317-1.06V65.113c0-.435.131-.808.317-1.061.186-.253.402-.358.595-.358Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M143.019 71.672a1.416 1.416 0 1 0 0-2.833 1.416 1.416 0 0 0 0 2.833ZM148.294 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M153.569 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#fff",d:"M49.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),d.jsx("path",{fill:"#fff",d:"M44.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),d.jsx("path",{fill:"#fff",d:"M44.482 40.488h-5.836a.486.486 0 1 1 0-.973h5.836a.486.486 0 1 1 0 .973ZM60.597 40.004l-3.255-3.255a.486.486 0 1 1 .688-.688l3.6 3.6c.19.19.19.497 0 .687l-3.594 3.593a.486.486 0 1 1-.688-.688l3.25-3.249Z"}),d.jsx("path",{fill:"#3BB272",d:"M32.147 36.709a3.375 3.375 0 1 1 0 6.75 3.375 3.375 0 0 1 0-6.75Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 65.808v-5.836a.487.487 0 0 0-.973 0v5.836a.486.486 0 1 0 .973 0Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 70.808v-5.836a.487.487 0 0 0-.973 0v5.837a.486.486 0 1 0 .973 0Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 70.644v5.836a.487.487 0 0 1-.973 0v-5.836a.486.486 0 1 1 .973 0ZM133.578 54.529l-3.255 3.255a.487.487 0 0 1-.688-.688l3.599-3.599c.19-.19.498-.19.688 0l3.593 3.593a.486.486 0 1 1-.688.688l-3.249-3.249Z"}),d.jsx("path",{fill:"#AAB0B0",d:"M130.282 82.98a3.376 3.376 0 1 1 6.752 0 3.376 3.376 0 0 1-6.752 0Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),jN=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#DE2122",d:"M79.593 28.399c2.403-4.163 8.411-4.163 10.814 0l29.741 51.512c2.403 4.162-.601 9.366-5.407 9.366H55.259c-4.806 0-7.81-5.204-5.407-9.366l29.74-51.512Z"}),d.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M81.84 42.528h6.321a1 1 0 0 1 .994 1.113l-2.691 23.67a1 1 0 0 1-.994.887h-1.033a1 1 0 0 1-.994-.89l-2.596-23.671a1 1 0 0 1 .994-1.11Zm3.128 30.366a3.547 3.547 0 1 0 0 7.093 3.547 3.547 0 0 0 0-7.093Z",clipRule:"evenodd"}),d.jsx("path",{fill:"#5A5C5C",d:"M115.69 27.082 132.459.185l17.514-.151-25.545 24.389 17.858 23.176-25.076 13.678L131.267 47.6 115.69 27.082Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),NN={edgeNotificationsPermissionTimeout:15e3},Ct={WINDOW_MANAGEMENT:jr.WINDOW_MANAGEMENT,NOTIFICATIONS:jr.NOTIFICATIONS,POPUPS:"popups",PWA_INSTALL:"pwa-install"},PN={name:Ct.WINDOW_MANAGEMENT,label:`Allow window management${Eh?"":" (not available in your browser)"}`,heading:"Allow Window Management",description:`By granting this permission you will be able to load layouts containing multiple
57
+ ***************************************************************************** */var Gp=function(){return Gp=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Gp.apply(this,arguments)};function pP(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Wp(e,t){if(e===t||e===null&&t===null)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="object"){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Wp(e[n],t[n]))return!1;return!0}var o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(var n=0;n<o.length;n++)if(!t.hasOwnProperty(o[n])||!Wp(e[o[n]],t[o[n]]))return!1;return!0}}var Ba=function(e){return Array.isArray(e)},lc=function(e){return typeof e=="object"&&e!==null&&!Ba(e)},fP=function(e){switch(typeof e){case"string":return"a string";case"number":return"a number";case"boolean":return"a boolean";case"undefined":return"undefined";case"object":return e instanceof Array?"an array":e===null?"null":"an object";default:return JSON.stringify(e)}},Oo=function(e,t){return"expected "+e+", got "+fP(t)},ka=function(e){return e.map(function(t){return typeof t=="string"?"."+t:"["+t+"]"}).join("")},Sa=function(e,t){var n=t.at,o=pP(t,["at"]);return Gp({at:e+(n||"")},o)},Bt=function(){function e(t){var n=this;this.decode=t,this.run=function(o){return id(function(r){return{kind:"DecoderError",input:o,at:"input"+(r.at||""),message:r.message||""}},n.decode(o))},this.runPromise=function(o){return sP(n.run(o))},this.runWithException=function(o){return lP(n.run(o))},this.map=function(o){return new e(function(r){return uP(o,n.decode(r))})},this.andThen=function(o){return new e(function(r){return dP(function(i){return o(i).decode(r)},n.decode(r))})},this.where=function(o,r){return n.andThen(function(i){return o(i)?e.succeed(i):e.fail(r)})}}return e.string=function(){return new e(function(t){return typeof t=="string"?Gt(t):Tt({message:Oo("a string",t)})})},e.number=function(){return new e(function(t){return typeof t=="number"?Gt(t):Tt({message:Oo("a number",t)})})},e.boolean=function(){return new e(function(t){return typeof t=="boolean"?Gt(t):Tt({message:Oo("a boolean",t)})})},e.constant=function(t){return new e(function(n){return Wp(n,t)?Gt(t):Tt({message:"expected "+JSON.stringify(t)+", got "+JSON.stringify(n)})})},e.object=function(t){return new e(function(n){if(lc(n)&&t){var o={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r].decode(n[r]);if(i.ok===!0)i.result!==void 0&&(o[r]=i.result);else return n[r]===void 0?Tt({message:"the key '"+r+"' is required but was not present"}):Tt(Sa("."+r,i.error))}return Gt(o)}else return lc(n)?Gt(n):Tt({message:Oo("an object",n)})})},e.array=function(t){return new e(function(n){if(Ba(n)&&t){var o=function(r,i){return id(function(a){return Sa("["+i+"]",a)},t.decode(r))};return n.reduce(function(r,i,a){return Q0(function(s,c){return s.concat([c])},r,o(i,a))},Gt([]))}else return Ba(n)?Gt(n):Tt({message:Oo("an array",n)})})},e.tuple=function(t){return new e(function(n){if(Ba(n)){if(n.length!==t.length)return Tt({message:"expected a tuple of length "+t.length+", got one of length "+n.length});for(var o=[],r=0;r<t.length;r++){var i=t[r].decode(n[r]);if(i.ok)o[r]=i.result;else return Tt(Sa("["+r+"]",i.error))}return Gt(o)}else return Tt({message:Oo("a tuple of length "+t.length,n)})})},e.union=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return e.oneOf.apply(e,[t,n].concat(o))},e.intersection=function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return new e(function(i){return[t,n].concat(o).reduce(function(a,s){return Q0(Object.assign,a,s.decode(i))},Gt({}))})},e.anyJson=function(){return new e(function(t){return Gt(t)})},e.unknownJson=function(){return new e(function(t){return Gt(t)})},e.dict=function(t){return new e(function(n){if(lc(n)){var o={};for(var r in n)if(n.hasOwnProperty(r)){var i=t.decode(n[r]);if(i.ok===!0)o[r]=i.result;else return Tt(Sa("."+r,i.error))}return Gt(o)}else return Tt({message:Oo("an object",n)})})},e.optional=function(t){return new e(function(n){return n==null?Gt(void 0):t.decode(n)})},e.oneOf=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(function(o){for(var r=[],i=0;i<t.length;i++){var a=t[i].decode(o);if(a.ok===!0)return a;r[i]=a.error}var s=r.map(function(c){return"at error"+(c.at||"")+": "+c.message}).join('", "');return Tt({message:'expected a value matching one of the decoders, got the errors ["'+s+'"]'})})},e.withDefault=function(t,n){return new e(function(o){return Gt(cP(t,n.decode(o)))})},e.valueAt=function(t,n){return new e(function(o){for(var r=o,i=0;i<t.length;i++){if(r===void 0)return Tt({at:ka(t.slice(0,i+1)),message:"path does not exist"});if(typeof t[i]=="string"&&!lc(r))return Tt({at:ka(t.slice(0,i+1)),message:Oo("an object",r)});if(typeof t[i]=="number"&&!Ba(r))return Tt({at:ka(t.slice(0,i+1)),message:Oo("an array",r)});r=r[t[i]]}return id(function(a){return r===void 0?{at:ka(t),message:"path does not exist"}:Sa(ka(t),a)},n.decode(r))})},e.succeed=function(t){return new e(function(n){return Gt(t)})},e.fail=function(t){return new e(function(n){return Tt({message:t})})},e.lazy=function(t){return new e(function(n){return t().decode(n)})},e}(),hP=Bt.string,mP=Bt.number,ls=Bt.boolean,rn=Bt.anyJson;Bt.unknownJson;var Rr=Bt.constant,It=Bt.object,gP=Bt.array;Bt.tuple;Bt.dict;var Ge=Bt.optional,us=Bt.oneOf;Bt.union;Bt.intersection;Bt.withDefault;Bt.valueAt;Bt.succeed;var vP=Bt.fail;Bt.lazy;const xn=hP().where(e=>e.length>0,"Expected a non-empty string"),yP=mP().where(e=>e>=0,"Expected a non-negative number"),Pn=(e,t)=>{const n=typeof e;return n==="function"?rn():vP(`The provided argument as ${t} should be of type function, provided: ${typeof n}`)},bP=It({name:xn}),Ls=It({isCompleted:ls()}),wP=Dt.useStorage,Nh=()=>{const[e,t]=wP("sessionStorage",aP,bP);return{isPlatformWindow:!e||window.name===e.name,setPlatformWindow:t}},xP=Dt.useIsLaunchpadPinned,_C=Dt.useOnIframeFocus,MC=Dt.useOnOutsideClick,CP=Dt.usePressedKeys,mi=Dt.useStorage,DC=v.createContext(void 0),Dr=()=>{const e=v.useContext(DC);if(e===void 0)throw new Error("useIOConnectHome must be used within an IOConnectHomeProvider");return e},IP=({children:e})=>{const[t,n]=mi("localStorage",Rs,Ls),[o,r]=v.useState([]),i=v.useMemo(()=>o.reduce((p,f)=>({...p,[f.stableName]:{state:f.state}}),{}),[o]),a={isLoading:o.length===0,statuses:i},[s,c]=v.useState(!1),l={isLoggingOut:s,setIsLoggingOut:c};v.useEffect(()=>{let p=!1;const f=Kj().then(h=>{if(p)return;r(h);const m=[];let g=!1;return h.forEach((y,x)=>{const C=w=>{if(p||!w.target||g)return;const I=w.target;if(I.state==="prompt")return n({isCompleted:!1}),g=!0,window.location.reload();r(k=>[...k.slice(0,x),I,...k.slice(x+1)])};y.addEventListener("change",C),m.push(()=>y.removeEventListener("change",C))}),m}).catch(console.warn);return()=>{p=!0,f.then(h=>{h==null||h.forEach(m=>m())})}},[n]);const u=v.useMemo(()=>({permission:a,login:l}),[a,l]);return d.jsx(DC.Provider,{value:u,children:e})},kP=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,fill:"#3C3E3F",rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),d.jsx("rect",{width:42.821,height:15,x:.5,y:-.5,stroke:"#4B4E4F",strokeMiterlimit:10,rx:7.5,transform:"matrix(1 0 0 -1 117 103.85)"}),d.jsx("path",{fill:"#36A86B",d:"M125.31 100.086c-1.656 0-3-1.41-3-3.149 0-1.74 1.344-3.15 3-3.15 1.657 0 3 1.41 3 3.15s-1.343 3.149-3 3.149Z"}),d.jsx("rect",{width:21.694,height:6.057,fill:"#AAB0B0",rx:3.028,transform:"matrix(1 0 0 -1 132.72 99.844)"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("rect",{width:64,height:64,x:53,y:24,fill:"#36AA6C",rx:32}),d.jsx("path",{fill:"#fff",d:"M84.068 42.02c0-.466.408-.932.932-.932.466 0 .932.466.932.932v.99c4.66.467 8.388 4.428 8.388 9.262v1.748a9.57 9.57 0 0 0 2.796 6.756l.174.175c.466.466.758 1.165.758 1.806a2.61 2.61 0 0 1-2.621 2.621H74.514c-1.456-.058-2.563-1.165-2.563-2.621 0-.7.233-1.34.758-1.806l.116-.175c1.806-1.805 2.854-4.252 2.854-6.757v-1.747a9.3 9.3 0 0 1 8.388-9.261v-.99ZM85 44.816c-4.136 0-7.456 3.379-7.456 7.456v1.748c0 3.028-1.223 5.94-3.378 8.096l-.175.117a.94.94 0 0 0-.175.524c0 .408.291.699.7.699h20.91c.408 0 .758-.291.758-.7 0-.174-.117-.349-.233-.523l-.175-.117a11.502 11.502 0 0 1-3.378-8.155v-1.689c0-4.077-3.32-7.456-7.456-7.456H85Zm-1.806 23.008c.291.758.99 1.224 1.806 1.224.757 0 1.456-.466 1.747-1.224.175-.466.7-.757 1.165-.582a.976.976 0 0 1 .583 1.223A3.717 3.717 0 0 1 85 70.912c-1.631 0-3.029-.99-3.553-2.447a.976.976 0 0 1 .582-1.223c.466-.175.99.116 1.165.582Z"}),d.jsx("path",{fill:"#36A86B",d:"M113.791 86.146c-1.922 0-3.48-1.62-3.48-3.62 0-1.999 1.558-3.62 3.48-3.62s3.481 1.621 3.481 3.62c0 2-1.559 3.62-3.481 3.62Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),SP=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v94H0z",transform:"translate(0 20)"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:113,x:.5,y:20.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#3C3E3F",stroke:"#5D5D5D",strokeMiterlimit:10,d:"M22.338.5h125.324c2.746 0 4.941 2.144 4.941 4.75v76.938c0 2.608-2.195 4.751-4.941 4.751H22.338c-2.746 0-4.94-2.143-4.94-4.75V5.25c0-2.607 2.194-4.751 4.94-4.751Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M116.905 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533ZM127.206 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M137.505 16.552a2.766 2.766 0 1 0 0-5.533 2.766 2.766 0 0 0 0 5.533Z"}),d.jsx("circle",{cx:46.208,cy:58.882,r:20.294,fill:"#36AA6C"}),d.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M45.501 53.17a1 1 0 0 1 1.414 0l6.364 6.363a1 1 0 0 1-1.414 1.415l-4.657-4.657v48.23a1 1 0 0 1-2 0v-48.23l-4.657 4.657a1 1 0 0 1-1.414-1.415l6.364-6.364Z",clipRule:"evenodd"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:114,y:20,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:50.521,y1:5.735,y2:95.406,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),AP=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeLinejoin:"round",strokeMiterlimit:10,d:"M27.449 103.584a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.495 1.495 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5V88.6h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V66.37h.5V64.35h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V42.12h.5V40.1h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5V19.89h-.5V17.87h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5V40.1h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5V88.6h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M128 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"M143.015 89.758a6.667 6.667 0 0 0 5.823-3.379c1.237-2.082 1.237-4.646 0-6.758-1.207-2.082-3.409-3.38-5.823-3.38a6.742 6.742 0 0 0-5.853 3.38c-1.237 2.112-1.237 4.676 0 6.758 1.207 2.112 3.409 3.38 5.853 3.38Zm0-14.482c2.746 0 5.28 1.479 6.668 3.862 1.388 2.414 1.388 5.34 0 7.724a7.666 7.666 0 0 1-6.668 3.862 7.678 7.678 0 0 1-6.698-3.862c-1.388-2.384-1.388-5.31 0-7.724a7.741 7.741 0 0 1 6.698-3.862Zm.724 2.897a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-1.689 7.723c0 .543.422.966.965.966a.973.973 0 0 0 .966-.966.993.993 0 0 0-.966-.965.972.972 0 0 0-.965.965Zm-.966 0c0-1.056.845-1.93 1.931-1.93.513 0 .996.21 1.328.573l3.228-1.931a.478.478 0 0 1 .664.15c.15.242.06.544-.151.664l-3.228 1.931c.06.181.09.362.09.543 0 1.087-.875 1.931-1.931 1.931a1.906 1.906 0 0 1-1.931-1.93Zm6.034-6.275a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Zm-8.93 2.655c.392 0 .724.332.724.724a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.301-.724.724-.724Zm2.172-2.655a.715.715 0 0 1-.724.724.697.697 0 0 1-.724-.724c0-.392.302-.724.724-.724.392 0 .724.332.724.724Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M12 83c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"M27.351 76.62a.804.804 0 0 0-.73 0L21.45 78.81c-.322.117-.556.438-.526.789 0 2.746 1.139 7.596 5.697 9.787a.804.804 0 0 0 .73 0c4.558-2.19 5.697-7.04 5.727-9.787a.855.855 0 0 0-.556-.789l-5.17-2.191Zm-1.08-.877a1.816 1.816 0 0 1 1.46 0l5.142 2.192c.643.292 1.14.905 1.14 1.665-.03 2.922-1.228 8.21-6.253 10.635a1.798 1.798 0 0 1-1.548 0c-5.026-2.425-6.223-7.713-6.223-10.635-.03-.76.467-1.373 1.11-1.665l5.171-2.192Z"}),d.jsx("rect",{width:30,height:30,fill:"#5A5C5C",rx:15,transform:"matrix(1 0 0 -1 12 45.46)"}),d.jsx("path",{fill:"#DDD",d:"M18.653 23.886c.132-.184.422-.237.58-.079l16.033 12.657a.394.394 0 0 1 .08.58c-.133.185-.396.212-.58.08L18.732 24.466a.42.42 0 0 1-.08-.58Zm10.416 6.065-1.45-1.16a7.74 7.74 0 0 1 4.746 2.189c.159.184.159.448 0 .606a.447.447 0 0 1-.606 0 6.555 6.555 0 0 0-2.69-1.635Zm-5.01.343a6.346 6.346 0 0 0-1.82 1.292.447.447 0 0 1-.606 0 .414.414 0 0 1 0-.58 7.975 7.975 0 0 1 1.688-1.292l.738.58Zm-.184-4.43-.791-.633a11.395 11.395 0 0 1 3.928-.686c3.218 0 6.17 1.319 8.307 3.428.158.159.158.422 0 .607-.158.158-.422.158-.607 0a10.84 10.84 0 0 0-7.7-3.19c-1.107 0-2.135.157-3.137.474ZM19.84 26.97l.686.528c-.449.343-.844.685-1.24 1.08a.447.447 0 0 1-.606 0c-.159-.184-.159-.447 0-.606.369-.369.765-.685 1.16-1.002Zm5.801 8.702a1.699 1.699 0 0 1-.21-1.687c.263-.554.79-.95 1.397-1.002a1.662 1.662 0 0 1 1.53.712c.369.5.448 1.134.21 1.687-.263.554-.79.95-1.397 1.002a1.662 1.662 0 0 1-1.53-.712Zm2.215-1.002a.868.868 0 0 0-.844-.843.85.85 0 0 0-.843.843c0 .475.369.844.843.844a.85.85 0 0 0 .844-.844Z"}),d.jsx("path",{fill:"#5A5C5C",d:"M128 30c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15Z"}),d.jsx("path",{fill:"#DDD",d:"m142.001 23.885-.424 1.457c-.091.364-.364.637-.668.789-.243.121-.455.242-.667.364a1.232 1.232 0 0 1-1.032.212l-1.456-.364h-.122a3.276 3.276 0 0 0-.455.668l-.152.212a7.838 7.838 0 0 0-.333.728c0 .03.03.091.06.122l1.062 1.061c.243.273.364.668.334 1.002v.758c.03.334-.091.698-.334.971l-1.062 1.092a.231.231 0 0 0-.06.122c.091.242.212.485.333.728l.122.212c.152.213.303.456.455.668h.152l1.456-.364c.364-.091.759 0 1.032.182.212.151.424.273.667.394.304.152.577.425.668.79l.424 1.456c0 .03.031.06.061.09.304.061.607.061.941.061.303 0 .607 0 .91-.06.03-.03.061-.061.061-.091l.424-1.457c.091-.364.364-.637.668-.789a4.79 4.79 0 0 0 .667-.394c.304-.182.668-.273 1.032-.182l1.456.364h.152c.152-.212.304-.455.455-.668l.122-.212c.121-.243.242-.486.333-.728 0-.03-.03-.091-.06-.122l-1.062-1.092a1.316 1.316 0 0 1-.334-.97c0-.122.03-.244.03-.395 0-.122-.03-.243-.03-.364-.03-.334.091-.729.334-1.002l1.062-1.061c.03-.03.06-.092.06-.122a7.838 7.838 0 0 0-.333-.728l-.122-.212a12.155 12.155 0 0 0-.455-.668h-.152l-1.456.364c-.364.091-.728 0-1.032-.182a4.789 4.789 0 0 0-.667-.394c-.304-.152-.577-.425-.668-.79l-.424-1.456a.233.233 0 0 0-.061-.121 9.146 9.146 0 0 0-.91-.06c-.334 0-.637.03-.941.06a.233.233 0 0 0-.061.121Zm1.002-1.153c.394 0 .758.03 1.153.091.06.03.091.03.151.061.273.152.516.425.607.728l.425 1.457c0 .06.061.151.152.182.273.121.546.273.789.455.091.06.182.09.242.06l1.487-.364c.303-.09.668-.03.941.152l.121.122c.212.242.394.546.576.849l.152.212v.03c.152.304.304.608.425.911.03.06.03.091.03.152.031.334-.091.667-.333.91l-1.062 1.092c-.031.03-.061.122-.061.213 0 .151.03.303.03.455 0 .151-.03.303-.03.455 0 .121.03.212.061.243l1.062 1.092c.242.243.364.576.333.91 0 .03 0 .091-.03.152-.121.303-.273.607-.425.91l-.152.243a5.476 5.476 0 0 1-.606.85c-.031.06-.061.09-.091.12a1.206 1.206 0 0 1-.971.152l-1.457-.364c-.06-.03-.151 0-.242.061-.243.152-.516.303-.789.455-.091.03-.152.121-.152.182l-.425 1.426a1.277 1.277 0 0 1-.607.759c-.06.03-.091.03-.151.06-.395.03-.759.061-1.153.061-.395 0-.789-.03-1.184-.06-.06-.03-.091-.03-.151-.061a1.277 1.277 0 0 1-.607-.759l-.425-1.426c0-.06-.061-.151-.152-.182a4.11 4.11 0 0 1-.789-.455c-.091-.06-.182-.06-.242-.06l-1.457.363c-.333.091-.667.03-.94-.151-.061-.03-.091-.06-.122-.091-.242-.273-.424-.577-.606-.88l-.122-.213-.03-.03a11.98 11.98 0 0 1-.425-.91c0-.06-.03-.091-.03-.152 0-.334.091-.667.334-.91l1.061-1.092c.031-.03.061-.122.061-.243v-.91c0-.091-.03-.182-.061-.213l-1.061-1.092c-.243-.243-.334-.576-.334-.91 0-.061.03-.091.03-.152.121-.303.273-.607.425-.91l.03-.03.122-.213a6.09 6.09 0 0 1 .606-.85.24.24 0 0 1 .122-.12c.273-.183.607-.244.94-.153l1.457.364c.06.03.151 0 .242-.06.243-.152.516-.334.789-.455.091-.03.152-.122.152-.182l.425-1.457c.091-.303.334-.576.607-.728.06-.03.091-.03.151-.06.395-.061.789-.092 1.184-.092Zm-1.699 7.768c0 .637.303 1.183.849 1.486.516.304 1.153.304 1.699 0 .516-.303.85-.85.85-1.486 0-.607-.334-1.153-.85-1.457-.546-.303-1.183-.303-1.699 0-.546.304-.849.85-.849 1.457Zm4.369 0c0 .97-.516 1.85-1.335 2.336a2.781 2.781 0 0 1-2.67 0c-.85-.485-1.335-1.365-1.335-2.336 0-.94.485-1.82 1.335-2.306a2.781 2.781 0 0 1 2.67 0 2.702 2.702 0 0 1 1.335 2.306Z"}),d.jsx("circle",{cx:85,cy:57.277,r:32,fill:"#36AA6C"}),d.jsx("path",{fill:"#fff",d:"M72.313 42.777h9.968v1.812h-9.969c-1.019 0-1.812.85-1.812 1.813v16.312a1.79 1.79 0 0 0 1.813 1.813h25.374c.963 0 1.813-.793 1.813-1.813V46.402c0-.963-.85-1.813-1.813-1.813H87.72v-1.812h9.969c1.982 0 3.624 1.642 3.624 3.625v16.312a3.613 3.613 0 0 1-3.624 3.625H89.19l.623 3.625h3.342c.453 0 .906.453.906.907 0 .51-.453.906-.906.906H76.844a.895.895 0 0 1-.906-.906c0-.454.396-.907.906-.907h3.285l.623-3.625h-8.44c-2.039 0-3.624-1.586-3.624-3.625V46.402a3.614 3.614 0 0 1 3.624-3.625Zm10.251 23.562-.623 3.625h6.061l-.623-3.625h-4.815Zm3.342-22.656v12.348l2.946-3.002c.34-.34.962-.34 1.302 0 .34.34.34.963 0 1.302l-4.531 4.532c-.34.34-.963.34-1.303 0l-4.53-4.532c-.34-.34-.34-.962 0-1.302.339-.34.962-.34 1.302 0l3.002 3.002V43.683c0-.453.396-.906.906-.906.453 0 .906.453.906.906Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),EP=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("path",{stroke:"#5D5D5D",strokeDasharray:"2 2",strokeMiterlimit:10,d:"M27.449 103.138a2.008 2.008 0 0 1-1.083-1.083l.462-.191a1.493 1.493 0 0 1-.114-.574v-1.011h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.022h-.5v-2.02h.5V80.07h-.5V78.05h.5v-2.021h-.5v-2.02h.5v-2.022h-.5v-2.02h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5V57.84h.5v-2.02h-.5V53.8h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.022h.5v-2.02h-.5V33.59h.5V31.57h-.5v-2.021h.5v-2.02h-.5v-2.022h.5v-2.02h-.5v-2.021h.5v-2.021h-.5v-2.021h.5v-2.021h-.5v-2.02h.5v-1.011c0-.205.04-.398.114-.574l-.462-.192c.203-.489.594-.88 1.083-1.083l.191.462c.176-.073.37-.113.574-.113h1.014v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.028v-.5h2.028v.5h2.029v-.5h2.028v.5h2.028v-.5h2.028v.5h1.014c.204 0 .398.04.574.113l.191-.462c.489.203.88.594 1.083 1.083l-.462.192c.073.176.114.37.114.574v1.01h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5v2.022h.5v2.02h-.5v2.021h.5v2.021h-.5v2.021h.5v2.02h-.5v2.022h.5v2.02h-.5V53.8h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v2.021h.5v2.021h-.5v2.02h.5v2.022h-.5v2.02h.5v2.021h-.5v1.011c0 .204-.041.398-.114.574l.462.191a2.01 2.01 0 0 1-1.083 1.083l-.191-.462c-.176.073-.37.114-.574.114h-1.014v.5h-2.028v-.5h-2.028v.5h-2.029v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H90.07v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H79.93v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H69.79v-.5H67.76v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H59.65v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5h-2.028v-.5H47.48v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-2.028v.5H37.34v-.5h-2.029v.5h-2.028v-.5h-2.028v.5h-2.028v-.5h-1.014c-.204 0-.398-.041-.574-.114l-.191.462Z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#36AA6C",d:"M114.756 28.708H55.244c-1.427 0-2.584 1.512-2.584 3.377v49.491c0 1.866 1.157 3.378 2.584 3.378h59.512c1.427 0 2.584-1.512 2.584-3.378v-49.49c0-1.866-1.157-3.378-2.584-3.378Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M98.8 37.185a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM104.076 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M109.351 37.185a1.417 1.417 0 1 0 0-2.834 1.417 1.417 0 0 0 0 2.834Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 18.367H43.32c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H10.803c-.193 0-.41-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.13-.808.317-1.06.186-.254.402-.36.595-.36Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M26.192 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM31.468 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M36.743 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 18.367h32.517c.192 0 .409.105.595.358s.316.627.316 1.061v28.126c0 .434-.13.808-.316 1.06-.186.254-.403.36-.595.36H126.63c-.193 0-.409-.106-.595-.36-.186-.252-.317-.626-.317-1.06V19.786c0-.434.131-.808.317-1.06.186-.254.402-.36.595-.36Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M142.019 26.344a1.416 1.416 0 1 0 0-2.832 1.416 1.416 0 0 0 0 2.832ZM147.294 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M152.569 26.344a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M10.804 63.694H43.32c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H10.803c-.193 0-.41-.106-.595-.359-.186-.253-.317-.626-.317-1.06V65.113c0-.435.13-.808.317-1.061.186-.253.402-.358.595-.358Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M27.192 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833ZM32.468 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M37.743 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#3C3E3F",stroke:"#4B4E4F",strokeMiterlimit:10,d:"M126.63 63.694h32.517c.192 0 .409.106.595.359s.316.626.316 1.061v28.125c0 .435-.13.808-.316 1.061-.186.254-.403.359-.595.359H126.63c-.193 0-.409-.106-.595-.359s-.317-.626-.317-1.06V65.113c0-.435.131-.808.317-1.061.186-.253.402-.358.595-.358Z"}),d.jsx("path",{fill:"#fff",fillOpacity:.3,d:"M143.019 71.672a1.416 1.416 0 1 0 0-2.833 1.416 1.416 0 0 0 0 2.833ZM148.294 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#F0F6FE",d:"M153.569 71.672a1.417 1.417 0 1 0 0-2.833 1.417 1.417 0 0 0 0 2.833Z"}),d.jsx("path",{fill:"#fff",d:"M49.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),d.jsx("path",{fill:"#fff",d:"M44.318 40.488h5.836a.486.486 0 1 0 0-.973h-5.836a.486.486 0 1 0 0 .973Z"}),d.jsx("path",{fill:"#fff",d:"M44.482 40.488h-5.836a.486.486 0 1 1 0-.973h5.836a.486.486 0 1 1 0 .973ZM60.597 40.004l-3.255-3.255a.486.486 0 1 1 .688-.688l3.6 3.6c.19.19.19.497 0 .687l-3.594 3.593a.486.486 0 1 1-.688-.688l3.25-3.249Z"}),d.jsx("path",{fill:"#3BB272",d:"M32.147 36.709a3.375 3.375 0 1 1 0 6.75 3.375 3.375 0 0 1 0-6.75Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 65.808v-5.836a.487.487 0 0 0-.973 0v5.836a.486.486 0 1 0 .973 0Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 70.808v-5.836a.487.487 0 0 0-.973 0v5.837a.486.486 0 1 0 .973 0Z"}),d.jsx("path",{fill:"#fff",d:"M134.062 70.644v5.836a.487.487 0 0 1-.973 0v-5.836a.486.486 0 1 1 .973 0ZM133.578 54.529l-3.255 3.255a.487.487 0 0 1-.688-.688l3.599-3.599c.19-.19.498-.19.688 0l3.593 3.593a.486.486 0 1 1-.688.688l-3.249-3.249Z"}),d.jsx("path",{fill:"#AAB0B0",d:"M130.282 82.98a3.376 3.376 0 1 1 6.752 0 3.376 3.376 0 0 1-6.752 0Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),jP=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:170,height:134,fill:"none",...e,children:[d.jsxs("g",{clipPath:"url(#a)",children:[d.jsxs("g",{clipPath:"url(#b)",children:[d.jsx("path",{fill:"url(#c)",d:"M0 0h170v114H0z"}),d.jsx("mask",{id:"d",fill:"#fff",children:d.jsx("path",{d:"M0 114h170v20H0v-20Z"})}),d.jsx("path",{fill:"#3C3E3F",d:"M0 114h170v20H0v-20Z"}),d.jsx("path",{fill:"#5D5D5D",d:"M0 115h170v-2H0v2Z",mask:"url(#d)"})]}),d.jsx("rect",{width:169,height:133,x:.5,y:.5,stroke:"#5D5D5D",rx:5.5}),d.jsx("path",{fill:"#DE2122",d:"M79.593 28.399c2.403-4.163 8.411-4.163 10.814 0l29.741 51.512c2.403 4.162-.601 9.366-5.407 9.366H55.259c-4.806 0-7.81-5.204-5.407-9.366l29.74-51.512Z"}),d.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M81.84 42.528h6.321a1 1 0 0 1 .994 1.113l-2.691 23.67a1 1 0 0 1-.994.887h-1.033a1 1 0 0 1-.994-.89l-2.596-23.671a1 1 0 0 1 .994-1.11Zm3.128 30.366a3.547 3.547 0 1 0 0 7.093 3.547 3.547 0 0 0 0-7.093Z",clipRule:"evenodd"}),d.jsx("path",{fill:"#5A5C5C",d:"M115.69 27.082 132.459.185l17.514-.151-25.545 24.389 17.858 23.176-25.076 13.678L131.267 47.6 115.69 27.082Z"})]}),d.jsxs("defs",{children:[d.jsx("clipPath",{id:"a",children:d.jsx("path",{fill:"#fff",d:"M0 0h170v134H0z"})}),d.jsx("clipPath",{id:"b",children:d.jsx("rect",{width:170,height:134,fill:"#fff",rx:6})}),d.jsxs("linearGradient",{id:"c",x1:20.715,x2:62.592,y1:6.956,y2:110.839,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#313131"}),d.jsx("stop",{offset:1,stopColor:"#1B1B1B"})]})]})]}),PP={edgeNotificationsPermissionTimeout:15e3},Ct={WINDOW_MANAGEMENT:jr.WINDOW_MANAGEMENT,NOTIFICATIONS:jr.NOTIFICATIONS,POPUPS:"popups",PWA_INSTALL:"pwa-install"},NP={name:Ct.WINDOW_MANAGEMENT,label:`Allow window management${jh?"":" (not available in your browser)"}`,heading:"Allow Window Management",description:`By granting this permission you will be able to load layouts containing multiple
58
58
  windows and share context data between opened windows.`,instructions:{initial:"Click “Allow” when the browser prompt appears.",additional:`It seems that you closed the permission prompt.
59
59
  Click the "Open permissions prompt" button again and grant the Window Management
60
- permission to allow the platform to function properly.`},Image:EN,actionBtnText:"Open permission prompt"},ON={name:Ct.NOTIFICATIONS,label:"Allow browser notifications",heading:"Allow Browser Notifications",description:`By granting this permission you will be able to receive platform notifications in the notification center of your
60
+ permission to allow the platform to function properly.`},Image:EP,actionBtnText:"Open permission prompt"},OP={name:Ct.NOTIFICATIONS,label:"Allow browser notifications",heading:"Allow Browser Notifications",description:`By granting this permission you will be able to receive platform notifications in the notification center of your
61
61
  operating system.`,instructions:{initial:"Click “Allow” when the browser prompt appears.",additional:`It seems that you closed the permission prompt or your browser automatically blocks notifications.
62
62
  To allow browser notifications, go to your browser settings or click the "Bell" icon
63
- in the address bar and allow notifications for this site.`},Image:kN,actionBtnText:"Open permission prompt"},TN={name:Ct.POPUPS,label:"Allow pop-ups",heading:"Allow Pop-ups",description:"By granting this permission you will be able to eject apps from Workspaces and save them as part of a Layout.",instructions:{initial:`Click the "Test Pop-Up Settings" button. It should open two pop-ups in order to test the
63
+ in the address bar and allow notifications for this site.`},Image:kP,actionBtnText:"Open permission prompt"},TP={name:Ct.POPUPS,label:"Allow pop-ups",heading:"Allow Pop-ups",description:"By granting this permission you will be able to eject apps from Workspaces and save them as part of a Layout.",instructions:{initial:`Click the "Test Pop-Up Settings" button. It should open two pop-ups in order to test the
64
64
  browser pop-up settings.`,additional:`It seems that pop-ups are disabled in your browser.
65
65
  To allow pop-ups, go to your browser settings or click the "Pop-up blocked" icon
66
- in the address bar and allow pop-ups for this site.`},Image:SN,actionBtnText:"Test pop-up settings"},RN={name:Ct.PWA_INSTALL,label:"Install as a PWA",heading:"Install as a PWA (optional)",description:"By installing the platform as a Progressive Web App you will get a similar experience as with native desktop apps.",instructions:{initial:"If your browser supports Progressive Web Apps, you can now install the platform as a PWA."},Image:AN,actionBtnText:"Continue to the platform"},Dc=[PN,ON,TN,RN],uc={isCompleted:!1,state:"prompt"},LN={[Ct.WINDOW_MANAGEMENT]:uc,[Ct.NOTIFICATIONS]:uc,[Ct.POPUPS]:uc,[Ct.PWA_INSTALL]:uc};const _N=({isOpen:e,onClose:t})=>{var s;const{launchpadComponents:n,launchpadSettings:o}=LC(),{permission:r}=Dr(),i=(s=r.statuses[Ct.WINDOW_MANAGEMENT])==null?void 0:s.state,{Panel:a}=Dt;return d.jsx(a,{components:n,isOpen:e,onClose:t,settings:o,windowManagementPermissionState:i})};const HC=v.forwardRef((e,t)=>{const{className:n,isOpen:o,onClose:r,Panel:i,pinned:a=!1,position:s="left"}=e;return o&&!i&&console.error('Invalid use of PanelWrapper component. Please provide Panel component when "isOpen" is "true".'),d.jsx("div",{className:jo(n,"panel-wrapper",s,{open:o,pinned:a}),ref:t,children:i&&d.jsx(i,{isOpen:o,onClose:r})})}),Ph=e=>{const{Button:t,Panel:n,panelWrapperClassName:o,pinned:r=!1,position:i="left",tag:a="div",onClose:s}=e,[c,l]=v.useState(!1),u=v.useRef(null),p=v.useCallback(async()=>{l(!1),await(s==null?void 0:s())},[s]),f=()=>{if(c){p();return}l(!0)},h=!c||r;return DC({eventType:"mouseup",handler:p,ref:u,skip:h}),MC({handler:p,skip:h}),d.jsxs(a,{ref:u,children:[d.jsx(t,{active:c,onClick:f}),d.jsx(HC,{className:o,isOpen:c,onClose:p,Panel:n,pinned:r,position:i})]})};const GC=({Button:e=Yj})=>{const{isLaunchpadPinned:t}=xN();return d.jsx(Ph,{Button:e,Panel:_N,panelWrapperClassName:"launchpad-panel-wrapper",pinned:t})};var Wp=function(e,t){return Wp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},Wp(e,t)};function MN(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ft=function(){return Ft=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ft.apply(this,arguments)};function Q0(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function nr(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(o.next(u))}catch(p){a(p)}}function c(u){try{l(o.throw(u))}catch(p){a(p)}}function l(u){u.done?i(u.value):r(u.value).then(s,c)}l((o=o.apply(e,t||[])).next())})}function or(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(o=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,r=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],r=0}finally{o=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function DN(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function $n(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}var gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},WC={},Oh={};Object.defineProperty(Oh,"__esModule",{value:!0});var BN=function(){function e(){var t=this;this.locked=new Map,this.addToLocked=function(n,o){var r=t.locked.get(n);r===void 0?o===void 0?t.locked.set(n,[]):t.locked.set(n,[o]):o!==void 0&&(r.unshift(o),t.locked.set(n,r))},this.isLocked=function(n){return t.locked.has(n)},this.lock=function(n){return new Promise(function(o,r){t.isLocked(n)?t.addToLocked(n,o):(t.addToLocked(n),o())})},this.unlock=function(n){var o=t.locked.get(n);if(o!==void 0&&o.length!==0){var r=o.pop();t.locked.set(n,o),r!==void 0&&setTimeout(r,0)}else t.locked.delete(n)}}return e.getInstance=function(){return e.instance===void 0&&(e.instance=new e),e.instance},e}();Oh.default=function(){return BN.getInstance()};var Xn=gi&&gi.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(l){try{c(o.next(l))}catch(u){i(u)}}function s(l){try{c(o.throw(l))}catch(u){i(u)}}function c(l){l.done?r(l.value):new n(function(u){u(l.value)}).then(a,s)}c((o=o.apply(e,t||[])).next())})},Un=gi&&gi.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,o=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!((r=r.length>0&&r[r.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(u[0]===6&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(p){u=[6,p],o=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}},Aa=gi;Object.defineProperty(WC,"__esModule",{value:!0});var Si=Oh,dc={key:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},getItem:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},clear:function(){return Xn(Aa,void 0,void 0,function(){return Un(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},setItem:function(e,t){return Xn(Aa,void 0,void 0,function(){return Un(this,function(n){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function ad(e){return new Promise(function(t){return setTimeout(t,e)})}function sd(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}var HN=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+sd(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,e.waiters===void 0&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return n===void 0&&(n=5e3),Xn(this,void 0,void 0,function(){var o,r,i,a,s,c,l;return Un(this,function(u){switch(u.label){case 0:o=Date.now()+sd(4),r=Date.now()+n,i="browser-tabs-lock-key-"+t,a=this.storageHandler===void 0?dc:this.storageHandler,u.label=1;case 1:return Date.now()<r?[4,ad(30)]:[3,8];case 2:return u.sent(),a.getItemSync(i)!==null?[3,5]:(s=this.id+"-"+t+"-"+o,[4,ad(Math.floor(25*Math.random()))]);case 3:return u.sent(),a.setItemSync(i,JSON.stringify({id:this.id,iat:o,timeoutKey:s,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,ad(30)];case 4:return u.sent(),(c=a.getItemSync(i))!==null&&(l=JSON.parse(c)).id===this.id&&l.iat===o?(this.acquiredIatSet.add(o),this.refreshLockWhileAcquired(i,o),[2,!0]):[3,7];case 5:return e.lockCorrector(this.storageHandler===void 0?dc:this.storageHandler),[4,this.waitForSomethingToChange(r)];case 6:u.sent(),u.label=7;case 7:return o=Date.now()+sd(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(t,n){return Xn(this,void 0,void 0,function(){var o=this;return Un(this,function(r){return setTimeout(function(){return Xn(o,void 0,void 0,function(){var i,a,s;return Un(this,function(c){switch(c.label){case 0:return[4,Si.default().lock(n)];case 1:return c.sent(),this.acquiredIatSet.has(n)?(i=this.storageHandler===void 0?dc:this.storageHandler,(a=i.getItemSync(t))===null?(Si.default().unlock(n),[2]):((s=JSON.parse(a)).timeRefreshed=Date.now(),i.setItemSync(t,JSON.stringify(s)),Si.default().unlock(n),this.refreshLockWhileAcquired(t,n),[2])):(Si.default().unlock(n),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return Xn(this,void 0,void 0,function(){return Un(this,function(n){switch(n.label){case 0:return[4,new Promise(function(o){var r=!1,i=Date.now(),a=!1;function s(){if(a||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(c),a=!0),!r){r=!0;var l=50-(Date.now()-i);l>0?setTimeout(o,l):o(null)}}window.addEventListener("storage",s),e.addToWaiting(s);var c=setTimeout(s,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)},e.removeFromWaiting=function(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(function(n){return n!==t}))},e.notifyWaiters=function(){e.waiters!==void 0&&e.waiters.slice().forEach(function(t){return t()})},e.prototype.releaseLock=function(t){return Xn(this,void 0,void 0,function(){return Un(this,function(n){switch(n.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,n.sent()]}})})},e.prototype.releaseLock__private__=function(t){return Xn(this,void 0,void 0,function(){var n,o,r,i;return Un(this,function(a){switch(a.label){case 0:return n=this.storageHandler===void 0?dc:this.storageHandler,o="browser-tabs-lock-key-"+t,(r=n.getItemSync(o))===null?[2]:(i=JSON.parse(r)).id!==this.id?[3,2]:[4,Si.default().lock(i.iat)];case 1:a.sent(),this.acquiredIatSet.delete(i.iat),n.removeItemSync(o),Si.default().unlock(i.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,o=t,r=[],i=0;;){var a=o.keySync(i);if(a===null)break;r.push(a),i++}for(var s=!1,c=0;c<r.length;c++){var l=r[c];if(l.includes("browser-tabs-lock-key")){var u=o.getItemSync(l);if(u!==null){var p=JSON.parse(u);(p.timeRefreshed===void 0&&p.timeAcquired<n||p.timeRefreshed!==void 0&&p.timeRefreshed<n)&&(o.removeItemSync(l),s=!0)}}}s&&e.notifyWaiters()},e.waiters=void 0,e}(),GN=WC.default=HN;const WN={timeoutInSeconds:60},VC={name:"auth0-spa-js",version:"2.14.0"},FC=()=>Date.now();class vt extends Error{constructor(t,n){super(n),this.error=t,this.error_description=n,Object.setPrototypeOf(this,vt.prototype)}static fromPayload(t){let{error:n,error_description:o}=t;return new vt(n,o)}}class Th extends vt{constructor(t,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;super(t,n),this.state=o,this.appState=r,Object.setPrototypeOf(this,Th.prototype)}}class Rh extends vt{constructor(t,n,o,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;super(t,n),this.connection=o,this.state=r,this.appState=i,Object.setPrototypeOf(this,Rh.prototype)}}class Fi extends vt{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,Fi.prototype)}}class Lh extends Fi{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,Lh.prototype)}}class _h extends vt{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,_h.prototype)}}class Mh extends vt{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,Mh.prototype)}}class _s extends vt{constructor(t,n,o,r){super(t,n),this.mfa_token=o,this.mfa_requirements=r,Object.setPrototypeOf(this,_s.prototype)}}class pu extends vt{constructor(t,n){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(ml(t,["default"]),"', scope: '").concat(ml(n),"')")),this.audience=t,this.scope=n,Object.setPrototypeOf(this,pu.prototype)}}class Dh extends vt{constructor(t,n){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(ml(t,["default"]),"', missing scope: '").concat(ml(n),"')")),this.audience=t,this.scope=n,Object.setPrototypeOf(this,Dh.prototype)}}class fu extends vt{constructor(t){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=t,Object.setPrototypeOf(this,fu.prototype)}}function ml(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&!t.includes(e)?e:""}const gl=()=>window.crypto,Ea=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(gl().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%e.length]),t},cd=e=>btoa(e),VN=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],zC=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return Object.keys(e).reduce((n,o)=>{if(t&&o==="env")return n;const r=VN.find(i=>i.key===o);return r&&r.type.includes(typeof e[o])&&(n[o]=e[o]),n},{})},Vp=e=>{var{clientId:t}=e,n=$n(e,["clientId"]);return new URLSearchParams((o=>Object.keys(o).filter(r=>o[r]!==void 0).reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:o[i]}),{}))(Object.assign({client_id:t},n))).toString()},ev=async e=>await gl().subtle.digest({name:"SHA-256"},new TextEncoder().encode(e)),tv=e=>(t=>decodeURIComponent(atob(t).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),nv=e=>{const t=new Uint8Array(e);return(n=>{const o={"+":"-","/":"_","=":""};return n.replace(/[+/=]/g,r=>o[r])})(window.btoa(String.fromCharCode(...Array.from(t))))},FN=new TextEncoder,zN=new TextDecoder;function za(e){return typeof e=="string"?FN.encode(e):zN.decode(e)}function ov(e){if(typeof e.modulusLength!="number"||e.modulusLength<2048)throw new ZN(`${e.name} modulusLength must be at least 2048 bits`)}async function $N(e,t,n){if(n.usages.includes("sign")===!1)throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const o=`${$a(za(JSON.stringify(e)))}.${$a(za(JSON.stringify(t)))}`;return`${o}.${$a(await crypto.subtle.sign(function(r){switch(r.algorithm.name){case"ECDSA":return{name:r.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return ov(r.algorithm),{name:r.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return ov(r.algorithm),{name:r.algorithm.name};case"Ed25519":return{name:r.algorithm.name}}throw new ni}(n),n,za(o)))}`}let Fp;Uint8Array.prototype.toBase64?Fp=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):Fp=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let o=0;o<t.byteLength;o+=32768)n.push(String.fromCharCode.apply(null,t.subarray(o,o+32768)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function $a(e){return Fp(e)}class ni extends Error{constructor(t){var n;super(t??"operation not supported"),this.name=this.constructor.name,(n=Error.captureStackTrace)===null||n===void 0||n.call(Error,this,this.constructor)}}class ZN extends Error{constructor(t){var n;super(t),this.name=this.constructor.name,(n=Error.captureStackTrace)===null||n===void 0||n.call(Error,this,this.constructor)}}function XN(e){switch(e.algorithm.name){case"RSA-PSS":return function(t){if(t.algorithm.hash.name==="SHA-256")return"PS256";throw new ni("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(t){if(t.algorithm.hash.name==="SHA-256")return"RS256";throw new ni("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(t){if(t.algorithm.namedCurve==="P-256")return"ES256";throw new ni("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new ni("unsupported CryptoKey algorithm name")}}function $C(e){return e instanceof CryptoKey}function ZC(e){return $C(e)&&e.type==="public"}async function UN(e,t,n,o,r,i){const a=e==null?void 0:e.privateKey,s=e==null?void 0:e.publicKey;if(!$C(c=a)||c.type!=="private")throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!ZC(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(s.extractable!==!0)throw new TypeError('"keypair.publicKey.extractable" must be true');if(typeof t!="string")throw new TypeError('"htu" must be a string');if(typeof n!="string")throw new TypeError('"htm" must be a string');if(o!==void 0&&typeof o!="string")throw new TypeError('"nonce" must be a string or undefined');if(r!==void 0&&typeof r!="string")throw new TypeError('"accessToken" must be a string or undefined');if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new TypeError('"additional" must be an object');return $N({alg:XN(a),typ:"dpop+jwt",jwk:await XC(s)},Object.assign(Object.assign({},i),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:n,nonce:o,htu:t,ath:r?$a(await crypto.subtle.digest("SHA-256",za(r))):void 0}),a)}async function XC(e){const{kty:t,e:n,n:o,x:r,y:i,crv:a}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:a,e:n,n:o,x:r,y:i}}const JN=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange","http://auth0.com/oauth/grant-type/mfa-oob","http://auth0.com/oauth/grant-type/mfa-otp","http://auth0.com/oauth/grant-type/mfa-recovery-code"];function YN(){return async function(e,t){var n;let o;if(typeof e!="string"||e.length===0)throw new TypeError('"alg" must be a non-empty string');switch(e){case"PS256":o={name:"RSA-PSS",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"RS256":o={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"};break;case"Ed25519":o={name:"Ed25519"};break;default:throw new ni}return crypto.subtle.generateKey(o,(n=t==null?void 0:t.extractable)!==null&&n!==void 0&&n,["sign","verify"])}("ES256",{extractable:!1})}function KN(e){return async function(t){if(!ZC(t))throw new TypeError('"publicKey" must be a public CryptoKey');if(t.extractable!==!0)throw new TypeError('"publicKey.extractable" must be true');const n=await XC(t);let o;switch(n.kty){case"EC":o={crv:n.crv,kty:n.kty,x:n.x,y:n.y};break;case"OKP":o={crv:n.crv,kty:n.kty,x:n.x};break;case"RSA":o={e:n.e,kty:n.kty,n:n.n};break;default:throw new ni("unsupported JWK kty")}return $a(await crypto.subtle.digest({name:"SHA-256"},za(JSON.stringify(o))))}(e.publicKey)}function qN(e){let{keyPair:t,url:n,method:o,nonce:r,accessToken:i}=e;const a=function(s){const c=new URL(s);return c.search="",c.hash="",c.href}(n);return UN(t,a,o,r,i)}const QN=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json(),headers:(o=n.headers,[...o].reduce((r,i)=>{let[a,s]=i;return r[a]=s,r},{}))};var o},eP=async(e,t,n)=>{const o=new AbortController;let r;return t.signal=o.signal,Promise.race([QN(e,t),new Promise((i,a)=>{r=setTimeout(()=>{o.abort(),a(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(r)})},tP=async(e,t,n,o,r,i,a,s)=>((c,l)=>new Promise(function(u,p){const f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?p(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))({auth:{audience:t,scope:n},timeout:r,fetchUrl:e,fetchOptions:o,useFormData:a,useMrrt:s},i),nP=async function(e,t,n,o,r,i){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1e4,s=arguments.length>7?arguments[7]:void 0;return r?tP(e,t,n,o,a,r,i,s):eP(e,o,a)};async function UC(e,t,n,o,r,i,a,s,c,l){if(c){const w=await c.generateProof({url:e,method:r.method||"GET",nonce:await c.getNonce()});r.headers=Object.assign(Object.assign({},r.headers),{dpop:w})}let u,p=null;for(let w=0;w<3;w++)try{u=await nP(e,n,o,r,i,a,t,s),p=null;break}catch(I){p=I}if(p)throw p;const f=u.json,{error:h,error_description:m}=f,g=$n(f,["error","error_description"]),{headers:y,ok:x}=u;let C;if(c&&(C=y["dpop-nonce"],C&&await c.setNonce(C)),!x){const w=m||"HTTP error. Unable to fetch ".concat(e);if(h==="mfa_required")throw new _s(h,w,g.mfa_token,g.mfa_requirements);if(h==="missing_refresh_token")throw new pu(n,o);if(h==="use_dpop_nonce"){if(!c||!C||l)throw new fu(C);return UC(e,t,n,o,r,i,a,s,c,!0)}throw new vt(h||"request_error",w)}return g}async function oP(e,t){var{baseUrl:n,timeout:o,audience:r,scope:i,auth0Client:a,useFormData:s,useMrrt:c,dpop:l}=e,u=$n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const p=u.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",f=u.grant_type==="refresh_token"&&c,h=Object.assign(Object.assign(Object.assign(Object.assign({},u),p&&r&&{audience:r}),p&&i&&{scope:i}),f&&{audience:r,scope:i}),m=s?Vp(h):JSON.stringify(h),g=(y=u.grant_type,JN.includes(y));var y;return await UC("".concat(n,"/oauth/token"),o,r||"default",i,{method:"POST",body:m,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(zC(a||VC)))}},t,s,c,g?l:void 0)}const rP=e=>Array.from(new Set(e)),Bc=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return rP(t.filter(Boolean).join(" ").trim().split(/\s+/)).join(" ")},pc=(e,t,n)=>{let o;return n&&(o=e[n]),o||(o=e.default),Bc(o,t)};class Ln{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"@@auth0spajs@@",o=arguments.length>2?arguments[2]:void 0;this.prefix=n,this.suffix=o,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[n,o,r,i]=t.split("::");return new Ln({clientId:o,scope:i,audience:r},n)}static fromCacheEntry(t){const{scope:n,audience:o,client_id:r}=t;return new Ln({scope:n,audience:o,clientId:r})}}class iP{set(t,n){localStorage.setItem(t,JSON.stringify(n))}get(t){const n=window.localStorage.getItem(t);if(n)try{return JSON.parse(n)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}}class JC{constructor(){this.enclosedCache=function(){let t={};return{set(n,o){t[n]=o},get(n){const o=t[n];if(o)return o},remove(n){delete t[n]},allKeys:()=>Object.keys(t)}}()}}class aP{constructor(t,n,o){this.cache=t,this.keyManifest=n,this.nowProvider=o||FC}async setIdToken(t,n,o){var r;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:n,decodedToken:o}),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(i))}async getIdToken(t){const n=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!n&&t.scope&&t.audience){const o=await this.get(t);return!o||!o.id_token||!o.decodedToken?void 0:{id_token:o.id_token,decodedToken:o.decodedToken}}if(n)return{id_token:n.id_token,decodedToken:n.decodedToken}}async get(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3?arguments[3]:void 0;var i;let a=await this.cache.get(t.toKey());if(!a){const l=await this.getCacheKeys();if(!l)return;const u=this.matchExistingCacheKey(t,l);if(u&&(a=await this.cache.get(u)),!a&&o&&r!=="cache-only")return this.getEntryWithRefreshToken(t,l)}if(!a)return;const s=await this.nowProvider(),c=Math.floor(s/1e3);return a.expiresAt-n<c?a.body.refresh_token?this.modifiedCachedEntry(a,t):(await this.cache.remove(t.toKey()),void await((i=this.keyManifest)===null||i===void 0?void 0:i.remove(t.toKey()))):a.body}async modifiedCachedEntry(t,n){return t.body={refresh_token:t.body.refresh_token,audience:t.body.audience,scope:t.body.scope},await this.cache.set(n.toKey(),t),{refresh_token:t.body.refresh_token,audience:t.body.audience,scope:t.body.scope}}async set(t){var n;const o=new Ln({clientId:t.client_id,scope:t.scope,audience:t.audience}),r=await this.wrapCacheEntry(t);await this.cache.set(o.toKey(),r),await((n=this.keyManifest)===null||n===void 0?void 0:n.add(o.toKey()))}async remove(t,n,o){const r=new Ln({clientId:t,scope:o,audience:n});await this.cache.remove(r.toKey())}async clear(t){var n;const o=await this.getCacheKeys();o&&(await o.filter(r=>!t||r.includes(t)).reduce(async(r,i)=>{await r,await this.cache.remove(i)},Promise.resolve()),await((n=this.keyManifest)===null||n===void 0?void 0:n.clear()))}async wrapCacheEntry(t){const n=await this.nowProvider();return{body:t,expiresAt:Math.floor(n/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new Ln({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,n){return n.filter(o=>{var r;const i=Ln.fromKey(o),a=new Set(i.scope&&i.scope.split(" ")),s=((r=t.scope)===null||r===void 0?void 0:r.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&a.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&c})[0]}async getEntryWithRefreshToken(t,n){var o;for(const r of n){const i=Ln.fromKey(r);if(i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId){const a=await this.cache.get(r);if(!((o=a==null?void 0:a.body)===null||o===void 0)&&o.refresh_token)return this.modifiedCachedEntry(a,t)}}}async updateEntry(t,n){var o;const r=await this.getCacheKeys();if(r)for(const i of r){const a=await this.cache.get(i);if(((o=a==null?void 0:a.body)===null||o===void 0?void 0:o.refresh_token)===t){const s=Object.assign(Object.assign({},a.body),{refresh_token:n});await this.set(s)}}}}class sP{constructor(t,n,o){this.storage=t,this.clientId=n,this.cookieDomain=o,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId)}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const ja=e=>typeof e=="number",cP=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],lP=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const a=i.split("."),[s,c,l]=a;if(a.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(tv(c)),p={__raw:i},f={};return Object.keys(u).forEach(h=>{p[h]=u[h],cP.includes(h)||(f[h]=u[h])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(tv(s)),claims:p,user:f}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!ja(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!ja(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ja(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,o=new Date(e.now||Date.now()),r=new Date(0);if(r.setUTCSeconds(t.claims.exp+n),o>r)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(o,") is after expiration time (").concat(r,")"));if(t.claims.nbf!=null&&ja(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-n),o<i)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(o,") is before ").concat(i))}if(t.claims.auth_time!=null&&ja(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),o>i)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(o,") is after last auth at ").concat(i))}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const a=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(a!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(a,'", found "').concat(t.claims.org_id,'"'))}else{const a=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(a!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(a,'", found "').concat(t.claims.org_name,'"'))}}return t};var ds=gi&&gi.__assign||function(){return ds=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ds.apply(this,arguments)};function Na(e,t){if(!t)return"";var n="; "+e;return t===!0?n:n+"="+t}function uP(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(o){if(typeof o.expires=="number"){var r=new Date;r.setMilliseconds(r.getMilliseconds()+864e5*o.expires),o.expires=r}return Na("Expires",o.expires?o.expires.toUTCString():"")+Na("Domain",o.domain)+Na("Path",o.path)+Na("Secure",o.secure)+Na("SameSite",o.sameSite)}(n)}function dP(){return function(e){for(var t={},n=e?e.split("; "):[],o=/(%[\dA-F]{2})+/gi,r=0;r<n.length;r++){var i=n[r].split("="),a=i.slice(1).join("=");a.charAt(0)==='"'&&(a=a.slice(1,-1));try{t[i[0].replace(o,decodeURIComponent)]=a.replace(o,decodeURIComponent)}catch{}}return t}(document.cookie)}var pP=function(e){return dP()[e]};function YC(e,t,n){document.cookie=uP(e,t,ds({path:"/"},n))}var KC=YC,qC=function(e,t){YC(e,"",ds(ds({},t),{expires:-1}))};const Pi={get(e){const t=pP(e);if(t!==void 0)return JSON.parse(t)},save(e,t,n){let o={};window.location.protocol==="https:"&&(o={secure:!0,sameSite:"none"}),n!=null&&n.daysUntilExpire&&(o.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(o.domain=n.cookieDomain),KC(e,JSON.stringify(t),o)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),qC(e,n)}},fP={get(e){return Pi.get(e)||Pi.get("".concat("_legacy_").concat(e))},save(e,t,n){let o={};window.location.protocol==="https:"&&(o={secure:!0}),n!=null&&n.daysUntilExpire&&(o.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(o.domain=n.cookieDomain),KC("".concat("_legacy_").concat(e),JSON.stringify(t),o),Pi.save(e,t,n)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),qC(e,n),Pi.remove(e,t),Pi.remove("".concat("_legacy_").concat(e),t)}},hP={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var fr;(function(e){e.Code="code",e.ConnectCode="connect_code"})(fr||(fr={}));function mP(e,t,n){var o=t===void 0?null:t,r=function(c,l){var u=atob(c);if(l){for(var p=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)p[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(p.buffer))}return u}(e,n!==void 0&&n),i=r.indexOf(`
67
- `,10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var rv,iv,av,ld,gP=(rv="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtsZXQgdD1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W107cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQodCk7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jIGU9PntsZXQgcixjLHtkYXRhOnt0aW1lb3V0OmksYXV0aDphLGZldGNoVXJsOmYsZmV0Y2hPcHRpb25zOmwsdXNlRm9ybURhdGE6cCx1c2VNcnJ0Omh9LHBvcnRzOlt1XX09ZSxkPXt9O2NvbnN0e2F1ZGllbmNlOmcsc2NvcGU6eX09YXx8e307dHJ5e2NvbnN0IGU9cD8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShsLmJvZHkpOkpTT04ucGFyc2UobC5ib2R5KTtpZighZS5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1lLmdyYW50X3R5cGUpe2lmKGM9KChlLHQpPT5vW24oZSx0KV0pKGcseSksIWMmJmgpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKCIiLmNvbmNhdChlLCJ8IikpKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxnKTtlJiYhdCYmKGM9ZSl9aWYoIWMpdGhyb3cgbmV3IHQoZyx5KTtsLmJvZHk9cD9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpfWxldCBhLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGE9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1hLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaj1pLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaikpKSksZmV0Y2goZixPYmplY3QuYXNzaWduKHt9LGwpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBhJiZhLmFib3J0KCksdm9pZCB1LnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO189ay5oZWFkZXJzLGQ9Wy4uLl9dLnJlZHVjZSgoKGUsdCk9PntsZXRbcixzXT10O3JldHVybiBlW3JdPXMsZX0pLHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKChlPT57bGV0W3Qscl09ZTtyPT09TyYmKG9bdF09Yil9KSkpLCgoZSx0LHIpPT57b1tuKHQscildPWV9KShyLnJlZnJlc2hfdG9rZW4sZyx5KSxkZWxldGUgci5yZWZyZXNoX3Rva2VuKTooKGUsdCk9PntkZWxldGUgb1tuKGUsdCldfSkoZyx5KSx1LnBvc3RNZXNzYWdlKHtvazprLm9rLGpzb246cixoZWFkZXJzOmR9KX1jYXRjaChlKXt1LnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX0saGVhZGVyczpkfSl9dmFyIE8sYixfLGp9KSl9KCk7Cgo=",iv=null,av=!1,function(e){return ld=ld||mP(rv,iv,av),new Worker(ld,e)});const ud={},sv=async function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3;for(let n=0;n<t;n++)if(await e())return!0;return!1};class vP{constructor(t,n){this.cache=t,this.clientId=n,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var n;const o=new Set(((n=await this.cache.get(this.manifestKey))===null||n===void 0?void 0:n.keys)||[]);o.add(t),await this.cache.set(this.manifestKey,{keys:[...o]})}async remove(t){const n=await this.cache.get(this.manifestKey);if(n){const o=new Set(n.keys);return o.delete(t),o.size>0?await this.cache.set(this.manifestKey,{keys:[...o]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return"".concat("@@auth0spajs@@","::").concat(t)}}const yP={memory:()=>new JC().enclosedCache,localstorage:()=>new iP},cv=e=>yP[e],lv=e=>{const{openUrl:t,onRedirect:n}=e,o=$n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},o),{openUrl:t===!1||t?t:n})},uv=(e,t)=>{const n=(t==null?void 0:t.split(" "))||[];return((e==null?void 0:e.split(" "))||[]).every(o=>n.includes(o))},Wr={NONCE:"nonce",KEYPAIR:"keypair"};class bP{constructor(t){this.clientId=t}getVersion(){return 1}createDbHandle(){const t=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((n,o)=>{t.onupgradeneeded=()=>Object.values(Wr).forEach(r=>t.result.createObjectStore(r)),t.onerror=()=>o(t.error),t.onsuccess=()=>n(t.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(t,n,o){const r=o((await this.getDbHandle()).transaction(t,n).objectStore(t));return new Promise((i,a)=>{r.onsuccess=()=>i(r.result),r.onerror=()=>a(r.error)})}buildKey(t){const n=t?"_".concat(t):"auth0";return"".concat(this.clientId,"::").concat(n)}setNonce(t,n){return this.save(Wr.NONCE,this.buildKey(n),t)}setKeyPair(t){return this.save(Wr.KEYPAIR,this.buildKey(),t)}async save(t,n,o){await this.executeDbRequest(t,"readwrite",r=>r.put(o,n))}findNonce(t){return this.find(Wr.NONCE,this.buildKey(t))}findKeyPair(){return this.find(Wr.KEYPAIR,this.buildKey())}find(t,n){return this.executeDbRequest(t,"readonly",o=>o.get(n))}async deleteBy(t,n){const o=await this.executeDbRequest(t,"readonly",r=>r.getAllKeys());o==null||o.filter(n).map(r=>this.executeDbRequest(t,"readwrite",i=>i.delete(r)))}deleteByClientId(t,n){return this.deleteBy(t,o=>typeof o=="string"&&o.startsWith("".concat(n,"::")))}clearNonces(){return this.deleteByClientId(Wr.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Wr.KEYPAIR,this.clientId)}}class wP{constructor(t){this.storage=new bP(t)}getNonce(t){return this.storage.findNonce(t)}setNonce(t,n){return this.storage.setNonce(t,n)}async getOrGenerateKeyPair(){let t=await this.storage.findKeyPair();return t||(t=await YN(),await this.storage.setKeyPair(t)),t}async generateProof(t){const n=await this.getOrGenerateKeyPair();return qN(Object.assign({keyPair:n},t))}async calculateThumbprint(){return KN(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Di;(function(e){e.Bearer="Bearer",e.DPoP="DPoP"})(Di||(Di={}));class xP{constructor(t,n){this.hooks=n,this.config=Object.assign(Object.assign({},t),{fetch:t.fetch||(typeof window>"u"?fetch:window.fetch.bind(window))})}isAbsoluteUrl(t){return/^(https?:)?\/\//i.test(t)}buildUrl(t,n){if(n){if(this.isAbsoluteUrl(n))return n;if(t)return"".concat(t.replace(/\/?\/$/,""),"/").concat(n.replace(/^\/+/,""))}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(t){return this.config.getAccessToken?this.config.getAccessToken(t):this.hooks.getAccessToken(t)}extractUrl(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}buildBaseRequest(t,n){if(!this.config.baseUrl)return new Request(t,n);const o=this.buildUrl(this.config.baseUrl,this.extractUrl(t)),r=t instanceof Request?new Request(o,t):o;return new Request(r,n)}setAuthorizationHeader(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Di.Bearer;t.headers.set("authorization","".concat(o," ").concat(n))}async setDpopProofHeader(t,n){if(!this.config.dpopNonceId)return;const o=await this.hooks.getDpopNonce(),r=await this.hooks.generateDpopProof({accessToken:n,method:t.method,nonce:o,url:t.url});t.headers.set("dpop",r)}async prepareRequest(t,n){const o=await this.getAccessToken(n);let r,i;typeof o=="string"?(r=this.config.dpopNonceId?Di.DPoP:Di.Bearer,i=o):(r=o.token_type,i=o.access_token),this.setAuthorizationHeader(t,i,r),r===Di.DPoP&&await this.setDpopProofHeader(t,i)}getHeader(t,n){return Array.isArray(t)?new Headers(t).get(n)||"":typeof t.get=="function"?t.get(n)||"":t[n]||""}hasUseDpopNonceError(t){if(t.status!==401)return!1;const n=this.getHeader(t.headers,"www-authenticate");return n.includes("invalid_dpop_nonce")||n.includes("use_dpop_nonce")}async handleResponse(t,n){const o=this.getHeader(t.headers,"dpop-nonce");if(o&&await this.hooks.setDpopNonce(o),!this.hasUseDpopNonceError(t))return t;if(!o||!n.onUseDpopNonceError)throw new fu(o);return n.onUseDpopNonceError()}async internalFetchWithAuth(t,n,o,r){const i=this.buildBaseRequest(t,n);await this.prepareRequest(i,r);const a=await this.config.fetch(i);return this.handleResponse(a,o)}fetchWithAuth(t,n,o){const r={onUseDpopNonceError:()=>this.internalFetchWithAuth(t,n,Object.assign(Object.assign({},r),{onUseDpopNonceError:void 0}),o)};return this.internalFetchWithAuth(t,n,r,o)}}class CP{constructor(t,n){this.myAccountFetcher=t,this.apiBase=n}async connectAccount(t){const n=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/connect"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return this._handleResponse(n)}async completeAccount(t){const n=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/complete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return this._handleResponse(n)}async _handleResponse(t){let n;try{n=await t.text(),n=JSON.parse(n)}catch(o){throw new vl({type:"invalid_json",status:t.status,title:"Invalid JSON response",detail:n||String(o)})}if(t.ok)return n;throw new vl(n)}}class vl extends Error{constructor(t){let{type:n,status:o,title:r,detail:i,validation_errors:a}=t;super(i),this.name="MyAccountApiError",this.type=n,this.status=o,this.title=r,this.detail=i,this.validation_errors=a,Object.setPrototypeOf(this,vl.prototype)}}const IP={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}},kP="http://auth0.com/oauth/grant-type/mfa-otp",SP="http://auth0.com/oauth/grant-type/mfa-oob",AP="http://auth0.com/oauth/grant-type/mfa-recovery-code";function QC(e,t){this.v=e,this.k=t}function Et(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function EP(e){return new QC(e,0)}function eI(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pe(e,t){return e.get(Et(e,t))}function Rt(e,t,n){eI(e,t),t.set(e,n)}function gt(e,t,n){return e.set(Et(e,t),n),n}function he(e,t,n){return(t=function(o){var r=function(i,a){if(typeof i!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var c=s.call(i,a||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(o,"string");return typeof r=="symbol"?r:r+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(n),!0).forEach(function(o){he(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function pv(e,t){if(e==null)return{};var n,o,r=function(a,s){if(a==null)return{};var c={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(s.indexOf(l)!==-1)continue;c[l]=a[l]}return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jP(e){return function(){return new Ha(e.apply(this,arguments))}}function Ha(e){var t,n;function o(i,a){try{var s=e[i](a),c=s.value,l=c instanceof QC;Promise.resolve(l?c.v:c).then(function(u){if(l){var p=i==="return"?"return":"next";if(!c.k||u.done)return o(p,u);u=e[p](u).value}r(s.done?"return":"normal",u)},function(u){o("throw",u)})}catch(u){r("throw",u)}}function r(i,a){switch(i){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?o(t.key,t.arg):n=null}this._invoke=function(i,a){return new Promise(function(s,c){var l={key:i,arg:a,resolve:s,reject:c,next:null};n?n=n.next=l:(t=n=l,o(i,a))})},typeof e.return!="function"&&(this.return=void 0)}var fc,dd;let zp;if(Ha.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ha.prototype.next=function(e){return this._invoke("next",e)},Ha.prototype.throw=function(e){return this._invoke("throw",e)},Ha.prototype.return=function(e){return this._invoke("return",e)},typeof navigator>"u"||(fc=navigator.userAgent)===null||fc===void 0||(dd=fc.startsWith)===null||dd===void 0||!dd.call(fc,"Mozilla/5.0 ")){const e="v3.8.3";zp="".concat("oauth4webapi","/").concat(e)}function fa(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}function rt(e,t,n){const o=new TypeError(e,{cause:n});return Object.assign(o,{code:t}),o}const Gn=Symbol(),$p=Symbol(),Zp=Symbol(),io=Symbol(),NP=Symbol(),ko=Symbol(),PP=new TextEncoder,OP=new TextDecoder;function zi(e){return typeof e=="string"?PP.encode(e):OP.decode(e)}let Xp,tI;Uint8Array.prototype.toBase64?Xp=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):Xp=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let o=0;o<t.byteLength;o+=32768)n.push(String.fromCharCode.apply(null,t.subarray(o,o+32768)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function li(e){return typeof e=="string"?tI(e):Xp(e)}tI=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(t){throw rt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",t)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}catch(t){throw rt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",t)}};class Sn extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,this.code=Yp,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}class Bh extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,n!=null&&n.code&&(this.code=n==null?void 0:n.code),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}function Re(e,t,n){return new Bh(e,{code:t,cause:n})}function TP(e,t){if(function(n,o){if(!(n instanceof CryptoKey))throw rt("".concat(o," must be a CryptoKey"),"ERR_INVALID_ARG_TYPE")}(e,t),e.type!=="private")throw rt("".concat(t," must be a private CryptoKey"),"ERR_INVALID_ARG_VALUE")}function yl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function hu(e){fa(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(e??{});if(zp&&!t.has("user-agent")&&t.set("user-agent",zp),t.has("authorization"))throw rt('"options.headers" must not include the "authorization" header name',"ERR_INVALID_ARG_VALUE");return t}function nI(e,t){if(t!==void 0){if(typeof t=="function"&&(t=t(e.href)),!(t instanceof AbortSignal))throw rt('"options.signal" must return or be an instance of AbortSignal',"ERR_INVALID_ARG_TYPE");return t}}function fv(e){return e.includes("//")?e.replace("//","/"):e}async function RP(e,t){return async function(n,o,r,i){if(!(n instanceof URL))throw rt('"'.concat(o,'" must be an instance of URL'),"ERR_INVALID_ARG_TYPE");Hh(n,(i==null?void 0:i[Gn])!==!0);const a=r(new URL(n.href)),s=hu(i==null?void 0:i.headers);return s.set("accept","application/json"),((i==null?void 0:i[io])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(s.entries()),method:"GET",redirect:"manual",signal:nI(a,i==null?void 0:i.signal)})}(e,"issuerIdentifier",n=>{switch(t==null?void 0:t.algorithm){case void 0:case"oidc":(function(o,r){o.pathname=fv("".concat(o.pathname,"/").concat(r))})(n,".well-known/openid-configuration");break;case"oauth2":(function(o,r){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];o.pathname==="/"?o.pathname=r:o.pathname=fv("".concat(r,"/").concat(i?o.pathname:o.pathname.replace(/(\/)$/,"")))})(n,".well-known/oauth-authorization-server");break;default:throw rt('"options.algorithm" must be "oidc" (default), or "oauth2"',"ERR_INVALID_ARG_VALUE")}return n},t)}function Nr(e,t,n,o,r){try{if(typeof e!="number"||!Number.isFinite(e))throw rt("".concat(n," must be a number"),"ERR_INVALID_ARG_TYPE",r);if(e>0)return;if(t){if(e!==0)throw rt("".concat(n," must be a non-negative number"),"ERR_INVALID_ARG_VALUE",r);return}throw rt("".concat(n," must be a positive number"),"ERR_INVALID_ARG_VALUE",r)}catch(i){throw o?Re(i.message,o,r):i}}function Nt(e,t,n,o){try{if(typeof e!="string")throw rt("".concat(t," must be a string"),"ERR_INVALID_ARG_TYPE",o);if(e.length===0)throw rt("".concat(t," must not be empty"),"ERR_INVALID_ARG_VALUE",o)}catch(r){throw n?Re(r.message,n,o):r}}function oI(e){(function(t,n){if(sI(t)!==n)throw function(o){let r='"response" content-type must be ';for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];if(a.length>2){const c=a.pop();r+="".concat(a.join(", "),", or ").concat(c)}else a.length===2?r+="".concat(a[0]," or ").concat(a[1]):r+=a[0];return Re(r,lI,o)}(t,n)})(e,"application/json")}function rI(){return li(crypto.getRandomValues(new Uint8Array(32)))}function LP(e){switch(e.algorithm.name){case"RSA-PSS":return function(t){switch(t.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Sn("unsupported RsaHashedKeyAlgorithm hash name",{cause:t})}}(e);case"RSASSA-PKCS1-v1_5":return function(t){switch(t.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Sn("unsupported RsaHashedKeyAlgorithm hash name",{cause:t})}}(e);case"ECDSA":return function(t){switch(t.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Sn("unsupported EcKeyAlgorithm namedCurve",{cause:t})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new Sn("unsupported CryptoKey algorithm name",{cause:e})}}function bl(e){const t=e==null?void 0:e[$p];return typeof t=="number"&&Number.isFinite(t)?t:0}function Up(e){const t=e==null?void 0:e[Zp];return typeof t=="number"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function wl(){return Math.floor(Date.now()/1e3)}function Qn(e){if(typeof e!="object"||e===null)throw rt('"as" must be an object',"ERR_INVALID_ARG_TYPE");Nt(e.issuer,'"as.issuer"')}function eo(e){if(typeof e!="object"||e===null)throw rt('"client" must be an object',"ERR_INVALID_ARG_TYPE");Nt(e.client_id,'"client.client_id"')}function hv(e){return Nt(e,'"clientSecret"'),(t,n,o,r)=>{o.set("client_id",n.client_id),o.set("client_secret",e)}}function _P(e,t){const{key:n,kid:o}=(r=e)instanceof CryptoKey?{key:r}:(r==null?void 0:r.key)instanceof CryptoKey?(r.kid!==void 0&&Nt(r.kid,'"kid"'),{key:r.key,kid:r.kid}):{};var r;return TP(n,'"clientPrivateKey.key"'),async(i,a,s,c)=>{var l;const u={alg:LP(n),kid:o},p=function(f,h){const m=wl()+bl(h);return{jti:rI(),aud:f.issuer,exp:m+60,iat:m,nbf:m,iss:h.client_id,sub:h.client_id}}(i,a);t==null||(l=t[NP])===null||l===void 0||l.call(t,u,p),s.set("client_id",a.client_id),s.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),s.set("client_assertion",await async function(f,h,m){if(!m.usages.includes("sign"))throw rt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',"ERR_INVALID_ARG_VALUE");const g="".concat(li(zi(JSON.stringify(f))),".").concat(li(zi(JSON.stringify(h)))),y=li(await crypto.subtle.sign(function(x){switch(x.algorithm.name){case"ECDSA":return{name:x.algorithm.name,hash:QP(x)};case"RSA-PSS":switch(vv(x),x.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:x.algorithm.name,saltLength:parseInt(x.algorithm.hash.name.slice(-3),10)>>3};default:throw new Sn("unsupported RSA-PSS hash name",{cause:x})}case"RSASSA-PKCS1-v1_5":return vv(x),x.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return x.algorithm.name}throw new Sn("unsupported CryptoKey algorithm name",{cause:x})}(m),m,zi(g)));return"".concat(g,".").concat(y)}(u,p,n))}}const MP=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function Hh(e,t){if(t&&e.protocol!=="https:")throw Re("only requests to HTTPS are allowed",uI,e);if(e.protocol!=="https:"&&e.protocol!=="http:")throw Re("only HTTP and HTTPS requests are allowed",dI,e)}function mv(e,t,n,o){let r;if(typeof e!="string"||!(r=MP(e)))throw Re("authorization server metadata does not contain a valid ".concat(n?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),e===void 0?KP:qP,{attribute:n?"mtls_endpoint_aliases.".concat(t):t});return Hh(r,o),r}function Ms(e,t,n,o){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?mv(e.mtls_endpoint_aliases[t],t,n,o):mv(e[t],t,n,o)}class mu extends Error{constructor(t,n){var o;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"error",void 0),he(this,"status",void 0),he(this,"error_description",void 0),he(this,"response",void 0),this.name=this.constructor.name,this.code=JP,this.cause=n.cause,this.error=n.cause.error,this.status=n.response.status,this.error_description=n.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}class iI extends Error{constructor(t,n){var o,r;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"error",void 0),he(this,"error_description",void 0),this.name=this.constructor.name,this.code=YP,this.cause=n.cause,this.error=n.cause.get("error"),this.error_description=(o=n.cause.get("error_description"))!==null&&o!==void 0?o:void 0,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}}class Gh extends Error{constructor(t,n){var o;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"response",void 0),he(this,"status",void 0),this.name=this.constructor.name,this.code=UP,this.cause=n.cause,this.status=n.response.status,this.response=n.response,Object.defineProperty(this,"response",{enumerable:!1}),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}const DP="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",BP=new RegExp("^[,\\s]*("+DP+")"),HP=new RegExp('^[,\\s]*([a-zA-Z0-9!#$%&\\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"[,\\s]*(.*)'),GP=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)[,\\s]*(.*)"),WP=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Wh(e,t,n){if(e.status!==t){let r;var o;throw function(i){let a;if(a=function(s){if(!fa(s,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");const c=s.headers.get("www-authenticate");if(c===null)return;const l=[];let u=c;for(;u;){var p;let f=u.match(BP);const h=(p=f)===null||p===void 0?void 0:p[1].toLowerCase();if(!h)return;const m=u.substring(f[0].length);if(m&&!m.match(/^[\s,]/))return;const g=m.match(/^\s+(.*)$/),y=!!g;u=g?g[1]:void 0;const x={};let C;if(y)for(;u;){let I,b;if(f=u.match(HP)){if([,I,b,u]=f,b.includes("\\"))try{b=JSON.parse('"'.concat(b,'"'))}catch{}x[I.toLowerCase()]=b}else{if(!(f=u.match(GP))){if(f=u.match(WP)){if(Object.keys(x).length)break;[,C,u]=f;break}return}[,I,b,u]=f,x[I.toLowerCase()]=b}}else u=m||void 0;const w={scheme:h,parameters:x};C&&(w.token68=C),l.push(w)}return l.length?l:void 0}(i))throw new Gh("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:a,response:i})}(e),(r=await async function(i){if(i.status>399&&i.status<500){Bs(i),oI(i);try{const a=await i.clone().json();if(yl(a)&&typeof a.error=="string"&&a.error.length)return a}catch{}}}(e))?(await((o=e.body)===null||o===void 0?void 0:o.cancel()),new mu("server responded with an error in the response body",{cause:r,response:e})):Re('"response" is not a conform '.concat(n," response (unexpected HTTP status code)"),zh,e)}}function aI(e){if(!Fh.has(e))throw rt('"options.DPoP" is not a valid DPoPHandle',"ERR_INVALID_ARG_VALUE")}function sI(e){var t;return(t=e.headers.get("content-type"))===null||t===void 0?void 0:t.split(";")[0]}async function Vh(e,t,n,o,r,i,a){return await n(e,t,r,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((a==null?void 0:a[io])||fetch)(o.href,{body:r,headers:Object.fromEntries(i.entries()),method:"POST",redirect:"manual",signal:nI(o,a==null?void 0:a.signal)})}async function Ds(e,t,n,o,r,i){var a;const s=Ms(e,"token_endpoint",t.use_mtls_endpoint_aliases,(i==null?void 0:i[Gn])!==!0);r.set("grant_type",o);const c=hu(i==null?void 0:i.headers);c.set("accept","application/json"),(i==null?void 0:i.DPoP)!==void 0&&(aI(i.DPoP),await i.DPoP.addProof(s,c,"POST"));const l=await Vh(e,t,n,s,r,c,i);return i==null||(a=i.DPoP)===null||a===void 0||a.cacheNonce(l,s),l}const cI=new WeakMap,VP=new WeakMap;function Jp(e){if(!e.id_token)return;const t=cI.get(e);if(!t)throw rt('"ref" was already garbage collected or did not resolve from the proper sources',"ERR_INVALID_ARG_VALUE");return t}async function oa(e,t,n,o,r,i){if(Qn(e),eo(t),!fa(n,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wh(n,200,"Token Endpoint"),Bs(n);const a=await gu(n);if(Nt(a.access_token,'"response" body "access_token" property',Fe,{body:a}),Nt(a.token_type,'"response" body "token_type" property',Fe,{body:a}),a.token_type=a.token_type.toLowerCase(),a.expires_in!==void 0){let s=typeof a.expires_in!="number"?parseFloat(a.expires_in):a.expires_in;Nr(s,!0,'"response" body "expires_in" property',Fe,{body:a}),a.expires_in=s}if(a.refresh_token!==void 0&&Nt(a.refresh_token,'"response" body "refresh_token" property',Fe,{body:a}),a.scope!==void 0&&typeof a.scope!="string")throw Re('"response" body "scope" property must be a string',Fe,{body:a});if(a.id_token!==void 0){Nt(a.id_token,'"response" body "id_token" property',Fe,{body:a});const s=["aud","exp","iat","iss","sub"];t.require_auth_time===!0&&s.push("auth_time"),t.default_max_age!==void 0&&(Nr(t.default_max_age,!0,'"client.default_max_age"'),s.push("auth_time")),o!=null&&o.length&&s.push(...o);const{claims:c,jwt:l}=await async function(u,p,f,h,m){let g,y,{0:x,1:C,length:w}=u.split(".");if(w===5){if(m===void 0)throw new Sn("JWE decryption is not configured",{cause:u});u=await m(u),{0:x,1:C,length:w}=u.split(".")}if(w!==3)throw Re("Invalid JWT",Fe,u);try{g=JSON.parse(zi(li(x)))}catch(b){throw Re("failed to parse JWT Header body as base64url encoded JSON",xl,b)}if(!yl(g))throw Re("JWT Header must be a top level object",Fe,u);if(p(g),g.crit!==void 0)throw new Sn('no JWT "crit" header parameter extensions are supported',{cause:{header:g}});try{y=JSON.parse(zi(li(C)))}catch(b){throw Re("failed to parse JWT Payload body as base64url encoded JSON",xl,b)}if(!yl(y))throw Re("JWT Payload must be a top level object",Fe,u);const I=wl()+f;if(y.exp!==void 0){if(typeof y.exp!="number")throw Re('unexpected JWT "exp" (expiration time) claim type',Fe,{claims:y});if(y.exp<=I-h)throw Re('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',ps,{claims:y,now:I,tolerance:h,claim:"exp"})}if(y.iat!==void 0&&typeof y.iat!="number")throw Re('unexpected JWT "iat" (issued at) claim type',Fe,{claims:y});if(y.iss!==void 0&&typeof y.iss!="string")throw Re('unexpected JWT "iss" (issuer) claim type',Fe,{claims:y});if(y.nbf!==void 0){if(typeof y.nbf!="number")throw Re('unexpected JWT "nbf" (not before) claim type',Fe,{claims:y});if(y.nbf>I+h)throw Re('unexpected JWT "nbf" (not before) claim value',ps,{claims:y,now:I,tolerance:h,claim:"nbf"})}if(y.aud!==void 0&&typeof y.aud!="string"&&!Array.isArray(y.aud))throw Re('unexpected JWT "aud" (audience) claim type',Fe,{claims:y});return{header:g,claims:y,jwt:u}}(a.id_token,t9.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),bl(t),Up(t),r).then(ZP.bind(void 0,s)).then(zP.bind(void 0,e)).then(FP.bind(void 0,t.client_id));if(Array.isArray(c.aud)&&c.aud.length!==1){if(c.azp===void 0)throw Re('ID Token "aud" (audience) claim includes additional untrusted audiences',$o,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw Re('unexpected ID Token "azp" (authorized party) claim value',$o,{expected:t.client_id,claims:c,claim:"azp"})}c.auth_time!==void 0&&Nr(c.auth_time,!0,'ID Token "auth_time" (authentication time)',Fe,{claims:c}),VP.set(n,l),cI.set(a,c)}if((i==null?void 0:i[a.token_type])!==void 0)i[a.token_type](n,a);else if(a.token_type!=="dpop"&&a.token_type!=="bearer")throw new Sn("unsupported `token_type` value",{cause:{body:a}});return a}function FP(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Re('unexpected JWT "aud" (audience) claim value',$o,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Re('unexpected JWT "aud" (audience) claim value',$o,{expected:e,claims:t.claims,claim:"aud"});return t}function zP(e,t){var n,o;const r=(n=(o=e[pI])===null||o===void 0?void 0:o.call(e,t))!==null&&n!==void 0?n:e.issuer;if(t.claims.iss!==r)throw Re('unexpected JWT "iss" (issuer) claim value',$o,{expected:r,claims:t.claims,claim:"iss"});return t}const Fh=new WeakSet,gv=Symbol(),$P={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function ZP(e,t){for(const n of e)if(t.claims[n]===void 0)throw Re('JWT "'.concat(n,'" (').concat($P[n],") claim missing"),Fe,{claims:t.claims});return t}const pd=Symbol(),fd=Symbol();async function XP(e,t,n,o){return typeof(o==null?void 0:o.expectedNonce)=="string"||typeof(o==null?void 0:o.maxAge)=="number"||o!=null&&o.requireIdToken?async function(r,i,a,s,c,l,u){const p=[];switch(s){case void 0:s=pd;break;case pd:break;default:Nt(s,'"expectedNonce" argument'),p.push("nonce")}switch(c!=null||(c=i.default_max_age),c){case void 0:c=fd;break;case fd:break;default:Nr(c,!0,'"maxAge" argument'),p.push("auth_time")}const f=await oa(r,i,a,p,l,u);Nt(f.id_token,'"response" body "id_token" property',Fe,{body:f});const h=Jp(f);if(c!==fd){const m=wl()+bl(i),g=Up(i);if(h.auth_time+c<m-g)throw Re("too much time has elapsed since the last End-User authentication",ps,{claims:h,now:m,tolerance:g,claim:"auth_time"})}if(s===pd){if(h.nonce!==void 0)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:void 0,claims:h,claim:"nonce"})}else if(h.nonce!==s)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:s,claims:h,claim:"nonce"});return f}(e,t,n,o.expectedNonce,o.maxAge,o[ko],o.recognizedTokenTypes):async function(r,i,a,s,c){const l=await oa(r,i,a,void 0,s,c),u=Jp(l);if(u){if(i.default_max_age!==void 0){Nr(i.default_max_age,!0,'"client.default_max_age"');const p=wl()+bl(i),f=Up(i);if(u.auth_time+i.default_max_age<p-f)throw Re("too much time has elapsed since the last End-User authentication",ps,{claims:u,now:p,tolerance:f,claim:"auth_time"})}if(u.nonce!==void 0)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:void 0,claims:u,claim:"nonce"})}return l}(e,t,n,o==null?void 0:o[ko],o==null?void 0:o.recognizedTokenTypes)}const UP="OAUTH_WWW_AUTHENTICATE_CHALLENGE",JP="OAUTH_RESPONSE_BODY_ERROR",Yp="OAUTH_UNSUPPORTED_OPERATION",YP="OAUTH_AUTHORIZATION_RESPONSE_ERROR",xl="OAUTH_PARSE_ERROR",Fe="OAUTH_INVALID_RESPONSE",lI="OAUTH_RESPONSE_IS_NOT_JSON",zh="OAUTH_RESPONSE_IS_NOT_CONFORM",uI="OAUTH_HTTP_REQUEST_FORBIDDEN",dI="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",ps="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",$o="OAUTH_JWT_CLAIM_COMPARISON_FAILED",Kp="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",KP="OAUTH_MISSING_SERVER_METADATA",qP="OAUTH_INVALID_SERVER_METADATA";function Bs(e){if(e.bodyUsed)throw rt('"response" body has been used already',"ERR_INVALID_ARG_VALUE")}function vv(e){const{algorithm:t}=e;if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Sn("unsupported ".concat(t.name," modulusLength"),{cause:e})}function QP(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Sn("unsupported ECDSA namedCurve",{cause:e})}}async function e9(e){if(e.method!=="POST")throw rt("form_post responses are expected to use the POST method","ERR_INVALID_ARG_VALUE",{cause:e});if(sI(e)!=="application/x-www-form-urlencoded")throw rt("form_post responses are expected to use the application/x-www-form-urlencoded content-type","ERR_INVALID_ARG_VALUE",{cause:e});return async function(t){if(t.bodyUsed)throw rt("form_post Request instances must contain a readable body","ERR_INVALID_ARG_VALUE",{cause:t});return t.text()}(e)}function t9(e,t,n,o){if(e===void 0)if(Array.isArray(t)){if(!t.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:t,reason:"authorization server metadata"})}else{if(n===void 0)throw Re('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:n});if(typeof n=="string"?o.alg!==n:typeof n=="function"?!n(o.alg):!n.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:n,reason:"default value"})}else if(typeof e=="string"?o.alg!==e:!e.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:e,reason:"client configuration"})}function Qr(e,t){const{0:n,length:o}=e.getAll(t);if(o>1)throw Re('"'.concat(t,'" parameter must be provided only once'),Fe);return n}const n9=Symbol(),o9=Symbol();function r9(e,t,n,o){if(Qn(e),eo(t),n instanceof URL&&(n=n.searchParams),!(n instanceof URLSearchParams))throw rt('"parameters" must be an instance of URLSearchParams, or URL',"ERR_INVALID_ARG_TYPE");if(Qr(n,"response"))throw Re('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',Fe,{parameters:n});const r=Qr(n,"iss"),i=Qr(n,"state");if(!r&&e.authorization_response_iss_parameter_supported)throw Re('response parameter "iss" (issuer) missing',Fe,{parameters:n});if(r&&r!==e.issuer)throw Re('unexpected "iss" (issuer) response parameter value',Fe,{expected:e.issuer,parameters:n});switch(o){case void 0:case o9:if(i!==void 0)throw Re('unexpected "state" response parameter encountered',Fe,{expected:void 0,parameters:n});break;case n9:break;default:if(Nt(o,'"expectedState" argument'),i!==o)throw Re(i===void 0?'response parameter "state" missing':'unexpected "state" response parameter value',Fe,{expected:o,parameters:n})}if(Qr(n,"error"))throw new iI("authorization response from the server is an error",{cause:n});const a=Qr(n,"id_token"),s=Qr(n,"token");if(a!==void 0||s!==void 0)throw new Sn("implicit and hybrid flows are not supported");return c=new URLSearchParams(n),Fh.add(c),c;var c}async function gu(e){let t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oI;try{t=await e.json()}catch(o){throw n(e),Re('failed to parse "response" body as JSON',xl,o)}if(!yl(t))throw Re('"response" body must be a top level object',Fe,{body:t});return t}const hd=Symbol(),pI=Symbol(),yv=new TextEncoder,fs=new TextDecoder;function md(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[n]=o}return t}function fI(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Za(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e=="string"?e:fs.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=fs.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return fI(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}class Yt extends Error{constructor(t,n){var o;super(t,n),he(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}he(Yt,"code","ERR_JOSE_GENERIC");class Fn extends Yt{constructor(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"unspecified",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unspecified";super(t,{cause:{claim:o,reason:r,payload:n}}),he(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),he(this,"claim",void 0),he(this,"reason",void 0),he(this,"payload",void 0),this.claim=o,this.reason=r,this.payload=n}}he(Fn,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class qp extends Yt{constructor(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"unspecified",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unspecified";super(t,{cause:{claim:o,reason:r,payload:n}}),he(this,"code","ERR_JWT_EXPIRED"),he(this,"claim",void 0),he(this,"reason",void 0),he(this,"payload",void 0),this.claim=o,this.reason=r,this.payload=n}}he(qp,"code","ERR_JWT_EXPIRED");class hI extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}he(hI,"code","ERR_JOSE_ALG_NOT_ALLOWED");class In extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JOSE_NOT_SUPPORTED")}}he(In,"code","ERR_JOSE_NOT_SUPPORTED");he(class extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED");he(class extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Wt extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWS_INVALID")}}he(Wt,"code","ERR_JWS_INVALID");class Qp extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWT_INVALID")}}he(Qp,"code","ERR_JWT_INVALID");he(class extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class $h extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWKS_INVALID")}}he($h,"code","ERR_JWKS_INVALID");class Zh extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}he(Zh,"code","ERR_JWKS_NO_MATCHING_KEY");class mI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),he(this,Symbol.asyncIterator,void 0),he(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}he(mI,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class gI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWKS_TIMEOUT")}}he(gI,"code","ERR_JWKS_TIMEOUT");class vI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}he(vI,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const so=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"algorithm.name";return new TypeError("CryptoKey does not support this operation, its ".concat(t," must be ").concat(e))},Ai=(e,t)=>e.name===t;function gd(e){return parseInt(e.name.slice(4),10)}function i9(e,t,n){switch(t){case"HS256":case"HS384":case"HS512":{if(!Ai(e.algorithm,"HMAC"))throw so("HMAC");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Ai(e.algorithm,"RSASSA-PKCS1-v1_5"))throw so("RSASSA-PKCS1-v1_5");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Ai(e.algorithm,"RSA-PSS"))throw so("RSA-PSS");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"Ed25519":case"EdDSA":if(!Ai(e.algorithm,"Ed25519"))throw so("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Ai(e.algorithm,t))throw so(t);break;case"ES256":case"ES384":case"ES512":{if(!Ai(e.algorithm,"ECDSA"))throw so("ECDSA");const o=function(r){switch(r){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==o)throw so(o,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}(function(o,r){if(r&&!o.usages.includes(r))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(r,"."))})(e,n)}function yI(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];if((o=o.filter(Boolean)).length>2){const a=o.pop();e+="one of type ".concat(o.join(", "),", or ").concat(a,".")}else o.length===2?e+="one of type ".concat(o[0]," or ").concat(o[1],"."):e+="of type ".concat(o[0],".");if(t==null)e+=" Received ".concat(t);else if(typeof t=="function"&&t.name)e+=" Received function ".concat(t.name);else if(typeof t=="object"&&t!=null){var i;(i=t.constructor)!==null&&i!==void 0&&i.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const bv=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return yI("Key for the ".concat(e," algorithm must be "),t,...o)},bI=e=>{if((e==null?void 0:e[Symbol.toStringTag])==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},wI=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",wv=e=>bI(e)||wI(e);function Lr(e){if(typeof(t=e)!="object"||t===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t;if(Object.getPrototypeOf(e)===null)return!0;let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}const vd=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},Xa=e=>{const t=e.data[e.pos++];if(128&t){const n=127&t;let o=0;for(let r=0;r<n;r++)o=o<<8|e.data[e.pos++];return o}return t},Ua=(e,t,n)=>{if(e.data[e.pos++]!==t)throw new Error(n)},xv=(e,t)=>{const n=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,n},a9=e=>{const t=(r=>{Ua(r,6,"Expected algorithm OID");const i=Xa(r);return xv(r,i)})(e);if(vd(t,[43,101,110]))return"X25519";if(!vd(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Ua(e,6,"Expected curve OID");const n=Xa(e),o=xv(e,n);for(const{name:r,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(vd(o,i))return r;throw new Error("Unsupported named curve")},s9=async(e,t,n,o)=>{var r;let i,a;const s=e==="spki",c=()=>s?["verify"]:["sign"];switch(n){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(n.slice(-3),10)||1)},a=s?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":i={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[n]},a=c();break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const l=o.getNamedCurve(t);i=l==="X25519"?{name:"X25519"}:{name:"ECDH",namedCurve:l}}catch{throw new In("Invalid or unsupported key format")}a=s?[]:["deriveBits"];break;case"Ed25519":case"EdDSA":i={name:"Ed25519"},a=c();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":i={name:n},a=c();break;default:throw new In('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,i,(r=o==null?void 0:o.extractable)!==null&&r!==void 0?r:!!s,a)},c9=(e,t,n)=>{var o;const r=((a,s)=>fI(a.replace(s,"")))(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g);let i=n;return t!=null&&(o=t.startsWith)!==null&&o!==void 0&&o.call(t,"ECDH-ES")&&(i||(i={}),i.getNamedCurve=a=>{const s={data:a,pos:0};return function(c){Ua(c,48,"Invalid PKCS#8 structure"),Xa(c),Ua(c,2,"Expected version field");const l=Xa(c);c.pos+=l,Ua(c,48,"Expected algorithm identifier"),Xa(c),c.pos}(s),a9(s)}),s9("pkcs8",r,t,i)};async function Hc(e){var t,n;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:o,keyUsages:r}=function(a){let s,c;switch(a.kty){case"AKP":switch(a.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":s={name:a.alg},c=a.priv?["sign"]:["verify"];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(a.alg){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:"SHA-".concat(a.alg.slice(-3))},c=a.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(a.alg.slice(-3))},c=a.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(a.alg.slice(-3),10)||1)},c=a.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(a.alg){case"ES256":s={name:"ECDSA",namedCurve:"P-256"},c=a.d?["sign"]:["verify"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},c=a.d?["sign"]:["verify"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},c=a.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":s={name:"ECDH",namedCurve:a.crv},c=a.d?["deriveBits"]:[];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(a.alg){case"Ed25519":case"EdDSA":s={name:"Ed25519"},c=a.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":s={name:a.crv},c=a.d?["deriveBits"]:[];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new In('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:s,keyUsages:c}}(e),i=ke({},e);return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,o,(t=e.ext)!==null&&t!==void 0?t:!e.d&&!e.priv,(n=e.key_ops)!==null&&n!==void 0?n:r)}const ef=e=>Lr(e)&&typeof e.kty=="string";let xr;const Cv=async function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0&&arguments[3];xr||(xr=new WeakMap);let r=xr.get(e);if(r!=null&&r[n])return r[n];const i=await Hc(ke(ke({},t),{},{alg:n}));return o&&Object.freeze(e),r?r[n]=i:xr.set(e,{[n]:i}),i};async function l9(e,t){if(e instanceof Uint8Array||bI(e))return e;if(wI(e)){if(e.type==="secret")return e.export();if("toCryptoKey"in e&&typeof e.toCryptoKey=="function")try{return((o,r)=>{xr||(xr=new WeakMap);let i=xr.get(o);if(i!=null&&i[r])return i[r];const a=o.type==="public",s=!!a;let c;if(o.asymmetricKeyType==="x25519"){switch(r){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError("given KeyObject instance cannot be used for this algorithm")}c=o.toCryptoKey(o.asymmetricKeyType,s,a?[]:["deriveBits"])}if(o.asymmetricKeyType==="ed25519"){if(r!=="EdDSA"&&r!=="Ed25519")throw new TypeError("given KeyObject instance cannot be used for this algorithm");c=o.toCryptoKey(o.asymmetricKeyType,s,[a?"verify":"sign"])}switch(o.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(r!==o.asymmetricKeyType.toUpperCase())throw new TypeError("given KeyObject instance cannot be used for this algorithm");c=o.toCryptoKey(o.asymmetricKeyType,s,[a?"verify":"sign"])}if(o.asymmetricKeyType==="rsa"){let u;switch(r){case"RSA-OAEP":u="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":u="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":u="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":u="SHA-512";break;default:throw new TypeError("given KeyObject instance cannot be used for this algorithm")}if(r.startsWith("RSA-OAEP"))return o.toCryptoKey({name:"RSA-OAEP",hash:u},s,a?["encrypt"]:["decrypt"]);c=o.toCryptoKey({name:r.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:u},s,[a?"verify":"sign"])}if(o.asymmetricKeyType==="ec"){var l;const u=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get((l=o.asymmetricKeyDetails)===null||l===void 0?void 0:l.namedCurve);if(!u)throw new TypeError("given KeyObject instance cannot be used for this algorithm");r==="ES256"&&u==="P-256"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r==="ES384"&&u==="P-384"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r==="ES512"&&u==="P-521"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r.startsWith("ECDH-ES")&&(c=o.toCryptoKey({name:"ECDH",namedCurve:u},s,a?[]:["deriveBits"]))}if(!c)throw new TypeError("given KeyObject instance cannot be used for this algorithm");return i?i[r]=c:xr.set(o,{[r]:c}),c})(e,t)}catch(o){if(o instanceof TypeError)throw o}let n=e.export({format:"jwk"});return Cv(e,n,t)}if(ef(e))return e.k?Za(e.k):Cv(e,e,t,!0);throw new Error("unreachable")}const Ei=e=>e==null?void 0:e[Symbol.toStringTag],yd=(e,t,n)=>{if(t.use!==void 0){let i;switch(n){case"sign":case"verify":i="sig";break;case"encrypt":case"decrypt":i="enc"}if(t.use!==i)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(i,'" when present'))}if(t.alg!==void 0&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var o,r;let i;switch(!0){case(n==="sign"||n==="verify"):case e==="dir":case e.includes("CBC-HS"):i=n;break;case e.startsWith("PBES2"):i="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):i=!e.includes("GCM")&&e.endsWith("KW")?n==="encrypt"?"wrapKey":"unwrapKey":n;break;case(n==="encrypt"&&e.startsWith("RSA")):i="wrapKey";break;case n==="decrypt":i=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(i&&((o=t.key_ops)===null||o===void 0||(r=o.includes)===null||r===void 0?void 0:r.call(o,i))===!1)throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(i,'" when present'))}return!0};function u9(e,t,n){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((o,r,i)=>{if(!(r instanceof Uint8Array)){if(ef(r)){if((a=>a.kty==="oct"&&typeof a.k=="string")(r)&&yd(o,r,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!wv(r))throw new TypeError(bv(o,r,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(r.type!=="secret")throw new TypeError("".concat(Ei(r),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,n);break;default:((o,r,i)=>{if(ef(r))switch(i){case"decrypt":case"sign":if((a=>a.kty!=="oct"&&(a.kty==="AKP"&&typeof a.priv=="string"||typeof a.d=="string"))(r)&&yd(o,r,i))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((a=>a.kty!=="oct"&&a.d===void 0&&a.priv===void 0)(r)&&yd(o,r,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!wv(r))throw new TypeError(bv(o,r,"CryptoKey","KeyObject","JSON Web Key"));if(r.type==="secret")throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithms must not be of type "secret"'));if(r.type==="public")switch(i){case"sign":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm decryption must be of type "private"'))}if(r.type==="private")switch(i){case"verify":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,n)}}var hc,bd;let So,Iv;if(typeof navigator>"u"||(hc=navigator.userAgent)===null||hc===void 0||(bd=hc.startsWith)===null||bd===void 0||!bd.call(hc,"Mozilla/5.0 ")){const e="v6.8.1";Iv="".concat("openid-client","/").concat(e),So={"user-agent":Iv}}const Jt=e=>Gc.get(e);let Gc,mc;function xI(e){return e!==void 0?hv(e):(mc||(mc=new WeakMap),(t,n,o,r)=>{let i;return(i=mc.get(n))||(function(a,s){if(typeof a!="string")throw Ao("".concat(s," must be a string"),Gs);if(a.length===0)throw Ao("".concat(s," must not be empty"),Hs)}(n.client_secret,'"metadata.client_secret"'),i=hv(n.client_secret),mc.set(n,i)),i(t,n,o,r)})}const Cr=io,Hs="ERR_INVALID_ARG_VALUE",Gs="ERR_INVALID_ARG_TYPE";function Ao(e,t,n){const o=new TypeError(e,{cause:n});return Object.assign(o,{code:t}),o}function d9(e){return async function(t){return Nt(t,"codeVerifier"),li(await crypto.subtle.digest("SHA-256",zi(t)))}(e)}function p9(){return rI()}class Cl extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,this.code=n==null?void 0:n.code,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}function an(e,t,n){return new Cl(e,{cause:t,code:n})}function un(e){if(e instanceof TypeError||e instanceof Cl||e instanceof mu||e instanceof iI||e instanceof Gh)throw e;if(e instanceof Bh)switch(e.code){case uI:throw an("only requests to HTTPS are allowed",e,e.code);case dI:throw an("only requests to HTTP or HTTPS are allowed",e,e.code);case zh:throw an("unexpected HTTP response status code",e.cause,e.code);case lI:throw an("unexpected response content-type",e.cause,e.code);case xl:throw an("parsing error occured",e,e.code);case Fe:throw an("invalid response encountered",e,e.code);case $o:throw an("unexpected JWT claim value encountered",e,e.code);case Kp:throw an("unexpected JSON attribute value encountered",e,e.code);case ps:throw an("JWT timestamp claim value failed validation",e,e.code);default:throw an(e.message,e,e.code)}if(e instanceof Sn)throw an("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw an("runtime operation error",e,Yp);case"NotSupportedError":throw an("runtime unsupported operation",e,Yp);case"TimeoutError":throw an("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw an("operation aborted",e,"OAUTH_ABORT")}throw new Cl("something went wrong",{cause:e})}async function f9(e,t,n,o,r){const i=await async function(c,l){var u,p;if(!(c instanceof URL))throw Ao('"server" must be an instance of URL',Gs);const f=!c.href.includes("/.well-known/"),h=(u=l==null?void 0:l.timeout)!==null&&u!==void 0?u:30,m=AbortSignal.timeout(1e3*h),g=await(f?RP(c,{algorithm:l==null?void 0:l.algorithm,[io]:l==null?void 0:l[Cr],[Gn]:l==null||(p=l.execute)===null||p===void 0?void 0:p.includes(Av),signal:m,headers:new Headers(So)}):((l==null?void 0:l[Cr])||fetch)((Hh(c,l==null||(y=l.execute)===null||y===void 0||!y.includes(Av)),c.href),{headers:Object.fromEntries(new Headers(ke({accept:"application/json"},So)).entries()),body:void 0,method:"GET",redirect:"manual",signal:m})).then(x=>async function(C,w){const I=C;if(!(I instanceof URL)&&I!==hd)throw rt('"expectedIssuerIdentifier" must be an instance of URL',"ERR_INVALID_ARG_TYPE");if(!fa(w,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");if(w.status!==200)throw Re('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',zh,w);Bs(w);const b=await gu(w);if(Nt(b.issuer,'"response" body "issuer" property',Fe,{body:b}),I!==hd&&new URL(b.issuer).href!==I.href)throw Re('"response" body "issuer" property does not match the expected value',Kp,{expected:I.href,body:b,attribute:"issuer"});return b}(hd,x)).catch(un);var y;return f&&new URL(g.issuer).href!==c.href&&(function(x,C,w){return!(x.origin!=="https://login.microsoftonline.com"||w!=null&&w.algorithm&&w.algorithm!=="oidc"||(C[CI]=!0,0))}(c,g,l)||function(x,C){return!(!x.hostname.endsWith(".b2clogin.com")||C!=null&&C.algorithm&&C.algorithm!=="oidc")}(c,l)||(()=>{throw new Cl("discovered metadata issuer does not match the expected issuer",{code:Kp,cause:{expected:c.href,body:g,attribute:"issuer"}})})()),g}(e,r),a=new Il(i,t,n,o);let s=Jt(a);if(r!=null&&r[Cr]&&(s.fetch=r[Cr]),r!=null&&r.timeout&&(s.timeout=r.timeout),r!=null&&r.execute)for(const c of r.execute)c(a);return a}new TextDecoder;const CI=Symbol();class Il{constructor(t,n,o,r){var i,a,s,c,l;if(typeof n!="string"||!n.length)throw Ao('"clientId" must be a non-empty string',Gs);if(typeof o=="string"&&(o={client_secret:o}),((i=o)===null||i===void 0?void 0:i.client_id)!==void 0&&n!==o.client_id)throw Ao('"clientId" and "metadata.client_id" must be the same',Hs);const u=ke(ke({},structuredClone(o)),{},{client_id:n});let p;u[$p]=(a=(s=o)===null||s===void 0?void 0:s[$p])!==null&&a!==void 0?a:0,u[Zp]=(c=(l=o)===null||l===void 0?void 0:l[Zp])!==null&&c!==void 0?c:30,p=r||(typeof u.client_secret=="string"&&u.client_secret.length?xI(u.client_secret):(g,y,x,C)=>{x.set("client_id",y.client_id)});let f=Object.freeze(u);const h=structuredClone(t);CI in t&&(h[pI]=g=>{let{claims:{tid:y}}=g;return t.issuer.replace("{tenantid}",y)});let m=Object.freeze(h);Gc||(Gc=new WeakMap),Gc.set(this,{__proto__:null,as:m,c:f,auth:p,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const t=structuredClone(Jt(this).as);return function(n){Object.defineProperties(n,function(o){return{supportsPKCE:{__proto__:null,value(){var r;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"S256";return((r=o.code_challenge_methods_supported)===null||r===void 0?void 0:r.includes(i))===!0}}}}(n))}(t),t}clientMetadata(){return structuredClone(Jt(this).c)}get timeout(){return Jt(this).timeout}set timeout(t){Jt(this).timeout=t}get[Cr](){return Jt(this).fetch}set[Cr](t){Jt(this).fetch=t}}function Ws(e){Object.defineProperties(e,function(t){let n;if(t.expires_in!==void 0){const o=new Date;o.setSeconds(o.getSeconds()+t.expires_in),n=o.getTime()}return{expiresIn:{__proto__:null,value(){if(n){const o=Date.now();return n>o?Math.floor((n-o)/1e3):0}}},claims:{__proto__:null,value(){try{return Jp(this)}catch{return}}}}}(e))}async function kv(e,t,n){var o;let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];const i=(o=e.headers.get("retry-after"))===null||o===void 0?void 0:o.trim();if(i===void 0)return;let a;if(/^\d+$/.test(i))a=parseInt(i,10);else{const s=new Date(i);if(Number.isFinite(s.getTime())){const c=new Date,l=s.getTime()-c.getTime();l>0&&(a=Math.ceil(l/1e3))}}if(r&&!Number.isFinite(a))throw new Bh("invalid Retry-After header value",{cause:e});a>t&&await II(a-t,n)}function II(e,t){return new Promise((n,o)=>{const r=i=>{try{t.throwIfAborted()}catch(s){return void o(s)}if(i<=0)return void n();const a=Math.min(i,5);setTimeout(()=>r(i-a),1e3*a)};r(e)})}async function Sv(e,t){Yo(e);const{as:n,c:o,auth:r,fetch:i,tlsOnly:a,timeout:s}=Jt(e);return async function(c,l,u,p,f){Qn(c),eo(l);const h=Ms(c,"backchannel_authentication_endpoint",l.use_mtls_endpoint_aliases,(f==null?void 0:f[Gn])!==!0),m=new URLSearchParams(p);m.set("client_id",l.client_id);const g=hu(f==null?void 0:f.headers);return g.set("accept","application/json"),Vh(c,l,u,h,m,g,f)}(n,o,r,t,{[io]:i,[Gn]:!a,headers:new Headers(So),signal:bi(s)}).then(c=>async function(l,u,p){if(Qn(l),eo(u),!fa(p,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wh(p,200,"Backchannel Authentication Endpoint"),Bs(p);const f=await gu(p);Nt(f.auth_req_id,'"response" body "auth_req_id" property',Fe,{body:f});let h=typeof f.expires_in!="number"?parseFloat(f.expires_in):f.expires_in;return Nr(h,!0,'"response" body "expires_in" property',Fe,{body:f}),f.expires_in=h,f.interval!==void 0&&Nr(f.interval,!1,'"response" body "interval" property',Fe,{body:f}),f}(n,o,c)).catch(un)}async function kI(e,t,n,o){var r,i;Yo(e),n=new URLSearchParams(n);let a=(r=t.interval)!==null&&r!==void 0?r:5;const s=(i=o==null?void 0:o.signal)!==null&&i!==void 0?i:AbortSignal.timeout(1e3*t.expires_in);try{await II(a,s)}catch(b){un(b)}const{as:c,c:l,auth:u,fetch:p,tlsOnly:f,nonRepudiation:h,timeout:m,decrypt:g}=Jt(e),y=(b,k)=>kI(e,ke(ke({},t),{},{interval:b}),n,ke(ke({},o),{},{signal:s,flag:k})),x=await async function(b,k,S,E,O){Qn(b),eo(k),Nt(E,'"authReqId"');const A=new URLSearchParams(O==null?void 0:O.additionalParameters);return A.set("auth_req_id",E),Ds(b,k,S,"urn:openid:params:grant-type:ciba",A,O)}(c,l,u,t.auth_req_id,{[io]:p,[Gn]:!f,additionalParameters:n,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:s.aborted?s:bi(m)}).catch(un);var C;if(x.status===503&&x.headers.has("retry-after"))return await kv(x,a,s,!0),await((C=x.body)===null||C===void 0?void 0:C.cancel()),y(a);const w=async function(b,k,S,E){return oa(b,k,S,void 0,E==null?void 0:E[ko],E==null?void 0:E.recognizedTokenTypes)}(c,l,x,{[ko]:g});let I;try{I=await w}catch(b){if(Vs(b,o))return y(a,Pr);if(b instanceof mu)switch(b.error){case"slow_down":a+=5;case"authorization_pending":return await kv(b.response,a,s),y(a)}un(b)}return I.id_token&&await(h==null?void 0:h(x)),Ws(I),I}function Av(e){Jt(e).tlsOnly=!1}async function SI(e,t,n,o,r){if(Yo(e),!((r==null?void 0:r.flag)===Pr||t instanceof URL||function(b,k){try{return Object.getPrototypeOf(b)[Symbol.toStringTag]===k}catch{return!1}}(t,"Request")))throw Ao('"currentUrl" must be an instance of URL, or Request',Gs);let i,a;const{as:s,c,auth:l,fetch:u,tlsOnly:p,jarm:f,hybrid:h,nonRepudiation:m,timeout:g,decrypt:y,implicit:x}=Jt(e);if((r==null?void 0:r.flag)===Pr)i=r.authResponse,a=r.redirectUri;else{if(!(t instanceof URL)){const b=t;switch(t=new URL(t.url),b.method){case"GET":break;case"POST":const k=new URLSearchParams(await e9(b));if(h)t.hash=k.toString();else for(const[S,E]of k.entries())t.searchParams.append(S,E);break;default:throw Ao("unexpected Request HTTP method",Hs)}}switch(a=function(b){return(b=new URL(b)).search="",b.hash="",b.href}(t),!0){case!!f:i=await f(t,n==null?void 0:n.expectedState);break;case!!h:i=await h(t,n==null?void 0:n.expectedNonce,n==null?void 0:n.expectedState,n==null?void 0:n.maxAge);break;case!!x:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{i=r9(s,c,t.searchParams,n==null?void 0:n.expectedState)}catch(b){un(b)}}}const C=await async function(b,k,S,E,O,A,N){if(Qn(b),eo(k),!Fh.has(E))throw rt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',"ERR_INVALID_ARG_VALUE");Nt(O,'"redirectUri"');const j=Qr(E,"code");if(!j)throw Re('no authorization code in "callbackParameters"',Fe);const G=new URLSearchParams(N==null?void 0:N.additionalParameters);return G.set("redirect_uri",O),G.set("code",j),A!==gv&&(Nt(A,'"codeVerifier"'),G.set("code_verifier",A)),Ds(b,k,S,"authorization_code",G,N)}(s,c,l,i,a,(n==null?void 0:n.pkceCodeVerifier)||gv,{additionalParameters:o,[io]:u,[Gn]:!p,DPoP:r==null?void 0:r.DPoP,headers:new Headers(So),signal:bi(g)}).catch(un);typeof(n==null?void 0:n.expectedNonce)!="string"&&typeof(n==null?void 0:n.maxAge)!="number"||(n.idTokenExpected=!0);const w=XP(s,c,C,{expectedNonce:n==null?void 0:n.expectedNonce,maxAge:n==null?void 0:n.maxAge,requireIdToken:n==null?void 0:n.idTokenExpected,[ko]:y});let I;try{I=await w}catch(b){if(Vs(b,r))return SI(e,void 0,n,o,ke(ke({},r),{},{flag:Pr,authResponse:i,redirectUri:a}));un(b)}return I.id_token&&await(m==null?void 0:m(C)),Ws(I),I}async function AI(e,t,n,o){Yo(e),n=new URLSearchParams(n);const{as:r,c:i,auth:a,fetch:s,tlsOnly:c,nonRepudiation:l,timeout:u,decrypt:p}=Jt(e),f=await async function(g,y,x,C,w){Qn(g),eo(y),Nt(C,'"refreshToken"');const I=new URLSearchParams(w==null?void 0:w.additionalParameters);return I.set("refresh_token",C),Ds(g,y,x,"refresh_token",I,w)}(r,i,a,t,{[io]:s,[Gn]:!c,additionalParameters:n,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:bi(u)}).catch(un),h=async function(g,y,x,C){return oa(g,y,x,void 0,C==null?void 0:C[ko],C==null?void 0:C.recognizedTokenTypes)}(r,i,f,{[ko]:p});let m;try{m=await h}catch(g){if(Vs(g,o))return AI(e,t,n,ke(ke({},o),{},{flag:Pr}));un(g)}return m.id_token&&await(l==null?void 0:l(f)),Ws(m),m}async function EI(e,t,n){Yo(e),t=new URLSearchParams(t);const{as:o,c:r,auth:i,fetch:a,tlsOnly:s,timeout:c}=Jt(e),l=await async function(f,h,m,g,y){return Qn(f),eo(h),Ds(f,h,m,"client_credentials",new URLSearchParams(g),y)}(o,r,i,t,{[io]:a,[Gn]:!s,DPoP:n==null?void 0:n.DPoP,headers:new Headers(So),signal:bi(c)}).catch(un),u=async function(f,h,m,g){return oa(f,h,m,void 0,g==null?void 0:g[ko],g==null?void 0:g.recognizedTokenTypes)}(o,r,l);let p;try{p=await u}catch(f){if(Vs(f,n))return EI(e,t,ke(ke({},n),{},{flag:Pr}));un(f)}return Ws(p),p}function tf(e,t){Yo(e);const{as:n,c:o,tlsOnly:r,hybrid:i,jarm:a,implicit:s}=Jt(e),c=Ms(n,"authorization_endpoint",!1,r);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",o.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",i?"code id_token":s?"id_token":"code"),s&&!t.has("nonce"))throw Ao("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Hs);a&&t.set("response_mode","jwt")}for(const[l,u]of t.entries())c.searchParams.append(l,u);return c}async function jI(e,t,n){Yo(e);const o=tf(e,t),{as:r,c:i,auth:a,fetch:s,tlsOnly:c,timeout:l}=Jt(e),u=await async function(h,m,g,y,x){var C;Qn(h),eo(m);const w=Ms(h,"pushed_authorization_request_endpoint",m.use_mtls_endpoint_aliases,(x==null?void 0:x[Gn])!==!0),I=new URLSearchParams(y);I.set("client_id",m.client_id);const b=hu(x==null?void 0:x.headers);b.set("accept","application/json"),(x==null?void 0:x.DPoP)!==void 0&&(aI(x.DPoP),await x.DPoP.addProof(w,b,"POST"));const k=await Vh(h,m,g,w,I,b,x);return x==null||(C=x.DPoP)===null||C===void 0||C.cacheNonce(k,w),k}(r,i,a,o.searchParams,{[io]:s,[Gn]:!c,DPoP:n==null?void 0:n.DPoP,headers:new Headers(So),signal:bi(l)}).catch(un),p=async function(h,m,g){if(Qn(h),eo(m),!fa(g,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Wh(g,201,"Pushed Authorization Request Endpoint"),Bs(g);const y=await gu(g);Nt(y.request_uri,'"response" body "request_uri" property',Fe,{body:y});let x=typeof y.expires_in!="number"?parseFloat(y.expires_in):y.expires_in;return Nr(x,!0,'"response" body "expires_in" property',Fe,{body:y}),y.expires_in=x,y}(r,i,u);let f;try{f=await p}catch(h){if(Vs(h,n))return jI(e,t,ke(ke({},n),{},{flag:Pr}));un(h)}return tf(e,{request_uri:f.request_uri})}function Yo(e){if(!(e instanceof Il))throw Ao('"config" must be an instance of Configuration',Gs);if(Object.getPrototypeOf(e)!==Il.prototype)throw Ao("subclassing Configuration is not allowed",Hs)}function bi(e){return e?AbortSignal.timeout(1e3*e):void 0}function Vs(e,t){return!(t==null||!t.DPoP||t.flag===Pr)&&function(n){if(n instanceof Gh){const{0:o,length:r}=n.cause;return r===1&&o.scheme==="dpop"&&o.parameters.error==="use_dpop_nonce"}return n instanceof mu&&n.error==="use_dpop_nonce"}(e)}Object.freeze(Il.prototype);const Pr=Symbol();async function Xh(e,t,n,o){Yo(e);const{as:r,c:i,auth:a,fetch:s,tlsOnly:c,timeout:l,decrypt:u}=Jt(e),p=await async function(f,h,m,g,y,x){return Qn(f),eo(h),Nt(g,'"grantType"'),Ds(f,h,m,g,new URLSearchParams(y),x)}(r,i,a,t,new URLSearchParams(n),{[io]:s,[Gn]:!c,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:bi(l)}).then(f=>{let h;return t==="urn:ietf:params:oauth:grant-type:token-exchange"&&(h={n_a:()=>{}}),async function(m,g,y,x){return oa(m,g,y,void 0,x==null?void 0:x[ko],x==null?void 0:x.recognizedTokenTypes)}(r,i,f,{[ko]:u,recognizedTokenTypes:h})}).catch(un);return Ws(p),p}async function h9(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return yI("Key must be ",o,...i)}(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:"SHA-".concat(e.slice(-3)),name:"HMAC"},!1,[n])}return i9(t,e,n),t}async function m9(e,t,n,o){const r=await h9(e,t,"verify");(function(a,s){if(a.startsWith("RS")||a.startsWith("PS")){const{modulusLength:c}=s.algorithm;if(typeof c!="number"||c<2048)throw new TypeError("".concat(a," requires key modulusLength to be 2048 bits or larger"))}})(e,r);const i=function(a,s){const c="SHA-".concat(a.slice(-3));switch(a){case"HS256":case"HS384":case"HS512":return{hash:c,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:c,name:"RSA-PSS",saltLength:parseInt(a.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:c,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:c,name:"ECDSA",namedCurve:s.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:a};default:throw new In("alg ".concat(a," is not supported either by JOSE or your javascript runtime"))}}(e,r.algorithm);try{return await crypto.subtle.verify(i,r,n,o)}catch{return!1}}async function g9(e,t,n){if(!Lr(e))throw new Wt("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new Wt('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new Wt("JWS Protected Header incorrect type");if(e.payload===void 0)throw new Wt("JWS Payload missing");if(typeof e.signature!="string")throw new Wt("JWS Signature missing or incorrect type");if(e.header!==void 0&&!Lr(e.header))throw new Wt("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{const g=Za(e.protected);o=JSON.parse(fs.decode(g))}catch{throw new Wt("JWS Protected Header is invalid")}if(!function(){for(var g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C=y.filter(Boolean);if(C.length===0||C.length===1)return!0;let w;for(const I of C){const b=Object.keys(I);if(w&&w.size!==0)for(const k of b){if(w.has(k))return!1;w.add(k)}else w=new Set(b)}return!0}(o,e.header))throw new Wt("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r=ke(ke({},o),e.header),i=function(g,y,x,C,w){if(w.crit!==void 0&&(C==null?void 0:C.crit)===void 0)throw new g('"crit" (Critical) Header Parameter MUST be integrity protected');if(!C||C.crit===void 0)return new Set;if(!Array.isArray(C.crit)||C.crit.length===0||C.crit.some(b=>typeof b!="string"||b.length===0))throw new g('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let I;I=x!==void 0?new Map([...Object.entries(x),...y.entries()]):y;for(const b of C.crit){if(!I.has(b))throw new In('Extension Header Parameter "'.concat(b,'" is not recognized'));if(w[b]===void 0)throw new g('Extension Header Parameter "'.concat(b,'" is missing'));if(I.get(b)&&C[b]===void 0)throw new g('Extension Header Parameter "'.concat(b,'" MUST be integrity protected'))}return new Set(C.crit)}(Wt,new Map([["b64",!0]]),n==null?void 0:n.crit,o,r);let a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new Wt('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=r;if(typeof s!="string"||!s)throw new Wt('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=n&&function(g,y){if(y!==void 0&&(!Array.isArray(y)||y.some(x=>typeof x!="string")))throw new TypeError('"'.concat(g,'" option must be an array of strings'));if(y)return new Set(y)}("algorithms",n.algorithms);if(c&&!c.has(s))throw new hI('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new Wt("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new Wt("JWS Payload must be a string or an Uint8Array instance");let l=!1;typeof t=="function"&&(t=await t(o,e),l=!0),u9(s,t,"verify");const u=function(){for(var g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C=y.reduce((b,k)=>{let{length:S}=k;return b+S},0),w=new Uint8Array(C);let I=0;for(const b of y)w.set(b,I),I+=b.length;return w}(e.protected!==void 0?md(e.protected):new Uint8Array,md("."),typeof e.payload=="string"?a?md(e.payload):yv.encode(e.payload):e.payload);let p;try{p=Za(e.signature)}catch{throw new Wt("Failed to base64url decode the signature")}const f=await l9(t,s);if(!await m9(s,f,p,u))throw new vI;let h;if(a)try{h=Za(e.payload)}catch{throw new Wt("Failed to base64url decode the payload")}else h=typeof e.payload=="string"?yv.encode(e.payload):e.payload;const m={payload:h};return e.protected!==void 0&&(m.protectedHeader=o),e.header!==void 0&&(m.unprotectedHeader=e.header),l?ke(ke({},m),{},{key:f}):m}const v9=e=>Math.floor(e.getTime()/1e3),y9=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function Ev(e){const t=y9.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let o;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":o=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":o=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":o=Math.round(3600*n);break;case"day":case"days":case"d":o=Math.round(86400*n);break;case"week":case"weeks":case"w":o=Math.round(604800*n);break;default:o=Math.round(31557600*n)}return t[1]==="-"||t[4]==="ago"?-o:o}const jv=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase()),b9=(e,t)=>typeof e=="string"?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));async function w9(e,t,n){var o;const r=await async function(s,c,l){if(s instanceof Uint8Array&&(s=fs.decode(s)),typeof s!="string")throw new Wt("Compact JWS must be a string or Uint8Array");const{0:u,1:p,2:f,length:h}=s.split(".");if(h!==3)throw new Wt("Invalid Compact JWS");const m=await g9({payload:p,protected:u,signature:f},c,l),g={payload:m.payload,protectedHeader:m.protectedHeader};return typeof c=="function"?ke(ke({},g),{},{key:m.key}):g}(e,t,n);if((o=r.protectedHeader.crit)!==null&&o!==void 0&&o.includes("b64")&&r.protectedHeader.b64===!1)throw new Qp("JWTs MUST NOT use unencoded payload");const i=function(s,c){let l,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{l=JSON.parse(fs.decode(c))}catch{}if(!Lr(l))throw new Qp("JWT Claims Set must be a top-level JSON object");const{typ:p}=u;if(p&&(typeof s.typ!="string"||jv(s.typ)!==jv(p)))throw new Fn('unexpected "typ" JWT header value',l,"typ","check_failed");const{requiredClaims:f=[],issuer:h,subject:m,audience:g,maxTokenAge:y}=u,x=[...f];y!==void 0&&x.push("iat"),g!==void 0&&x.push("aud"),m!==void 0&&x.push("sub"),h!==void 0&&x.push("iss");for(const b of new Set(x.reverse()))if(!(b in l))throw new Fn('missing required "'.concat(b,'" claim'),l,b,"missing");if(h&&!(Array.isArray(h)?h:[h]).includes(l.iss))throw new Fn('unexpected "iss" claim value',l,"iss","check_failed");if(m&&l.sub!==m)throw new Fn('unexpected "sub" claim value',l,"sub","check_failed");if(g&&!b9(l.aud,typeof g=="string"?[g]:g))throw new Fn('unexpected "aud" claim value',l,"aud","check_failed");let C;switch(typeof u.clockTolerance){case"string":C=Ev(u.clockTolerance);break;case"number":C=u.clockTolerance;break;case"undefined":C=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:w}=u,I=v9(w||new Date);if((l.iat!==void 0||y)&&typeof l.iat!="number")throw new Fn('"iat" claim must be a number',l,"iat","invalid");if(l.nbf!==void 0){if(typeof l.nbf!="number")throw new Fn('"nbf" claim must be a number',l,"nbf","invalid");if(l.nbf>I+C)throw new Fn('"nbf" claim timestamp check failed',l,"nbf","check_failed")}if(l.exp!==void 0){if(typeof l.exp!="number")throw new Fn('"exp" claim must be a number',l,"exp","invalid");if(l.exp<=I-C)throw new qp('"exp" claim timestamp check failed',l,"exp","check_failed")}if(y){const b=I-l.iat;if(b-C>(typeof y=="number"?y:Ev(y)))throw new qp('"iat" claim timestamp check failed (too far in the past)',l,"iat","check_failed");if(b<0-C)throw new Fn('"iat" claim timestamp check failed (it should be in the past)',l,"iat","check_failed")}return l}(r.protectedHeader,r.payload,n),a={payload:i,protectedHeader:r.protectedHeader};return typeof t=="function"?ke(ke({},a),{},{key:r.key}):a}function x9(e){return Lr(e)}var gc,wd,vc=new WeakMap,xd=new WeakMap;class C9{constructor(t){if(Rt(this,vc,void 0),Rt(this,xd,new WeakMap),!function(n){return n&&typeof n=="object"&&Array.isArray(n.keys)&&n.keys.every(x9)}(t))throw new $h("JSON Web Key Set malformed");gt(vc,this,structuredClone(t))}jwks(){return pe(vc,this)}async getKey(t,n){const{alg:o,kid:r}=ke(ke({},t),n==null?void 0:n.header),i=function(l){switch(typeof l=="string"&&l.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new In('Unsupported "alg" value for a JSON Web Key Set')}}(o),a=pe(vc,this).keys.filter(l=>{let u=i===l.kty;if(u&&typeof r=="string"&&(u=r===l.kid),!u||typeof l.alg!="string"&&i!=="AKP"||(u=o===l.alg),u&&typeof l.use=="string"&&(u=l.use==="sig"),u&&Array.isArray(l.key_ops)&&(u=l.key_ops.includes("verify")),u)switch(o){case"ES256":u=l.crv==="P-256";break;case"ES384":u=l.crv==="P-384";break;case"ES512":u=l.crv==="P-521";break;case"Ed25519":case"EdDSA":u=l.crv==="Ed25519"}return u}),{0:s,length:c}=a;if(c===0)throw new Zh;if(c!==1){const l=new mI,u=pe(xd,this);throw l[Symbol.asyncIterator]=jP(function*(){for(const p of a)try{yield yield EP(Nv(u,p,o))}catch{}}),l}return Nv(pe(xd,this),s,o)}}async function Nv(e,t,n){const o=e.get(t)||e.set(t,{}).get(t);if(o[n]===void 0){const r=await async function(i,a,s){var c;if(!Lr(i))throw new TypeError("JWK must be an object");let l;switch(a!=null||(a=i.alg),l!=null||(l=(c=s==null?void 0:s.extractable)!==null&&c!==void 0?c:i.ext),i.kty){case"oct":if(typeof i.k!="string"||!i.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Za(i.k);case"RSA":if("oth"in i&&i.oth!==void 0)throw new In('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return Hc(ke(ke({},i),{},{alg:a,ext:l}));case"AKP":if(typeof i.alg!="string"||!i.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(a!==void 0&&a!==i.alg)throw new TypeError("JWK alg and alg option value mismatch");return Hc(ke(ke({},i),{},{ext:l}));case"EC":case"OKP":return Hc(ke(ke({},i),{},{alg:a,ext:l}));default:throw new In('Unsupported "kty" (Key Type) Parameter value')}}(ke(ke({},t),{},{ext:!0}),n);if(r instanceof Uint8Array||r.type!=="public")throw new $h("JSON Web Key Set members must be public keys");o[n]=r}return o[n]}function Pv(e){const t=new C9(e),n=async(o,r)=>t.getKey(o,r);return Object.defineProperties(n,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),n}let nf;if(typeof navigator>"u"||(gc=navigator.userAgent)===null||gc===void 0||(wd=gc.startsWith)===null||wd===void 0||!wd.call(gc,"Mozilla/5.0 ")){const e="v6.1.3";nf="".concat("jose","/").concat(e)}const NI=Symbol(),Cd=Symbol();var Id=new WeakMap,kd=new WeakMap,Sd=new WeakMap,yc=new WeakMap,Vr=new WeakMap,To=new WeakMap,rr=new WeakMap,Ad=new WeakMap,Fr=new WeakMap,zr=new WeakMap;class I9{constructor(t,n){if(Rt(this,Id,void 0),Rt(this,kd,void 0),Rt(this,Sd,void 0),Rt(this,yc,void 0),Rt(this,Vr,void 0),Rt(this,To,void 0),Rt(this,rr,void 0),Rt(this,Ad,void 0),Rt(this,Fr,void 0),Rt(this,zr,void 0),!(t instanceof URL))throw new TypeError("url must be an instance of URL");var o,r;gt(Id,this,new URL(t.href)),gt(kd,this,typeof(n==null?void 0:n.timeoutDuration)=="number"?n==null?void 0:n.timeoutDuration:5e3),gt(Sd,this,typeof(n==null?void 0:n.cooldownDuration)=="number"?n==null?void 0:n.cooldownDuration:3e4),gt(yc,this,typeof(n==null?void 0:n.cacheMaxAge)=="number"?n==null?void 0:n.cacheMaxAge:6e5),gt(rr,this,new Headers(n==null?void 0:n.headers)),nf&&!pe(rr,this).has("User-Agent")&&pe(rr,this).set("User-Agent",nf),pe(rr,this).has("accept")||(pe(rr,this).set("accept","application/json"),pe(rr,this).append("accept","application/jwk-set+json")),gt(Ad,this,n==null?void 0:n[NI]),(n==null?void 0:n[Cd])!==void 0&&(gt(zr,this,n==null?void 0:n[Cd]),o=n==null?void 0:n[Cd],r=pe(yc,this),typeof o=="object"&&o!==null&&"uat"in o&&typeof o.uat=="number"&&!(Date.now()-o.uat>=r)&&"jwks"in o&&Lr(o.jwks)&&Array.isArray(o.jwks.keys)&&Array.prototype.every.call(o.jwks.keys,Lr)&&(gt(Vr,this,pe(zr,this).uat),gt(Fr,this,Pv(pe(zr,this).jwks))))}pendingFetch(){return!!pe(To,this)}coolingDown(){return typeof pe(Vr,this)=="number"&&Date.now()<pe(Vr,this)+pe(Sd,this)}fresh(){return typeof pe(Vr,this)=="number"&&Date.now()<pe(Vr,this)+pe(yc,this)}jwks(){var t;return(t=pe(Fr,this))===null||t===void 0?void 0:t.jwks()}async getKey(t,n){pe(Fr,this)&&this.fresh()||await this.reload();try{return await pe(Fr,this).call(this,t,n)}catch(o){if(o instanceof Zh&&this.coolingDown()===!1)return await this.reload(),pe(Fr,this).call(this,t,n);throw o}}async reload(){pe(To,this)&&(typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel")&&gt(To,this,void 0),pe(To,this)||gt(To,this,async function(t,n,o){const i=await(arguments.length>3&&arguments[3]!==void 0?arguments[3]:fetch)(t,{method:"GET",signal:o,redirect:"manual",headers:n}).catch(a=>{throw a.name==="TimeoutError"?new gI:a});if(i.status!==200)throw new Yt("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await i.json()}catch{throw new Yt("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(pe(Id,this).href,pe(rr,this),AbortSignal.timeout(pe(kd,this)),pe(Ad,this)).then(t=>{gt(Fr,this,Pv(t)),pe(zr,this)&&(pe(zr,this).uat=Date.now(),pe(zr,this).jwks=t),gt(Vr,this,Date.now()),gt(To,this,void 0)}).catch(t=>{throw gt(To,this,void 0),t})),await pe(To,this)}}const k9=["mfaToken"],S9=["mfaToken"];var $r,bc,Zr,sr,Bi,ct,Pa,At,Ov=class extends Error{constructor(e,t){super(t),he(this,"code",void 0),this.name="NotSupportedError",this.code=e}},Ko=class extends Error{constructor(e,t,n){super(t),he(this,"cause",void 0),he(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},A9=class extends Ko{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},E9=class extends Ko{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},j9=class extends Ko{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},Ed=class extends Ko{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},po=class extends Ko{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},ir=class extends Error{constructor(e){super(e),he(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},jd=class extends Ko{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),he(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},N9=class extends Ko{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},P9=class extends Ko{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},O9=class extends Ko{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},T9=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),he(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function of(e){return Object.entries(e).filter(t=>{let[,n]=t;return n!==void 0}).reduce((t,n)=>ke(ke({},t),{},{[n[0]]:n[1]}),{})}var vu=class extends Error{constructor(e,t,n){super(t),he(this,"cause",void 0),he(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},PI=class extends vu{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},OI=class extends vu{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},R9=class extends vu{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},TI=class extends vu{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function L9(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var _9=($r=new WeakMap,bc=new WeakMap,Zr=new WeakMap,class{constructor(e){var t;Rt(this,$r,void 0),Rt(this,bc,void 0),Rt(this,Zr,void 0),gt($r,this,"https://".concat(e.domain)),gt(bc,this,e.clientId),gt(Zr,this,(t=e.customFetch)!==null&&t!==void 0?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(pe($r,this),"/mfa/authenticators"),{mfaToken:n}=e,o=await pe(Zr,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!o.ok){const r=await o.json();throw new PI(r.error_description||"Failed to list authenticators",r)}return(await o.json()).map(L9)}async enrollAuthenticator(e){const t="".concat(pe($r,this),"/mfa/associate"),{mfaToken:n}=e,o=pv(e,k9),r={authenticator_types:o.authenticatorTypes};"oobChannels"in o&&(r.oob_channels=o.oobChannels),"phoneNumber"in o&&o.phoneNumber&&(r.phone_number=o.phoneNumber),"email"in o&&o.email&&(r.email=o.email);const i=await pe(Zr,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){const a=await i.json();throw new OI(a.error_description||"Failed to enroll authenticator",a)}return function(a){if(a.authenticator_type==="otp")return{authenticatorType:"otp",secret:a.secret,barcodeUri:a.barcode_uri,recoveryCodes:a.recovery_codes,id:a.id};if(a.authenticator_type==="oob")return{authenticatorType:"oob",oobChannel:a.oob_channel,oobCode:a.oob_code,bindingMethod:a.binding_method,id:a.id};throw new Error("Unexpected authenticator type: ".concat(a.authenticator_type))}(await i.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:n}=e,o="".concat(pe($r,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),r=await pe(Zr,this).call(this,o,{method:"DELETE",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!r.ok){const i=await r.json();throw new R9(i.error_description||"Failed to delete authenticator",i)}}async challengeAuthenticator(e){const t="".concat(pe($r,this),"/mfa/challenge"),{mfaToken:n}=e,o=pv(e,S9),r={mfa_token:n,client_id:pe(bc,this),challenge_type:o.challengeType};o.authenticatorId&&(r.authenticator_id=o.authenticatorId);const i=await pe(Zr,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){const a=await i.json();throw new TI(a.error_description||"Failed to challenge authenticator",a)}return function(a){const s={challengeType:a.challenge_type};return a.oob_code!==void 0&&(s.oobCode=a.oob_code),a.binding_method!==void 0&&(s.bindingMethod=a.binding_method),s}(await i.json())}}),ti=class RI{constructor(t,n,o,r,i,a,s){he(this,"accessToken",void 0),he(this,"idToken",void 0),he(this,"refreshToken",void 0),he(this,"expiresAt",void 0),he(this,"scope",void 0),he(this,"claims",void 0),he(this,"authorizationDetails",void 0),he(this,"tokenType",void 0),he(this,"issuedTokenType",void 0),this.accessToken=t,this.idToken=o,this.refreshToken=r,this.expiresAt=n,this.scope=i,this.claims=a,this.authorizationDetails=s}static fromTokenEndpointResponse(t){const n=t.id_token?t.claims():void 0,o=new RI(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,n,t.authorization_details);return o.tokenType=t.token_type,o.issuedTokenType=t.issued_token_type,o}},rf="openid profile email offline_access",M9=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function LI(e){if(e==null)throw new po("subject_token is required");if(typeof e!="string")throw new po("subject_token must be a string");if(e.trim().length===0)throw new po("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new po("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new po("subject_token must not include the 'Bearer ' prefix")}function _I(e,t){if(t){for(const[n,o]of Object.entries(t))if(!M9.has(n))if(Array.isArray(o)){if(o.length>20)throw new po("Parameter '".concat(n,"' exceeds maximum array size of ").concat(20));o.forEach(r=>{e.append(n,r)})}else e.append(n,o)}}var D9=(sr=new WeakMap,Bi=new WeakMap,ct=new WeakMap,Pa=new WeakMap,At=new WeakSet,class{constructor(e){if(function(t,n){eI(t,n),n.add(t)}(this,At),Rt(this,sr,void 0),Rt(this,Bi,void 0),Rt(this,ct,void 0),Rt(this,Pa,void 0),he(this,"mfa",void 0),gt(ct,this,e),e.useMtls&&!e.customFetch)throw new Ov("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");this.mfa=new _9({domain:pe(ct,this).domain,clientId:pe(ct,this).clientId,customFetch:pe(ct,this).customFetch})}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Et(At,this,Tn).call(this);if(e!=null&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new Ov("par_not_supported_error","The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par");try{return await Et(At,this,Nd).call(this,e)}catch(n){throw new N9(n)}}async buildLinkUserUrl(e){try{const t=await Et(At,this,Nd).call(this,{authorizationParams:ke(ke({},e.authorizationParams),{},{requested_connection:e.connection,requested_connection_scope:e.connectionScope,scope:"openid link_account offline_access",id_token_hint:e.idToken})});return{linkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(t){throw new P9(t)}}async buildUnlinkUserUrl(e){try{const t=await Et(At,this,Nd).call(this,{authorizationParams:ke(ke({},e.authorizationParams),{},{requested_connection:e.connection,scope:"openid unlink_account",id_token_hint:e.idToken})});return{unlinkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(t){throw new O9(t)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this),o=of(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),r=new URLSearchParams(ke(ke({scope:rf},o),{},{client_id:pe(ct,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&r.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&r.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const i=await Sv(t,r),a=await kI(t,i);return ti.fromTokenEndpointResponse(a)}catch(i){throw new jd(i)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this),o=of(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),r=new URLSearchParams(ke(ke({scope:rf},o),{},{client_id:pe(ct,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&r.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&r.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const i=await Sv(t,r);return{authReqId:i.auth_req_id,expiresIn:i.expires_in,interval:i.interval}}catch(i){throw new jd(i)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:n}=await Et(At,this,Tn).call(this),o=new URLSearchParams({auth_req_id:t});try{const r=await Xh(n,"urn:openid:params:grant-type:ciba",o);return ti.fromTokenEndpointResponse(r)}catch(r){throw new jd(r)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new Ed("Either a refresh or access token should be specified, but not both.");const n=(t=e.accessToken)!==null&&t!==void 0?t:e.refreshToken;if(!n)throw new Ed("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:n,subjectTokenType:e.accessToken?"urn:ietf:params:oauth:token-type:access_token":"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(o){throw o instanceof po?new Ed(o.message,o.cause):o}}async exchangeToken(e){return"connection"in e?Et(At,this,B9).call(this,e):Et(At,this,H9).call(this,e)}async getTokenByCode(e,t){const{configuration:n}=await Et(At,this,Tn).call(this);try{const o=await SI(n,e,{pkceCodeVerifier:t.codeVerifier});return ti.fromTokenEndpointResponse(o)}catch(o){throw new A9("There was an error while trying to request a token.",o)}}async getTokenByRefreshToken(e){const{configuration:t}=await Et(At,this,Tn).call(this);try{const n=await AI(t,e.refreshToken);return ti.fromTokenEndpointResponse(n)}catch(n){throw new j9("The access token has expired and there was an error while trying to refresh it.",n)}}async getTokenByClientCredentials(e){const{configuration:t}=await Et(At,this,Tn).call(this);try{const n=new URLSearchParams({audience:e.audience});e.organization&&n.append("organization",e.organization);const o=await EI(t,n);return ti.fromTokenEndpointResponse(o)}catch(n){throw new E9("There was an error while trying to request a token.",n)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this);if(!n.end_session_endpoint){const o=new URL("https://".concat(pe(ct,this).domain,"/v2/logout"));return o.searchParams.set("returnTo",e.returnTo),o.searchParams.set("client_id",pe(ct,this).clientId),o}return function(o,r){Yo(o);const{as:i,c:a,tlsOnly:s}=Jt(o),c=Ms(i,"end_session_endpoint",!1,s);(r=new URLSearchParams(r)).has("client_id")||r.set("client_id",a.client_id);for(const[l,u]of r.entries())c.searchParams.append(l,u);return c}(t,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const{serverMetadata:t}=await Et(At,this,Tn).call(this);pe(Pa,this)||gt(Pa,this,function(o,r){const i=new I9(o,r),a=async(s,c)=>i.getKey(s,c);return Object.defineProperties(a,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>i.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>i.jwks(),enumerable:!0,configurable:!1,writable:!1}}),a}(new URL(t.jwks_uri),{[NI]:pe(ct,this).customFetch}));const{payload:n}=await w9(e.logoutToken,pe(Pa,this),{issuer:t.issuer,audience:pe(ct,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in n)&&!("sub"in n))throw new ir('either "sid" or "sub" (or both) claims must be present');if("sid"in n&&typeof n.sid!="string")throw new ir('"sid" claim must be a string');if("sub"in n&&typeof n.sub!="string")throw new ir('"sub" claim must be a string');if("nonce"in n)throw new ir('"nonce" claim is prohibited');if(!("events"in n))throw new ir('"events" claim is missing');if(typeof n.events!="object"||n.events===null)throw new ir('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in n.events))throw new ir('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if(typeof n.events["http://schemas.openid.net/event/backchannel-logout"]!="object")throw new ir('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:n.sid,sub:n.sub}}});async function Tn(){if(pe(sr,this)&&pe(Bi,this))return{configuration:pe(sr,this),serverMetadata:pe(Bi,this)};const e=await Et(At,this,G9).call(this);return gt(sr,this,await f9(new URL("https://".concat(pe(ct,this).domain)),pe(ct,this).clientId,{use_mtls_endpoint_aliases:pe(ct,this).useMtls},e,{[Cr]:pe(ct,this).customFetch})),gt(Bi,this,pe(sr,this).serverMetadata()),pe(sr,this)[Cr]=pe(ct,this).customFetch||fetch,{configuration:pe(sr,this),serverMetadata:pe(Bi,this)}}async function B9(e){var t,n;const{configuration:o}=await Et(At,this,Tn).call(this);if("audience"in e||"resource"in e)throw new po("audience and resource parameters are not supported for Token Vault exchanges");LI(e.subjectToken);const r=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:(t=e.subjectTokenType)!==null&&t!==void 0?t:"urn:ietf:params:oauth:token-type:access_token",requested_token_type:(n=e.requestedTokenType)!==null&&n!==void 0?n:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&r.append("login_hint",e.loginHint),e.scope&&r.append("scope",e.scope),_I(r,e.extra);try{const i=await Xh(o,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",r);return ti.fromTokenEndpointResponse(i)}catch(i){throw new po("Failed to exchange token for connection '".concat(e.connection,"'."),i)}}async function H9(e){const{configuration:t}=await Et(At,this,Tn).call(this);LI(e.subjectToken);const n=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&n.append("audience",e.audience),e.scope&&n.append("scope",e.scope),e.requestedTokenType&&n.append("requested_token_type",e.requestedTokenType),e.organization&&n.append("organization",e.organization),_I(n,e.extra);try{const o=await Xh(t,"urn:ietf:params:oauth:grant-type:token-exchange",n);return ti.fromTokenEndpointResponse(o)}catch(o){throw new po("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),o)}}async function G9(){if(!pe(ct,this).clientSecret&&!pe(ct,this).clientAssertionSigningKey&&!pe(ct,this).useMtls)throw new T9;if(pe(ct,this).useMtls)return(t,n,o,r)=>{o.set("client_id",n.client_id)};let e=pe(ct,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await async function(t,n,o){if(typeof t!="string"||t.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return c9(t,n,o)}(e,pe(ct,this).clientAssertionSigningAlg||"RS256")),e?function(t,n){return _P(t,n)}(e):xI(pe(ct,this).clientSecret)}async function Nd(e){const{configuration:t}=await Et(At,this,Tn).call(this),n=p9(),o=await d9(n),r=of(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),i=new URLSearchParams(ke(ke({scope:rf},r),{},{client_id:pe(ct,this).clientId,code_challenge:o,code_challenge_method:"S256"}));return{authorizationUrl:e!=null&&e.pushedAuthorizationRequests?await jI(t,i):await tf(t,i),codeVerifier:n}}class _r extends vt{constructor(t,n){super(t,n),Object.setPrototypeOf(this,_r.prototype)}static fromPayload(t){let{error:n,error_description:o}=t;return new _r(n,o)}}class kl extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,kl.prototype)}}class Uh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Uh.prototype)}}class Jh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Jh.prototype)}}class Hi extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Hi.prototype)}}class Yh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Yh.prototype)}}class W9{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6e5;this.contexts=new Map,this.ttlMs=t}set(t,n){this.cleanup(),this.contexts.set(t,Object.assign(Object.assign({},n),{createdAt:Date.now()}))}get(t){const n=this.contexts.get(t);if(n){if(!(Date.now()-n.createdAt>this.ttlMs))return n;this.contexts.delete(t)}}remove(t){this.contexts.delete(t)}cleanup(){const t=Date.now();for(const[n,o]of this.contexts)t-o.createdAt>this.ttlMs&&this.contexts.delete(n)}get size(){return this.contexts.size}}class V9{constructor(t,n){this.authJsMfaClient=t,this.auth0Client=n,this.contextManager=new W9}setMFAAuthDetails(t,n,o,r){this.contextManager.set(t,{scope:n,audience:o,mfaRequirements:r})}async getAuthenticators(t){var n,o;const r=this.contextManager.get(t);if(!(!((n=r==null?void 0:r.mfaRequirements)===null||n===void 0)&&n.challenge)||r.mfaRequirements.challenge.length===0)throw new kl("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const i=r.mfaRequirements.challenge.map(a=>a.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:t})).filter(a=>!!a.type&&i.includes(a.type))}catch(a){throw a instanceof PI?new kl((o=a.cause)===null||o===void 0?void 0:o.error,a.message):a}}async enroll(t){var n;const o=function(r){const i=IP[r.factorType];return Object.assign(Object.assign(Object.assign({mfaToken:r.mfaToken,authenticatorTypes:i.authenticatorTypes},i.oobChannels&&{oobChannels:i.oobChannels}),"phoneNumber"in r&&{phoneNumber:r.phoneNumber}),"email"in r&&{email:r.email})}(t);try{return await this.authJsMfaClient.enrollAuthenticator(o)}catch(r){throw r instanceof OI?new Uh((n=r.cause)===null||n===void 0?void 0:n.error,r.message):r}}async challenge(t){var n;try{const o={challengeType:t.challengeType,mfaToken:t.mfaToken};return t.authenticatorId&&(o.authenticatorId=t.authenticatorId),await this.authJsMfaClient.challengeAuthenticator(o)}catch(o){throw o instanceof TI?new Jh((n=o.cause)===null||n===void 0?void 0:n.error,o.message):o}}async getEnrollmentFactors(t){const n=this.contextManager.get(t);if(!n||!n.mfaRequirements)throw new Yh("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");return n.mfaRequirements.enroll&&n.mfaRequirements.enroll.length!==0?n.mfaRequirements.enroll:[]}async verify(t){const n=this.contextManager.get(t.mfaToken);if(!n)throw new Hi("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");const o=function(a){return"otp"in a&&a.otp?kP:"oobCode"in a&&a.oobCode?SP:"recoveryCode"in a&&a.recoveryCode?AP:void 0}(t);if(!o)throw new Hi("invalid_request","Unable to determine grant type. Provide one of: otp, oobCode, or recoveryCode.");const r=n.scope,i=n.audience;try{const a=await this.auth0Client._requestTokenForMfa({grant_type:o,mfaToken:t.mfaToken,scope:r,audience:i,otp:t.otp,oob_code:t.oobCode,binding_code:t.bindingCode,recovery_code:t.recoveryCode});return this.contextManager.remove(t.mfaToken),a}catch(a){if(a instanceof _s)this.setMFAAuthDetails(a.mfa_token,r,i,a.mfa_requirements);else if(a instanceof Hi)throw new Hi(a.error,a.error_description);throw a}}}const Oa=new GN;class F9{constructor(t){let n,o;if(this.userCache=new JC().enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const l=Array.from(this.activeLockKeys);for(const u of l)await Oa.releaseLock(u);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),typeof window<"u"&&(()=>{if(!gl())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(gl().subtle===void 0)throw new Error(`
66
+ in the address bar and allow pop-ups for this site.`},Image:SP,actionBtnText:"Test pop-up settings"},RP={name:Ct.PWA_INSTALL,label:"Install as a PWA",heading:"Install as a PWA (optional)",description:"By installing the platform as a Progressive Web App you will get a similar experience as with native desktop apps.",instructions:{initial:"If your browser supports Progressive Web Apps, you can now install the platform as a PWA."},Image:AP,actionBtnText:"Continue to the platform"},Dc=[NP,OP,TP,RP],uc={isCompleted:!1,state:"prompt"},LP={[Ct.WINDOW_MANAGEMENT]:uc,[Ct.NOTIFICATIONS]:uc,[Ct.POPUPS]:uc,[Ct.PWA_INSTALL]:uc};const _P=({isOpen:e,onClose:t})=>{var s;const{launchpadComponents:n,launchpadSettings:o}=RC(),{permission:r}=Dr(),i=(s=r.statuses[Ct.WINDOW_MANAGEMENT])==null?void 0:s.state,{Panel:a}=Dt;return d.jsx(a,{components:n,isOpen:e,onClose:t,settings:o,windowManagementPermissionState:i})};const BC=v.forwardRef((e,t)=>{const{className:n,isOpen:o,onClose:r,Panel:i,pinned:a=!1,position:s="left"}=e;return o&&!i&&console.error('Invalid use of PanelWrapper component. Please provide Panel component when "isOpen" is "true".'),d.jsx("div",{className:jo(n,"panel-wrapper",s,{open:o,pinned:a}),ref:t,children:i&&d.jsx(i,{isOpen:o,onClose:r})})}),Oh=e=>{const{Button:t,Panel:n,panelWrapperClassName:o,pinned:r=!1,position:i="left",tag:a="div",onClose:s}=e,[c,l]=v.useState(!1),u=v.useRef(null),p=v.useCallback(async()=>{l(!1),await(s==null?void 0:s())},[s]),f=()=>{if(c){p();return}l(!0)},h=!c||r;return MC({eventType:"mouseup",handler:p,ref:u,skip:h}),_C({handler:p,skip:h}),d.jsxs(a,{ref:u,children:[d.jsx(t,{active:c,onClick:f}),d.jsx(BC,{className:o,isOpen:c,onClose:p,Panel:n,pinned:r,position:i})]})};const HC=({Button:e=Yj})=>{const{isLaunchpadPinned:t}=xP();return d.jsx(Oh,{Button:e,Panel:_P,panelWrapperClassName:"launchpad-panel-wrapper",pinned:t})};var Vp=function(e,t){return Vp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},Vp(e,t)};function MP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Vp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ft=function(){return Ft=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ft.apply(this,arguments)};function ev(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function nr(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(o.next(u))}catch(p){a(p)}}function c(u){try{l(o.throw(u))}catch(p){a(p)}}function l(u){u.done?i(u.value):r(u.value).then(s,c)}l((o=o.apply(e,t||[])).next())})}function or(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(o=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,r=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],r=0}finally{o=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function DP(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function $n(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}var gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},GC={},Th={};Object.defineProperty(Th,"__esModule",{value:!0});var BP=function(){function e(){var t=this;this.locked=new Map,this.addToLocked=function(n,o){var r=t.locked.get(n);r===void 0?o===void 0?t.locked.set(n,[]):t.locked.set(n,[o]):o!==void 0&&(r.unshift(o),t.locked.set(n,r))},this.isLocked=function(n){return t.locked.has(n)},this.lock=function(n){return new Promise(function(o,r){t.isLocked(n)?t.addToLocked(n,o):(t.addToLocked(n),o())})},this.unlock=function(n){var o=t.locked.get(n);if(o!==void 0&&o.length!==0){var r=o.pop();t.locked.set(n,o),r!==void 0&&setTimeout(r,0)}else t.locked.delete(n)}}return e.getInstance=function(){return e.instance===void 0&&(e.instance=new e),e.instance},e}();Th.default=function(){return BP.getInstance()};var Xn=gi&&gi.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(l){try{c(o.next(l))}catch(u){i(u)}}function s(l){try{c(o.throw(l))}catch(u){i(u)}}function c(l){l.done?r(l.value):new n(function(u){u(l.value)}).then(a,s)}c((o=o.apply(e,t||[])).next())})},Un=gi&&gi.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,o=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!((r=r.length>0&&r[r.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(u[0]===6&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(p){u=[6,p],o=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}},Aa=gi;Object.defineProperty(GC,"__esModule",{value:!0});var Si=Th,dc={key:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},getItem:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},clear:function(){return Xn(Aa,void 0,void 0,function(){return Un(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return Xn(Aa,void 0,void 0,function(){return Un(this,function(t){throw new Error("Unsupported")})})},setItem:function(e,t){return Xn(Aa,void 0,void 0,function(){return Un(this,function(n){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function ad(e){return new Promise(function(t){return setTimeout(t,e)})}function sd(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}var HP=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+sd(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,e.waiters===void 0&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return n===void 0&&(n=5e3),Xn(this,void 0,void 0,function(){var o,r,i,a,s,c,l;return Un(this,function(u){switch(u.label){case 0:o=Date.now()+sd(4),r=Date.now()+n,i="browser-tabs-lock-key-"+t,a=this.storageHandler===void 0?dc:this.storageHandler,u.label=1;case 1:return Date.now()<r?[4,ad(30)]:[3,8];case 2:return u.sent(),a.getItemSync(i)!==null?[3,5]:(s=this.id+"-"+t+"-"+o,[4,ad(Math.floor(25*Math.random()))]);case 3:return u.sent(),a.setItemSync(i,JSON.stringify({id:this.id,iat:o,timeoutKey:s,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,ad(30)];case 4:return u.sent(),(c=a.getItemSync(i))!==null&&(l=JSON.parse(c)).id===this.id&&l.iat===o?(this.acquiredIatSet.add(o),this.refreshLockWhileAcquired(i,o),[2,!0]):[3,7];case 5:return e.lockCorrector(this.storageHandler===void 0?dc:this.storageHandler),[4,this.waitForSomethingToChange(r)];case 6:u.sent(),u.label=7;case 7:return o=Date.now()+sd(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(t,n){return Xn(this,void 0,void 0,function(){var o=this;return Un(this,function(r){return setTimeout(function(){return Xn(o,void 0,void 0,function(){var i,a,s;return Un(this,function(c){switch(c.label){case 0:return[4,Si.default().lock(n)];case 1:return c.sent(),this.acquiredIatSet.has(n)?(i=this.storageHandler===void 0?dc:this.storageHandler,(a=i.getItemSync(t))===null?(Si.default().unlock(n),[2]):((s=JSON.parse(a)).timeRefreshed=Date.now(),i.setItemSync(t,JSON.stringify(s)),Si.default().unlock(n),this.refreshLockWhileAcquired(t,n),[2])):(Si.default().unlock(n),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return Xn(this,void 0,void 0,function(){return Un(this,function(n){switch(n.label){case 0:return[4,new Promise(function(o){var r=!1,i=Date.now(),a=!1;function s(){if(a||(window.removeEventListener("storage",s),e.removeFromWaiting(s),clearTimeout(c),a=!0),!r){r=!0;var l=50-(Date.now()-i);l>0?setTimeout(o,l):o(null)}}window.addEventListener("storage",s),e.addToWaiting(s);var c=setTimeout(s,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)},e.removeFromWaiting=function(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(function(n){return n!==t}))},e.notifyWaiters=function(){e.waiters!==void 0&&e.waiters.slice().forEach(function(t){return t()})},e.prototype.releaseLock=function(t){return Xn(this,void 0,void 0,function(){return Un(this,function(n){switch(n.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,n.sent()]}})})},e.prototype.releaseLock__private__=function(t){return Xn(this,void 0,void 0,function(){var n,o,r,i;return Un(this,function(a){switch(a.label){case 0:return n=this.storageHandler===void 0?dc:this.storageHandler,o="browser-tabs-lock-key-"+t,(r=n.getItemSync(o))===null?[2]:(i=JSON.parse(r)).id!==this.id?[3,2]:[4,Si.default().lock(i.iat)];case 1:a.sent(),this.acquiredIatSet.delete(i.iat),n.removeItemSync(o),Si.default().unlock(i.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,o=t,r=[],i=0;;){var a=o.keySync(i);if(a===null)break;r.push(a),i++}for(var s=!1,c=0;c<r.length;c++){var l=r[c];if(l.includes("browser-tabs-lock-key")){var u=o.getItemSync(l);if(u!==null){var p=JSON.parse(u);(p.timeRefreshed===void 0&&p.timeAcquired<n||p.timeRefreshed!==void 0&&p.timeRefreshed<n)&&(o.removeItemSync(l),s=!0)}}}s&&e.notifyWaiters()},e.waiters=void 0,e}(),GP=GC.default=HP;const WP={timeoutInSeconds:60},WC={name:"auth0-spa-js",version:"2.14.0"},VC=()=>Date.now();class vt extends Error{constructor(t,n){super(n),this.error=t,this.error_description=n,Object.setPrototypeOf(this,vt.prototype)}static fromPayload(t){let{error:n,error_description:o}=t;return new vt(n,o)}}class Rh extends vt{constructor(t,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;super(t,n),this.state=o,this.appState=r,Object.setPrototypeOf(this,Rh.prototype)}}class Lh extends vt{constructor(t,n,o,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;super(t,n),this.connection=o,this.state=r,this.appState=i,Object.setPrototypeOf(this,Lh.prototype)}}class Fi extends vt{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,Fi.prototype)}}class _h extends Fi{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,_h.prototype)}}class Mh extends vt{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,Mh.prototype)}}class Dh extends vt{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,Dh.prototype)}}class _s extends vt{constructor(t,n,o,r){super(t,n),this.mfa_token=o,this.mfa_requirements=r,Object.setPrototypeOf(this,_s.prototype)}}class pu extends vt{constructor(t,n){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(ml(t,["default"]),"', scope: '").concat(ml(n),"')")),this.audience=t,this.scope=n,Object.setPrototypeOf(this,pu.prototype)}}class Bh extends vt{constructor(t,n){super("missing_scopes","Missing requested scopes after refresh (audience: '".concat(ml(t,["default"]),"', missing scope: '").concat(ml(n),"')")),this.audience=t,this.scope=n,Object.setPrototypeOf(this,Bh.prototype)}}class fu extends vt{constructor(t){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=t,Object.setPrototypeOf(this,fu.prototype)}}function ml(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&!t.includes(e)?e:""}const gl=()=>window.crypto,Ea=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(gl().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%e.length]),t},cd=e=>btoa(e),VP=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],FC=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return Object.keys(e).reduce((n,o)=>{if(t&&o==="env")return n;const r=VP.find(i=>i.key===o);return r&&r.type.includes(typeof e[o])&&(n[o]=e[o]),n},{})},Fp=e=>{var{clientId:t}=e,n=$n(e,["clientId"]);return new URLSearchParams((o=>Object.keys(o).filter(r=>o[r]!==void 0).reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:o[i]}),{}))(Object.assign({client_id:t},n))).toString()},tv=async e=>await gl().subtle.digest({name:"SHA-256"},new TextEncoder().encode(e)),nv=e=>(t=>decodeURIComponent(atob(t).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),ov=e=>{const t=new Uint8Array(e);return(n=>{const o={"+":"-","/":"_","=":""};return n.replace(/[+/=]/g,r=>o[r])})(window.btoa(String.fromCharCode(...Array.from(t))))},FP=new TextEncoder,zP=new TextDecoder;function za(e){return typeof e=="string"?FP.encode(e):zP.decode(e)}function rv(e){if(typeof e.modulusLength!="number"||e.modulusLength<2048)throw new ZP(`${e.name} modulusLength must be at least 2048 bits`)}async function $P(e,t,n){if(n.usages.includes("sign")===!1)throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const o=`${$a(za(JSON.stringify(e)))}.${$a(za(JSON.stringify(t)))}`;return`${o}.${$a(await crypto.subtle.sign(function(r){switch(r.algorithm.name){case"ECDSA":return{name:r.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return rv(r.algorithm),{name:r.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return rv(r.algorithm),{name:r.algorithm.name};case"Ed25519":return{name:r.algorithm.name}}throw new ni}(n),n,za(o)))}`}let zp;Uint8Array.prototype.toBase64?zp=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):zp=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let o=0;o<t.byteLength;o+=32768)n.push(String.fromCharCode.apply(null,t.subarray(o,o+32768)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function $a(e){return zp(e)}class ni extends Error{constructor(t){var n;super(t??"operation not supported"),this.name=this.constructor.name,(n=Error.captureStackTrace)===null||n===void 0||n.call(Error,this,this.constructor)}}class ZP extends Error{constructor(t){var n;super(t),this.name=this.constructor.name,(n=Error.captureStackTrace)===null||n===void 0||n.call(Error,this,this.constructor)}}function XP(e){switch(e.algorithm.name){case"RSA-PSS":return function(t){if(t.algorithm.hash.name==="SHA-256")return"PS256";throw new ni("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(t){if(t.algorithm.hash.name==="SHA-256")return"RS256";throw new ni("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(t){if(t.algorithm.namedCurve==="P-256")return"ES256";throw new ni("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new ni("unsupported CryptoKey algorithm name")}}function zC(e){return e instanceof CryptoKey}function $C(e){return zC(e)&&e.type==="public"}async function UP(e,t,n,o,r,i){const a=e==null?void 0:e.privateKey,s=e==null?void 0:e.publicKey;if(!zC(c=a)||c.type!=="private")throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!$C(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(s.extractable!==!0)throw new TypeError('"keypair.publicKey.extractable" must be true');if(typeof t!="string")throw new TypeError('"htu" must be a string');if(typeof n!="string")throw new TypeError('"htm" must be a string');if(o!==void 0&&typeof o!="string")throw new TypeError('"nonce" must be a string or undefined');if(r!==void 0&&typeof r!="string")throw new TypeError('"accessToken" must be a string or undefined');if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw new TypeError('"additional" must be an object');return $P({alg:XP(a),typ:"dpop+jwt",jwk:await ZC(s)},Object.assign(Object.assign({},i),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:n,nonce:o,htu:t,ath:r?$a(await crypto.subtle.digest("SHA-256",za(r))):void 0}),a)}async function ZC(e){const{kty:t,e:n,n:o,x:r,y:i,crv:a}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:a,e:n,n:o,x:r,y:i}}const JP=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange","http://auth0.com/oauth/grant-type/mfa-oob","http://auth0.com/oauth/grant-type/mfa-otp","http://auth0.com/oauth/grant-type/mfa-recovery-code"];function YP(){return async function(e,t){var n;let o;if(typeof e!="string"||e.length===0)throw new TypeError('"alg" must be a non-empty string');switch(e){case"PS256":o={name:"RSA-PSS",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"RS256":o={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"};break;case"Ed25519":o={name:"Ed25519"};break;default:throw new ni}return crypto.subtle.generateKey(o,(n=t==null?void 0:t.extractable)!==null&&n!==void 0&&n,["sign","verify"])}("ES256",{extractable:!1})}function KP(e){return async function(t){if(!$C(t))throw new TypeError('"publicKey" must be a public CryptoKey');if(t.extractable!==!0)throw new TypeError('"publicKey.extractable" must be true');const n=await ZC(t);let o;switch(n.kty){case"EC":o={crv:n.crv,kty:n.kty,x:n.x,y:n.y};break;case"OKP":o={crv:n.crv,kty:n.kty,x:n.x};break;case"RSA":o={e:n.e,kty:n.kty,n:n.n};break;default:throw new ni("unsupported JWK kty")}return $a(await crypto.subtle.digest({name:"SHA-256"},za(JSON.stringify(o))))}(e.publicKey)}function qP(e){let{keyPair:t,url:n,method:o,nonce:r,accessToken:i}=e;const a=function(s){const c=new URL(s);return c.search="",c.hash="",c.href}(n);return UP(t,a,o,r,i)}const QP=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json(),headers:(o=n.headers,[...o].reduce((r,i)=>{let[a,s]=i;return r[a]=s,r},{}))};var o},eN=async(e,t,n)=>{const o=new AbortController;let r;return t.signal=o.signal,Promise.race([QP(e,t),new Promise((i,a)=>{r=setTimeout(()=>{o.abort(),a(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(r)})},tN=async(e,t,n,o,r,i,a,s)=>((c,l)=>new Promise(function(u,p){const f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?p(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))({auth:{audience:t,scope:n},timeout:r,fetchUrl:e,fetchOptions:o,useFormData:a,useMrrt:s},i),nN=async function(e,t,n,o,r,i){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1e4,s=arguments.length>7?arguments[7]:void 0;return r?tN(e,t,n,o,a,r,i,s):eN(e,o,a)};async function XC(e,t,n,o,r,i,a,s,c,l){if(c){const w=await c.generateProof({url:e,method:r.method||"GET",nonce:await c.getNonce()});r.headers=Object.assign(Object.assign({},r.headers),{dpop:w})}let u,p=null;for(let w=0;w<3;w++)try{u=await nN(e,n,o,r,i,a,t,s),p=null;break}catch(I){p=I}if(p)throw p;const f=u.json,{error:h,error_description:m}=f,g=$n(f,["error","error_description"]),{headers:y,ok:x}=u;let C;if(c&&(C=y["dpop-nonce"],C&&await c.setNonce(C)),!x){const w=m||"HTTP error. Unable to fetch ".concat(e);if(h==="mfa_required")throw new _s(h,w,g.mfa_token,g.mfa_requirements);if(h==="missing_refresh_token")throw new pu(n,o);if(h==="use_dpop_nonce"){if(!c||!C||l)throw new fu(C);return XC(e,t,n,o,r,i,a,s,c,!0)}throw new vt(h||"request_error",w)}return g}async function oN(e,t){var{baseUrl:n,timeout:o,audience:r,scope:i,auth0Client:a,useFormData:s,useMrrt:c,dpop:l}=e,u=$n(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const p=u.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",f=u.grant_type==="refresh_token"&&c,h=Object.assign(Object.assign(Object.assign(Object.assign({},u),p&&r&&{audience:r}),p&&i&&{scope:i}),f&&{audience:r,scope:i}),m=s?Fp(h):JSON.stringify(h),g=(y=u.grant_type,JP.includes(y));var y;return await XC("".concat(n,"/oauth/token"),o,r||"default",i,{method:"POST",body:m,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(FC(a||WC)))}},t,s,c,g?l:void 0)}const rN=e=>Array.from(new Set(e)),Bc=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return rN(t.filter(Boolean).join(" ").trim().split(/\s+/)).join(" ")},pc=(e,t,n)=>{let o;return n&&(o=e[n]),o||(o=e.default),Bc(o,t)};class Ln{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"@@auth0spajs@@",o=arguments.length>2?arguments[2]:void 0;this.prefix=n,this.suffix=o,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[n,o,r,i]=t.split("::");return new Ln({clientId:o,scope:i,audience:r},n)}static fromCacheEntry(t){const{scope:n,audience:o,client_id:r}=t;return new Ln({scope:n,audience:o,clientId:r})}}class iN{set(t,n){localStorage.setItem(t,JSON.stringify(n))}get(t){const n=window.localStorage.getItem(t);if(n)try{return JSON.parse(n)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}}class UC{constructor(){this.enclosedCache=function(){let t={};return{set(n,o){t[n]=o},get(n){const o=t[n];if(o)return o},remove(n){delete t[n]},allKeys:()=>Object.keys(t)}}()}}class aN{constructor(t,n,o){this.cache=t,this.keyManifest=n,this.nowProvider=o||VC}async setIdToken(t,n,o){var r;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:n,decodedToken:o}),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(i))}async getIdToken(t){const n=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!n&&t.scope&&t.audience){const o=await this.get(t);return!o||!o.id_token||!o.decodedToken?void 0:{id_token:o.id_token,decodedToken:o.decodedToken}}if(n)return{id_token:n.id_token,decodedToken:n.decodedToken}}async get(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3?arguments[3]:void 0;var i;let a=await this.cache.get(t.toKey());if(!a){const l=await this.getCacheKeys();if(!l)return;const u=this.matchExistingCacheKey(t,l);if(u&&(a=await this.cache.get(u)),!a&&o&&r!=="cache-only")return this.getEntryWithRefreshToken(t,l)}if(!a)return;const s=await this.nowProvider(),c=Math.floor(s/1e3);return a.expiresAt-n<c?a.body.refresh_token?this.modifiedCachedEntry(a,t):(await this.cache.remove(t.toKey()),void await((i=this.keyManifest)===null||i===void 0?void 0:i.remove(t.toKey()))):a.body}async modifiedCachedEntry(t,n){return t.body={refresh_token:t.body.refresh_token,audience:t.body.audience,scope:t.body.scope},await this.cache.set(n.toKey(),t),{refresh_token:t.body.refresh_token,audience:t.body.audience,scope:t.body.scope}}async set(t){var n;const o=new Ln({clientId:t.client_id,scope:t.scope,audience:t.audience}),r=await this.wrapCacheEntry(t);await this.cache.set(o.toKey(),r),await((n=this.keyManifest)===null||n===void 0?void 0:n.add(o.toKey()))}async remove(t,n,o){const r=new Ln({clientId:t,scope:o,audience:n});await this.cache.remove(r.toKey())}async clear(t){var n;const o=await this.getCacheKeys();o&&(await o.filter(r=>!t||r.includes(t)).reduce(async(r,i)=>{await r,await this.cache.remove(i)},Promise.resolve()),await((n=this.keyManifest)===null||n===void 0?void 0:n.clear()))}async wrapCacheEntry(t){const n=await this.nowProvider();return{body:t,expiresAt:Math.floor(n/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new Ln({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,n){return n.filter(o=>{var r;const i=Ln.fromKey(o),a=new Set(i.scope&&i.scope.split(" ")),s=((r=t.scope)===null||r===void 0?void 0:r.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&a.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&c})[0]}async getEntryWithRefreshToken(t,n){var o;for(const r of n){const i=Ln.fromKey(r);if(i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId){const a=await this.cache.get(r);if(!((o=a==null?void 0:a.body)===null||o===void 0)&&o.refresh_token)return this.modifiedCachedEntry(a,t)}}}async updateEntry(t,n){var o;const r=await this.getCacheKeys();if(r)for(const i of r){const a=await this.cache.get(i);if(((o=a==null?void 0:a.body)===null||o===void 0?void 0:o.refresh_token)===t){const s=Object.assign(Object.assign({},a.body),{refresh_token:n});await this.set(s)}}}}class sN{constructor(t,n,o){this.storage=t,this.clientId=n,this.cookieDomain=o,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId)}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const ja=e=>typeof e=="number",cN=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],lN=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const a=i.split("."),[s,c,l]=a;if(a.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(nv(c)),p={__raw:i},f={};return Object.keys(u).forEach(h=>{p[h]=u[h],cN.includes(h)||(f[h]=u[h])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(nv(s)),claims:p,user:f}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!ja(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!ja(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!ja(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,o=new Date(e.now||Date.now()),r=new Date(0);if(r.setUTCSeconds(t.claims.exp+n),o>r)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(o,") is after expiration time (").concat(r,")"));if(t.claims.nbf!=null&&ja(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-n),o<i)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(o,") is before ").concat(i))}if(t.claims.auth_time!=null&&ja(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),o>i)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(o,") is after last auth at ").concat(i))}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const a=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(a!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(a,'", found "').concat(t.claims.org_id,'"'))}else{const a=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(a!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(a,'", found "').concat(t.claims.org_name,'"'))}}return t};var ds=gi&&gi.__assign||function(){return ds=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ds.apply(this,arguments)};function Pa(e,t){if(!t)return"";var n="; "+e;return t===!0?n:n+"="+t}function uN(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(o){if(typeof o.expires=="number"){var r=new Date;r.setMilliseconds(r.getMilliseconds()+864e5*o.expires),o.expires=r}return Pa("Expires",o.expires?o.expires.toUTCString():"")+Pa("Domain",o.domain)+Pa("Path",o.path)+Pa("Secure",o.secure)+Pa("SameSite",o.sameSite)}(n)}function dN(){return function(e){for(var t={},n=e?e.split("; "):[],o=/(%[\dA-F]{2})+/gi,r=0;r<n.length;r++){var i=n[r].split("="),a=i.slice(1).join("=");a.charAt(0)==='"'&&(a=a.slice(1,-1));try{t[i[0].replace(o,decodeURIComponent)]=a.replace(o,decodeURIComponent)}catch{}}return t}(document.cookie)}var pN=function(e){return dN()[e]};function JC(e,t,n){document.cookie=uN(e,t,ds({path:"/"},n))}var YC=JC,KC=function(e,t){JC(e,"",ds(ds({},t),{expires:-1}))};const Ni={get(e){const t=pN(e);if(t!==void 0)return JSON.parse(t)},save(e,t,n){let o={};window.location.protocol==="https:"&&(o={secure:!0,sameSite:"none"}),n!=null&&n.daysUntilExpire&&(o.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(o.domain=n.cookieDomain),YC(e,JSON.stringify(t),o)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),KC(e,n)}},fN={get(e){return Ni.get(e)||Ni.get("".concat("_legacy_").concat(e))},save(e,t,n){let o={};window.location.protocol==="https:"&&(o={secure:!0}),n!=null&&n.daysUntilExpire&&(o.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(o.domain=n.cookieDomain),YC("".concat("_legacy_").concat(e),JSON.stringify(t),o),Ni.save(e,t,n)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),KC(e,n),Ni.remove(e,t),Ni.remove("".concat("_legacy_").concat(e),t)}},hN={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var fr;(function(e){e.Code="code",e.ConnectCode="connect_code"})(fr||(fr={}));function mN(e,t,n){var o=t===void 0?null:t,r=function(c,l){var u=atob(c);if(l){for(var p=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)p[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(p.buffer))}return u}(e,n!==void 0&&n),i=r.indexOf(`
67
+ `,10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var iv,av,sv,ld,gN=(iv="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHQpe2xldHtlcnJvcjpyLGVycm9yX2Rlc2NyaXB0aW9uOnN9PXQ7cmV0dXJuIG5ldyBlKHIscyl9fWNsYXNzIHQgZXh0ZW5kcyBle2NvbnN0cnVjdG9yKGUscyl7c3VwZXIoIm1pc3NpbmdfcmVmcmVzaF90b2tlbiIsIk1pc3NpbmcgUmVmcmVzaCBUb2tlbiAoYXVkaWVuY2U6ICciLmNvbmNhdChyKGUsWyJkZWZhdWx0Il0pLCInLCBzY29wZTogJyIpLmNvbmNhdChyKHMpLCInKSIpKSx0aGlzLmF1ZGllbmNlPWUsdGhpcy5zY29wZT1zLE9iamVjdC5zZXRQcm90b3R5cGVPZih0aGlzLHQucHJvdG90eXBlKX19ZnVuY3Rpb24gcihlKXtsZXQgdD1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXT9hcmd1bWVudHNbMV06W107cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+IiIuY29uY2F0KGUsInwiKS5jb25jYXQodCk7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jIGU9PntsZXQgcixjLHtkYXRhOnt0aW1lb3V0OmksYXV0aDphLGZldGNoVXJsOmYsZmV0Y2hPcHRpb25zOmwsdXNlRm9ybURhdGE6cCx1c2VNcnJ0Omh9LHBvcnRzOlt1XX09ZSxkPXt9O2NvbnN0e2F1ZGllbmNlOmcsc2NvcGU6eX09YXx8e307dHJ5e2NvbnN0IGU9cD8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShsLmJvZHkpOkpTT04ucGFyc2UobC5ib2R5KTtpZighZS5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1lLmdyYW50X3R5cGUpe2lmKGM9KChlLHQpPT5vW24oZSx0KV0pKGcseSksIWMmJmgpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKCIiLmNvbmNhdChlLCJ8IikpKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxnKTtlJiYhdCYmKGM9ZSl9aWYoIWMpdGhyb3cgbmV3IHQoZyx5KTtsLmJvZHk9cD9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxlKSx7cmVmcmVzaF90b2tlbjpjfSkpfWxldCBhLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGE9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1hLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaj1pLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaikpKSksZmV0Y2goZixPYmplY3QuYXNzaWduKHt9LGwpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHUucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBhJiZhLmFib3J0KCksdm9pZCB1LnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO189ay5oZWFkZXJzLGQ9Wy4uLl9dLnJlZHVjZSgoKGUsdCk9PntsZXRbcixzXT10O3JldHVybiBlW3JdPXMsZX0pLHt9KSxyPWF3YWl0IGsuanNvbigpLHIucmVmcmVzaF90b2tlbj8oaCYmKG8ubGF0ZXN0X3JlZnJlc2hfdG9rZW49ci5yZWZyZXNoX3Rva2VuLE89YyxiPXIucmVmcmVzaF90b2tlbixPYmplY3QuZW50cmllcyhvKS5mb3JFYWNoKChlPT57bGV0W3Qscl09ZTtyPT09TyYmKG9bdF09Yil9KSkpLCgoZSx0LHIpPT57b1tuKHQscildPWV9KShyLnJlZnJlc2hfdG9rZW4sZyx5KSxkZWxldGUgci5yZWZyZXNoX3Rva2VuKTooKGUsdCk9PntkZWxldGUgb1tuKGUsdCldfSkoZyx5KSx1LnBvc3RNZXNzYWdlKHtvazprLm9rLGpzb246cixoZWFkZXJzOmR9KX1jYXRjaChlKXt1LnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX0saGVhZGVyczpkfSl9dmFyIE8sYixfLGp9KSl9KCk7Cgo=",av=null,sv=!1,function(e){return ld=ld||mN(iv,av,sv),new Worker(ld,e)});const ud={},cv=async function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3;for(let n=0;n<t;n++)if(await e())return!0;return!1};class vN{constructor(t,n){this.cache=t,this.clientId=n,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var n;const o=new Set(((n=await this.cache.get(this.manifestKey))===null||n===void 0?void 0:n.keys)||[]);o.add(t),await this.cache.set(this.manifestKey,{keys:[...o]})}async remove(t){const n=await this.cache.get(this.manifestKey);if(n){const o=new Set(n.keys);return o.delete(t),o.size>0?await this.cache.set(this.manifestKey,{keys:[...o]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return"".concat("@@auth0spajs@@","::").concat(t)}}const yN={memory:()=>new UC().enclosedCache,localstorage:()=>new iN},lv=e=>yN[e],uv=e=>{const{openUrl:t,onRedirect:n}=e,o=$n(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},o),{openUrl:t===!1||t?t:n})},dv=(e,t)=>{const n=(t==null?void 0:t.split(" "))||[];return((e==null?void 0:e.split(" "))||[]).every(o=>n.includes(o))},Wr={NONCE:"nonce",KEYPAIR:"keypair"};class bN{constructor(t){this.clientId=t}getVersion(){return 1}createDbHandle(){const t=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((n,o)=>{t.onupgradeneeded=()=>Object.values(Wr).forEach(r=>t.result.createObjectStore(r)),t.onerror=()=>o(t.error),t.onsuccess=()=>n(t.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(t,n,o){const r=o((await this.getDbHandle()).transaction(t,n).objectStore(t));return new Promise((i,a)=>{r.onsuccess=()=>i(r.result),r.onerror=()=>a(r.error)})}buildKey(t){const n=t?"_".concat(t):"auth0";return"".concat(this.clientId,"::").concat(n)}setNonce(t,n){return this.save(Wr.NONCE,this.buildKey(n),t)}setKeyPair(t){return this.save(Wr.KEYPAIR,this.buildKey(),t)}async save(t,n,o){await this.executeDbRequest(t,"readwrite",r=>r.put(o,n))}findNonce(t){return this.find(Wr.NONCE,this.buildKey(t))}findKeyPair(){return this.find(Wr.KEYPAIR,this.buildKey())}find(t,n){return this.executeDbRequest(t,"readonly",o=>o.get(n))}async deleteBy(t,n){const o=await this.executeDbRequest(t,"readonly",r=>r.getAllKeys());o==null||o.filter(n).map(r=>this.executeDbRequest(t,"readwrite",i=>i.delete(r)))}deleteByClientId(t,n){return this.deleteBy(t,o=>typeof o=="string"&&o.startsWith("".concat(n,"::")))}clearNonces(){return this.deleteByClientId(Wr.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Wr.KEYPAIR,this.clientId)}}class wN{constructor(t){this.storage=new bN(t)}getNonce(t){return this.storage.findNonce(t)}setNonce(t,n){return this.storage.setNonce(t,n)}async getOrGenerateKeyPair(){let t=await this.storage.findKeyPair();return t||(t=await YP(),await this.storage.setKeyPair(t)),t}async generateProof(t){const n=await this.getOrGenerateKeyPair();return qP(Object.assign({keyPair:n},t))}async calculateThumbprint(){return KP(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}}var Di;(function(e){e.Bearer="Bearer",e.DPoP="DPoP"})(Di||(Di={}));class xN{constructor(t,n){this.hooks=n,this.config=Object.assign(Object.assign({},t),{fetch:t.fetch||(typeof window>"u"?fetch:window.fetch.bind(window))})}isAbsoluteUrl(t){return/^(https?:)?\/\//i.test(t)}buildUrl(t,n){if(n){if(this.isAbsoluteUrl(n))return n;if(t)return"".concat(t.replace(/\/?\/$/,""),"/").concat(n.replace(/^\/+/,""))}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(t){return this.config.getAccessToken?this.config.getAccessToken(t):this.hooks.getAccessToken(t)}extractUrl(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}buildBaseRequest(t,n){if(!this.config.baseUrl)return new Request(t,n);const o=this.buildUrl(this.config.baseUrl,this.extractUrl(t)),r=t instanceof Request?new Request(o,t):o;return new Request(r,n)}setAuthorizationHeader(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Di.Bearer;t.headers.set("authorization","".concat(o," ").concat(n))}async setDpopProofHeader(t,n){if(!this.config.dpopNonceId)return;const o=await this.hooks.getDpopNonce(),r=await this.hooks.generateDpopProof({accessToken:n,method:t.method,nonce:o,url:t.url});t.headers.set("dpop",r)}async prepareRequest(t,n){const o=await this.getAccessToken(n);let r,i;typeof o=="string"?(r=this.config.dpopNonceId?Di.DPoP:Di.Bearer,i=o):(r=o.token_type,i=o.access_token),this.setAuthorizationHeader(t,i,r),r===Di.DPoP&&await this.setDpopProofHeader(t,i)}getHeader(t,n){return Array.isArray(t)?new Headers(t).get(n)||"":typeof t.get=="function"?t.get(n)||"":t[n]||""}hasUseDpopNonceError(t){if(t.status!==401)return!1;const n=this.getHeader(t.headers,"www-authenticate");return n.includes("invalid_dpop_nonce")||n.includes("use_dpop_nonce")}async handleResponse(t,n){const o=this.getHeader(t.headers,"dpop-nonce");if(o&&await this.hooks.setDpopNonce(o),!this.hasUseDpopNonceError(t))return t;if(!o||!n.onUseDpopNonceError)throw new fu(o);return n.onUseDpopNonceError()}async internalFetchWithAuth(t,n,o,r){const i=this.buildBaseRequest(t,n);await this.prepareRequest(i,r);const a=await this.config.fetch(i);return this.handleResponse(a,o)}fetchWithAuth(t,n,o){const r={onUseDpopNonceError:()=>this.internalFetchWithAuth(t,n,Object.assign(Object.assign({},r),{onUseDpopNonceError:void 0}),o)};return this.internalFetchWithAuth(t,n,r,o)}}class CN{constructor(t,n){this.myAccountFetcher=t,this.apiBase=n}async connectAccount(t){const n=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/connect"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return this._handleResponse(n)}async completeAccount(t){const n=await this.myAccountFetcher.fetchWithAuth("".concat(this.apiBase,"v1/connected-accounts/complete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return this._handleResponse(n)}async _handleResponse(t){let n;try{n=await t.text(),n=JSON.parse(n)}catch(o){throw new vl({type:"invalid_json",status:t.status,title:"Invalid JSON response",detail:n||String(o)})}if(t.ok)return n;throw new vl(n)}}class vl extends Error{constructor(t){let{type:n,status:o,title:r,detail:i,validation_errors:a}=t;super(i),this.name="MyAccountApiError",this.type=n,this.status=o,this.title=r,this.detail=i,this.validation_errors=a,Object.setPrototypeOf(this,vl.prototype)}}const IN={otp:{authenticatorTypes:["otp"]},sms:{authenticatorTypes:["oob"],oobChannels:["sms"]},email:{authenticatorTypes:["oob"],oobChannels:["email"]},push:{authenticatorTypes:["oob"],oobChannels:["auth0"]},voice:{authenticatorTypes:["oob"],oobChannels:["voice"]}},kN="http://auth0.com/oauth/grant-type/mfa-otp",SN="http://auth0.com/oauth/grant-type/mfa-oob",AN="http://auth0.com/oauth/grant-type/mfa-recovery-code";function qC(e,t){this.v=e,this.k=t}function Et(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function EN(e){return new qC(e,0)}function QC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pe(e,t){return e.get(Et(e,t))}function Rt(e,t,n){QC(e,t),t.set(e,n)}function gt(e,t,n){return e.set(Et(e,t),n),n}function he(e,t,n){return(t=function(o){var r=function(i,a){if(typeof i!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var c=s.call(i,a||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(o,"string");return typeof r=="symbol"?r:r+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pv(Object(n),!0).forEach(function(o){he(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function fv(e,t){if(e==null)return{};var n,o,r=function(a,s){if(a==null)return{};var c={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(s.indexOf(l)!==-1)continue;c[l]=a[l]}return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jN(e){return function(){return new Ha(e.apply(this,arguments))}}function Ha(e){var t,n;function o(i,a){try{var s=e[i](a),c=s.value,l=c instanceof qC;Promise.resolve(l?c.v:c).then(function(u){if(l){var p=i==="return"?"return":"next";if(!c.k||u.done)return o(p,u);u=e[p](u).value}r(s.done?"return":"normal",u)},function(u){o("throw",u)})}catch(u){r("throw",u)}}function r(i,a){switch(i){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?o(t.key,t.arg):n=null}this._invoke=function(i,a){return new Promise(function(s,c){var l={key:i,arg:a,resolve:s,reject:c,next:null};n?n=n.next=l:(t=n=l,o(i,a))})},typeof e.return!="function"&&(this.return=void 0)}var fc,dd;let $p;if(Ha.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ha.prototype.next=function(e){return this._invoke("next",e)},Ha.prototype.throw=function(e){return this._invoke("throw",e)},Ha.prototype.return=function(e){return this._invoke("return",e)},typeof navigator>"u"||(fc=navigator.userAgent)===null||fc===void 0||(dd=fc.startsWith)===null||dd===void 0||!dd.call(fc,"Mozilla/5.0 ")){const e="v3.8.3";$p="".concat("oauth4webapi","/").concat(e)}function fa(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}function rt(e,t,n){const o=new TypeError(e,{cause:n});return Object.assign(o,{code:t}),o}const Gn=Symbol(),Zp=Symbol(),Xp=Symbol(),io=Symbol(),PN=Symbol(),ko=Symbol(),NN=new TextEncoder,ON=new TextDecoder;function zi(e){return typeof e=="string"?NN.encode(e):ON.decode(e)}let Up,eI;Uint8Array.prototype.toBase64?Up=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):Up=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let o=0;o<t.byteLength;o+=32768)n.push(String.fromCharCode.apply(null,t.subarray(o,o+32768)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function li(e){return typeof e=="string"?eI(e):Up(e)}eI=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(t){throw rt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",t)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}catch(t){throw rt("The input to be decoded is not correctly encoded.","ERR_INVALID_ARG_VALUE",t)}};class Sn extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,this.code=Kp,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}class Hh extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,n!=null&&n.code&&(this.code=n==null?void 0:n.code),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}function Re(e,t,n){return new Hh(e,{code:t,cause:n})}function TN(e,t){if(function(n,o){if(!(n instanceof CryptoKey))throw rt("".concat(o," must be a CryptoKey"),"ERR_INVALID_ARG_TYPE")}(e,t),e.type!=="private")throw rt("".concat(t," must be a private CryptoKey"),"ERR_INVALID_ARG_VALUE")}function yl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function hu(e){fa(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(e??{});if($p&&!t.has("user-agent")&&t.set("user-agent",$p),t.has("authorization"))throw rt('"options.headers" must not include the "authorization" header name',"ERR_INVALID_ARG_VALUE");return t}function tI(e,t){if(t!==void 0){if(typeof t=="function"&&(t=t(e.href)),!(t instanceof AbortSignal))throw rt('"options.signal" must return or be an instance of AbortSignal',"ERR_INVALID_ARG_TYPE");return t}}function hv(e){return e.includes("//")?e.replace("//","/"):e}async function RN(e,t){return async function(n,o,r,i){if(!(n instanceof URL))throw rt('"'.concat(o,'" must be an instance of URL'),"ERR_INVALID_ARG_TYPE");Gh(n,(i==null?void 0:i[Gn])!==!0);const a=r(new URL(n.href)),s=hu(i==null?void 0:i.headers);return s.set("accept","application/json"),((i==null?void 0:i[io])||fetch)(a.href,{body:void 0,headers:Object.fromEntries(s.entries()),method:"GET",redirect:"manual",signal:tI(a,i==null?void 0:i.signal)})}(e,"issuerIdentifier",n=>{switch(t==null?void 0:t.algorithm){case void 0:case"oidc":(function(o,r){o.pathname=hv("".concat(o.pathname,"/").concat(r))})(n,".well-known/openid-configuration");break;case"oauth2":(function(o,r){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];o.pathname==="/"?o.pathname=r:o.pathname=hv("".concat(r,"/").concat(i?o.pathname:o.pathname.replace(/(\/)$/,"")))})(n,".well-known/oauth-authorization-server");break;default:throw rt('"options.algorithm" must be "oidc" (default), or "oauth2"',"ERR_INVALID_ARG_VALUE")}return n},t)}function Pr(e,t,n,o,r){try{if(typeof e!="number"||!Number.isFinite(e))throw rt("".concat(n," must be a number"),"ERR_INVALID_ARG_TYPE",r);if(e>0)return;if(t){if(e!==0)throw rt("".concat(n," must be a non-negative number"),"ERR_INVALID_ARG_VALUE",r);return}throw rt("".concat(n," must be a positive number"),"ERR_INVALID_ARG_VALUE",r)}catch(i){throw o?Re(i.message,o,r):i}}function Pt(e,t,n,o){try{if(typeof e!="string")throw rt("".concat(t," must be a string"),"ERR_INVALID_ARG_TYPE",o);if(e.length===0)throw rt("".concat(t," must not be empty"),"ERR_INVALID_ARG_VALUE",o)}catch(r){throw n?Re(r.message,n,o):r}}function nI(e){(function(t,n){if(aI(t)!==n)throw function(o){let r='"response" content-type must be ';for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];if(a.length>2){const c=a.pop();r+="".concat(a.join(", "),", or ").concat(c)}else a.length===2?r+="".concat(a[0]," or ").concat(a[1]):r+=a[0];return Re(r,cI,o)}(t,n)})(e,"application/json")}function oI(){return li(crypto.getRandomValues(new Uint8Array(32)))}function LN(e){switch(e.algorithm.name){case"RSA-PSS":return function(t){switch(t.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Sn("unsupported RsaHashedKeyAlgorithm hash name",{cause:t})}}(e);case"RSASSA-PKCS1-v1_5":return function(t){switch(t.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Sn("unsupported RsaHashedKeyAlgorithm hash name",{cause:t})}}(e);case"ECDSA":return function(t){switch(t.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Sn("unsupported EcKeyAlgorithm namedCurve",{cause:t})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new Sn("unsupported CryptoKey algorithm name",{cause:e})}}function bl(e){const t=e==null?void 0:e[Zp];return typeof t=="number"&&Number.isFinite(t)?t:0}function Jp(e){const t=e==null?void 0:e[Xp];return typeof t=="number"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function wl(){return Math.floor(Date.now()/1e3)}function Qn(e){if(typeof e!="object"||e===null)throw rt('"as" must be an object',"ERR_INVALID_ARG_TYPE");Pt(e.issuer,'"as.issuer"')}function eo(e){if(typeof e!="object"||e===null)throw rt('"client" must be an object',"ERR_INVALID_ARG_TYPE");Pt(e.client_id,'"client.client_id"')}function mv(e){return Pt(e,'"clientSecret"'),(t,n,o,r)=>{o.set("client_id",n.client_id),o.set("client_secret",e)}}function _N(e,t){const{key:n,kid:o}=(r=e)instanceof CryptoKey?{key:r}:(r==null?void 0:r.key)instanceof CryptoKey?(r.kid!==void 0&&Pt(r.kid,'"kid"'),{key:r.key,kid:r.kid}):{};var r;return TN(n,'"clientPrivateKey.key"'),async(i,a,s,c)=>{var l;const u={alg:LN(n),kid:o},p=function(f,h){const m=wl()+bl(h);return{jti:oI(),aud:f.issuer,exp:m+60,iat:m,nbf:m,iss:h.client_id,sub:h.client_id}}(i,a);t==null||(l=t[PN])===null||l===void 0||l.call(t,u,p),s.set("client_id",a.client_id),s.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),s.set("client_assertion",await async function(f,h,m){if(!m.usages.includes("sign"))throw rt('CryptoKey instances used for signing assertions must include "sign" in their "usages"',"ERR_INVALID_ARG_VALUE");const g="".concat(li(zi(JSON.stringify(f))),".").concat(li(zi(JSON.stringify(h)))),y=li(await crypto.subtle.sign(function(x){switch(x.algorithm.name){case"ECDSA":return{name:x.algorithm.name,hash:QN(x)};case"RSA-PSS":switch(yv(x),x.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:x.algorithm.name,saltLength:parseInt(x.algorithm.hash.name.slice(-3),10)>>3};default:throw new Sn("unsupported RSA-PSS hash name",{cause:x})}case"RSASSA-PKCS1-v1_5":return yv(x),x.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return x.algorithm.name}throw new Sn("unsupported CryptoKey algorithm name",{cause:x})}(m),m,zi(g)));return"".concat(g,".").concat(y)}(u,p,n))}}const MN=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function Gh(e,t){if(t&&e.protocol!=="https:")throw Re("only requests to HTTPS are allowed",lI,e);if(e.protocol!=="https:"&&e.protocol!=="http:")throw Re("only HTTP and HTTPS requests are allowed",uI,e)}function gv(e,t,n,o){let r;if(typeof e!="string"||!(r=MN(e)))throw Re("authorization server metadata does not contain a valid ".concat(n?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),e===void 0?KN:qN,{attribute:n?"mtls_endpoint_aliases.".concat(t):t});return Gh(r,o),r}function Ms(e,t,n,o){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?gv(e.mtls_endpoint_aliases[t],t,n,o):gv(e[t],t,n,o)}class mu extends Error{constructor(t,n){var o;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"error",void 0),he(this,"status",void 0),he(this,"error_description",void 0),he(this,"response",void 0),this.name=this.constructor.name,this.code=JN,this.cause=n.cause,this.error=n.cause.error,this.status=n.response.status,this.error_description=n.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}class rI extends Error{constructor(t,n){var o,r;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"error",void 0),he(this,"error_description",void 0),this.name=this.constructor.name,this.code=YN,this.cause=n.cause,this.error=n.cause.get("error"),this.error_description=(o=n.cause.get("error_description"))!==null&&o!==void 0?o:void 0,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}}class Wh extends Error{constructor(t,n){var o;super(t,n),he(this,"cause",void 0),he(this,"code",void 0),he(this,"response",void 0),he(this,"status",void 0),this.name=this.constructor.name,this.code=UN,this.cause=n.cause,this.status=n.response.status,this.response=n.response,Object.defineProperty(this,"response",{enumerable:!1}),(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}const DN="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",BN=new RegExp("^[,\\s]*("+DN+")"),HN=new RegExp('^[,\\s]*([a-zA-Z0-9!#$%&\\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"[,\\s]*(.*)'),GN=new RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)[,\\s]*(.*)"),WN=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Vh(e,t,n){if(e.status!==t){let r;var o;throw function(i){let a;if(a=function(s){if(!fa(s,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");const c=s.headers.get("www-authenticate");if(c===null)return;const l=[];let u=c;for(;u;){var p;let f=u.match(BN);const h=(p=f)===null||p===void 0?void 0:p[1].toLowerCase();if(!h)return;const m=u.substring(f[0].length);if(m&&!m.match(/^[\s,]/))return;const g=m.match(/^\s+(.*)$/),y=!!g;u=g?g[1]:void 0;const x={};let C;if(y)for(;u;){let I,b;if(f=u.match(HN)){if([,I,b,u]=f,b.includes("\\"))try{b=JSON.parse('"'.concat(b,'"'))}catch{}x[I.toLowerCase()]=b}else{if(!(f=u.match(GN))){if(f=u.match(WN)){if(Object.keys(x).length)break;[,C,u]=f;break}return}[,I,b,u]=f,x[I.toLowerCase()]=b}}else u=m||void 0;const w={scheme:h,parameters:x};C&&(w.token68=C),l.push(w)}return l.length?l:void 0}(i))throw new Wh("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:a,response:i})}(e),(r=await async function(i){if(i.status>399&&i.status<500){Bs(i),nI(i);try{const a=await i.clone().json();if(yl(a)&&typeof a.error=="string"&&a.error.length)return a}catch{}}}(e))?(await((o=e.body)===null||o===void 0?void 0:o.cancel()),new mu("server responded with an error in the response body",{cause:r,response:e})):Re('"response" is not a conform '.concat(n," response (unexpected HTTP status code)"),$h,e)}}function iI(e){if(!zh.has(e))throw rt('"options.DPoP" is not a valid DPoPHandle',"ERR_INVALID_ARG_VALUE")}function aI(e){var t;return(t=e.headers.get("content-type"))===null||t===void 0?void 0:t.split(";")[0]}async function Fh(e,t,n,o,r,i,a){return await n(e,t,r,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((a==null?void 0:a[io])||fetch)(o.href,{body:r,headers:Object.fromEntries(i.entries()),method:"POST",redirect:"manual",signal:tI(o,a==null?void 0:a.signal)})}async function Ds(e,t,n,o,r,i){var a;const s=Ms(e,"token_endpoint",t.use_mtls_endpoint_aliases,(i==null?void 0:i[Gn])!==!0);r.set("grant_type",o);const c=hu(i==null?void 0:i.headers);c.set("accept","application/json"),(i==null?void 0:i.DPoP)!==void 0&&(iI(i.DPoP),await i.DPoP.addProof(s,c,"POST"));const l=await Fh(e,t,n,s,r,c,i);return i==null||(a=i.DPoP)===null||a===void 0||a.cacheNonce(l,s),l}const sI=new WeakMap,VN=new WeakMap;function Yp(e){if(!e.id_token)return;const t=sI.get(e);if(!t)throw rt('"ref" was already garbage collected or did not resolve from the proper sources',"ERR_INVALID_ARG_VALUE");return t}async function oa(e,t,n,o,r,i){if(Qn(e),eo(t),!fa(n,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Vh(n,200,"Token Endpoint"),Bs(n);const a=await gu(n);if(Pt(a.access_token,'"response" body "access_token" property',Fe,{body:a}),Pt(a.token_type,'"response" body "token_type" property',Fe,{body:a}),a.token_type=a.token_type.toLowerCase(),a.expires_in!==void 0){let s=typeof a.expires_in!="number"?parseFloat(a.expires_in):a.expires_in;Pr(s,!0,'"response" body "expires_in" property',Fe,{body:a}),a.expires_in=s}if(a.refresh_token!==void 0&&Pt(a.refresh_token,'"response" body "refresh_token" property',Fe,{body:a}),a.scope!==void 0&&typeof a.scope!="string")throw Re('"response" body "scope" property must be a string',Fe,{body:a});if(a.id_token!==void 0){Pt(a.id_token,'"response" body "id_token" property',Fe,{body:a});const s=["aud","exp","iat","iss","sub"];t.require_auth_time===!0&&s.push("auth_time"),t.default_max_age!==void 0&&(Pr(t.default_max_age,!0,'"client.default_max_age"'),s.push("auth_time")),o!=null&&o.length&&s.push(...o);const{claims:c,jwt:l}=await async function(u,p,f,h,m){let g,y,{0:x,1:C,length:w}=u.split(".");if(w===5){if(m===void 0)throw new Sn("JWE decryption is not configured",{cause:u});u=await m(u),{0:x,1:C,length:w}=u.split(".")}if(w!==3)throw Re("Invalid JWT",Fe,u);try{g=JSON.parse(zi(li(x)))}catch(b){throw Re("failed to parse JWT Header body as base64url encoded JSON",xl,b)}if(!yl(g))throw Re("JWT Header must be a top level object",Fe,u);if(p(g),g.crit!==void 0)throw new Sn('no JWT "crit" header parameter extensions are supported',{cause:{header:g}});try{y=JSON.parse(zi(li(C)))}catch(b){throw Re("failed to parse JWT Payload body as base64url encoded JSON",xl,b)}if(!yl(y))throw Re("JWT Payload must be a top level object",Fe,u);const I=wl()+f;if(y.exp!==void 0){if(typeof y.exp!="number")throw Re('unexpected JWT "exp" (expiration time) claim type',Fe,{claims:y});if(y.exp<=I-h)throw Re('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',ps,{claims:y,now:I,tolerance:h,claim:"exp"})}if(y.iat!==void 0&&typeof y.iat!="number")throw Re('unexpected JWT "iat" (issued at) claim type',Fe,{claims:y});if(y.iss!==void 0&&typeof y.iss!="string")throw Re('unexpected JWT "iss" (issuer) claim type',Fe,{claims:y});if(y.nbf!==void 0){if(typeof y.nbf!="number")throw Re('unexpected JWT "nbf" (not before) claim type',Fe,{claims:y});if(y.nbf>I+h)throw Re('unexpected JWT "nbf" (not before) claim value',ps,{claims:y,now:I,tolerance:h,claim:"nbf"})}if(y.aud!==void 0&&typeof y.aud!="string"&&!Array.isArray(y.aud))throw Re('unexpected JWT "aud" (audience) claim type',Fe,{claims:y});return{header:g,claims:y,jwt:u}}(a.id_token,t9.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),bl(t),Jp(t),r).then(ZN.bind(void 0,s)).then(zN.bind(void 0,e)).then(FN.bind(void 0,t.client_id));if(Array.isArray(c.aud)&&c.aud.length!==1){if(c.azp===void 0)throw Re('ID Token "aud" (audience) claim includes additional untrusted audiences',$o,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw Re('unexpected ID Token "azp" (authorized party) claim value',$o,{expected:t.client_id,claims:c,claim:"azp"})}c.auth_time!==void 0&&Pr(c.auth_time,!0,'ID Token "auth_time" (authentication time)',Fe,{claims:c}),VN.set(n,l),sI.set(a,c)}if((i==null?void 0:i[a.token_type])!==void 0)i[a.token_type](n,a);else if(a.token_type!=="dpop"&&a.token_type!=="bearer")throw new Sn("unsupported `token_type` value",{cause:{body:a}});return a}function FN(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Re('unexpected JWT "aud" (audience) claim value',$o,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Re('unexpected JWT "aud" (audience) claim value',$o,{expected:e,claims:t.claims,claim:"aud"});return t}function zN(e,t){var n,o;const r=(n=(o=e[dI])===null||o===void 0?void 0:o.call(e,t))!==null&&n!==void 0?n:e.issuer;if(t.claims.iss!==r)throw Re('unexpected JWT "iss" (issuer) claim value',$o,{expected:r,claims:t.claims,claim:"iss"});return t}const zh=new WeakSet,vv=Symbol(),$N={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function ZN(e,t){for(const n of e)if(t.claims[n]===void 0)throw Re('JWT "'.concat(n,'" (').concat($N[n],") claim missing"),Fe,{claims:t.claims});return t}const pd=Symbol(),fd=Symbol();async function XN(e,t,n,o){return typeof(o==null?void 0:o.expectedNonce)=="string"||typeof(o==null?void 0:o.maxAge)=="number"||o!=null&&o.requireIdToken?async function(r,i,a,s,c,l,u){const p=[];switch(s){case void 0:s=pd;break;case pd:break;default:Pt(s,'"expectedNonce" argument'),p.push("nonce")}switch(c!=null||(c=i.default_max_age),c){case void 0:c=fd;break;case fd:break;default:Pr(c,!0,'"maxAge" argument'),p.push("auth_time")}const f=await oa(r,i,a,p,l,u);Pt(f.id_token,'"response" body "id_token" property',Fe,{body:f});const h=Yp(f);if(c!==fd){const m=wl()+bl(i),g=Jp(i);if(h.auth_time+c<m-g)throw Re("too much time has elapsed since the last End-User authentication",ps,{claims:h,now:m,tolerance:g,claim:"auth_time"})}if(s===pd){if(h.nonce!==void 0)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:void 0,claims:h,claim:"nonce"})}else if(h.nonce!==s)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:s,claims:h,claim:"nonce"});return f}(e,t,n,o.expectedNonce,o.maxAge,o[ko],o.recognizedTokenTypes):async function(r,i,a,s,c){const l=await oa(r,i,a,void 0,s,c),u=Yp(l);if(u){if(i.default_max_age!==void 0){Pr(i.default_max_age,!0,'"client.default_max_age"');const p=wl()+bl(i),f=Jp(i);if(u.auth_time+i.default_max_age<p-f)throw Re("too much time has elapsed since the last End-User authentication",ps,{claims:u,now:p,tolerance:f,claim:"auth_time"})}if(u.nonce!==void 0)throw Re('unexpected ID Token "nonce" claim value',$o,{expected:void 0,claims:u,claim:"nonce"})}return l}(e,t,n,o==null?void 0:o[ko],o==null?void 0:o.recognizedTokenTypes)}const UN="OAUTH_WWW_AUTHENTICATE_CHALLENGE",JN="OAUTH_RESPONSE_BODY_ERROR",Kp="OAUTH_UNSUPPORTED_OPERATION",YN="OAUTH_AUTHORIZATION_RESPONSE_ERROR",xl="OAUTH_PARSE_ERROR",Fe="OAUTH_INVALID_RESPONSE",cI="OAUTH_RESPONSE_IS_NOT_JSON",$h="OAUTH_RESPONSE_IS_NOT_CONFORM",lI="OAUTH_HTTP_REQUEST_FORBIDDEN",uI="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",ps="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",$o="OAUTH_JWT_CLAIM_COMPARISON_FAILED",qp="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",KN="OAUTH_MISSING_SERVER_METADATA",qN="OAUTH_INVALID_SERVER_METADATA";function Bs(e){if(e.bodyUsed)throw rt('"response" body has been used already',"ERR_INVALID_ARG_VALUE")}function yv(e){const{algorithm:t}=e;if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Sn("unsupported ".concat(t.name," modulusLength"),{cause:e})}function QN(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Sn("unsupported ECDSA namedCurve",{cause:e})}}async function e9(e){if(e.method!=="POST")throw rt("form_post responses are expected to use the POST method","ERR_INVALID_ARG_VALUE",{cause:e});if(aI(e)!=="application/x-www-form-urlencoded")throw rt("form_post responses are expected to use the application/x-www-form-urlencoded content-type","ERR_INVALID_ARG_VALUE",{cause:e});return async function(t){if(t.bodyUsed)throw rt("form_post Request instances must contain a readable body","ERR_INVALID_ARG_VALUE",{cause:t});return t.text()}(e)}function t9(e,t,n,o){if(e===void 0)if(Array.isArray(t)){if(!t.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:t,reason:"authorization server metadata"})}else{if(n===void 0)throw Re('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:n});if(typeof n=="string"?o.alg!==n:typeof n=="function"?!n(o.alg):!n.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:n,reason:"default value"})}else if(typeof e=="string"?o.alg!==e:!e.includes(o.alg))throw Re('unexpected JWT "alg" header parameter',Fe,{header:o,expected:e,reason:"client configuration"})}function Qr(e,t){const{0:n,length:o}=e.getAll(t);if(o>1)throw Re('"'.concat(t,'" parameter must be provided only once'),Fe);return n}const n9=Symbol(),o9=Symbol();function r9(e,t,n,o){if(Qn(e),eo(t),n instanceof URL&&(n=n.searchParams),!(n instanceof URLSearchParams))throw rt('"parameters" must be an instance of URLSearchParams, or URL',"ERR_INVALID_ARG_TYPE");if(Qr(n,"response"))throw Re('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',Fe,{parameters:n});const r=Qr(n,"iss"),i=Qr(n,"state");if(!r&&e.authorization_response_iss_parameter_supported)throw Re('response parameter "iss" (issuer) missing',Fe,{parameters:n});if(r&&r!==e.issuer)throw Re('unexpected "iss" (issuer) response parameter value',Fe,{expected:e.issuer,parameters:n});switch(o){case void 0:case o9:if(i!==void 0)throw Re('unexpected "state" response parameter encountered',Fe,{expected:void 0,parameters:n});break;case n9:break;default:if(Pt(o,'"expectedState" argument'),i!==o)throw Re(i===void 0?'response parameter "state" missing':'unexpected "state" response parameter value',Fe,{expected:o,parameters:n})}if(Qr(n,"error"))throw new rI("authorization response from the server is an error",{cause:n});const a=Qr(n,"id_token"),s=Qr(n,"token");if(a!==void 0||s!==void 0)throw new Sn("implicit and hybrid flows are not supported");return c=new URLSearchParams(n),zh.add(c),c;var c}async function gu(e){let t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nI;try{t=await e.json()}catch(o){throw n(e),Re('failed to parse "response" body as JSON',xl,o)}if(!yl(t))throw Re('"response" body must be a top level object',Fe,{body:t});return t}const hd=Symbol(),dI=Symbol(),bv=new TextEncoder,fs=new TextDecoder;function md(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[n]=o}return t}function pI(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Za(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e=="string"?e:fs.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=fs.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return pI(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}class Yt extends Error{constructor(t,n){var o;super(t,n),he(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}he(Yt,"code","ERR_JOSE_GENERIC");class Fn extends Yt{constructor(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"unspecified",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unspecified";super(t,{cause:{claim:o,reason:r,payload:n}}),he(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),he(this,"claim",void 0),he(this,"reason",void 0),he(this,"payload",void 0),this.claim=o,this.reason=r,this.payload=n}}he(Fn,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class Qp extends Yt{constructor(t,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"unspecified",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unspecified";super(t,{cause:{claim:o,reason:r,payload:n}}),he(this,"code","ERR_JWT_EXPIRED"),he(this,"claim",void 0),he(this,"reason",void 0),he(this,"payload",void 0),this.claim=o,this.reason=r,this.payload=n}}he(Qp,"code","ERR_JWT_EXPIRED");class fI extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}he(fI,"code","ERR_JOSE_ALG_NOT_ALLOWED");class In extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JOSE_NOT_SUPPORTED")}}he(In,"code","ERR_JOSE_NOT_SUPPORTED");he(class extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED");he(class extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Wt extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWS_INVALID")}}he(Wt,"code","ERR_JWS_INVALID");class ef extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWT_INVALID")}}he(ef,"code","ERR_JWT_INVALID");he(class extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Zh extends Yt{constructor(){super(...arguments),he(this,"code","ERR_JWKS_INVALID")}}he(Zh,"code","ERR_JWKS_INVALID");class Xh extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}he(Xh,"code","ERR_JWKS_NO_MATCHING_KEY");class hI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),he(this,Symbol.asyncIterator,void 0),he(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}he(hI,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class mI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWKS_TIMEOUT")}}he(mI,"code","ERR_JWKS_TIMEOUT");class gI extends Yt{constructor(){super(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),he(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}he(gI,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const so=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"algorithm.name";return new TypeError("CryptoKey does not support this operation, its ".concat(t," must be ").concat(e))},Ai=(e,t)=>e.name===t;function gd(e){return parseInt(e.name.slice(4),10)}function i9(e,t,n){switch(t){case"HS256":case"HS384":case"HS512":{if(!Ai(e.algorithm,"HMAC"))throw so("HMAC");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Ai(e.algorithm,"RSASSA-PKCS1-v1_5"))throw so("RSASSA-PKCS1-v1_5");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Ai(e.algorithm,"RSA-PSS"))throw so("RSA-PSS");const o=parseInt(t.slice(2),10);if(gd(e.algorithm.hash)!==o)throw so("SHA-".concat(o),"algorithm.hash");break}case"Ed25519":case"EdDSA":if(!Ai(e.algorithm,"Ed25519"))throw so("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!Ai(e.algorithm,t))throw so(t);break;case"ES256":case"ES384":case"ES512":{if(!Ai(e.algorithm,"ECDSA"))throw so("ECDSA");const o=function(r){switch(r){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==o)throw so(o,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}(function(o,r){if(r&&!o.usages.includes(r))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(r,"."))})(e,n)}function vI(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];if((o=o.filter(Boolean)).length>2){const a=o.pop();e+="one of type ".concat(o.join(", "),", or ").concat(a,".")}else o.length===2?e+="one of type ".concat(o[0]," or ").concat(o[1],"."):e+="of type ".concat(o[0],".");if(t==null)e+=" Received ".concat(t);else if(typeof t=="function"&&t.name)e+=" Received function ".concat(t.name);else if(typeof t=="object"&&t!=null){var i;(i=t.constructor)!==null&&i!==void 0&&i.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const wv=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return vI("Key for the ".concat(e," algorithm must be "),t,...o)},yI=e=>{if((e==null?void 0:e[Symbol.toStringTag])==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},bI=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",xv=e=>yI(e)||bI(e);function Lr(e){if(typeof(t=e)!="object"||t===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t;if(Object.getPrototypeOf(e)===null)return!0;let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}const vd=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},Xa=e=>{const t=e.data[e.pos++];if(128&t){const n=127&t;let o=0;for(let r=0;r<n;r++)o=o<<8|e.data[e.pos++];return o}return t},Ua=(e,t,n)=>{if(e.data[e.pos++]!==t)throw new Error(n)},Cv=(e,t)=>{const n=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,n},a9=e=>{const t=(r=>{Ua(r,6,"Expected algorithm OID");const i=Xa(r);return Cv(r,i)})(e);if(vd(t,[43,101,110]))return"X25519";if(!vd(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Ua(e,6,"Expected curve OID");const n=Xa(e),o=Cv(e,n);for(const{name:r,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(vd(o,i))return r;throw new Error("Unsupported named curve")},s9=async(e,t,n,o)=>{var r;let i,a;const s=e==="spki",c=()=>s?["verify"]:["sign"];switch(n){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(n.slice(-3),10)||1)},a=s?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":i={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[n]},a=c();break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const l=o.getNamedCurve(t);i=l==="X25519"?{name:"X25519"}:{name:"ECDH",namedCurve:l}}catch{throw new In("Invalid or unsupported key format")}a=s?[]:["deriveBits"];break;case"Ed25519":case"EdDSA":i={name:"Ed25519"},a=c();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":i={name:n},a=c();break;default:throw new In('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,i,(r=o==null?void 0:o.extractable)!==null&&r!==void 0?r:!!s,a)},c9=(e,t,n)=>{var o;const r=((a,s)=>pI(a.replace(s,"")))(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g);let i=n;return t!=null&&(o=t.startsWith)!==null&&o!==void 0&&o.call(t,"ECDH-ES")&&(i||(i={}),i.getNamedCurve=a=>{const s={data:a,pos:0};return function(c){Ua(c,48,"Invalid PKCS#8 structure"),Xa(c),Ua(c,2,"Expected version field");const l=Xa(c);c.pos+=l,Ua(c,48,"Expected algorithm identifier"),Xa(c),c.pos}(s),a9(s)}),s9("pkcs8",r,t,i)};async function Hc(e){var t,n;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:o,keyUsages:r}=function(a){let s,c;switch(a.kty){case"AKP":switch(a.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":s={name:a.alg},c=a.priv?["sign"]:["verify"];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(a.alg){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:"SHA-".concat(a.alg.slice(-3))},c=a.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(a.alg.slice(-3))},c=a.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(a.alg.slice(-3),10)||1)},c=a.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(a.alg){case"ES256":s={name:"ECDSA",namedCurve:"P-256"},c=a.d?["sign"]:["verify"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},c=a.d?["sign"]:["verify"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},c=a.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":s={name:"ECDH",namedCurve:a.crv},c=a.d?["deriveBits"]:[];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(a.alg){case"Ed25519":case"EdDSA":s={name:"Ed25519"},c=a.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":s={name:a.crv},c=a.d?["deriveBits"]:[];break;default:throw new In('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new In('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:s,keyUsages:c}}(e),i=ke({},e);return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,o,(t=e.ext)!==null&&t!==void 0?t:!e.d&&!e.priv,(n=e.key_ops)!==null&&n!==void 0?n:r)}const tf=e=>Lr(e)&&typeof e.kty=="string";let xr;const Iv=async function(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0&&arguments[3];xr||(xr=new WeakMap);let r=xr.get(e);if(r!=null&&r[n])return r[n];const i=await Hc(ke(ke({},t),{},{alg:n}));return o&&Object.freeze(e),r?r[n]=i:xr.set(e,{[n]:i}),i};async function l9(e,t){if(e instanceof Uint8Array||yI(e))return e;if(bI(e)){if(e.type==="secret")return e.export();if("toCryptoKey"in e&&typeof e.toCryptoKey=="function")try{return((o,r)=>{xr||(xr=new WeakMap);let i=xr.get(o);if(i!=null&&i[r])return i[r];const a=o.type==="public",s=!!a;let c;if(o.asymmetricKeyType==="x25519"){switch(r){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError("given KeyObject instance cannot be used for this algorithm")}c=o.toCryptoKey(o.asymmetricKeyType,s,a?[]:["deriveBits"])}if(o.asymmetricKeyType==="ed25519"){if(r!=="EdDSA"&&r!=="Ed25519")throw new TypeError("given KeyObject instance cannot be used for this algorithm");c=o.toCryptoKey(o.asymmetricKeyType,s,[a?"verify":"sign"])}switch(o.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(r!==o.asymmetricKeyType.toUpperCase())throw new TypeError("given KeyObject instance cannot be used for this algorithm");c=o.toCryptoKey(o.asymmetricKeyType,s,[a?"verify":"sign"])}if(o.asymmetricKeyType==="rsa"){let u;switch(r){case"RSA-OAEP":u="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":u="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":u="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":u="SHA-512";break;default:throw new TypeError("given KeyObject instance cannot be used for this algorithm")}if(r.startsWith("RSA-OAEP"))return o.toCryptoKey({name:"RSA-OAEP",hash:u},s,a?["encrypt"]:["decrypt"]);c=o.toCryptoKey({name:r.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:u},s,[a?"verify":"sign"])}if(o.asymmetricKeyType==="ec"){var l;const u=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get((l=o.asymmetricKeyDetails)===null||l===void 0?void 0:l.namedCurve);if(!u)throw new TypeError("given KeyObject instance cannot be used for this algorithm");r==="ES256"&&u==="P-256"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r==="ES384"&&u==="P-384"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r==="ES512"&&u==="P-521"&&(c=o.toCryptoKey({name:"ECDSA",namedCurve:u},s,[a?"verify":"sign"])),r.startsWith("ECDH-ES")&&(c=o.toCryptoKey({name:"ECDH",namedCurve:u},s,a?[]:["deriveBits"]))}if(!c)throw new TypeError("given KeyObject instance cannot be used for this algorithm");return i?i[r]=c:xr.set(o,{[r]:c}),c})(e,t)}catch(o){if(o instanceof TypeError)throw o}let n=e.export({format:"jwk"});return Iv(e,n,t)}if(tf(e))return e.k?Za(e.k):Iv(e,e,t,!0);throw new Error("unreachable")}const Ei=e=>e==null?void 0:e[Symbol.toStringTag],yd=(e,t,n)=>{if(t.use!==void 0){let i;switch(n){case"sign":case"verify":i="sig";break;case"encrypt":case"decrypt":i="enc"}if(t.use!==i)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(i,'" when present'))}if(t.alg!==void 0&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var o,r;let i;switch(!0){case(n==="sign"||n==="verify"):case e==="dir":case e.includes("CBC-HS"):i=n;break;case e.startsWith("PBES2"):i="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):i=!e.includes("GCM")&&e.endsWith("KW")?n==="encrypt"?"wrapKey":"unwrapKey":n;break;case(n==="encrypt"&&e.startsWith("RSA")):i="wrapKey";break;case n==="decrypt":i=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(i&&((o=t.key_ops)===null||o===void 0||(r=o.includes)===null||r===void 0?void 0:r.call(o,i))===!1)throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(i,'" when present'))}return!0};function u9(e,t,n){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((o,r,i)=>{if(!(r instanceof Uint8Array)){if(tf(r)){if((a=>a.kty==="oct"&&typeof a.k=="string")(r)&&yd(o,r,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!xv(r))throw new TypeError(wv(o,r,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(r.type!=="secret")throw new TypeError("".concat(Ei(r),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,n);break;default:((o,r,i)=>{if(tf(r))switch(i){case"decrypt":case"sign":if((a=>a.kty!=="oct"&&(a.kty==="AKP"&&typeof a.priv=="string"||typeof a.d=="string"))(r)&&yd(o,r,i))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((a=>a.kty!=="oct"&&a.d===void 0&&a.priv===void 0)(r)&&yd(o,r,i))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!xv(r))throw new TypeError(wv(o,r,"CryptoKey","KeyObject","JSON Web Key"));if(r.type==="secret")throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithms must not be of type "secret"'));if(r.type==="public")switch(i){case"sign":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm decryption must be of type "private"'))}if(r.type==="private")switch(i){case"verify":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(Ei(r),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,n)}}var hc,bd;let So,kv;if(typeof navigator>"u"||(hc=navigator.userAgent)===null||hc===void 0||(bd=hc.startsWith)===null||bd===void 0||!bd.call(hc,"Mozilla/5.0 ")){const e="v6.8.1";kv="".concat("openid-client","/").concat(e),So={"user-agent":kv}}const Jt=e=>Gc.get(e);let Gc,mc;function wI(e){return e!==void 0?mv(e):(mc||(mc=new WeakMap),(t,n,o,r)=>{let i;return(i=mc.get(n))||(function(a,s){if(typeof a!="string")throw Ao("".concat(s," must be a string"),Gs);if(a.length===0)throw Ao("".concat(s," must not be empty"),Hs)}(n.client_secret,'"metadata.client_secret"'),i=mv(n.client_secret),mc.set(n,i)),i(t,n,o,r)})}const Cr=io,Hs="ERR_INVALID_ARG_VALUE",Gs="ERR_INVALID_ARG_TYPE";function Ao(e,t,n){const o=new TypeError(e,{cause:n});return Object.assign(o,{code:t}),o}function d9(e){return async function(t){return Pt(t,"codeVerifier"),li(await crypto.subtle.digest("SHA-256",zi(t)))}(e)}function p9(){return oI()}class Cl extends Error{constructor(t,n){var o;super(t,n),he(this,"code",void 0),this.name=this.constructor.name,this.code=n==null?void 0:n.code,(o=Error.captureStackTrace)===null||o===void 0||o.call(Error,this,this.constructor)}}function an(e,t,n){return new Cl(e,{cause:t,code:n})}function un(e){if(e instanceof TypeError||e instanceof Cl||e instanceof mu||e instanceof rI||e instanceof Wh)throw e;if(e instanceof Hh)switch(e.code){case lI:throw an("only requests to HTTPS are allowed",e,e.code);case uI:throw an("only requests to HTTP or HTTPS are allowed",e,e.code);case $h:throw an("unexpected HTTP response status code",e.cause,e.code);case cI:throw an("unexpected response content-type",e.cause,e.code);case xl:throw an("parsing error occured",e,e.code);case Fe:throw an("invalid response encountered",e,e.code);case $o:throw an("unexpected JWT claim value encountered",e,e.code);case qp:throw an("unexpected JSON attribute value encountered",e,e.code);case ps:throw an("JWT timestamp claim value failed validation",e,e.code);default:throw an(e.message,e,e.code)}if(e instanceof Sn)throw an("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw an("runtime operation error",e,Kp);case"NotSupportedError":throw an("runtime unsupported operation",e,Kp);case"TimeoutError":throw an("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw an("operation aborted",e,"OAUTH_ABORT")}throw new Cl("something went wrong",{cause:e})}async function f9(e,t,n,o,r){const i=await async function(c,l){var u,p;if(!(c instanceof URL))throw Ao('"server" must be an instance of URL',Gs);const f=!c.href.includes("/.well-known/"),h=(u=l==null?void 0:l.timeout)!==null&&u!==void 0?u:30,m=AbortSignal.timeout(1e3*h),g=await(f?RN(c,{algorithm:l==null?void 0:l.algorithm,[io]:l==null?void 0:l[Cr],[Gn]:l==null||(p=l.execute)===null||p===void 0?void 0:p.includes(Ev),signal:m,headers:new Headers(So)}):((l==null?void 0:l[Cr])||fetch)((Gh(c,l==null||(y=l.execute)===null||y===void 0||!y.includes(Ev)),c.href),{headers:Object.fromEntries(new Headers(ke({accept:"application/json"},So)).entries()),body:void 0,method:"GET",redirect:"manual",signal:m})).then(x=>async function(C,w){const I=C;if(!(I instanceof URL)&&I!==hd)throw rt('"expectedIssuerIdentifier" must be an instance of URL',"ERR_INVALID_ARG_TYPE");if(!fa(w,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");if(w.status!==200)throw Re('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',$h,w);Bs(w);const b=await gu(w);if(Pt(b.issuer,'"response" body "issuer" property',Fe,{body:b}),I!==hd&&new URL(b.issuer).href!==I.href)throw Re('"response" body "issuer" property does not match the expected value',qp,{expected:I.href,body:b,attribute:"issuer"});return b}(hd,x)).catch(un);var y;return f&&new URL(g.issuer).href!==c.href&&(function(x,C,w){return!(x.origin!=="https://login.microsoftonline.com"||w!=null&&w.algorithm&&w.algorithm!=="oidc"||(C[xI]=!0,0))}(c,g,l)||function(x,C){return!(!x.hostname.endsWith(".b2clogin.com")||C!=null&&C.algorithm&&C.algorithm!=="oidc")}(c,l)||(()=>{throw new Cl("discovered metadata issuer does not match the expected issuer",{code:qp,cause:{expected:c.href,body:g,attribute:"issuer"}})})()),g}(e,r),a=new Il(i,t,n,o);let s=Jt(a);if(r!=null&&r[Cr]&&(s.fetch=r[Cr]),r!=null&&r.timeout&&(s.timeout=r.timeout),r!=null&&r.execute)for(const c of r.execute)c(a);return a}new TextDecoder;const xI=Symbol();class Il{constructor(t,n,o,r){var i,a,s,c,l;if(typeof n!="string"||!n.length)throw Ao('"clientId" must be a non-empty string',Gs);if(typeof o=="string"&&(o={client_secret:o}),((i=o)===null||i===void 0?void 0:i.client_id)!==void 0&&n!==o.client_id)throw Ao('"clientId" and "metadata.client_id" must be the same',Hs);const u=ke(ke({},structuredClone(o)),{},{client_id:n});let p;u[Zp]=(a=(s=o)===null||s===void 0?void 0:s[Zp])!==null&&a!==void 0?a:0,u[Xp]=(c=(l=o)===null||l===void 0?void 0:l[Xp])!==null&&c!==void 0?c:30,p=r||(typeof u.client_secret=="string"&&u.client_secret.length?wI(u.client_secret):(g,y,x,C)=>{x.set("client_id",y.client_id)});let f=Object.freeze(u);const h=structuredClone(t);xI in t&&(h[dI]=g=>{let{claims:{tid:y}}=g;return t.issuer.replace("{tenantid}",y)});let m=Object.freeze(h);Gc||(Gc=new WeakMap),Gc.set(this,{__proto__:null,as:m,c:f,auth:p,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const t=structuredClone(Jt(this).as);return function(n){Object.defineProperties(n,function(o){return{supportsPKCE:{__proto__:null,value(){var r;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"S256";return((r=o.code_challenge_methods_supported)===null||r===void 0?void 0:r.includes(i))===!0}}}}(n))}(t),t}clientMetadata(){return structuredClone(Jt(this).c)}get timeout(){return Jt(this).timeout}set timeout(t){Jt(this).timeout=t}get[Cr](){return Jt(this).fetch}set[Cr](t){Jt(this).fetch=t}}function Ws(e){Object.defineProperties(e,function(t){let n;if(t.expires_in!==void 0){const o=new Date;o.setSeconds(o.getSeconds()+t.expires_in),n=o.getTime()}return{expiresIn:{__proto__:null,value(){if(n){const o=Date.now();return n>o?Math.floor((n-o)/1e3):0}}},claims:{__proto__:null,value(){try{return Yp(this)}catch{return}}}}}(e))}async function Sv(e,t,n){var o;let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];const i=(o=e.headers.get("retry-after"))===null||o===void 0?void 0:o.trim();if(i===void 0)return;let a;if(/^\d+$/.test(i))a=parseInt(i,10);else{const s=new Date(i);if(Number.isFinite(s.getTime())){const c=new Date,l=s.getTime()-c.getTime();l>0&&(a=Math.ceil(l/1e3))}}if(r&&!Number.isFinite(a))throw new Hh("invalid Retry-After header value",{cause:e});a>t&&await CI(a-t,n)}function CI(e,t){return new Promise((n,o)=>{const r=i=>{try{t.throwIfAborted()}catch(s){return void o(s)}if(i<=0)return void n();const a=Math.min(i,5);setTimeout(()=>r(i-a),1e3*a)};r(e)})}async function Av(e,t){Yo(e);const{as:n,c:o,auth:r,fetch:i,tlsOnly:a,timeout:s}=Jt(e);return async function(c,l,u,p,f){Qn(c),eo(l);const h=Ms(c,"backchannel_authentication_endpoint",l.use_mtls_endpoint_aliases,(f==null?void 0:f[Gn])!==!0),m=new URLSearchParams(p);m.set("client_id",l.client_id);const g=hu(f==null?void 0:f.headers);return g.set("accept","application/json"),Fh(c,l,u,h,m,g,f)}(n,o,r,t,{[io]:i,[Gn]:!a,headers:new Headers(So),signal:bi(s)}).then(c=>async function(l,u,p){if(Qn(l),eo(u),!fa(p,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Vh(p,200,"Backchannel Authentication Endpoint"),Bs(p);const f=await gu(p);Pt(f.auth_req_id,'"response" body "auth_req_id" property',Fe,{body:f});let h=typeof f.expires_in!="number"?parseFloat(f.expires_in):f.expires_in;return Pr(h,!0,'"response" body "expires_in" property',Fe,{body:f}),f.expires_in=h,f.interval!==void 0&&Pr(f.interval,!1,'"response" body "interval" property',Fe,{body:f}),f}(n,o,c)).catch(un)}async function II(e,t,n,o){var r,i;Yo(e),n=new URLSearchParams(n);let a=(r=t.interval)!==null&&r!==void 0?r:5;const s=(i=o==null?void 0:o.signal)!==null&&i!==void 0?i:AbortSignal.timeout(1e3*t.expires_in);try{await CI(a,s)}catch(b){un(b)}const{as:c,c:l,auth:u,fetch:p,tlsOnly:f,nonRepudiation:h,timeout:m,decrypt:g}=Jt(e),y=(b,k)=>II(e,ke(ke({},t),{},{interval:b}),n,ke(ke({},o),{},{signal:s,flag:k})),x=await async function(b,k,S,E,N){Qn(b),eo(k),Pt(E,'"authReqId"');const A=new URLSearchParams(N==null?void 0:N.additionalParameters);return A.set("auth_req_id",E),Ds(b,k,S,"urn:openid:params:grant-type:ciba",A,N)}(c,l,u,t.auth_req_id,{[io]:p,[Gn]:!f,additionalParameters:n,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:s.aborted?s:bi(m)}).catch(un);var C;if(x.status===503&&x.headers.has("retry-after"))return await Sv(x,a,s,!0),await((C=x.body)===null||C===void 0?void 0:C.cancel()),y(a);const w=async function(b,k,S,E){return oa(b,k,S,void 0,E==null?void 0:E[ko],E==null?void 0:E.recognizedTokenTypes)}(c,l,x,{[ko]:g});let I;try{I=await w}catch(b){if(Vs(b,o))return y(a,Nr);if(b instanceof mu)switch(b.error){case"slow_down":a+=5;case"authorization_pending":return await Sv(b.response,a,s),y(a)}un(b)}return I.id_token&&await(h==null?void 0:h(x)),Ws(I),I}function Ev(e){Jt(e).tlsOnly=!1}async function kI(e,t,n,o,r){if(Yo(e),!((r==null?void 0:r.flag)===Nr||t instanceof URL||function(b,k){try{return Object.getPrototypeOf(b)[Symbol.toStringTag]===k}catch{return!1}}(t,"Request")))throw Ao('"currentUrl" must be an instance of URL, or Request',Gs);let i,a;const{as:s,c,auth:l,fetch:u,tlsOnly:p,jarm:f,hybrid:h,nonRepudiation:m,timeout:g,decrypt:y,implicit:x}=Jt(e);if((r==null?void 0:r.flag)===Nr)i=r.authResponse,a=r.redirectUri;else{if(!(t instanceof URL)){const b=t;switch(t=new URL(t.url),b.method){case"GET":break;case"POST":const k=new URLSearchParams(await e9(b));if(h)t.hash=k.toString();else for(const[S,E]of k.entries())t.searchParams.append(S,E);break;default:throw Ao("unexpected Request HTTP method",Hs)}}switch(a=function(b){return(b=new URL(b)).search="",b.hash="",b.href}(t),!0){case!!f:i=await f(t,n==null?void 0:n.expectedState);break;case!!h:i=await h(t,n==null?void 0:n.expectedNonce,n==null?void 0:n.expectedState,n==null?void 0:n.maxAge);break;case!!x:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{i=r9(s,c,t.searchParams,n==null?void 0:n.expectedState)}catch(b){un(b)}}}const C=await async function(b,k,S,E,N,A,P){if(Qn(b),eo(k),!zh.has(E))throw rt('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',"ERR_INVALID_ARG_VALUE");Pt(N,'"redirectUri"');const j=Qr(E,"code");if(!j)throw Re('no authorization code in "callbackParameters"',Fe);const G=new URLSearchParams(P==null?void 0:P.additionalParameters);return G.set("redirect_uri",N),G.set("code",j),A!==vv&&(Pt(A,'"codeVerifier"'),G.set("code_verifier",A)),Ds(b,k,S,"authorization_code",G,P)}(s,c,l,i,a,(n==null?void 0:n.pkceCodeVerifier)||vv,{additionalParameters:o,[io]:u,[Gn]:!p,DPoP:r==null?void 0:r.DPoP,headers:new Headers(So),signal:bi(g)}).catch(un);typeof(n==null?void 0:n.expectedNonce)!="string"&&typeof(n==null?void 0:n.maxAge)!="number"||(n.idTokenExpected=!0);const w=XN(s,c,C,{expectedNonce:n==null?void 0:n.expectedNonce,maxAge:n==null?void 0:n.maxAge,requireIdToken:n==null?void 0:n.idTokenExpected,[ko]:y});let I;try{I=await w}catch(b){if(Vs(b,r))return kI(e,void 0,n,o,ke(ke({},r),{},{flag:Nr,authResponse:i,redirectUri:a}));un(b)}return I.id_token&&await(m==null?void 0:m(C)),Ws(I),I}async function SI(e,t,n,o){Yo(e),n=new URLSearchParams(n);const{as:r,c:i,auth:a,fetch:s,tlsOnly:c,nonRepudiation:l,timeout:u,decrypt:p}=Jt(e),f=await async function(g,y,x,C,w){Qn(g),eo(y),Pt(C,'"refreshToken"');const I=new URLSearchParams(w==null?void 0:w.additionalParameters);return I.set("refresh_token",C),Ds(g,y,x,"refresh_token",I,w)}(r,i,a,t,{[io]:s,[Gn]:!c,additionalParameters:n,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:bi(u)}).catch(un),h=async function(g,y,x,C){return oa(g,y,x,void 0,C==null?void 0:C[ko],C==null?void 0:C.recognizedTokenTypes)}(r,i,f,{[ko]:p});let m;try{m=await h}catch(g){if(Vs(g,o))return SI(e,t,n,ke(ke({},o),{},{flag:Nr}));un(g)}return m.id_token&&await(l==null?void 0:l(f)),Ws(m),m}async function AI(e,t,n){Yo(e),t=new URLSearchParams(t);const{as:o,c:r,auth:i,fetch:a,tlsOnly:s,timeout:c}=Jt(e),l=await async function(f,h,m,g,y){return Qn(f),eo(h),Ds(f,h,m,"client_credentials",new URLSearchParams(g),y)}(o,r,i,t,{[io]:a,[Gn]:!s,DPoP:n==null?void 0:n.DPoP,headers:new Headers(So),signal:bi(c)}).catch(un),u=async function(f,h,m,g){return oa(f,h,m,void 0,g==null?void 0:g[ko],g==null?void 0:g.recognizedTokenTypes)}(o,r,l);let p;try{p=await u}catch(f){if(Vs(f,n))return AI(e,t,ke(ke({},n),{},{flag:Nr}));un(f)}return Ws(p),p}function nf(e,t){Yo(e);const{as:n,c:o,tlsOnly:r,hybrid:i,jarm:a,implicit:s}=Jt(e),c=Ms(n,"authorization_endpoint",!1,r);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",o.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",i?"code id_token":s?"id_token":"code"),s&&!t.has("nonce"))throw Ao("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Hs);a&&t.set("response_mode","jwt")}for(const[l,u]of t.entries())c.searchParams.append(l,u);return c}async function EI(e,t,n){Yo(e);const o=nf(e,t),{as:r,c:i,auth:a,fetch:s,tlsOnly:c,timeout:l}=Jt(e),u=await async function(h,m,g,y,x){var C;Qn(h),eo(m);const w=Ms(h,"pushed_authorization_request_endpoint",m.use_mtls_endpoint_aliases,(x==null?void 0:x[Gn])!==!0),I=new URLSearchParams(y);I.set("client_id",m.client_id);const b=hu(x==null?void 0:x.headers);b.set("accept","application/json"),(x==null?void 0:x.DPoP)!==void 0&&(iI(x.DPoP),await x.DPoP.addProof(w,b,"POST"));const k=await Fh(h,m,g,w,I,b,x);return x==null||(C=x.DPoP)===null||C===void 0||C.cacheNonce(k,w),k}(r,i,a,o.searchParams,{[io]:s,[Gn]:!c,DPoP:n==null?void 0:n.DPoP,headers:new Headers(So),signal:bi(l)}).catch(un),p=async function(h,m,g){if(Qn(h),eo(m),!fa(g,Response))throw rt('"response" must be an instance of Response',"ERR_INVALID_ARG_TYPE");await Vh(g,201,"Pushed Authorization Request Endpoint"),Bs(g);const y=await gu(g);Pt(y.request_uri,'"response" body "request_uri" property',Fe,{body:y});let x=typeof y.expires_in!="number"?parseFloat(y.expires_in):y.expires_in;return Pr(x,!0,'"response" body "expires_in" property',Fe,{body:y}),y.expires_in=x,y}(r,i,u);let f;try{f=await p}catch(h){if(Vs(h,n))return EI(e,t,ke(ke({},n),{},{flag:Nr}));un(h)}return nf(e,{request_uri:f.request_uri})}function Yo(e){if(!(e instanceof Il))throw Ao('"config" must be an instance of Configuration',Gs);if(Object.getPrototypeOf(e)!==Il.prototype)throw Ao("subclassing Configuration is not allowed",Hs)}function bi(e){return e?AbortSignal.timeout(1e3*e):void 0}function Vs(e,t){return!(t==null||!t.DPoP||t.flag===Nr)&&function(n){if(n instanceof Wh){const{0:o,length:r}=n.cause;return r===1&&o.scheme==="dpop"&&o.parameters.error==="use_dpop_nonce"}return n instanceof mu&&n.error==="use_dpop_nonce"}(e)}Object.freeze(Il.prototype);const Nr=Symbol();async function Uh(e,t,n,o){Yo(e);const{as:r,c:i,auth:a,fetch:s,tlsOnly:c,timeout:l,decrypt:u}=Jt(e),p=await async function(f,h,m,g,y,x){return Qn(f),eo(h),Pt(g,'"grantType"'),Ds(f,h,m,g,new URLSearchParams(y),x)}(r,i,a,t,new URLSearchParams(n),{[io]:s,[Gn]:!c,DPoP:o==null?void 0:o.DPoP,headers:new Headers(So),signal:bi(l)}).then(f=>{let h;return t==="urn:ietf:params:oauth:grant-type:token-exchange"&&(h={n_a:()=>{}}),async function(m,g,y,x){return oa(m,g,y,void 0,x==null?void 0:x[ko],x==null?void 0:x.recognizedTokenTypes)}(r,i,f,{[ko]:u,recognizedTokenTypes:h})}).catch(un);return Ws(p),p}async function h9(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return vI("Key must be ",o,...i)}(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:"SHA-".concat(e.slice(-3)),name:"HMAC"},!1,[n])}return i9(t,e,n),t}async function m9(e,t,n,o){const r=await h9(e,t,"verify");(function(a,s){if(a.startsWith("RS")||a.startsWith("PS")){const{modulusLength:c}=s.algorithm;if(typeof c!="number"||c<2048)throw new TypeError("".concat(a," requires key modulusLength to be 2048 bits or larger"))}})(e,r);const i=function(a,s){const c="SHA-".concat(a.slice(-3));switch(a){case"HS256":case"HS384":case"HS512":return{hash:c,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:c,name:"RSA-PSS",saltLength:parseInt(a.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:c,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:c,name:"ECDSA",namedCurve:s.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:a};default:throw new In("alg ".concat(a," is not supported either by JOSE or your javascript runtime"))}}(e,r.algorithm);try{return await crypto.subtle.verify(i,r,n,o)}catch{return!1}}async function g9(e,t,n){if(!Lr(e))throw new Wt("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new Wt('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new Wt("JWS Protected Header incorrect type");if(e.payload===void 0)throw new Wt("JWS Payload missing");if(typeof e.signature!="string")throw new Wt("JWS Signature missing or incorrect type");if(e.header!==void 0&&!Lr(e.header))throw new Wt("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{const g=Za(e.protected);o=JSON.parse(fs.decode(g))}catch{throw new Wt("JWS Protected Header is invalid")}if(!function(){for(var g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C=y.filter(Boolean);if(C.length===0||C.length===1)return!0;let w;for(const I of C){const b=Object.keys(I);if(w&&w.size!==0)for(const k of b){if(w.has(k))return!1;w.add(k)}else w=new Set(b)}return!0}(o,e.header))throw new Wt("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r=ke(ke({},o),e.header),i=function(g,y,x,C,w){if(w.crit!==void 0&&(C==null?void 0:C.crit)===void 0)throw new g('"crit" (Critical) Header Parameter MUST be integrity protected');if(!C||C.crit===void 0)return new Set;if(!Array.isArray(C.crit)||C.crit.length===0||C.crit.some(b=>typeof b!="string"||b.length===0))throw new g('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let I;I=x!==void 0?new Map([...Object.entries(x),...y.entries()]):y;for(const b of C.crit){if(!I.has(b))throw new In('Extension Header Parameter "'.concat(b,'" is not recognized'));if(w[b]===void 0)throw new g('Extension Header Parameter "'.concat(b,'" is missing'));if(I.get(b)&&C[b]===void 0)throw new g('Extension Header Parameter "'.concat(b,'" MUST be integrity protected'))}return new Set(C.crit)}(Wt,new Map([["b64",!0]]),n==null?void 0:n.crit,o,r);let a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new Wt('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=r;if(typeof s!="string"||!s)throw new Wt('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=n&&function(g,y){if(y!==void 0&&(!Array.isArray(y)||y.some(x=>typeof x!="string")))throw new TypeError('"'.concat(g,'" option must be an array of strings'));if(y)return new Set(y)}("algorithms",n.algorithms);if(c&&!c.has(s))throw new fI('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new Wt("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new Wt("JWS Payload must be a string or an Uint8Array instance");let l=!1;typeof t=="function"&&(t=await t(o,e),l=!0),u9(s,t,"verify");const u=function(){for(var g=arguments.length,y=new Array(g),x=0;x<g;x++)y[x]=arguments[x];const C=y.reduce((b,k)=>{let{length:S}=k;return b+S},0),w=new Uint8Array(C);let I=0;for(const b of y)w.set(b,I),I+=b.length;return w}(e.protected!==void 0?md(e.protected):new Uint8Array,md("."),typeof e.payload=="string"?a?md(e.payload):bv.encode(e.payload):e.payload);let p;try{p=Za(e.signature)}catch{throw new Wt("Failed to base64url decode the signature")}const f=await l9(t,s);if(!await m9(s,f,p,u))throw new gI;let h;if(a)try{h=Za(e.payload)}catch{throw new Wt("Failed to base64url decode the payload")}else h=typeof e.payload=="string"?bv.encode(e.payload):e.payload;const m={payload:h};return e.protected!==void 0&&(m.protectedHeader=o),e.header!==void 0&&(m.unprotectedHeader=e.header),l?ke(ke({},m),{},{key:f}):m}const v9=e=>Math.floor(e.getTime()/1e3),y9=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function jv(e){const t=y9.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let o;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":o=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":o=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":o=Math.round(3600*n);break;case"day":case"days":case"d":o=Math.round(86400*n);break;case"week":case"weeks":case"w":o=Math.round(604800*n);break;default:o=Math.round(31557600*n)}return t[1]==="-"||t[4]==="ago"?-o:o}const Pv=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase()),b9=(e,t)=>typeof e=="string"?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));async function w9(e,t,n){var o;const r=await async function(s,c,l){if(s instanceof Uint8Array&&(s=fs.decode(s)),typeof s!="string")throw new Wt("Compact JWS must be a string or Uint8Array");const{0:u,1:p,2:f,length:h}=s.split(".");if(h!==3)throw new Wt("Invalid Compact JWS");const m=await g9({payload:p,protected:u,signature:f},c,l),g={payload:m.payload,protectedHeader:m.protectedHeader};return typeof c=="function"?ke(ke({},g),{},{key:m.key}):g}(e,t,n);if((o=r.protectedHeader.crit)!==null&&o!==void 0&&o.includes("b64")&&r.protectedHeader.b64===!1)throw new ef("JWTs MUST NOT use unencoded payload");const i=function(s,c){let l,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{l=JSON.parse(fs.decode(c))}catch{}if(!Lr(l))throw new ef("JWT Claims Set must be a top-level JSON object");const{typ:p}=u;if(p&&(typeof s.typ!="string"||Pv(s.typ)!==Pv(p)))throw new Fn('unexpected "typ" JWT header value',l,"typ","check_failed");const{requiredClaims:f=[],issuer:h,subject:m,audience:g,maxTokenAge:y}=u,x=[...f];y!==void 0&&x.push("iat"),g!==void 0&&x.push("aud"),m!==void 0&&x.push("sub"),h!==void 0&&x.push("iss");for(const b of new Set(x.reverse()))if(!(b in l))throw new Fn('missing required "'.concat(b,'" claim'),l,b,"missing");if(h&&!(Array.isArray(h)?h:[h]).includes(l.iss))throw new Fn('unexpected "iss" claim value',l,"iss","check_failed");if(m&&l.sub!==m)throw new Fn('unexpected "sub" claim value',l,"sub","check_failed");if(g&&!b9(l.aud,typeof g=="string"?[g]:g))throw new Fn('unexpected "aud" claim value',l,"aud","check_failed");let C;switch(typeof u.clockTolerance){case"string":C=jv(u.clockTolerance);break;case"number":C=u.clockTolerance;break;case"undefined":C=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:w}=u,I=v9(w||new Date);if((l.iat!==void 0||y)&&typeof l.iat!="number")throw new Fn('"iat" claim must be a number',l,"iat","invalid");if(l.nbf!==void 0){if(typeof l.nbf!="number")throw new Fn('"nbf" claim must be a number',l,"nbf","invalid");if(l.nbf>I+C)throw new Fn('"nbf" claim timestamp check failed',l,"nbf","check_failed")}if(l.exp!==void 0){if(typeof l.exp!="number")throw new Fn('"exp" claim must be a number',l,"exp","invalid");if(l.exp<=I-C)throw new Qp('"exp" claim timestamp check failed',l,"exp","check_failed")}if(y){const b=I-l.iat;if(b-C>(typeof y=="number"?y:jv(y)))throw new Qp('"iat" claim timestamp check failed (too far in the past)',l,"iat","check_failed");if(b<0-C)throw new Fn('"iat" claim timestamp check failed (it should be in the past)',l,"iat","check_failed")}return l}(r.protectedHeader,r.payload,n),a={payload:i,protectedHeader:r.protectedHeader};return typeof t=="function"?ke(ke({},a),{},{key:r.key}):a}function x9(e){return Lr(e)}var gc,wd,vc=new WeakMap,xd=new WeakMap;class C9{constructor(t){if(Rt(this,vc,void 0),Rt(this,xd,new WeakMap),!function(n){return n&&typeof n=="object"&&Array.isArray(n.keys)&&n.keys.every(x9)}(t))throw new Zh("JSON Web Key Set malformed");gt(vc,this,structuredClone(t))}jwks(){return pe(vc,this)}async getKey(t,n){const{alg:o,kid:r}=ke(ke({},t),n==null?void 0:n.header),i=function(l){switch(typeof l=="string"&&l.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new In('Unsupported "alg" value for a JSON Web Key Set')}}(o),a=pe(vc,this).keys.filter(l=>{let u=i===l.kty;if(u&&typeof r=="string"&&(u=r===l.kid),!u||typeof l.alg!="string"&&i!=="AKP"||(u=o===l.alg),u&&typeof l.use=="string"&&(u=l.use==="sig"),u&&Array.isArray(l.key_ops)&&(u=l.key_ops.includes("verify")),u)switch(o){case"ES256":u=l.crv==="P-256";break;case"ES384":u=l.crv==="P-384";break;case"ES512":u=l.crv==="P-521";break;case"Ed25519":case"EdDSA":u=l.crv==="Ed25519"}return u}),{0:s,length:c}=a;if(c===0)throw new Xh;if(c!==1){const l=new hI,u=pe(xd,this);throw l[Symbol.asyncIterator]=jN(function*(){for(const p of a)try{yield yield EN(Nv(u,p,o))}catch{}}),l}return Nv(pe(xd,this),s,o)}}async function Nv(e,t,n){const o=e.get(t)||e.set(t,{}).get(t);if(o[n]===void 0){const r=await async function(i,a,s){var c;if(!Lr(i))throw new TypeError("JWK must be an object");let l;switch(a!=null||(a=i.alg),l!=null||(l=(c=s==null?void 0:s.extractable)!==null&&c!==void 0?c:i.ext),i.kty){case"oct":if(typeof i.k!="string"||!i.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Za(i.k);case"RSA":if("oth"in i&&i.oth!==void 0)throw new In('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return Hc(ke(ke({},i),{},{alg:a,ext:l}));case"AKP":if(typeof i.alg!="string"||!i.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(a!==void 0&&a!==i.alg)throw new TypeError("JWK alg and alg option value mismatch");return Hc(ke(ke({},i),{},{ext:l}));case"EC":case"OKP":return Hc(ke(ke({},i),{},{alg:a,ext:l}));default:throw new In('Unsupported "kty" (Key Type) Parameter value')}}(ke(ke({},t),{},{ext:!0}),n);if(r instanceof Uint8Array||r.type!=="public")throw new Zh("JSON Web Key Set members must be public keys");o[n]=r}return o[n]}function Ov(e){const t=new C9(e),n=async(o,r)=>t.getKey(o,r);return Object.defineProperties(n,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),n}let of;if(typeof navigator>"u"||(gc=navigator.userAgent)===null||gc===void 0||(wd=gc.startsWith)===null||wd===void 0||!wd.call(gc,"Mozilla/5.0 ")){const e="v6.1.3";of="".concat("jose","/").concat(e)}const jI=Symbol(),Cd=Symbol();var Id=new WeakMap,kd=new WeakMap,Sd=new WeakMap,yc=new WeakMap,Vr=new WeakMap,To=new WeakMap,rr=new WeakMap,Ad=new WeakMap,Fr=new WeakMap,zr=new WeakMap;class I9{constructor(t,n){if(Rt(this,Id,void 0),Rt(this,kd,void 0),Rt(this,Sd,void 0),Rt(this,yc,void 0),Rt(this,Vr,void 0),Rt(this,To,void 0),Rt(this,rr,void 0),Rt(this,Ad,void 0),Rt(this,Fr,void 0),Rt(this,zr,void 0),!(t instanceof URL))throw new TypeError("url must be an instance of URL");var o,r;gt(Id,this,new URL(t.href)),gt(kd,this,typeof(n==null?void 0:n.timeoutDuration)=="number"?n==null?void 0:n.timeoutDuration:5e3),gt(Sd,this,typeof(n==null?void 0:n.cooldownDuration)=="number"?n==null?void 0:n.cooldownDuration:3e4),gt(yc,this,typeof(n==null?void 0:n.cacheMaxAge)=="number"?n==null?void 0:n.cacheMaxAge:6e5),gt(rr,this,new Headers(n==null?void 0:n.headers)),of&&!pe(rr,this).has("User-Agent")&&pe(rr,this).set("User-Agent",of),pe(rr,this).has("accept")||(pe(rr,this).set("accept","application/json"),pe(rr,this).append("accept","application/jwk-set+json")),gt(Ad,this,n==null?void 0:n[jI]),(n==null?void 0:n[Cd])!==void 0&&(gt(zr,this,n==null?void 0:n[Cd]),o=n==null?void 0:n[Cd],r=pe(yc,this),typeof o=="object"&&o!==null&&"uat"in o&&typeof o.uat=="number"&&!(Date.now()-o.uat>=r)&&"jwks"in o&&Lr(o.jwks)&&Array.isArray(o.jwks.keys)&&Array.prototype.every.call(o.jwks.keys,Lr)&&(gt(Vr,this,pe(zr,this).uat),gt(Fr,this,Ov(pe(zr,this).jwks))))}pendingFetch(){return!!pe(To,this)}coolingDown(){return typeof pe(Vr,this)=="number"&&Date.now()<pe(Vr,this)+pe(Sd,this)}fresh(){return typeof pe(Vr,this)=="number"&&Date.now()<pe(Vr,this)+pe(yc,this)}jwks(){var t;return(t=pe(Fr,this))===null||t===void 0?void 0:t.jwks()}async getKey(t,n){pe(Fr,this)&&this.fresh()||await this.reload();try{return await pe(Fr,this).call(this,t,n)}catch(o){if(o instanceof Xh&&this.coolingDown()===!1)return await this.reload(),pe(Fr,this).call(this,t,n);throw o}}async reload(){pe(To,this)&&(typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel")&&gt(To,this,void 0),pe(To,this)||gt(To,this,async function(t,n,o){const i=await(arguments.length>3&&arguments[3]!==void 0?arguments[3]:fetch)(t,{method:"GET",signal:o,redirect:"manual",headers:n}).catch(a=>{throw a.name==="TimeoutError"?new mI:a});if(i.status!==200)throw new Yt("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await i.json()}catch{throw new Yt("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(pe(Id,this).href,pe(rr,this),AbortSignal.timeout(pe(kd,this)),pe(Ad,this)).then(t=>{gt(Fr,this,Ov(t)),pe(zr,this)&&(pe(zr,this).uat=Date.now(),pe(zr,this).jwks=t),gt(Vr,this,Date.now()),gt(To,this,void 0)}).catch(t=>{throw gt(To,this,void 0),t})),await pe(To,this)}}const k9=["mfaToken"],S9=["mfaToken"];var $r,bc,Zr,sr,Bi,ct,Na,At,Tv=class extends Error{constructor(e,t){super(t),he(this,"code",void 0),this.name="NotSupportedError",this.code=e}},Ko=class extends Error{constructor(e,t,n){super(t),he(this,"cause",void 0),he(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},A9=class extends Ko{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},E9=class extends Ko{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},j9=class extends Ko{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},Ed=class extends Ko{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},po=class extends Ko{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},ir=class extends Error{constructor(e){super(e),he(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},jd=class extends Ko{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),he(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},P9=class extends Ko{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},N9=class extends Ko{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},O9=class extends Ko{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},T9=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),he(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function rf(e){return Object.entries(e).filter(t=>{let[,n]=t;return n!==void 0}).reduce((t,n)=>ke(ke({},t),{},{[n[0]]:n[1]}),{})}var vu=class extends Error{constructor(e,t,n){super(t),he(this,"cause",void 0),he(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},PI=class extends vu{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},NI=class extends vu{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},R9=class extends vu{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},OI=class extends vu{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function L9(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var _9=($r=new WeakMap,bc=new WeakMap,Zr=new WeakMap,class{constructor(e){var t;Rt(this,$r,void 0),Rt(this,bc,void 0),Rt(this,Zr,void 0),gt($r,this,"https://".concat(e.domain)),gt(bc,this,e.clientId),gt(Zr,this,(t=e.customFetch)!==null&&t!==void 0?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(pe($r,this),"/mfa/authenticators"),{mfaToken:n}=e,o=await pe(Zr,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!o.ok){const r=await o.json();throw new PI(r.error_description||"Failed to list authenticators",r)}return(await o.json()).map(L9)}async enrollAuthenticator(e){const t="".concat(pe($r,this),"/mfa/associate"),{mfaToken:n}=e,o=fv(e,k9),r={authenticator_types:o.authenticatorTypes};"oobChannels"in o&&(r.oob_channels=o.oobChannels),"phoneNumber"in o&&o.phoneNumber&&(r.phone_number=o.phoneNumber),"email"in o&&o.email&&(r.email=o.email);const i=await pe(Zr,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){const a=await i.json();throw new NI(a.error_description||"Failed to enroll authenticator",a)}return function(a){if(a.authenticator_type==="otp")return{authenticatorType:"otp",secret:a.secret,barcodeUri:a.barcode_uri,recoveryCodes:a.recovery_codes,id:a.id};if(a.authenticator_type==="oob")return{authenticatorType:"oob",oobChannel:a.oob_channel,oobCode:a.oob_code,bindingMethod:a.binding_method,id:a.id};throw new Error("Unexpected authenticator type: ".concat(a.authenticator_type))}(await i.json())}async deleteAuthenticator(e){const{authenticatorId:t,mfaToken:n}=e,o="".concat(pe($r,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),r=await pe(Zr,this).call(this,o,{method:"DELETE",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!r.ok){const i=await r.json();throw new R9(i.error_description||"Failed to delete authenticator",i)}}async challengeAuthenticator(e){const t="".concat(pe($r,this),"/mfa/challenge"),{mfaToken:n}=e,o=fv(e,S9),r={mfa_token:n,client_id:pe(bc,this),challenge_type:o.challengeType};o.authenticatorId&&(r.authenticator_id=o.authenticatorId);const i=await pe(Zr,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){const a=await i.json();throw new OI(a.error_description||"Failed to challenge authenticator",a)}return function(a){const s={challengeType:a.challenge_type};return a.oob_code!==void 0&&(s.oobCode=a.oob_code),a.binding_method!==void 0&&(s.bindingMethod=a.binding_method),s}(await i.json())}}),ti=class TI{constructor(t,n,o,r,i,a,s){he(this,"accessToken",void 0),he(this,"idToken",void 0),he(this,"refreshToken",void 0),he(this,"expiresAt",void 0),he(this,"scope",void 0),he(this,"claims",void 0),he(this,"authorizationDetails",void 0),he(this,"tokenType",void 0),he(this,"issuedTokenType",void 0),this.accessToken=t,this.idToken=o,this.refreshToken=r,this.expiresAt=n,this.scope=i,this.claims=a,this.authorizationDetails=s}static fromTokenEndpointResponse(t){const n=t.id_token?t.claims():void 0,o=new TI(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,n,t.authorization_details);return o.tokenType=t.token_type,o.issuedTokenType=t.issued_token_type,o}},af="openid profile email offline_access",M9=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function RI(e){if(e==null)throw new po("subject_token is required");if(typeof e!="string")throw new po("subject_token must be a string");if(e.trim().length===0)throw new po("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new po("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new po("subject_token must not include the 'Bearer ' prefix")}function LI(e,t){if(t){for(const[n,o]of Object.entries(t))if(!M9.has(n))if(Array.isArray(o)){if(o.length>20)throw new po("Parameter '".concat(n,"' exceeds maximum array size of ").concat(20));o.forEach(r=>{e.append(n,r)})}else e.append(n,o)}}var D9=(sr=new WeakMap,Bi=new WeakMap,ct=new WeakMap,Na=new WeakMap,At=new WeakSet,class{constructor(e){if(function(t,n){QC(t,n),n.add(t)}(this,At),Rt(this,sr,void 0),Rt(this,Bi,void 0),Rt(this,ct,void 0),Rt(this,Na,void 0),he(this,"mfa",void 0),gt(ct,this,e),e.useMtls&&!e.customFetch)throw new Tv("mtls_without_custom_fetch_not_supported","Using mTLS without a custom fetch implementation is not supported");this.mfa=new _9({domain:pe(ct,this).domain,clientId:pe(ct,this).clientId,customFetch:pe(ct,this).customFetch})}async buildAuthorizationUrl(e){const{serverMetadata:t}=await Et(At,this,Tn).call(this);if(e!=null&&e.pushedAuthorizationRequests&&!t.pushed_authorization_request_endpoint)throw new Tv("par_not_supported_error","The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par");try{return await Et(At,this,Pd).call(this,e)}catch(n){throw new P9(n)}}async buildLinkUserUrl(e){try{const t=await Et(At,this,Pd).call(this,{authorizationParams:ke(ke({},e.authorizationParams),{},{requested_connection:e.connection,requested_connection_scope:e.connectionScope,scope:"openid link_account offline_access",id_token_hint:e.idToken})});return{linkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(t){throw new N9(t)}}async buildUnlinkUserUrl(e){try{const t=await Et(At,this,Pd).call(this,{authorizationParams:ke(ke({},e.authorizationParams),{},{requested_connection:e.connection,scope:"openid unlink_account",id_token_hint:e.idToken})});return{unlinkUserUrl:t.authorizationUrl,codeVerifier:t.codeVerifier}}catch(t){throw new O9(t)}}async backchannelAuthentication(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this),o=rf(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),r=new URLSearchParams(ke(ke({scope:af},o),{},{client_id:pe(ct,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&r.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&r.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const i=await Av(t,r),a=await II(t,i);return ti.fromTokenEndpointResponse(a)}catch(i){throw new jd(i)}}async initiateBackchannelAuthentication(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this),o=rf(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),r=new URLSearchParams(ke(ke({scope:af},o),{},{client_id:pe(ct,this).clientId,binding_message:e.bindingMessage,login_hint:JSON.stringify({format:"iss_sub",iss:n.issuer,sub:e.loginHint.sub})}));e.requestedExpiry&&r.append("requested_expiry",e.requestedExpiry.toString()),e.authorizationDetails&&r.append("authorization_details",JSON.stringify(e.authorizationDetails));try{const i=await Av(t,r);return{authReqId:i.auth_req_id,expiresIn:i.expires_in,interval:i.interval}}catch(i){throw new jd(i)}}async backchannelAuthenticationGrant(e){let{authReqId:t}=e;const{configuration:n}=await Et(At,this,Tn).call(this),o=new URLSearchParams({auth_req_id:t});try{const r=await Uh(n,"urn:openid:params:grant-type:ciba",o);return ti.fromTokenEndpointResponse(r)}catch(r){throw new jd(r)}}async getTokenForConnection(e){var t;if(e.refreshToken&&e.accessToken)throw new Ed("Either a refresh or access token should be specified, but not both.");const n=(t=e.accessToken)!==null&&t!==void 0?t:e.refreshToken;if(!n)throw new Ed("Either a refresh or access token must be specified.");try{return await this.exchangeToken({connection:e.connection,subjectToken:n,subjectTokenType:e.accessToken?"urn:ietf:params:oauth:token-type:access_token":"urn:ietf:params:oauth:token-type:refresh_token",loginHint:e.loginHint})}catch(o){throw o instanceof po?new Ed(o.message,o.cause):o}}async exchangeToken(e){return"connection"in e?Et(At,this,B9).call(this,e):Et(At,this,H9).call(this,e)}async getTokenByCode(e,t){const{configuration:n}=await Et(At,this,Tn).call(this);try{const o=await kI(n,e,{pkceCodeVerifier:t.codeVerifier});return ti.fromTokenEndpointResponse(o)}catch(o){throw new A9("There was an error while trying to request a token.",o)}}async getTokenByRefreshToken(e){const{configuration:t}=await Et(At,this,Tn).call(this);try{const n=await SI(t,e.refreshToken);return ti.fromTokenEndpointResponse(n)}catch(n){throw new j9("The access token has expired and there was an error while trying to refresh it.",n)}}async getTokenByClientCredentials(e){const{configuration:t}=await Et(At,this,Tn).call(this);try{const n=new URLSearchParams({audience:e.audience});e.organization&&n.append("organization",e.organization);const o=await AI(t,n);return ti.fromTokenEndpointResponse(o)}catch(n){throw new E9("There was an error while trying to request a token.",n)}}async buildLogoutUrl(e){const{configuration:t,serverMetadata:n}=await Et(At,this,Tn).call(this);if(!n.end_session_endpoint){const o=new URL("https://".concat(pe(ct,this).domain,"/v2/logout"));return o.searchParams.set("returnTo",e.returnTo),o.searchParams.set("client_id",pe(ct,this).clientId),o}return function(o,r){Yo(o);const{as:i,c:a,tlsOnly:s}=Jt(o),c=Ms(i,"end_session_endpoint",!1,s);(r=new URLSearchParams(r)).has("client_id")||r.set("client_id",a.client_id);for(const[l,u]of r.entries())c.searchParams.append(l,u);return c}(t,{post_logout_redirect_uri:e.returnTo})}async verifyLogoutToken(e){const{serverMetadata:t}=await Et(At,this,Tn).call(this);pe(Na,this)||gt(Na,this,function(o,r){const i=new I9(o,r),a=async(s,c)=>i.getKey(s,c);return Object.defineProperties(a,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>i.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>i.jwks(),enumerable:!0,configurable:!1,writable:!1}}),a}(new URL(t.jwks_uri),{[jI]:pe(ct,this).customFetch}));const{payload:n}=await w9(e.logoutToken,pe(Na,this),{issuer:t.issuer,audience:pe(ct,this).clientId,algorithms:["RS256"],requiredClaims:["iat"]});if(!("sid"in n)&&!("sub"in n))throw new ir('either "sid" or "sub" (or both) claims must be present');if("sid"in n&&typeof n.sid!="string")throw new ir('"sid" claim must be a string');if("sub"in n&&typeof n.sub!="string")throw new ir('"sub" claim must be a string');if("nonce"in n)throw new ir('"nonce" claim is prohibited');if(!("events"in n))throw new ir('"events" claim is missing');if(typeof n.events!="object"||n.events===null)throw new ir('"events" claim must be an object');if(!("http://schemas.openid.net/event/backchannel-logout"in n.events))throw new ir('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim');if(typeof n.events["http://schemas.openid.net/event/backchannel-logout"]!="object")throw new ir('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object');return{sid:n.sid,sub:n.sub}}});async function Tn(){if(pe(sr,this)&&pe(Bi,this))return{configuration:pe(sr,this),serverMetadata:pe(Bi,this)};const e=await Et(At,this,G9).call(this);return gt(sr,this,await f9(new URL("https://".concat(pe(ct,this).domain)),pe(ct,this).clientId,{use_mtls_endpoint_aliases:pe(ct,this).useMtls},e,{[Cr]:pe(ct,this).customFetch})),gt(Bi,this,pe(sr,this).serverMetadata()),pe(sr,this)[Cr]=pe(ct,this).customFetch||fetch,{configuration:pe(sr,this),serverMetadata:pe(Bi,this)}}async function B9(e){var t,n;const{configuration:o}=await Et(At,this,Tn).call(this);if("audience"in e||"resource"in e)throw new po("audience and resource parameters are not supported for Token Vault exchanges");RI(e.subjectToken);const r=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:(t=e.subjectTokenType)!==null&&t!==void 0?t:"urn:ietf:params:oauth:token-type:access_token",requested_token_type:(n=e.requestedTokenType)!==null&&n!==void 0?n:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&r.append("login_hint",e.loginHint),e.scope&&r.append("scope",e.scope),LI(r,e.extra);try{const i=await Uh(o,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",r);return ti.fromTokenEndpointResponse(i)}catch(i){throw new po("Failed to exchange token for connection '".concat(e.connection,"'."),i)}}async function H9(e){const{configuration:t}=await Et(At,this,Tn).call(this);RI(e.subjectToken);const n=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&n.append("audience",e.audience),e.scope&&n.append("scope",e.scope),e.requestedTokenType&&n.append("requested_token_type",e.requestedTokenType),e.organization&&n.append("organization",e.organization),LI(n,e.extra);try{const o=await Uh(t,"urn:ietf:params:oauth:grant-type:token-exchange",n);return ti.fromTokenEndpointResponse(o)}catch(o){throw new po("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),o)}}async function G9(){if(!pe(ct,this).clientSecret&&!pe(ct,this).clientAssertionSigningKey&&!pe(ct,this).useMtls)throw new T9;if(pe(ct,this).useMtls)return(t,n,o,r)=>{o.set("client_id",n.client_id)};let e=pe(ct,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await async function(t,n,o){if(typeof t!="string"||t.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return c9(t,n,o)}(e,pe(ct,this).clientAssertionSigningAlg||"RS256")),e?function(t,n){return _N(t,n)}(e):wI(pe(ct,this).clientSecret)}async function Pd(e){const{configuration:t}=await Et(At,this,Tn).call(this),n=p9(),o=await d9(n),r=rf(ke(ke({},pe(ct,this).authorizationParams),e==null?void 0:e.authorizationParams)),i=new URLSearchParams(ke(ke({scope:af},r),{},{client_id:pe(ct,this).clientId,code_challenge:o,code_challenge_method:"S256"}));return{authorizationUrl:e!=null&&e.pushedAuthorizationRequests?await EI(t,i):await nf(t,i),codeVerifier:n}}class _r extends vt{constructor(t,n){super(t,n),Object.setPrototypeOf(this,_r.prototype)}static fromPayload(t){let{error:n,error_description:o}=t;return new _r(n,o)}}class kl extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,kl.prototype)}}class Jh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Jh.prototype)}}class Yh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Yh.prototype)}}class Hi extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Hi.prototype)}}class Kh extends _r{constructor(t,n){super(t,n),Object.setPrototypeOf(this,Kh.prototype)}}class W9{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6e5;this.contexts=new Map,this.ttlMs=t}set(t,n){this.cleanup(),this.contexts.set(t,Object.assign(Object.assign({},n),{createdAt:Date.now()}))}get(t){const n=this.contexts.get(t);if(n){if(!(Date.now()-n.createdAt>this.ttlMs))return n;this.contexts.delete(t)}}remove(t){this.contexts.delete(t)}cleanup(){const t=Date.now();for(const[n,o]of this.contexts)t-o.createdAt>this.ttlMs&&this.contexts.delete(n)}get size(){return this.contexts.size}}class V9{constructor(t,n){this.authJsMfaClient=t,this.auth0Client=n,this.contextManager=new W9}setMFAAuthDetails(t,n,o,r){this.contextManager.set(t,{scope:n,audience:o,mfaRequirements:r})}async getAuthenticators(t){var n,o;const r=this.contextManager.get(t);if(!(!((n=r==null?void 0:r.mfaRequirements)===null||n===void 0)&&n.challenge)||r.mfaRequirements.challenge.length===0)throw new kl("invalid_request","challengeType is required and must contain at least one challenge type, please check mfa_required error payload");const i=r.mfaRequirements.challenge.map(a=>a.type);try{return(await this.authJsMfaClient.listAuthenticators({mfaToken:t})).filter(a=>!!a.type&&i.includes(a.type))}catch(a){throw a instanceof PI?new kl((o=a.cause)===null||o===void 0?void 0:o.error,a.message):a}}async enroll(t){var n;const o=function(r){const i=IN[r.factorType];return Object.assign(Object.assign(Object.assign({mfaToken:r.mfaToken,authenticatorTypes:i.authenticatorTypes},i.oobChannels&&{oobChannels:i.oobChannels}),"phoneNumber"in r&&{phoneNumber:r.phoneNumber}),"email"in r&&{email:r.email})}(t);try{return await this.authJsMfaClient.enrollAuthenticator(o)}catch(r){throw r instanceof NI?new Jh((n=r.cause)===null||n===void 0?void 0:n.error,r.message):r}}async challenge(t){var n;try{const o={challengeType:t.challengeType,mfaToken:t.mfaToken};return t.authenticatorId&&(o.authenticatorId=t.authenticatorId),await this.authJsMfaClient.challengeAuthenticator(o)}catch(o){throw o instanceof OI?new Yh((n=o.cause)===null||n===void 0?void 0:n.error,o.message):o}}async getEnrollmentFactors(t){const n=this.contextManager.get(t);if(!n||!n.mfaRequirements)throw new Kh("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");return n.mfaRequirements.enroll&&n.mfaRequirements.enroll.length!==0?n.mfaRequirements.enroll:[]}async verify(t){const n=this.contextManager.get(t.mfaToken);if(!n)throw new Hi("mfa_context_not_found","MFA context not found for this MFA token. Please retry the original request to get a new MFA token.");const o=function(a){return"otp"in a&&a.otp?kN:"oobCode"in a&&a.oobCode?SN:"recoveryCode"in a&&a.recoveryCode?AN:void 0}(t);if(!o)throw new Hi("invalid_request","Unable to determine grant type. Provide one of: otp, oobCode, or recoveryCode.");const r=n.scope,i=n.audience;try{const a=await this.auth0Client._requestTokenForMfa({grant_type:o,mfaToken:t.mfaToken,scope:r,audience:i,otp:t.otp,oob_code:t.oobCode,binding_code:t.bindingCode,recovery_code:t.recoveryCode});return this.contextManager.remove(t.mfaToken),a}catch(a){if(a instanceof _s)this.setMFAAuthDetails(a.mfa_token,r,i,a.mfa_requirements);else if(a instanceof Hi)throw new Hi(a.error,a.error_description);throw a}}}const Oa=new GP;class F9{constructor(t){let n,o;if(this.userCache=new UC().enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const l=Array.from(this.activeLockKeys);for(const u of l)await Oa.releaseLock(u);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),typeof window<"u"&&(()=>{if(!gl())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(gl().subtle===void 0)throw new Error(`
68
68
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
69
- `)})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)o=t.cache;else{if(n=t.cacheLocation||"memory",!cv(n))throw new Error('Invalid cache location "'.concat(n,'"'));o=cv(n)()}var r;this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?Pi:fP,this.orgHintCookieName=(r=this.options.clientId,"auth0.".concat(r,".organization_hint")),this.isAuthenticatedCookieName=(l=>"auth0.".concat(l,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const i=t.useCookiesForTransactions?this.cookieStorage:hP;var a;this.scope=function(l,u){for(var p=arguments.length,f=new Array(p>2?p-2:0),h=2;h<p;h++)f[h-2]=arguments[h];if(typeof l!="object")return{default:Bc(u,l,...f)};let m={default:Bc(u,...f)};return Object.keys(l).forEach(g=>{const y=l[g];m[g]=Bc(u,y,...f)}),m}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new sP(i,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||FC,this.cacheManager=new aP(o,o.allKeys?void 0:new vP(o,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new wP(this.options.clientId):void 0,this.domainUrl=(a=this.options.domain,/^https?:\/\//.test(a)?a:"https://".concat(a)),this.tokenIssuer=((l,u)=>l?l.startsWith("https://")?l:"https://".concat(l,"/"):"".concat(u,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),c=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new CP(c,s),this.authJsClient=new D9({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new V9(this.authJsClient.mfa,this),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&n==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new gP)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(t){const n=this.options.auth0Client||VC,o=zC(n,!0),r=encodeURIComponent(btoa(JSON.stringify(o)));return"".concat(this.domainUrl).concat(t,"&auth0Client=").concat(r)}_authorizeUrl(t){return this._url("/authorize?".concat(Vp(t)))}async _verifyIdToken(t,n,o){const r=await this.nowProvider();return lP({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:n,organization:o,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,n,o){var r;const i=cd(Ea()),a=cd(Ea()),s=Ea(),c=await ev(s),l=nv(c),u=await((r=this.dpop)===null||r===void 0?void 0:r.calculateThumbprint()),p=((h,m,g,y,x,C,w,I,b)=>Object.assign(Object.assign(Object.assign({client_id:h.clientId},h.authorizationParams),g),{scope:pc(m,g.scope,g.audience),response_type:"code",response_mode:I||"query",state:y,nonce:x,redirect_uri:w||h.authorizationParams.redirect_uri,code_challenge:C,code_challenge_method:"S256",dpop_jkt:b}))(this.options,this.scope,t,i,a,l,t.redirect_uri||this.options.authorizationParams.redirect_uri||o,n==null?void 0:n.response_mode,u),f=this._authorizeUrl(p);return{nonce:a,code_verifier:s,scope:p.scope,audience:p.audience||"default",redirect_uri:p.redirect_uri,state:i,url:f}}async loginWithPopup(t,n){var o;if(t=t||{},!(n=n||{}).popup&&(n.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup","left=".concat(c,",top=").concat(l,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(""),!n.popup))throw new Mh;const r=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);n.popup.location.href=r.url;const i=await(s=>new Promise((c,l)=>{let u;const p=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(p),clearTimeout(f),window.removeEventListener("message",u,!1),l(new _h(s.popup)))},1e3),f=setTimeout(()=>{clearInterval(p),l(new Lh(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(f),clearInterval(p),window.removeEventListener("message",u,!1),s.closePopup!==!1&&s.popup.close(),h.data.response.error)return l(vt.fromPayload(h.data.response));c(h.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},n),{timeoutInSeconds:n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==i.state)throw new vt("state_mismatch","Invalid state");const a=((o=t.authorizationParams)===null||o===void 0?void 0:o.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.user}async getIdTokenClaims(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.claims}async loginWithRedirect(){var t;const n=lv(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),{openUrl:o,fragment:r,appState:i}=n,a=$n(n,["openUrl","fragment","appState"]),s=((t=a.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,c=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:l}=c,u=$n(c,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:i,response_type:fr.Code}),s&&{organization:s}));const p=r?"".concat(l,"#").concat(r):l;o?await o(p):window.location.assign(p)}async handleRedirectCallback(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location.href).split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new vt("missing_transaction","Invalid state");this.transactionManager.remove();const o=(r=>{r.indexOf("#")>-1&&(r=r.substring(0,r.indexOf("#")));const i=new URLSearchParams(r);return{state:i.get("state"),code:i.get("code")||void 0,connect_code:i.get("connect_code")||void 0,error:i.get("error")||void 0,error_description:i.get("error_description")||void 0}})(t.join(""));return n.response_type===fr.ConnectCode?this._handleConnectAccountRedirectCallback(o,n):this._handleLoginRedirectCallback(o,n)}async _handleLoginRedirectCallback(t,n){const{code:o,state:r,error:i,error_description:a}=t;if(i)throw new Th(i,a||i,r,n.appState);if(!n.code_verifier||n.state&&n.state!==r)throw new vt("state_mismatch","Invalid state");const s=n.organization,c=n.nonce,l=n.redirect_uri;return await this._requestToken(Object.assign({audience:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:o},l?{redirect_uri:l}:{}),{nonceIn:c,organization:s}),{appState:n.appState,response_type:fr.Code}}async _handleConnectAccountRedirectCallback(t,n){const{connect_code:o,state:r,error:i,error_description:a}=t;if(i)throw new Rh(i,a||i,n.connection,r,n.appState);if(!o)throw new vt("missing_connect_code","Missing connect code");if(!(n.code_verifier&&n.state&&n.auth_session&&n.redirect_uri&&n.state===r))throw new vt("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:n.auth_session,connect_code:o,redirect_uri:n.redirect_uri,code_verifier:n.code_verifier});return Object.assign(Object.assign({},s),{appState:n.appState,response_type:fr.ConnectCode})}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch{}}async getTokenSilently(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n,o;const r=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:pc(this.scope,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope,((o=t.authorizationParams)===null||o===void 0?void 0:o.audience)||this.options.authorizationParams.audience)})}),i=await((a,s)=>{let c=ud[s];return c||(c=a().finally(()=>{delete ud[s],c=null}),ud[s]=c),c})(()=>this._getTokenSilently(r),"".concat(this.options.clientId,"::").concat(r.authorizationParams.audience,"::").concat(r.authorizationParams.scope));return t.detailedResponse?i:i==null?void 0:i.access_token}async _getTokenSilently(t){const{cacheMode:n}=t,o=$n(t,["cacheMode"]);if(n!=="off"){const s=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:n});if(s)return s}if(n==="cache-only")return;const r=(i=this.options.clientId,a=o.authorizationParams.audience||"default","".concat("auth0.lock.getTokenSilently",".").concat(i,".").concat(a));var i,a;if(!await sv(()=>Oa.acquireLock(r,5e3),10))throw new Fi;this.activeLockKeys.add(r),this.activeLockKeys.size===1&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if(n!=="off"){const h=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(h)return h}const s=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(o):await this._getTokenFromIFrame(o),{id_token:c,token_type:l,access_token:u,oauthTokenScope:p,expires_in:f}=s;return Object.assign(Object.assign({id_token:c,token_type:l,access_token:u},p?{scope:p}:null),{expires_in:f})}finally{await Oa.releaseLock(r),this.activeLockKeys.delete(r),this.activeLockKeys.size===0&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var o,r;const i=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:pc(this.scope,(o=t.authorizationParams)===null||o===void 0?void 0:o.scope,((r=t.authorizationParams)===null||r===void 0?void 0:r.audience)||this.options.authorizationParams.audience)})});return n=Object.assign(Object.assign({},WN),n),await this.loginWithPopup(i,n),(await this.cacheManager.get(new Ln({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){t.clientId!==null?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const n=t.logoutParams||{},{federated:o}=n,r=$n(n,["federated"]),i=o?"&federated":"";return this._url("/v2/logout?".concat(Vp(Object.assign({clientId:t.clientId},r))))+i}async logout(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n;const o=lv(t),{openUrl:r}=o,i=$n(o,["openUrl"]);t.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await((n=this.dpop)===null||n===void 0?void 0:n.clear());const a=this._buildLogoutUrl(i);r?await r(a):r!==!1&&window.location.assign(a)}async _getTokenFromIFrame(t){const n=(o=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(o));var o;if(!await sv(()=>Oa.acquireLock(n,5e3),10))throw new Fi;try{const r=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),i=this.cookieStorage.get(this.orgHintCookieName);i&&!r.organization&&(r.organization=i);const{url:a,state:s,nonce:c,code_verifier:l,redirect_uri:u,scope:p,audience:f}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);if(window.crossOriginIsolated)throw new vt("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const h=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let m;try{m=new URL(this.domainUrl).origin}catch{m=this.domainUrl}const g=await function(x,C){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:60;return new Promise((I,b)=>{const k=window.document.createElement("iframe");k.setAttribute("width","0"),k.setAttribute("height","0"),k.style.display="none";const S=()=>{window.document.body.contains(k)&&(window.document.body.removeChild(k),window.removeEventListener("message",E,!1))};let E;const O=setTimeout(()=>{b(new Fi),S()},1e3*w);E=function(A){if(A.origin!=C||!A.data||A.data.type!=="authorization_response")return;const N=A.source;N&&N.close(),A.data.response.error?b(vt.fromPayload(A.data.response)):I(A.data.response),clearTimeout(O),window.removeEventListener("message",E,!1),setTimeout(S,2e3)},window.addEventListener("message",E,!1),window.document.body.appendChild(k),k.setAttribute("src",x)})}(a,m,h);if(s!==g.state)throw new vt("state_mismatch","Invalid state");const y=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:l,code:g.code,grant_type:"authorization_code",redirect_uri:u,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:c,organization:r.organization});return Object.assign(Object.assign({},y),{scope:p,oauthTokenScope:y.scope,audience:f})}catch(r){throw r.error==="login_required"&&this.logout({openUrl:!1}),r}finally{await Oa.releaseLock(n)}}async _getTokenUsingRefreshToken(t){var n,o;const r=await this.cacheManager.get(new Ln({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new pu(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const i=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null,s=((f,h,m,g)=>{var y;if(f&&m&&g){if(h.audience!==m)return h.scope;const x=g.split(" "),C=((y=h.scope)===null||y===void 0?void 0:y.split(" "))||[],w=C.every(I=>x.includes(I));return x.length>=C.length&&w?g:h.scope}return h.scope})(this.options.useMrrt,t.authorizationParams,r==null?void 0:r.audience,r==null?void 0:r.scope);try{const f=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:i}),a&&{timeout:a}),{scopesToRequest:s});if(f.refresh_token&&(r!=null&&r.refresh_token)&&await this.cacheManager.updateEntry(r.refresh_token,f.refresh_token),this.options.useMrrt&&(c=r==null?void 0:r.audience,l=r==null?void 0:r.scope,u=t.authorizationParams.audience,p=t.authorizationParams.scope,(c!==u||!uv(p,l))&&!uv(s,f.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);await this.cacheManager.remove(this.options.clientId,t.authorizationParams.audience,t.authorizationParams.scope);const h=((m,g)=>{const y=(m==null?void 0:m.split(" "))||[],x=(g==null?void 0:g.split(" "))||[];return y.filter(C=>x.indexOf(C)==-1).join(",")})(s,f.scope);throw new Dh(t.authorizationParams.audience||"default",h)}return Object.assign(Object.assign({},f),{scope:t.authorizationParams.scope,oauthTokenScope:f.scope,audience:t.authorizationParams.audience||"default"})}catch(f){if(f.message){if(f.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),f;if((f.message.includes("Missing Refresh Token")||f.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t)}throw f instanceof _s&&this.mfa.setMFAAuthDetails(f.mfa_token,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope,(o=t.authorizationParams)===null||o===void 0?void 0:o.audience,f.mfa_requirements),f}var c,l,u,p}async _saveEntryInCache(t){const{id_token:n,decodedToken:o}=t,r=$n(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:n,decodedToken:o}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",n=this.scope[t],o=await this.cacheManager.getIdToken(new Ln({clientId:this.options.clientId,audience:t,scope:n})),r=this.userCache.get("@@user@@");return o&&o.id_token===(r==null?void 0:r.id_token)?r:(this.userCache.set("@@user@@",o),o)}async _getEntryFromCache(t){let{scope:n,audience:o,clientId:r,cacheMode:i}=t;const a=await this.cacheManager.get(new Ln({scope:n,audience:o,clientId:r}),60,this.options.useMrrt,i);if(a&&a.access_token){const{token_type:s,access_token:c,oauthTokenScope:l,expires_in:u}=a,p=await this._getIdTokenFromCache();return p&&Object.assign(Object.assign({id_token:p.id_token,token_type:s||"Bearer",access_token:c},l?{scope:l}:null),{expires_in:u})}}async _requestToken(t,n){var o,r;const{nonceIn:i,organization:a,scopesToRequest:s}=n||{},c=await oP(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},t),{scope:s||t.scope}),this.worker),l=await this._verifyIdToken(c.id_token,i,a);if(t.grant_type==="authorization_code"){const u=await this._getIdTokenFromCache();!((r=(o=u==null?void 0:u.decodedToken)===null||o===void 0?void 0:o.claims)===null||r===void 0)&&r.sub&&u.decodedToken.claims.sub!==l.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove("@@user@@"))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},c),{decodedToken:l,scope:t.scope,audience:t.audience||"default"}),c.scope?{oauthTokenScope:c.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||l.claims.org_id),Object.assign(Object.assign({},c),{decodedToken:l})}async loginWithCustomTokenExchange(t){return this._requestToken(Object.assign(Object.assign({},t),{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:t.subject_token,subject_token_type:t.subject_token_type,scope:pc(this.scope,t.scope,t.audience||this.options.authorizationParams.audience),audience:t.audience||this.options.authorizationParams.audience,organization:t.organization||this.options.authorizationParams.organization}))}async exchangeToken(t){return this.loginWithCustomTokenExchange(t)}_assertDpop(t){if(!t)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(t){return this._assertDpop(this.dpop),this.dpop.getNonce(t)}setDpopNonce(t,n){return this._assertDpop(this.dpop),this.dpop.setNonce(t,n)}generateDpopProof(t){return this._assertDpop(this.dpop),this.dpop.generateProof(t)}createFetcher(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new xP(t,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:n=>{var o;return this.getTokenSilently({authorizationParams:{scope:(o=n==null?void 0:n.scope)===null||o===void 0?void 0:o.join(" "),audience:n==null?void 0:n.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(t.dpopNonceId),setDpopNonce:n=>this.setDpopNonce(n,t.dpopNonceId),generateDpopProof:n=>this.generateDpopProof(n)})}async connectAccountWithRedirect(t){const{openUrl:n,appState:o,connection:r,scopes:i,authorization_params:a,redirectUri:s=this.options.authorizationParams.redirect_uri||window.location.origin}=t;if(!r)throw new Error("connection is required");const c=cd(Ea()),l=Ea(),u=await ev(l),p=nv(u),{connect_uri:f,connect_params:h,auth_session:m}=await this.myAccountApi.connectAccount({connection:r,scopes:i,redirect_uri:s,state:c,code_challenge:p,code_challenge_method:"S256",authorization_params:a});this.transactionManager.create({state:c,code_verifier:l,auth_session:m,redirect_uri:s,appState:o,connection:r,response_type:fr.ConnectCode});const g=new URL(f);g.searchParams.set("ticket",h.ticket),n?await n(g.toString()):window.location.assign(g)}async _requestTokenForMfa(t,n){const{mfaToken:o}=t,r=$n(t,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},r),{mfa_token:o}),n)}}var MI={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},Xt=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},z9=Ft(Ft({},MI),{buildAuthorizeUrl:Xt,buildLogoutUrl:Xt,getAccessTokenSilently:Xt,getAccessTokenWithPopup:Xt,getIdTokenClaims:Xt,loginWithCustomTokenExchange:Xt,exchangeToken:Xt,loginWithRedirect:Xt,loginWithPopup:Xt,connectAccountWithRedirect:Xt,logout:Xt,handleRedirectCallback:Xt,getDpopNonce:Xt,setDpopNonce:Xt,generateDpopProof:Xt,createFetcher:Xt,getConfiguration:Xt}),DI=v.createContext(z9),Tv=function(e){MN(t,e);function t(n,o){var r=e.call(this,o??n)||this;return r.error=n,r.error_description=o,Object.setPrototypeOf(r,t.prototype),r}return t}(Error),$9=/[?&](?:connect_)?code=[^&]+/,Z9=/[?&]state=[^&]+/,X9=/[?&]error=[^&]+/,U9=function(e){return e===void 0&&(e=window.location.search),($9.test(e)||X9.test(e))&&Z9.test(e)},BI=function(e){return function(t){if(t instanceof Error)return t;if(t!==null&&typeof t=="object"&&"error"in t&&typeof t.error=="string"){if("error_description"in t&&typeof t.error_description=="string"){var n=t;return new Tv(n.error,n.error_description)}var o=t;return new Tv(o.error)}return new Error(e)}},Rv=BI("Login failed"),wc=BI("Get access token failed"),HI=function(e){var t,n;e!=null&&e.redirectUri&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=(t=e.authorizationParams)!==null&&t!==void 0?t:{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),!((n=e==null?void 0:e.authorizationParams)===null||n===void 0)&&n.redirectUri&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},J9=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return Ft(Ft({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return Ft(Ft({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:Ft(Ft({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return Ft(Ft({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return Ft(Ft({},e),{isLoading:!1,error:t.error})}},Y9=function(e){return HI(e),Ft(Ft({},e),{auth0Client:{name:"auth0-react",version:"2.13.0"}})},K9=function(e){var t;window.history.replaceState({},document.title,(t=e.returnTo)!==null&&t!==void 0?t:window.location.pathname)},q9=function(e){var t=e.children,n=e.skipRedirectCallback,o=e.onRedirectCallback,r=o===void 0?K9:o,i=e.context,a=i===void 0?DI:i,s=Q0(e,["children","skipRedirectCallback","onRedirectCallback","context"]),c=v.useState(function(){return new F9(Y9(s))})[0],l=v.useReducer(J9,MI),u=l[0],p=l[1],f=v.useRef(!1),h=v.useCallback(function(M){return p({type:"ERROR",error:M}),M},[]);v.useEffect(function(){f.current||(f.current=!0,function(){return nr(void 0,void 0,void 0,function(){var M,T,H,V,z,P,B;return or(this,function(F){switch(F.label){case 0:return F.trys.push([0,7,,8]),M=void 0,U9()&&!n?[4,c.handleRedirectCallback()]:[3,3];case 1:return T=F.sent(),H=T.appState,V=H===void 0?{}:H,z=T.response_type,P=Q0(T,["appState","response_type"]),[4,c.getUser()];case 2:return M=F.sent(),V.response_type=z,z===fr.ConnectCode&&(V.connectedAccount=P),r(V,M),[3,6];case 3:return[4,c.checkSession()];case 4:return F.sent(),[4,c.getUser()];case 5:M=F.sent(),F.label=6;case 6:return p({type:"INITIALISED",user:M}),[3,8];case 7:return B=F.sent(),h(Rv(B)),[3,8];case 8:return[2]}})})}())},[c,r,n,h]);var m=v.useCallback(function(M){return HI(M),c.loginWithRedirect(M)},[c]),g=v.useCallback(function(M,T){return nr(void 0,void 0,void 0,function(){var H,V;return or(this,function(z){switch(z.label){case 0:p({type:"LOGIN_POPUP_STARTED"}),z.label=1;case 1:return z.trys.push([1,3,,4]),[4,c.loginWithPopup(M,T)];case 2:return z.sent(),[3,4];case 3:return H=z.sent(),h(Rv(H)),[2];case 4:return[4,c.getUser()];case 5:return V=z.sent(),p({type:"LOGIN_POPUP_COMPLETE",user:V}),[2]}})})},[c,h]),y=v.useCallback(function(){for(var M=[],T=0;T<arguments.length;T++)M[T]=arguments[T];return nr(void 0,DN([],M,!0),void 0,function(H){return H===void 0&&(H={}),or(this,function(V){switch(V.label){case 0:return[4,c.logout(H)];case 1:return V.sent(),(H.openUrl||H.openUrl===!1)&&p({type:"LOGOUT"}),[2]}})})},[c]),x=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V,z;return or(this,function(P){switch(P.label){case 0:return P.trys.push([0,2,3,5]),[4,c.getTokenSilently(M)];case 1:return T=P.sent(),[3,5];case 2:throw H=P.sent(),wc(H);case 3:return V=p,z={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return V.apply(void 0,[(z.user=P.sent(),z)]),[7];case 5:return[2,T]}})})},[c]),C=v.useCallback(function(M,T){return nr(void 0,void 0,void 0,function(){var H,V,z,P;return or(this,function(B){switch(B.label){case 0:return B.trys.push([0,2,3,5]),[4,c.getTokenWithPopup(M,T)];case 1:return H=B.sent(),[3,5];case 2:throw V=B.sent(),wc(V);case 3:return z=p,P={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return z.apply(void 0,[(P.user=B.sent(),P)]),[7];case 5:return[2,H]}})})},[c]),w=v.useCallback(function(M){return c.connectAccountWithRedirect(M)},[c]),I=v.useCallback(function(){return c.getIdTokenClaims()},[c]),b=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V,z;return or(this,function(P){switch(P.label){case 0:return P.trys.push([0,2,3,5]),[4,c.loginWithCustomTokenExchange(M)];case 1:return T=P.sent(),[3,5];case 2:throw H=P.sent(),wc(H);case 3:return V=p,z={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return V.apply(void 0,[(z.user=P.sent(),z)]),[7];case 5:return[2,T]}})})},[c]),k=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){return or(this,function(T){return[2,b(M)]})})},[b]),S=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V;return or(this,function(z){switch(z.label){case 0:return z.trys.push([0,2,3,5]),[4,c.handleRedirectCallback(M)];case 1:return[2,z.sent()];case 2:throw T=z.sent(),wc(T);case 3:return H=p,V={type:"HANDLE_REDIRECT_COMPLETE"},[4,c.getUser()];case 4:return H.apply(void 0,[(V.user=z.sent(),V)]),[7];case 5:return[2]}})})},[c]),E=v.useCallback(function(M){return c.getDpopNonce(M)},[c]),O=v.useCallback(function(M,T){return c.setDpopNonce(M,T)},[c]),A=v.useCallback(function(M){return c.generateDpopProof(M)},[c]),N=v.useCallback(function(M){return c.createFetcher(M)},[c]),j=v.useCallback(function(){return c.getConfiguration()},[c]),G=v.useMemo(function(){return Ft(Ft({},u),{getAccessTokenSilently:x,getAccessTokenWithPopup:C,getIdTokenClaims:I,loginWithCustomTokenExchange:b,exchangeToken:k,loginWithRedirect:m,loginWithPopup:g,connectAccountWithRedirect:w,logout:y,handleRedirectCallback:S,getDpopNonce:E,setDpopNonce:O,generateDpopProof:A,createFetcher:N,getConfiguration:j})},[u,x,C,I,b,k,m,g,w,y,S,E,O,A,N,j]);return v.createElement(a.Provider,{value:G},t)},GI=function(e){return e===void 0&&(e=DI),v.useContext(e)};const WI=({className:e,children:t,Logo:n})=>d.jsxs("div",{className:jo("info-page-container",e),children:[d.jsx(n,{className:"info-page-logo"}),d.jsx("div",{className:"info-page-wrapper",children:t})]}),Q9={value:"data:image/svg+xml,%3Csvg width='5041' height='1232' viewBox='0 0 5041 1232' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_879_362)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M548.6 178H439.6C368.7 178 310 199.5 269.3 244.5C228.6 289.3 206.7 356 206.7 444.3C206.7 532.6 228.6 599.5 269.3 644.2C310.2 689.2 368.7 710.7 439.6 710.7H548.6C619 710.7 677.6 689.2 718.6 644.2C759.5 599.4 781.6 532.6 781.6 444.2C781.6 355.8 759.5 289 718.6 244.2C677.7 199.3 619 177.7 548.6 177.7V178ZM449.5 293.8H538.9C582.2 293.8 611.9 305.2 631.1 328.3C650.5 351.8 660.5 389.2 660.5 444.4C660.5 499.6 650.5 536.7 631.1 560C612 583 582.2 594.1 538.9 594.1H449.5C405.6 594.1 375.9 583 356.9 560C337.6 536.8 327.7 499.7 327.7 444.5C327.7 389.3 337.4 351.9 356.8 328.4C375.9 305.2 405.6 293.8 449.5 293.8Z' fill='white'/%3E%3Cpath d='M0.700195 189.8C0.700195 183.1 6.10017 177.7 12.8002 177.7H108.6C115.3 177.7 120.7 183.1 120.7 189.8V698.6C120.7 705.3 115.3 710.7 108.6 710.7H12.8002C6.10017 710.7 0.700195 705.3 0.700195 698.6V189.8Z' fill='white'/%3E%3Cpath d='M0.700195 11.9002C0.700195 5.7002 5.70018 0.700195 11.9002 0.700195H109.6C115.7 0.700195 120.7 5.7002 120.7 11.9002V109.5C120.7 115.7 115.7 120.7 109.5 120.7H11.9002C5.70018 120.7 0.700195 115.7 0.700195 109.5V11.9002Z' fill='%23007BE5'/%3E%3Cpath d='M827.7 601.9C827.7 595.7 832.7 590.7 838.9 590.7H936.6C942.8 590.7 947.8 595.7 947.8 601.9V699.5C947.8 705.7 942.8 710.7 936.6 710.7H838.9C832.7 710.7 827.7 705.7 827.7 699.5V601.9Z' fill='%23007BE5'/%3E%3Cpath d='M4363.9 293.2C4320.2 293.2 4290.6 304.6 4271.6 327.8C4252.3 351.4 4242.5 388.8 4242.5 444C4242.5 499.2 4252.3 536.4 4271.5 559.7C4290.5 582.6 4320 593.8 4363.8 593.8H4614.7C4622.4 593.8 4628.7 600.1 4628.7 607.8V696.7C4628.7 704.4 4622.4 710.7 4614.7 710.7H4354.1C4283.3 710.7 4224.9 689.1 4184.1 644.1C4143.5 599.3 4121.6 532.4 4121.6 444C4121.6 355.6 4143.5 288.7 4184.1 243.9C4224.8 199 4283.3 177.3 4354.1 177.3H4614.7C4622.4 177.3 4628.7 183.6 4628.7 191.3V279.3C4628.7 287 4622.4 293.3 4614.7 293.3H4363.9V293.2Z' fill='white'/%3E%3Cpath d='M1302.6 165.3C1240.1 165.3 1197 180.9 1169.3 213.3C1141.3 246 1127.4 297.6 1127.4 372.9C1127.4 447.7 1141.1 499 1169 531.6C1196.6 563.9 1239.7 579.5 1302.7 579.5H1552.5C1560.2 579.5 1566.5 585.8 1566.5 593.5V697.1C1566.5 704.8 1560.2 711.1 1552.5 711.1H1302.7C1204.7 711.1 1127.5 683.4 1075 626.4C1022.4 569.7 995.7 484.8 995.7 372.9C995.7 260.5 1022.7 175.4 1075.2 118.4C1127.9 61.3001 1205 33.6001 1302.6 33.6001H1552.4C1560.1 33.6001 1566.4 39.9001 1566.4 47.6001V151.2C1566.4 158.9 1560.1 165.2 1552.4 165.2H1302.6V165.3Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1953.6 177.7H1844.8C1774 177.7 1715.6 199.3 1674.8 244.3C1634.2 289.1 1612.3 356 1612.3 444.4C1612.3 532.8 1634.2 599.7 1674.8 644.5C1715.5 689.4 1774 711.1 1844.8 711.1H1953.6C2023.9 711.1 2082.4 689.5 2123.2 644.5C2163.9 599.7 2186 532.8 2186 444.3C2186 355.8 2163.9 289 2123.2 244.1C2082.3 199.3 2023.9 177.7 1953.6 177.7ZM1854.6 293.7H1943.8C1987 293.7 2016.6 305.1 2035.8 328.3C2055.2 351.9 2065.2 389.3 2065.2 444.5C2065.2 499.7 2055.2 536.8 2035.8 560.2C2016.7 583.2 1987.1 594.3 1943.8 594.3H1854.6C1810.8 594.3 1781.3 583.1 1762.3 560.2C1743 536.9 1733.3 499.8 1733.3 444.5C1733.3 389.3 1743.1 351.9 1762.4 328.3C1781.3 305 1810.9 293.7 1854.6 293.7Z' fill='white'/%3E%3Cpath d='M2679.7 411.6C2679.7 372.5 2668.5 343.5 2645.4 324C2622.1 304.3 2585.3 293.2 2531.9 293.2H2378.4C2375.5 293.2 2374.9 293.9 2374.8 294C2374.5 294.4 2373.6 295.8 2373.6 299.8V696.7C2373.6 704.4 2367.3 710.7 2359.6 710.7H2267.7C2260 710.7 2253.7 704.4 2253.7 696.7V265.6C2253.7 234.7 2258.8 212 2272.6 197.2C2286.5 182.2 2307.5 177.3 2334.2 177.3H2531.8C2620.7 177.3 2688 198.4 2733.3 238.9C2778.7 279.5 2800.5 338.6 2800.5 411.7V696.7C2800.5 704.4 2794.2 710.7 2786.5 710.7H2693.7C2686 710.7 2679.7 704.4 2679.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M3304.7 411.6C3304.7 372.5 3293.5 343.5 3270.4 324C3247.1 304.3 3210.3 293.2 3156.9 293.2H3003.4C3000.5 293.2 2999.9 293.9 2999.8 294C2999.5 294.4 2998.6 295.8 2998.6 299.8V696.7C2998.6 704.4 2992.3 710.7 2984.6 710.7H2892.7C2885 710.7 2878.7 704.4 2878.7 696.7V265.6C2878.7 234.7 2883.8 212 2897.6 197.2C2911.5 182.2 2932.5 177.3 2959.2 177.3H3156.8C3245.7 177.3 3313 198.4 3358.3 238.9C3403.7 279.5 3425.5 338.6 3425.5 411.7V696.7C3425.5 704.4 3419.2 710.7 3411.5 710.7H3318.7C3311 710.7 3304.7 704.4 3304.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M4906.1 292.2C4898.4 292.2 4892.1 298.5 4892.1 306.2V529.2C4892.1 557.5 4897.2 574.3 4906.4 584.1C4915.4 593.8 4930 598.6 4953.7 598.6H5019.2C5026.9 598.6 5033.2 604.9 5033.2 612.6V695.7C5033.2 703.4 5026.9 709.7 5019.2 709.7H4932.1C4877.9 709.7 4836.8 698.8 4809.7 668.6C4782.8 638.6 4771.3 591.5 4771.3 523.4V306.2C4771.3 298.5 4765 292.2 4757.3 292.2H4714.7C4707 292.2 4700.7 285.9 4700.7 278.2V190.2C4700.7 182.5 4707 176.2 4714.7 176.2H4757.3C4765 176.2 4771.3 169.9 4771.3 162.2V67.7002C4771.3 60.0002 4777.6 53.7002 4785.3 53.7002H4878.2C4885.9 53.7002 4892.2 60.0002 4892.2 67.7002V162.2C4892.2 169.9 4898.5 176.2 4906.2 176.2H5021.3C5029 176.2 5035.3 182.5 5035.3 190.2V278.2C5035.3 285.9 5029 292.2 5021.3 292.2H4906.1Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4024.4 607.2C4024.4 599.5 4018.1 593.2 4010.4 593.2H3699.9C3672.9 593.2 3655.3 586 3644.6 575.2C3633.8 564.4 3628.6 548.8 3628.6 529.7V514.5C3628.6 506.8 3634.9 500.5 3642.6 500.5H3866.6C3931.2 500.5 3977.4 486.9 4007.5 459.6C4037.7 432.2 4050.1 392.3 4050.1 343.5C4050.1 292.2 4036.8 250.1 4006.4 220.9C3976.1 191.7 3930.1 176.8 3867.7 176.8H3700.1C3633.9 176.8 3586.5 195.4 3555.6 227.8C3524.8 260.1 3511.8 305 3511.8 355.3V531.7C3511.8 582 3524.9 626.9 3555.6 659.2C3586.5 691.6 3633.9 710.2 3700.1 710.2H4010.6C4018.3 710.2 4024.6 703.9 4024.6 696.2V607.2H4024.4ZM3863.5 403.1H3642.5C3634.8 403.1 3628.5 396.8 3628.5 389.1V356.2C3628.5 337.6 3633.7 321.9 3644.6 311C3655.4 300.1 3672.9 292.7 3699.9 292.7H3866.5C3890.7 292.7 3906.9 298.8 3916.9 308.2C3926.9 317.5 3932 331.3 3932 349.4C3932 367.1 3927.3 380 3917.4 388.6C3907.4 397.4 3890.5 403.1 3863.5 403.1Z' fill='white'/%3E%3Cpath d='M2918.9 872.3C3001.9 872.3 3036.9 909.9 3036.9 966.3C3036.9 1012.2 3013.9 1036.8 2973.2 1047.2C3014.4 1058.2 3037.9 1083.7 3037.9 1129.7C3037.9 1186.1 3003.5 1224.7 2920.5 1224.7H2755.6C2741.5 1224.7 2734.2 1217.9 2734.2 1203.8V893.2C2734.2 879.1 2741.5 872.3 2755.6 872.3H2918.9ZM2765.4 1033.1H2918.9C2976.8 1033.1 3005 1014.8 3005 970.5C3005 929.8 2979.4 903.7 2919.4 903.7H2771.2C2767.5 903.7 2765.5 905.3 2765.5 909.4V1033.1H2765.4ZM2765.4 1187.6C2765.4 1191.8 2767.5 1193.3 2771.1 1193.3H2921C2979.5 1193.3 3006.1 1168.2 3006.1 1125.4C3006.1 1081 2976.9 1060.2 2921 1060.2H2765.5V1187.6H2765.4Z' fill='white'/%3E%3Cpath d='M3294 956.9V985.6H3182.8C3148.9 985.6 3135.3 1000.7 3135.3 1033.6V1224.6H3106.1V1029.9C3106.1 979.8 3125.4 956.8 3176.6 956.8H3294V956.9Z' fill='white'/%3E%3Cpath d='M3489.1 956.9C3562.2 956.9 3608.6 1001.3 3608.6 1091C3608.6 1181.3 3562.1 1224.6 3489.1 1224.6H3431.2C3357.6 1224.6 3311.7 1181.3 3311.7 1091C3311.7 1001.2 3357.6 956.9 3431.2 956.9H3489.1ZM3433.3 985.6C3374.3 985.6 3340.9 1019 3340.9 1091C3340.9 1163.5 3374.3 1196.4 3433.3 1196.4H3487.1C3546.1 1196.4 3579.5 1163.5 3579.5 1091C3579.5 1019 3546.1 985.6 3487.1 985.6H3433.3Z' fill='white'/%3E%3Cpath d='M3674.4 956.9L3706.8 1176.6C3709.4 1195.4 3716.2 1204.3 3737.1 1204.3C3758.5 1204.3 3767.4 1195.4 3771.5 1180.3L3821.6 995.5C3829.4 966.8 3849.3 951.7 3884.2 951.7C3919.1 951.7 3937.4 966.8 3945.3 995.5L3994.9 1180.3C3999.1 1195.4 4007.9 1204.3 4029.3 1204.3C4050.2 1204.3 4056.4 1195.4 4059.6 1176.6L4093.5 956.9H4125.3L4089.3 1179.8C4084.6 1210.6 4069.5 1231 4028.2 1231C3992.7 1231 3975 1216.4 3966.6 1185.1L3917 1000.9C3912.8 985.2 3900.8 978.5 3883.6 978.5C3865.9 978.5 3854.9 985.3 3850.7 1000.9L3799.6 1185.1C3790.7 1216.4 3773.5 1231 3737.5 1231C3695.2 1231 3682.2 1210.1 3677.5 1179.8L3643.1 956.9H3674.4Z' fill='white'/%3E%3Cpath d='M4417.6 956.9V985.6H4260C4219.8 985.6 4203.6 1003.3 4203.6 1032.1C4203.6 1057.2 4216.1 1077.5 4263.6 1077.5H4338.8C4410.8 1077.5 4428.6 1110.9 4428.6 1149.5C4428.6 1194.9 4404.6 1224.7 4344 1224.7H4178V1196.5H4344C4384.2 1196.5 4399.8 1178.2 4399.8 1149.5C4399.8 1124.4 4387.8 1103.6 4339.8 1103.6H4264.6C4193.1 1103.6 4174.8 1069.2 4174.8 1030C4174.8 985.1 4198.8 956.9 4259.4 956.9H4417.6Z' fill='white'/%3E%3Cpath d='M4685.4 956.9C4749.1 956.9 4775.7 986.6 4775.7 1036.8C4775.7 1084.8 4751.2 1111.4 4684.9 1111.4H4526.2V1135.9C4526.2 1170.3 4545 1196.4 4593.5 1196.4H4762.1V1224.6H4593.5C4524.6 1224.6 4497.5 1187.5 4497.5 1136.4V1045.1C4497.5 995 4524.6 956.9 4593.5 956.9H4685.4ZM4526.2 1087.4H4684.3C4729.7 1087.4 4746.9 1069.7 4746.9 1037.8C4746.9 1005.4 4728.6 985.6 4685.3 985.6H4593.4C4544.9 985.6 4526.1 1011.2 4526.1 1045.6V1087.4H4526.2Z' fill='white'/%3E%3Cpath d='M5040.3 956.9V985.6H4929.1C4895.2 985.6 4881.6 1000.7 4881.6 1033.6V1224.6H4852.4V1029.9C4852.4 979.8 4871.7 956.8 4922.9 956.8H5040.3V956.9Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_879_362'%3E%3Crect width='5041' height='1231' fill='white' transform='translate(0 0.700195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"},e6={loginPageLogo:Q9},t6="200px",Fs=({logoSrc:e=e6.loginPageLogo.value,width:t=t6,className:n="logo"})=>d.jsx("img",{width:t,src:e,className:n,alt:"Login logo"}),VI=()=>d.jsx("span",{className:"spinner"});const Br=({Logo:e=Fs,text:t="Loading..."})=>d.jsx("div",{className:"system-loader-background",children:d.jsxs("div",{className:"system-loader-container flex flex-column ai-center",children:[d.jsx(e,{}),d.jsx("h1",{className:"system-loader-text io-title",children:t}),d.jsx(VI,{})]})});var af={exports:{}},xc={exports:{}},tt={};/** @license React v16.13.1
69
+ `)})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)o=t.cache;else{if(n=t.cacheLocation||"memory",!lv(n))throw new Error('Invalid cache location "'.concat(n,'"'));o=lv(n)()}var r;this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?Ni:fN,this.orgHintCookieName=(r=this.options.clientId,"auth0.".concat(r,".organization_hint")),this.isAuthenticatedCookieName=(l=>"auth0.".concat(l,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const i=t.useCookiesForTransactions?this.cookieStorage:hN;var a;this.scope=function(l,u){for(var p=arguments.length,f=new Array(p>2?p-2:0),h=2;h<p;h++)f[h-2]=arguments[h];if(typeof l!="object")return{default:Bc(u,l,...f)};let m={default:Bc(u,...f)};return Object.keys(l).forEach(g=>{const y=l[g];m[g]=Bc(u,y,...f)}),m}(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new sN(i,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||VC,this.cacheManager=new aN(o,o.allKeys?void 0:new vN(o,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new wN(this.options.clientId):void 0,this.domainUrl=(a=this.options.domain,/^https?:\/\//.test(a)?a:"https://".concat(a)),this.tokenIssuer=((l,u)=>l?l.startsWith("https://")?l:"https://".concat(l,"/"):"".concat(u,"/"))(this.options.issuer,this.domainUrl);const s="".concat(this.domainUrl,"/me/"),c=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new CN(c,s),this.authJsClient=new D9({domain:this.options.domain,clientId:this.options.clientId}),this.mfa=new V9(this.authJsClient.mfa,this),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&n==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new gN)}getConfiguration(){return Object.freeze({domain:this.options.domain,clientId:this.options.clientId})}_url(t){const n=this.options.auth0Client||WC,o=FC(n,!0),r=encodeURIComponent(btoa(JSON.stringify(o)));return"".concat(this.domainUrl).concat(t,"&auth0Client=").concat(r)}_authorizeUrl(t){return this._url("/authorize?".concat(Fp(t)))}async _verifyIdToken(t,n,o){const r=await this.nowProvider();return lN({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:n,organization:o,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,n,o){var r;const i=cd(Ea()),a=cd(Ea()),s=Ea(),c=await tv(s),l=ov(c),u=await((r=this.dpop)===null||r===void 0?void 0:r.calculateThumbprint()),p=((h,m,g,y,x,C,w,I,b)=>Object.assign(Object.assign(Object.assign({client_id:h.clientId},h.authorizationParams),g),{scope:pc(m,g.scope,g.audience),response_type:"code",response_mode:I||"query",state:y,nonce:x,redirect_uri:w||h.authorizationParams.redirect_uri,code_challenge:C,code_challenge_method:"S256",dpop_jkt:b}))(this.options,this.scope,t,i,a,l,t.redirect_uri||this.options.authorizationParams.redirect_uri||o,n==null?void 0:n.response_mode,u),f=this._authorizeUrl(p);return{nonce:a,code_verifier:s,scope:p.scope,audience:p.audience||"default",redirect_uri:p.redirect_uri,state:i,url:f}}async loginWithPopup(t,n){var o;if(t=t||{},!(n=n||{}).popup&&(n.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup","left=".concat(c,",top=").concat(l,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))})(""),!n.popup))throw new Dh;const r=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);n.popup.location.href=r.url;const i=await(s=>new Promise((c,l)=>{let u;const p=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(p),clearTimeout(f),window.removeEventListener("message",u,!1),l(new Mh(s.popup)))},1e3),f=setTimeout(()=>{clearInterval(p),l(new _h(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(f),clearInterval(p),window.removeEventListener("message",u,!1),s.closePopup!==!1&&s.popup.close(),h.data.response.error)return l(vt.fromPayload(h.data.response));c(h.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},n),{timeoutInSeconds:n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==i.state)throw new vt("state_mismatch","Invalid state");const a=((o=t.authorizationParams)===null||o===void 0?void 0:o.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.user}async getIdTokenClaims(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.claims}async loginWithRedirect(){var t;const n=uv(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),{openUrl:o,fragment:r,appState:i}=n,a=$n(n,["openUrl","fragment","appState"]),s=((t=a.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,c=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:l}=c,u=$n(c,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:i,response_type:fr.Code}),s&&{organization:s}));const p=r?"".concat(l,"#").concat(r):l;o?await o(p):window.location.assign(p)}async handleRedirectCallback(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location.href).split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new vt("missing_transaction","Invalid state");this.transactionManager.remove();const o=(r=>{r.indexOf("#")>-1&&(r=r.substring(0,r.indexOf("#")));const i=new URLSearchParams(r);return{state:i.get("state"),code:i.get("code")||void 0,connect_code:i.get("connect_code")||void 0,error:i.get("error")||void 0,error_description:i.get("error_description")||void 0}})(t.join(""));return n.response_type===fr.ConnectCode?this._handleConnectAccountRedirectCallback(o,n):this._handleLoginRedirectCallback(o,n)}async _handleLoginRedirectCallback(t,n){const{code:o,state:r,error:i,error_description:a}=t;if(i)throw new Rh(i,a||i,r,n.appState);if(!n.code_verifier||n.state&&n.state!==r)throw new vt("state_mismatch","Invalid state");const s=n.organization,c=n.nonce,l=n.redirect_uri;return await this._requestToken(Object.assign({audience:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:o},l?{redirect_uri:l}:{}),{nonceIn:c,organization:s}),{appState:n.appState,response_type:fr.Code}}async _handleConnectAccountRedirectCallback(t,n){const{connect_code:o,state:r,error:i,error_description:a}=t;if(i)throw new Lh(i,a||i,n.connection,r,n.appState);if(!o)throw new vt("missing_connect_code","Missing connect code");if(!(n.code_verifier&&n.state&&n.auth_session&&n.redirect_uri&&n.state===r))throw new vt("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:n.auth_session,connect_code:o,redirect_uri:n.redirect_uri,code_verifier:n.code_verifier});return Object.assign(Object.assign({},s),{appState:n.appState,response_type:fr.ConnectCode})}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch{}}async getTokenSilently(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n,o;const r=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:pc(this.scope,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope,((o=t.authorizationParams)===null||o===void 0?void 0:o.audience)||this.options.authorizationParams.audience)})}),i=await((a,s)=>{let c=ud[s];return c||(c=a().finally(()=>{delete ud[s],c=null}),ud[s]=c),c})(()=>this._getTokenSilently(r),"".concat(this.options.clientId,"::").concat(r.authorizationParams.audience,"::").concat(r.authorizationParams.scope));return t.detailedResponse?i:i==null?void 0:i.access_token}async _getTokenSilently(t){const{cacheMode:n}=t,o=$n(t,["cacheMode"]);if(n!=="off"){const s=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:n});if(s)return s}if(n==="cache-only")return;const r=(i=this.options.clientId,a=o.authorizationParams.audience||"default","".concat("auth0.lock.getTokenSilently",".").concat(i,".").concat(a));var i,a;if(!await cv(()=>Oa.acquireLock(r,5e3),10))throw new Fi;this.activeLockKeys.add(r),this.activeLockKeys.size===1&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if(n!=="off"){const h=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||"default",clientId:this.options.clientId});if(h)return h}const s=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(o):await this._getTokenFromIFrame(o),{id_token:c,token_type:l,access_token:u,oauthTokenScope:p,expires_in:f}=s;return Object.assign(Object.assign({id_token:c,token_type:l,access_token:u},p?{scope:p}:null),{expires_in:f})}finally{await Oa.releaseLock(r),this.activeLockKeys.delete(r),this.activeLockKeys.size===0&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var o,r;const i=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:pc(this.scope,(o=t.authorizationParams)===null||o===void 0?void 0:o.scope,((r=t.authorizationParams)===null||r===void 0?void 0:r.audience)||this.options.authorizationParams.audience)})});return n=Object.assign(Object.assign({},WP),n),await this.loginWithPopup(i,n),(await this.cacheManager.get(new Ln({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){t.clientId!==null?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const n=t.logoutParams||{},{federated:o}=n,r=$n(n,["federated"]),i=o?"&federated":"";return this._url("/v2/logout?".concat(Fp(Object.assign({clientId:t.clientId},r))))+i}async logout(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n;const o=uv(t),{openUrl:r}=o,i=$n(o,["openUrl"]);t.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await((n=this.dpop)===null||n===void 0?void 0:n.clear());const a=this._buildLogoutUrl(i);r?await r(a):r!==!1&&window.location.assign(a)}async _getTokenFromIFrame(t){const n=(o=this.options.clientId,"".concat("auth0.lock.getTokenFromIFrame",".").concat(o));var o;if(!await cv(()=>Oa.acquireLock(n,5e3),10))throw new Fi;try{const r=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),i=this.cookieStorage.get(this.orgHintCookieName);i&&!r.organization&&(r.organization=i);const{url:a,state:s,nonce:c,code_verifier:l,redirect_uri:u,scope:p,audience:f}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);if(window.crossOriginIsolated)throw new vt("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const h=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let m;try{m=new URL(this.domainUrl).origin}catch{m=this.domainUrl}const g=await function(x,C){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:60;return new Promise((I,b)=>{const k=window.document.createElement("iframe");k.setAttribute("width","0"),k.setAttribute("height","0"),k.style.display="none";const S=()=>{window.document.body.contains(k)&&(window.document.body.removeChild(k),window.removeEventListener("message",E,!1))};let E;const N=setTimeout(()=>{b(new Fi),S()},1e3*w);E=function(A){if(A.origin!=C||!A.data||A.data.type!=="authorization_response")return;const P=A.source;P&&P.close(),A.data.response.error?b(vt.fromPayload(A.data.response)):I(A.data.response),clearTimeout(N),window.removeEventListener("message",E,!1),setTimeout(S,2e3)},window.addEventListener("message",E,!1),window.document.body.appendChild(k),k.setAttribute("src",x)})}(a,m,h);if(s!==g.state)throw new vt("state_mismatch","Invalid state");const y=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:l,code:g.code,grant_type:"authorization_code",redirect_uri:u,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:c,organization:r.organization});return Object.assign(Object.assign({},y),{scope:p,oauthTokenScope:y.scope,audience:f})}catch(r){throw r.error==="login_required"&&this.logout({openUrl:!1}),r}finally{await Oa.releaseLock(n)}}async _getTokenUsingRefreshToken(t){var n,o;const r=await this.cacheManager.get(new Ln({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new pu(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const i=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null,s=((f,h,m,g)=>{var y;if(f&&m&&g){if(h.audience!==m)return h.scope;const x=g.split(" "),C=((y=h.scope)===null||y===void 0?void 0:y.split(" "))||[],w=C.every(I=>x.includes(I));return x.length>=C.length&&w?g:h.scope}return h.scope})(this.options.useMrrt,t.authorizationParams,r==null?void 0:r.audience,r==null?void 0:r.scope);try{const f=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:i}),a&&{timeout:a}),{scopesToRequest:s});if(f.refresh_token&&(r!=null&&r.refresh_token)&&await this.cacheManager.updateEntry(r.refresh_token,f.refresh_token),this.options.useMrrt&&(c=r==null?void 0:r.audience,l=r==null?void 0:r.scope,u=t.authorizationParams.audience,p=t.authorizationParams.scope,(c!==u||!dv(p,l))&&!dv(s,f.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);await this.cacheManager.remove(this.options.clientId,t.authorizationParams.audience,t.authorizationParams.scope);const h=((m,g)=>{const y=(m==null?void 0:m.split(" "))||[],x=(g==null?void 0:g.split(" "))||[];return y.filter(C=>x.indexOf(C)==-1).join(",")})(s,f.scope);throw new Bh(t.authorizationParams.audience||"default",h)}return Object.assign(Object.assign({},f),{scope:t.authorizationParams.scope,oauthTokenScope:f.scope,audience:t.authorizationParams.audience||"default"})}catch(f){if(f.message){if(f.message.includes("user is blocked"))throw await this.logout({openUrl:!1}),f;if((f.message.includes("Missing Refresh Token")||f.message.includes("invalid refresh token"))&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t)}throw f instanceof _s&&this.mfa.setMFAAuthDetails(f.mfa_token,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope,(o=t.authorizationParams)===null||o===void 0?void 0:o.audience,f.mfa_requirements),f}var c,l,u,p}async _saveEntryInCache(t){const{id_token:n,decodedToken:o}=t,r=$n(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:n,decodedToken:o}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",n=this.scope[t],o=await this.cacheManager.getIdToken(new Ln({clientId:this.options.clientId,audience:t,scope:n})),r=this.userCache.get("@@user@@");return o&&o.id_token===(r==null?void 0:r.id_token)?r:(this.userCache.set("@@user@@",o),o)}async _getEntryFromCache(t){let{scope:n,audience:o,clientId:r,cacheMode:i}=t;const a=await this.cacheManager.get(new Ln({scope:n,audience:o,clientId:r}),60,this.options.useMrrt,i);if(a&&a.access_token){const{token_type:s,access_token:c,oauthTokenScope:l,expires_in:u}=a,p=await this._getIdTokenFromCache();return p&&Object.assign(Object.assign({id_token:p.id_token,token_type:s||"Bearer",access_token:c},l?{scope:l}:null),{expires_in:u})}}async _requestToken(t,n){var o,r;const{nonceIn:i,organization:a,scopesToRequest:s}=n||{},c=await oN(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},t),{scope:s||t.scope}),this.worker),l=await this._verifyIdToken(c.id_token,i,a);if(t.grant_type==="authorization_code"){const u=await this._getIdTokenFromCache();!((r=(o=u==null?void 0:u.decodedToken)===null||o===void 0?void 0:o.claims)===null||r===void 0)&&r.sub&&u.decodedToken.claims.sub!==l.claims.sub&&(await this.cacheManager.clear(this.options.clientId),this.userCache.remove("@@user@@"))}return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},c),{decodedToken:l,scope:t.scope,audience:t.audience||"default"}),c.scope?{oauthTokenScope:c.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||l.claims.org_id),Object.assign(Object.assign({},c),{decodedToken:l})}async loginWithCustomTokenExchange(t){return this._requestToken(Object.assign(Object.assign({},t),{grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:t.subject_token,subject_token_type:t.subject_token_type,scope:pc(this.scope,t.scope,t.audience||this.options.authorizationParams.audience),audience:t.audience||this.options.authorizationParams.audience,organization:t.organization||this.options.authorizationParams.organization}))}async exchangeToken(t){return this.loginWithCustomTokenExchange(t)}_assertDpop(t){if(!t)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(t){return this._assertDpop(this.dpop),this.dpop.getNonce(t)}setDpopNonce(t,n){return this._assertDpop(this.dpop),this.dpop.setNonce(t,n)}generateDpopProof(t){return this._assertDpop(this.dpop),this.dpop.generateProof(t)}createFetcher(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new xN(t,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:n=>{var o;return this.getTokenSilently({authorizationParams:{scope:(o=n==null?void 0:n.scope)===null||o===void 0?void 0:o.join(" "),audience:n==null?void 0:n.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(t.dpopNonceId),setDpopNonce:n=>this.setDpopNonce(n,t.dpopNonceId),generateDpopProof:n=>this.generateDpopProof(n)})}async connectAccountWithRedirect(t){const{openUrl:n,appState:o,connection:r,scopes:i,authorization_params:a,redirectUri:s=this.options.authorizationParams.redirect_uri||window.location.origin}=t;if(!r)throw new Error("connection is required");const c=cd(Ea()),l=Ea(),u=await tv(l),p=ov(u),{connect_uri:f,connect_params:h,auth_session:m}=await this.myAccountApi.connectAccount({connection:r,scopes:i,redirect_uri:s,state:c,code_challenge:p,code_challenge_method:"S256",authorization_params:a});this.transactionManager.create({state:c,code_verifier:l,auth_session:m,redirect_uri:s,appState:o,connection:r,response_type:fr.ConnectCode});const g=new URL(f);g.searchParams.set("ticket",h.ticket),n?await n(g.toString()):window.location.assign(g)}async _requestTokenForMfa(t,n){const{mfaToken:o}=t,r=$n(t,["mfaToken"]);return this._requestToken(Object.assign(Object.assign({},r),{mfa_token:o}),n)}}var _I={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},Xt=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},z9=Ft(Ft({},_I),{buildAuthorizeUrl:Xt,buildLogoutUrl:Xt,getAccessTokenSilently:Xt,getAccessTokenWithPopup:Xt,getIdTokenClaims:Xt,loginWithCustomTokenExchange:Xt,exchangeToken:Xt,loginWithRedirect:Xt,loginWithPopup:Xt,connectAccountWithRedirect:Xt,logout:Xt,handleRedirectCallback:Xt,getDpopNonce:Xt,setDpopNonce:Xt,generateDpopProof:Xt,createFetcher:Xt,getConfiguration:Xt}),MI=v.createContext(z9),Rv=function(e){MP(t,e);function t(n,o){var r=e.call(this,o??n)||this;return r.error=n,r.error_description=o,Object.setPrototypeOf(r,t.prototype),r}return t}(Error),$9=/[?&](?:connect_)?code=[^&]+/,Z9=/[?&]state=[^&]+/,X9=/[?&]error=[^&]+/,U9=function(e){return e===void 0&&(e=window.location.search),($9.test(e)||X9.test(e))&&Z9.test(e)},DI=function(e){return function(t){if(t instanceof Error)return t;if(t!==null&&typeof t=="object"&&"error"in t&&typeof t.error=="string"){if("error_description"in t&&typeof t.error_description=="string"){var n=t;return new Rv(n.error,n.error_description)}var o=t;return new Rv(o.error)}return new Error(e)}},Lv=DI("Login failed"),wc=DI("Get access token failed"),BI=function(e){var t,n;e!=null&&e.redirectUri&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=(t=e.authorizationParams)!==null&&t!==void 0?t:{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),!((n=e==null?void 0:e.authorizationParams)===null||n===void 0)&&n.redirectUri&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},J9=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return Ft(Ft({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return Ft(Ft({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:Ft(Ft({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return Ft(Ft({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return Ft(Ft({},e),{isLoading:!1,error:t.error})}},Y9=function(e){return BI(e),Ft(Ft({},e),{auth0Client:{name:"auth0-react",version:"2.13.0"}})},K9=function(e){var t;window.history.replaceState({},document.title,(t=e.returnTo)!==null&&t!==void 0?t:window.location.pathname)},q9=function(e){var t=e.children,n=e.skipRedirectCallback,o=e.onRedirectCallback,r=o===void 0?K9:o,i=e.context,a=i===void 0?MI:i,s=ev(e,["children","skipRedirectCallback","onRedirectCallback","context"]),c=v.useState(function(){return new F9(Y9(s))})[0],l=v.useReducer(J9,_I),u=l[0],p=l[1],f=v.useRef(!1),h=v.useCallback(function(M){return p({type:"ERROR",error:M}),M},[]);v.useEffect(function(){f.current||(f.current=!0,function(){return nr(void 0,void 0,void 0,function(){var M,T,H,V,z,O,B;return or(this,function(F){switch(F.label){case 0:return F.trys.push([0,7,,8]),M=void 0,U9()&&!n?[4,c.handleRedirectCallback()]:[3,3];case 1:return T=F.sent(),H=T.appState,V=H===void 0?{}:H,z=T.response_type,O=ev(T,["appState","response_type"]),[4,c.getUser()];case 2:return M=F.sent(),V.response_type=z,z===fr.ConnectCode&&(V.connectedAccount=O),r(V,M),[3,6];case 3:return[4,c.checkSession()];case 4:return F.sent(),[4,c.getUser()];case 5:M=F.sent(),F.label=6;case 6:return p({type:"INITIALISED",user:M}),[3,8];case 7:return B=F.sent(),h(Lv(B)),[3,8];case 8:return[2]}})})}())},[c,r,n,h]);var m=v.useCallback(function(M){return BI(M),c.loginWithRedirect(M)},[c]),g=v.useCallback(function(M,T){return nr(void 0,void 0,void 0,function(){var H,V;return or(this,function(z){switch(z.label){case 0:p({type:"LOGIN_POPUP_STARTED"}),z.label=1;case 1:return z.trys.push([1,3,,4]),[4,c.loginWithPopup(M,T)];case 2:return z.sent(),[3,4];case 3:return H=z.sent(),h(Lv(H)),[2];case 4:return[4,c.getUser()];case 5:return V=z.sent(),p({type:"LOGIN_POPUP_COMPLETE",user:V}),[2]}})})},[c,h]),y=v.useCallback(function(){for(var M=[],T=0;T<arguments.length;T++)M[T]=arguments[T];return nr(void 0,DP([],M,!0),void 0,function(H){return H===void 0&&(H={}),or(this,function(V){switch(V.label){case 0:return[4,c.logout(H)];case 1:return V.sent(),(H.openUrl||H.openUrl===!1)&&p({type:"LOGOUT"}),[2]}})})},[c]),x=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V,z;return or(this,function(O){switch(O.label){case 0:return O.trys.push([0,2,3,5]),[4,c.getTokenSilently(M)];case 1:return T=O.sent(),[3,5];case 2:throw H=O.sent(),wc(H);case 3:return V=p,z={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return V.apply(void 0,[(z.user=O.sent(),z)]),[7];case 5:return[2,T]}})})},[c]),C=v.useCallback(function(M,T){return nr(void 0,void 0,void 0,function(){var H,V,z,O;return or(this,function(B){switch(B.label){case 0:return B.trys.push([0,2,3,5]),[4,c.getTokenWithPopup(M,T)];case 1:return H=B.sent(),[3,5];case 2:throw V=B.sent(),wc(V);case 3:return z=p,O={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return z.apply(void 0,[(O.user=B.sent(),O)]),[7];case 5:return[2,H]}})})},[c]),w=v.useCallback(function(M){return c.connectAccountWithRedirect(M)},[c]),I=v.useCallback(function(){return c.getIdTokenClaims()},[c]),b=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V,z;return or(this,function(O){switch(O.label){case 0:return O.trys.push([0,2,3,5]),[4,c.loginWithCustomTokenExchange(M)];case 1:return T=O.sent(),[3,5];case 2:throw H=O.sent(),wc(H);case 3:return V=p,z={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,c.getUser()];case 4:return V.apply(void 0,[(z.user=O.sent(),z)]),[7];case 5:return[2,T]}})})},[c]),k=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){return or(this,function(T){return[2,b(M)]})})},[b]),S=v.useCallback(function(M){return nr(void 0,void 0,void 0,function(){var T,H,V;return or(this,function(z){switch(z.label){case 0:return z.trys.push([0,2,3,5]),[4,c.handleRedirectCallback(M)];case 1:return[2,z.sent()];case 2:throw T=z.sent(),wc(T);case 3:return H=p,V={type:"HANDLE_REDIRECT_COMPLETE"},[4,c.getUser()];case 4:return H.apply(void 0,[(V.user=z.sent(),V)]),[7];case 5:return[2]}})})},[c]),E=v.useCallback(function(M){return c.getDpopNonce(M)},[c]),N=v.useCallback(function(M,T){return c.setDpopNonce(M,T)},[c]),A=v.useCallback(function(M){return c.generateDpopProof(M)},[c]),P=v.useCallback(function(M){return c.createFetcher(M)},[c]),j=v.useCallback(function(){return c.getConfiguration()},[c]),G=v.useMemo(function(){return Ft(Ft({},u),{getAccessTokenSilently:x,getAccessTokenWithPopup:C,getIdTokenClaims:I,loginWithCustomTokenExchange:b,exchangeToken:k,loginWithRedirect:m,loginWithPopup:g,connectAccountWithRedirect:w,logout:y,handleRedirectCallback:S,getDpopNonce:E,setDpopNonce:N,generateDpopProof:A,createFetcher:P,getConfiguration:j})},[u,x,C,I,b,k,m,g,w,y,S,E,N,A,P,j]);return v.createElement(a.Provider,{value:G},t)},HI=function(e){return e===void 0&&(e=MI),v.useContext(e)};const GI=({className:e,children:t,Logo:n})=>d.jsxs("div",{className:jo("info-page-container",e),children:[d.jsx(n,{className:"info-page-logo"}),d.jsx("div",{className:"info-page-wrapper",children:t})]}),Q9={value:"data:image/svg+xml,%3Csvg width='5041' height='1232' viewBox='0 0 5041 1232' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_879_362)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M548.6 178H439.6C368.7 178 310 199.5 269.3 244.5C228.6 289.3 206.7 356 206.7 444.3C206.7 532.6 228.6 599.5 269.3 644.2C310.2 689.2 368.7 710.7 439.6 710.7H548.6C619 710.7 677.6 689.2 718.6 644.2C759.5 599.4 781.6 532.6 781.6 444.2C781.6 355.8 759.5 289 718.6 244.2C677.7 199.3 619 177.7 548.6 177.7V178ZM449.5 293.8H538.9C582.2 293.8 611.9 305.2 631.1 328.3C650.5 351.8 660.5 389.2 660.5 444.4C660.5 499.6 650.5 536.7 631.1 560C612 583 582.2 594.1 538.9 594.1H449.5C405.6 594.1 375.9 583 356.9 560C337.6 536.8 327.7 499.7 327.7 444.5C327.7 389.3 337.4 351.9 356.8 328.4C375.9 305.2 405.6 293.8 449.5 293.8Z' fill='white'/%3E%3Cpath d='M0.700195 189.8C0.700195 183.1 6.10017 177.7 12.8002 177.7H108.6C115.3 177.7 120.7 183.1 120.7 189.8V698.6C120.7 705.3 115.3 710.7 108.6 710.7H12.8002C6.10017 710.7 0.700195 705.3 0.700195 698.6V189.8Z' fill='white'/%3E%3Cpath d='M0.700195 11.9002C0.700195 5.7002 5.70018 0.700195 11.9002 0.700195H109.6C115.7 0.700195 120.7 5.7002 120.7 11.9002V109.5C120.7 115.7 115.7 120.7 109.5 120.7H11.9002C5.70018 120.7 0.700195 115.7 0.700195 109.5V11.9002Z' fill='%23007BE5'/%3E%3Cpath d='M827.7 601.9C827.7 595.7 832.7 590.7 838.9 590.7H936.6C942.8 590.7 947.8 595.7 947.8 601.9V699.5C947.8 705.7 942.8 710.7 936.6 710.7H838.9C832.7 710.7 827.7 705.7 827.7 699.5V601.9Z' fill='%23007BE5'/%3E%3Cpath d='M4363.9 293.2C4320.2 293.2 4290.6 304.6 4271.6 327.8C4252.3 351.4 4242.5 388.8 4242.5 444C4242.5 499.2 4252.3 536.4 4271.5 559.7C4290.5 582.6 4320 593.8 4363.8 593.8H4614.7C4622.4 593.8 4628.7 600.1 4628.7 607.8V696.7C4628.7 704.4 4622.4 710.7 4614.7 710.7H4354.1C4283.3 710.7 4224.9 689.1 4184.1 644.1C4143.5 599.3 4121.6 532.4 4121.6 444C4121.6 355.6 4143.5 288.7 4184.1 243.9C4224.8 199 4283.3 177.3 4354.1 177.3H4614.7C4622.4 177.3 4628.7 183.6 4628.7 191.3V279.3C4628.7 287 4622.4 293.3 4614.7 293.3H4363.9V293.2Z' fill='white'/%3E%3Cpath d='M1302.6 165.3C1240.1 165.3 1197 180.9 1169.3 213.3C1141.3 246 1127.4 297.6 1127.4 372.9C1127.4 447.7 1141.1 499 1169 531.6C1196.6 563.9 1239.7 579.5 1302.7 579.5H1552.5C1560.2 579.5 1566.5 585.8 1566.5 593.5V697.1C1566.5 704.8 1560.2 711.1 1552.5 711.1H1302.7C1204.7 711.1 1127.5 683.4 1075 626.4C1022.4 569.7 995.7 484.8 995.7 372.9C995.7 260.5 1022.7 175.4 1075.2 118.4C1127.9 61.3001 1205 33.6001 1302.6 33.6001H1552.4C1560.1 33.6001 1566.4 39.9001 1566.4 47.6001V151.2C1566.4 158.9 1560.1 165.2 1552.4 165.2H1302.6V165.3Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1953.6 177.7H1844.8C1774 177.7 1715.6 199.3 1674.8 244.3C1634.2 289.1 1612.3 356 1612.3 444.4C1612.3 532.8 1634.2 599.7 1674.8 644.5C1715.5 689.4 1774 711.1 1844.8 711.1H1953.6C2023.9 711.1 2082.4 689.5 2123.2 644.5C2163.9 599.7 2186 532.8 2186 444.3C2186 355.8 2163.9 289 2123.2 244.1C2082.3 199.3 2023.9 177.7 1953.6 177.7ZM1854.6 293.7H1943.8C1987 293.7 2016.6 305.1 2035.8 328.3C2055.2 351.9 2065.2 389.3 2065.2 444.5C2065.2 499.7 2055.2 536.8 2035.8 560.2C2016.7 583.2 1987.1 594.3 1943.8 594.3H1854.6C1810.8 594.3 1781.3 583.1 1762.3 560.2C1743 536.9 1733.3 499.8 1733.3 444.5C1733.3 389.3 1743.1 351.9 1762.4 328.3C1781.3 305 1810.9 293.7 1854.6 293.7Z' fill='white'/%3E%3Cpath d='M2679.7 411.6C2679.7 372.5 2668.5 343.5 2645.4 324C2622.1 304.3 2585.3 293.2 2531.9 293.2H2378.4C2375.5 293.2 2374.9 293.9 2374.8 294C2374.5 294.4 2373.6 295.8 2373.6 299.8V696.7C2373.6 704.4 2367.3 710.7 2359.6 710.7H2267.7C2260 710.7 2253.7 704.4 2253.7 696.7V265.6C2253.7 234.7 2258.8 212 2272.6 197.2C2286.5 182.2 2307.5 177.3 2334.2 177.3H2531.8C2620.7 177.3 2688 198.4 2733.3 238.9C2778.7 279.5 2800.5 338.6 2800.5 411.7V696.7C2800.5 704.4 2794.2 710.7 2786.5 710.7H2693.7C2686 710.7 2679.7 704.4 2679.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M3304.7 411.6C3304.7 372.5 3293.5 343.5 3270.4 324C3247.1 304.3 3210.3 293.2 3156.9 293.2H3003.4C3000.5 293.2 2999.9 293.9 2999.8 294C2999.5 294.4 2998.6 295.8 2998.6 299.8V696.7C2998.6 704.4 2992.3 710.7 2984.6 710.7H2892.7C2885 710.7 2878.7 704.4 2878.7 696.7V265.6C2878.7 234.7 2883.8 212 2897.6 197.2C2911.5 182.2 2932.5 177.3 2959.2 177.3H3156.8C3245.7 177.3 3313 198.4 3358.3 238.9C3403.7 279.5 3425.5 338.6 3425.5 411.7V696.7C3425.5 704.4 3419.2 710.7 3411.5 710.7H3318.7C3311 710.7 3304.7 704.4 3304.7 696.7V411.6Z' fill='white'/%3E%3Cpath d='M4906.1 292.2C4898.4 292.2 4892.1 298.5 4892.1 306.2V529.2C4892.1 557.5 4897.2 574.3 4906.4 584.1C4915.4 593.8 4930 598.6 4953.7 598.6H5019.2C5026.9 598.6 5033.2 604.9 5033.2 612.6V695.7C5033.2 703.4 5026.9 709.7 5019.2 709.7H4932.1C4877.9 709.7 4836.8 698.8 4809.7 668.6C4782.8 638.6 4771.3 591.5 4771.3 523.4V306.2C4771.3 298.5 4765 292.2 4757.3 292.2H4714.7C4707 292.2 4700.7 285.9 4700.7 278.2V190.2C4700.7 182.5 4707 176.2 4714.7 176.2H4757.3C4765 176.2 4771.3 169.9 4771.3 162.2V67.7002C4771.3 60.0002 4777.6 53.7002 4785.3 53.7002H4878.2C4885.9 53.7002 4892.2 60.0002 4892.2 67.7002V162.2C4892.2 169.9 4898.5 176.2 4906.2 176.2H5021.3C5029 176.2 5035.3 182.5 5035.3 190.2V278.2C5035.3 285.9 5029 292.2 5021.3 292.2H4906.1Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4024.4 607.2C4024.4 599.5 4018.1 593.2 4010.4 593.2H3699.9C3672.9 593.2 3655.3 586 3644.6 575.2C3633.8 564.4 3628.6 548.8 3628.6 529.7V514.5C3628.6 506.8 3634.9 500.5 3642.6 500.5H3866.6C3931.2 500.5 3977.4 486.9 4007.5 459.6C4037.7 432.2 4050.1 392.3 4050.1 343.5C4050.1 292.2 4036.8 250.1 4006.4 220.9C3976.1 191.7 3930.1 176.8 3867.7 176.8H3700.1C3633.9 176.8 3586.5 195.4 3555.6 227.8C3524.8 260.1 3511.8 305 3511.8 355.3V531.7C3511.8 582 3524.9 626.9 3555.6 659.2C3586.5 691.6 3633.9 710.2 3700.1 710.2H4010.6C4018.3 710.2 4024.6 703.9 4024.6 696.2V607.2H4024.4ZM3863.5 403.1H3642.5C3634.8 403.1 3628.5 396.8 3628.5 389.1V356.2C3628.5 337.6 3633.7 321.9 3644.6 311C3655.4 300.1 3672.9 292.7 3699.9 292.7H3866.5C3890.7 292.7 3906.9 298.8 3916.9 308.2C3926.9 317.5 3932 331.3 3932 349.4C3932 367.1 3927.3 380 3917.4 388.6C3907.4 397.4 3890.5 403.1 3863.5 403.1Z' fill='white'/%3E%3Cpath d='M2918.9 872.3C3001.9 872.3 3036.9 909.9 3036.9 966.3C3036.9 1012.2 3013.9 1036.8 2973.2 1047.2C3014.4 1058.2 3037.9 1083.7 3037.9 1129.7C3037.9 1186.1 3003.5 1224.7 2920.5 1224.7H2755.6C2741.5 1224.7 2734.2 1217.9 2734.2 1203.8V893.2C2734.2 879.1 2741.5 872.3 2755.6 872.3H2918.9ZM2765.4 1033.1H2918.9C2976.8 1033.1 3005 1014.8 3005 970.5C3005 929.8 2979.4 903.7 2919.4 903.7H2771.2C2767.5 903.7 2765.5 905.3 2765.5 909.4V1033.1H2765.4ZM2765.4 1187.6C2765.4 1191.8 2767.5 1193.3 2771.1 1193.3H2921C2979.5 1193.3 3006.1 1168.2 3006.1 1125.4C3006.1 1081 2976.9 1060.2 2921 1060.2H2765.5V1187.6H2765.4Z' fill='white'/%3E%3Cpath d='M3294 956.9V985.6H3182.8C3148.9 985.6 3135.3 1000.7 3135.3 1033.6V1224.6H3106.1V1029.9C3106.1 979.8 3125.4 956.8 3176.6 956.8H3294V956.9Z' fill='white'/%3E%3Cpath d='M3489.1 956.9C3562.2 956.9 3608.6 1001.3 3608.6 1091C3608.6 1181.3 3562.1 1224.6 3489.1 1224.6H3431.2C3357.6 1224.6 3311.7 1181.3 3311.7 1091C3311.7 1001.2 3357.6 956.9 3431.2 956.9H3489.1ZM3433.3 985.6C3374.3 985.6 3340.9 1019 3340.9 1091C3340.9 1163.5 3374.3 1196.4 3433.3 1196.4H3487.1C3546.1 1196.4 3579.5 1163.5 3579.5 1091C3579.5 1019 3546.1 985.6 3487.1 985.6H3433.3Z' fill='white'/%3E%3Cpath d='M3674.4 956.9L3706.8 1176.6C3709.4 1195.4 3716.2 1204.3 3737.1 1204.3C3758.5 1204.3 3767.4 1195.4 3771.5 1180.3L3821.6 995.5C3829.4 966.8 3849.3 951.7 3884.2 951.7C3919.1 951.7 3937.4 966.8 3945.3 995.5L3994.9 1180.3C3999.1 1195.4 4007.9 1204.3 4029.3 1204.3C4050.2 1204.3 4056.4 1195.4 4059.6 1176.6L4093.5 956.9H4125.3L4089.3 1179.8C4084.6 1210.6 4069.5 1231 4028.2 1231C3992.7 1231 3975 1216.4 3966.6 1185.1L3917 1000.9C3912.8 985.2 3900.8 978.5 3883.6 978.5C3865.9 978.5 3854.9 985.3 3850.7 1000.9L3799.6 1185.1C3790.7 1216.4 3773.5 1231 3737.5 1231C3695.2 1231 3682.2 1210.1 3677.5 1179.8L3643.1 956.9H3674.4Z' fill='white'/%3E%3Cpath d='M4417.6 956.9V985.6H4260C4219.8 985.6 4203.6 1003.3 4203.6 1032.1C4203.6 1057.2 4216.1 1077.5 4263.6 1077.5H4338.8C4410.8 1077.5 4428.6 1110.9 4428.6 1149.5C4428.6 1194.9 4404.6 1224.7 4344 1224.7H4178V1196.5H4344C4384.2 1196.5 4399.8 1178.2 4399.8 1149.5C4399.8 1124.4 4387.8 1103.6 4339.8 1103.6H4264.6C4193.1 1103.6 4174.8 1069.2 4174.8 1030C4174.8 985.1 4198.8 956.9 4259.4 956.9H4417.6Z' fill='white'/%3E%3Cpath d='M4685.4 956.9C4749.1 956.9 4775.7 986.6 4775.7 1036.8C4775.7 1084.8 4751.2 1111.4 4684.9 1111.4H4526.2V1135.9C4526.2 1170.3 4545 1196.4 4593.5 1196.4H4762.1V1224.6H4593.5C4524.6 1224.6 4497.5 1187.5 4497.5 1136.4V1045.1C4497.5 995 4524.6 956.9 4593.5 956.9H4685.4ZM4526.2 1087.4H4684.3C4729.7 1087.4 4746.9 1069.7 4746.9 1037.8C4746.9 1005.4 4728.6 985.6 4685.3 985.6H4593.4C4544.9 985.6 4526.1 1011.2 4526.1 1045.6V1087.4H4526.2Z' fill='white'/%3E%3Cpath d='M5040.3 956.9V985.6H4929.1C4895.2 985.6 4881.6 1000.7 4881.6 1033.6V1224.6H4852.4V1029.9C4852.4 979.8 4871.7 956.8 4922.9 956.8H5040.3V956.9Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_879_362'%3E%3Crect width='5041' height='1231' fill='white' transform='translate(0 0.700195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"},e6={loginPageLogo:Q9},t6="200px",Fs=({logoSrc:e=e6.loginPageLogo.value,width:t=t6,className:n="logo"})=>d.jsx("img",{width:t,src:e,className:n,alt:"Login logo"}),WI=()=>d.jsx("span",{className:"spinner"});const Br=({Logo:e=Fs,text:t="Loading..."})=>d.jsx("div",{className:"system-loader-background",children:d.jsxs("div",{className:"system-loader-container flex flex-column ai-center",children:[d.jsx(e,{}),d.jsx("h1",{className:"system-loader-text io-title",children:t}),d.jsx(WI,{})]})});var sf={exports:{}},xc={exports:{}},tt={};/** @license React v16.13.1
70
70
  * react-is.production.min.js
71
71
  *
72
72
  * Copyright (c) Facebook, Inc. and its affiliates.
73
73
  *
74
74
  * This source code is licensed under the MIT license found in the
75
75
  * LICENSE file in the root directory of this source tree.
76
- */var Lv;function n6(){if(Lv)return tt;Lv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type,b){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof,b){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return tt.AsyncMode=c,tt.ConcurrentMode=l,tt.ContextConsumer=s,tt.ContextProvider=a,tt.Element=t,tt.ForwardRef=u,tt.Fragment=o,tt.Lazy=m,tt.Memo=h,tt.Portal=n,tt.Profiler=i,tt.StrictMode=r,tt.Suspense=p,tt.isAsyncMode=function(b){return I(b)||w(b)===c},tt.isConcurrentMode=I,tt.isContextConsumer=function(b){return w(b)===s},tt.isContextProvider=function(b){return w(b)===a},tt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},tt.isForwardRef=function(b){return w(b)===u},tt.isFragment=function(b){return w(b)===o},tt.isLazy=function(b){return w(b)===m},tt.isMemo=function(b){return w(b)===h},tt.isPortal=function(b){return w(b)===n},tt.isProfiler=function(b){return w(b)===i},tt.isStrictMode=function(b){return w(b)===r},tt.isSuspense=function(b){return w(b)===p},tt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},tt.typeOf=w,tt}var nt={};/** @license React v16.13.1
76
+ */var _v;function n6(){if(_v)return tt;_v=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case t:switch(b=b.type,b){case c:case l:case o:case i:case r:case p:return b;default:switch(b=b&&b.$$typeof,b){case s:case u:case m:case h:case a:return b;default:return k}}case n:return k}}}function I(b){return w(b)===l}return tt.AsyncMode=c,tt.ConcurrentMode=l,tt.ContextConsumer=s,tt.ContextProvider=a,tt.Element=t,tt.ForwardRef=u,tt.Fragment=o,tt.Lazy=m,tt.Memo=h,tt.Portal=n,tt.Profiler=i,tt.StrictMode=r,tt.Suspense=p,tt.isAsyncMode=function(b){return I(b)||w(b)===c},tt.isConcurrentMode=I,tt.isContextConsumer=function(b){return w(b)===s},tt.isContextProvider=function(b){return w(b)===a},tt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},tt.isForwardRef=function(b){return w(b)===u},tt.isFragment=function(b){return w(b)===o},tt.isLazy=function(b){return w(b)===m},tt.isMemo=function(b){return w(b)===h},tt.isPortal=function(b){return w(b)===n},tt.isProfiler=function(b){return w(b)===i},tt.isStrictMode=function(b){return w(b)===r},tt.isSuspense=function(b){return w(b)===p},tt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===i||b===r||b===p||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===u||b.$$typeof===y||b.$$typeof===x||b.$$typeof===C||b.$$typeof===g)},tt.typeOf=w,tt}var nt={};/** @license React v16.13.1
77
77
  * react-is.development.js
78
78
  *
79
79
  * Copyright (c) Facebook, Inc. and its affiliates.
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var _v;function o6(){return _v||(_v=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(X){return typeof X=="string"||typeof X=="function"||X===o||X===l||X===i||X===r||X===p||X===f||typeof X=="object"&&X!==null&&(X.$$typeof===m||X.$$typeof===h||X.$$typeof===a||X.$$typeof===s||X.$$typeof===u||X.$$typeof===y||X.$$typeof===x||X.$$typeof===C||X.$$typeof===g)}function I(X){if(typeof X=="object"&&X!==null){var ae=X.$$typeof;switch(ae){case t:var ce=X.type;switch(ce){case c:case l:case o:case i:case r:case p:return ce;default:var me=ce&&ce.$$typeof;switch(me){case s:case u:case m:case h:case a:return me;default:return ae}}case n:return ae}}}var b=c,k=l,S=s,E=a,O=t,A=u,N=o,j=m,G=h,M=n,T=i,H=r,V=p,z=!1;function P(X){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(X)||I(X)===c}function B(X){return I(X)===l}function F(X){return I(X)===s}function $(X){return I(X)===a}function Z(X){return typeof X=="object"&&X!==null&&X.$$typeof===t}function _(X){return I(X)===u}function R(X){return I(X)===o}function L(X){return I(X)===m}function D(X){return I(X)===h}function K(X){return I(X)===n}function J(X){return I(X)===i}function Y(X){return I(X)===r}function ee(X){return I(X)===p}nt.AsyncMode=b,nt.ConcurrentMode=k,nt.ContextConsumer=S,nt.ContextProvider=E,nt.Element=O,nt.ForwardRef=A,nt.Fragment=N,nt.Lazy=j,nt.Memo=G,nt.Portal=M,nt.Profiler=T,nt.StrictMode=H,nt.Suspense=V,nt.isAsyncMode=P,nt.isConcurrentMode=B,nt.isContextConsumer=F,nt.isContextProvider=$,nt.isElement=Z,nt.isForwardRef=_,nt.isFragment=R,nt.isLazy=L,nt.isMemo=D,nt.isPortal=K,nt.isProfiler=J,nt.isStrictMode=Y,nt.isSuspense=ee,nt.isValidElementType=w,nt.typeOf=I}()),nt}var Mv;function FI(){return Mv||(Mv=1,process.env.NODE_ENV==="production"?xc.exports=n6():xc.exports=o6()),xc.exports}/*
83
+ */var Mv;function o6(){return Mv||(Mv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function w(X){return typeof X=="string"||typeof X=="function"||X===o||X===l||X===i||X===r||X===p||X===f||typeof X=="object"&&X!==null&&(X.$$typeof===m||X.$$typeof===h||X.$$typeof===a||X.$$typeof===s||X.$$typeof===u||X.$$typeof===y||X.$$typeof===x||X.$$typeof===C||X.$$typeof===g)}function I(X){if(typeof X=="object"&&X!==null){var ae=X.$$typeof;switch(ae){case t:var ce=X.type;switch(ce){case c:case l:case o:case i:case r:case p:return ce;default:var me=ce&&ce.$$typeof;switch(me){case s:case u:case m:case h:case a:return me;default:return ae}}case n:return ae}}}var b=c,k=l,S=s,E=a,N=t,A=u,P=o,j=m,G=h,M=n,T=i,H=r,V=p,z=!1;function O(X){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(X)||I(X)===c}function B(X){return I(X)===l}function F(X){return I(X)===s}function $(X){return I(X)===a}function Z(X){return typeof X=="object"&&X!==null&&X.$$typeof===t}function _(X){return I(X)===u}function R(X){return I(X)===o}function L(X){return I(X)===m}function D(X){return I(X)===h}function K(X){return I(X)===n}function J(X){return I(X)===i}function Y(X){return I(X)===r}function ee(X){return I(X)===p}nt.AsyncMode=b,nt.ConcurrentMode=k,nt.ContextConsumer=S,nt.ContextProvider=E,nt.Element=N,nt.ForwardRef=A,nt.Fragment=P,nt.Lazy=j,nt.Memo=G,nt.Portal=M,nt.Profiler=T,nt.StrictMode=H,nt.Suspense=V,nt.isAsyncMode=O,nt.isConcurrentMode=B,nt.isContextConsumer=F,nt.isContextProvider=$,nt.isElement=Z,nt.isForwardRef=_,nt.isFragment=R,nt.isLazy=L,nt.isMemo=D,nt.isPortal=K,nt.isProfiler=J,nt.isStrictMode=Y,nt.isSuspense=ee,nt.isValidElementType=w,nt.typeOf=I}()),nt}var Dv;function VI(){return Dv||(Dv=1,process.env.NODE_ENV==="production"?xc.exports=n6():xc.exports=o6()),xc.exports}/*
84
84
  object-assign
85
85
  (c) Sindre Sorhus
86
86
  @license MIT
87
- */var Pd,Dv;function r6(){if(Dv)return Pd;Dv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pd=r()?Object.assign:function(i,a){for(var s,c=o(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var p in s)t.call(s,p)&&(c[p]=s[p]);if(e){l=e(s);for(var f=0;f<l.length;f++)n.call(s,l[f])&&(c[l[f]]=s[l[f]])}}return c},Pd}var Od,Bv;function Kh(){if(Bv)return Od;Bv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Od=e,Od}var Td,Hv;function zI(){return Hv||(Hv=1,Td=Function.call.bind(Object.prototype.hasOwnProperty)),Td}var Rd,Gv;function i6(){if(Gv)return Rd;Gv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Kh(),n={},o=zI();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(o(i,u)){var p;try{if(typeof i[u]!="function"){var f=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}p=i[u](a,u,c,s,null,t)}catch(m){p=m}if(p&&!(p instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+p.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Rd=r,Rd}var Ld,Wv;function a6(){if(Wv)return Ld;Wv=1;var e=FI(),t=r6(),n=Kh(),o=zI(),r=i6(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Ld=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function p(B){var F=B&&(l&&B[l]||B[u]);if(typeof F=="function")return F}var f="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:C(),arrayOf:w,element:I(),elementType:b(),instanceOf:k,node:A(),objectOf:E,oneOf:S,oneOfType:O,shape:j,exact:G};function m(B,F){return B===F?B!==0||1/B===1/F:B!==B&&F!==F}function g(B,F){this.message=B,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function y(B){if(process.env.NODE_ENV!=="production")var F={},$=0;function Z(R,L,D,K,J,Y,ee){if(K=K||f,Y=Y||D,ee!==n){if(c){var X=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=K+":"+D;!F[ae]&&$<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[ae]=!0,$++)}}return L[D]==null?R?L[D]===null?new g("The "+J+" `"+Y+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new g("The "+J+" `"+Y+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:B(L,D,K,J,Y)}var _=Z.bind(null,!1);return _.isRequired=Z.bind(null,!0),_}function x(B){function F($,Z,_,R,L,D){var K=$[Z],J=H(K);if(J!==B){var Y=V(K);return new g("Invalid "+R+" `"+L+"` of type "+("`"+Y+"` supplied to `"+_+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return y(F)}function C(){return y(a)}function w(B){function F($,Z,_,R,L){if(typeof B!="function")return new g("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var D=$[Z];if(!Array.isArray(D)){var K=H(D);return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected an array."))}for(var J=0;J<D.length;J++){var Y=B(D,J,_,R,L+"["+J+"]",n);if(Y instanceof Error)return Y}return null}return y(F)}function I(){function B(F,$,Z,_,R){var L=F[$];if(!s(L)){var D=H(L);return new g("Invalid "+_+" `"+R+"` of type "+("`"+D+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return y(B)}function b(){function B(F,$,Z,_,R){var L=F[$];if(!e.isValidElementType(L)){var D=H(L);return new g("Invalid "+_+" `"+R+"` of type "+("`"+D+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return y(B)}function k(B){function F($,Z,_,R,L){if(!($[Z]instanceof B)){var D=B.name||f,K=P($[Z]);return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected ")+("instance of `"+D+"`."))}return null}return y(F)}function S(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function F($,Z,_,R,L){for(var D=$[Z],K=0;K<B.length;K++)if(m(D,B[K]))return null;var J=JSON.stringify(B,function(ee,X){var ae=V(X);return ae==="symbol"?String(X):X});return new g("Invalid "+R+" `"+L+"` of value `"+String(D)+"` "+("supplied to `"+_+"`, expected one of "+J+"."))}return y(F)}function E(B){function F($,Z,_,R,L){if(typeof B!="function")return new g("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected an object."));for(var J in D)if(o(D,J)){var Y=B(D,J,_,R,L+"."+J,n);if(Y instanceof Error)return Y}return null}return y(F)}function O(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var F=0;F<B.length;F++){var $=B[F];if(typeof $!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z($)+" at index "+F+"."),a}function Z(_,R,L,D,K){for(var J=[],Y=0;Y<B.length;Y++){var ee=B[Y],X=ee(_,R,L,D,K,n);if(X==null)return null;X.data&&o(X.data,"expectedType")&&J.push(X.data.expectedType)}var ae=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new g("Invalid "+D+" `"+K+"` supplied to "+("`"+L+"`"+ae+"."))}return y(Z)}function A(){function B(F,$,Z,_,R){return M(F[$])?null:new g("Invalid "+_+" `"+R+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return y(B)}function N(B,F,$,Z,_){return new g((B||"React class")+": "+F+" type `"+$+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function j(B){function F($,Z,_,R,L){var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type `"+K+"` "+("supplied to `"+_+"`, expected `object`."));for(var J in B){var Y=B[J];if(typeof Y!="function")return N(_,R,L,J,V(Y));var ee=Y(D,J,_,R,L+"."+J,n);if(ee)return ee}return null}return y(F)}function G(B){function F($,Z,_,R,L){var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type `"+K+"` "+("supplied to `"+_+"`, expected `object`."));var J=t({},$[Z],B);for(var Y in J){var ee=B[Y];if(o(B,Y)&&typeof ee!="function")return N(_,R,L,Y,V(ee));if(!ee)return new g("Invalid "+R+" `"+L+"` key `"+Y+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify($[Z],null," ")+`
88
- Valid keys: `+JSON.stringify(Object.keys(B),null," "));var X=ee(D,Y,_,R,L+"."+Y,n);if(X)return X}return null}return y(F)}function M(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(M);if(B===null||s(B))return!0;var F=p(B);if(F){var $=F.call(B),Z;if(F!==B.entries){for(;!(Z=$.next()).done;)if(!M(Z.value))return!1}else for(;!(Z=$.next()).done;){var _=Z.value;if(_&&!M(_[1]))return!1}}else return!1;return!0;default:return!1}}function T(B,F){return B==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function H(B){var F=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":T(F,B)?"symbol":F}function V(B){if(typeof B>"u"||B===null)return""+B;var F=H(B);if(F==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return F}function z(B){var F=V(B);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function P(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Ld}var _d,Vv;function s6(){if(Vv)return _d;Vv=1;var e=Kh();function t(){}function n(){}return n.resetWarningCache=t,_d=function(){function o(a,s,c,l,u,p){if(p!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},_d}if(process.env.NODE_ENV!=="production"){var c6=FI(),l6=!0;af.exports=a6()(c6.isElement,l6)}else af.exports=s6()();var u6=af.exports;const _e=OC(u6);function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}var d6;function $I(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d6;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}var p6=(typeof window>"u"?"undefined":sf(window))==="object"&&window.Element||function(){};function f6(e,t,n){if(!(e[t]instanceof p6))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}_e.oneOfType([_e.string,_e.func,f6,_e.shape({current:_e.any})]);var h6=_e.oneOfType([_e.func,_e.string,_e.shape({$$typeof:_e.symbol,render:_e.func}),_e.arrayOf(_e.oneOfType([_e.func,_e.string,_e.shape({$$typeof:_e.symbol,render:_e.func})]))]),m6=["className","cssModule","variant","innerRef"];function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},cf.apply(this,arguments)}function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function g6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fv(Object(n),!0).forEach(function(o){v6(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function v6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y6(e,t){if(e==null)return{};var n=b6(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function b6(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var w6={active:_e.bool,"aria-label":_e.string,onClick:_e.func,variant:_e.oneOf(["white"]),className:_e.string,cssModule:_e.object,innerRef:_e.oneOfType([_e.object,_e.string,_e.func])};function ZI(e){var t=e.className;e.cssModule;var n=e.variant,o=e.innerRef,r=y6(e,m6),i=$I(jo(t,"btn-close",n&&"btn-close-".concat(n)));return v.createElement("button",cf({ref:o,type:"button",className:i},g6({"aria-label":"close"},r)))}ZI.propTypes=w6;var x6=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function lf(){return lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},lf.apply(this,arguments)}function C6(e,t){if(e==null)return{};var n=I6(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function I6(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var k6={active:_e.bool,"aria-label":_e.string,block:_e.bool,children:_e.node,className:_e.string,cssModule:_e.object,close:_e.bool,color:_e.string,disabled:_e.bool,innerRef:_e.oneOfType([_e.object,_e.func,_e.string]),onClick:_e.func,outline:_e.bool,size:_e.string,tag:h6};function Sl(e){var t=v.useCallback(function(C){if(e.disabled){C.preventDefault();return}if(e.onClick)return e.onClick(C)},[e.onClick,e.disabled]),n=e.active,o=e["aria-label"],r=e.block,i=e.className,a=e.close,s=e.cssModule,c=e.color,l=c===void 0?"secondary":c,u=e.outline,p=e.size,f=e.tag,h=f===void 0?"button":f,m=e.innerRef,g=C6(e,x6);if(a)return v.createElement(ZI,g);var y="btn".concat(u?"-outline":"","-").concat(l),x=$I(jo(i,"btn",y,p?"btn-".concat(p):!1,r?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return g.href&&h==="button"&&(h="a"),v.createElement(h,lf({type:h==="button"&&g.onClick?"button":void 0},g,{className:x,ref:m,onClick:t,"aria-label":o}))}Sl.propTypes=k6;const XI=({children:e,description:t,heading:n,Image:o,title:r,className:i})=>d.jsxs("div",{className:jo("info-card",i),children:[r&&d.jsx("h1",{className:"info-card-title io-title-large",children:r}),o&&d.jsx("div",{className:"info-card-image",children:d.jsx(o,{})}),n&&d.jsx("h3",{className:"info-card-heading io-title",children:n}),d.jsx("p",{className:"info-card-description io-text-default-lh16",children:t}),e]}),S6=({activeStepName:e,showWarnIcon:t,stepsStatuses:n})=>d.jsx("ul",{className:"setup-flow-list io-text-default-lh16",children:Dc.map(({name:o,label:r},i)=>{const a=o===e,s=n[o].state,c=t&&a?d.jsx(wt,{variant:"exclamation-mark",size:"12"}):d.jsxs("span",{children:[i+1,"."]});return d.jsx("li",{className:jo(a&&"active"),children:d.jsxs("div",{className:"setup-flow-list-item",children:[d.jsxs("div",{className:"setup-flow-list-item-icon-wrapper",children:[s==="prompt"&&c,s==="granted"&&d.jsx(wt,{variant:"check-solid",size:"12"}),s==="denied"&&d.jsx(wt,{variant:"close",size:"12"})]}),r]})},o)})}),A6=({edgeNotificationsPermissionTimeout:e,isNotificationsPermissionPromptOpen:t})=>{const{name:n}=nN(),[o,r]=v.useState(!1);return v.useEffect(()=>{if(!t||n!=="Edge")return;const i=setTimeout(()=>r(!0),e);return()=>clearTimeout(i)},[n,e,t]),v.useEffect(()=>{t&&!o||r(!1)},[t,o,r]),{hasEdgeNotificationsPermissionError:o}},E6=(e,t)=>{const{type:n,payload:o}=t;switch(n){case"completed":return{...e,[o.stepName]:{...e[o.stepName],isCompleted:!0}};case"skipped":return{...e,[o.stepName]:{isCompleted:!0,state:"denied"}};case"stateUpdated":{if(!o.state)throw Error('"stateUpdated" action invoked without state in payload');return{...e,[o.stepName]:{isCompleted:o.stepName===Ct.POPUPS?o.state==="granted":o.state!=="prompt",state:o.state}}}default:throw Error("Unknown action: "+n)}},j6=e=>{const{handleDeferredStep:t,handleOperationComplete:n}=e;window.getScreenDetails().catch(async()=>{const{state:o}=await navigator.permissions.query({name:jr.WINDOW_MANAGEMENT});o==="prompt"&&t()}).finally(n)},N6=e=>{const{handleDeferredStep:t,handleOperationComplete:n}=e;Notification.requestPermission().then(async()=>{const{state:o}=await navigator.permissions.query({name:jr.NOTIFICATIONS});o==="prompt"&&t()}).finally(n)},P6=e=>{const{handleDeferredStep:t,handleOperationComplete:n,dispatchAction:o}=e,r="about:blank",i="popup,width=1,height=1,top=9999,left=9999",a=window.open(r,void 0,i),s=window.open(r,void 0,i);a==null||a.close(),s==null||s.close();const c=!(a&&s);c&&t(),o({type:"stateUpdated",payload:{stepName:Ct.POPUPS,state:c?"denied":"granted"}}),n()},O6=e=>{const{dispatchAction:t}=e;t({type:"completed",payload:{stepName:Ct.PWA_INSTALL}})},T6={[Ct.WINDOW_MANAGEMENT]:j6,[Ct.NOTIFICATIONS]:N6,[Ct.POPUPS]:P6,[Ct.PWA_INSTALL]:O6},R6=({settings:e})=>{const{permission:t}=Dr(),[n,o]=mi("localStorage",Rs,Ls),[r,i]=v.useReducer(E6,LN),[a,s]=v.useState(!1),[c,l]=v.useState(!1),u=Dc.find(y=>!r[y.name].isCompleted);if(!u)throw new Error("All setup steps are completed. The SetupSteps component should not be used in such case.");const p=u.name,f=Dc[Dc.length-1].name,{hasEdgeNotificationsPermissionError:h}=A6({edgeNotificationsPermissionTimeout:e.edgeNotificationsPermissionTimeout,isNotificationsPermissionPromptOpen:c&&p===jr.NOTIFICATIONS}),m=()=>{s(!1),l(!0),T6[p]({handleDeferredStep:()=>s(!0),handleOperationComplete:()=>l(!1),dispatchAction:y=>i(y)}),p===f&&o({isCompleted:!0})},g=()=>{s(!1),i({type:"skipped",payload:{stepName:p}})};return v.useEffect(()=>{h&&(l(!1),s(!0))},[h]),v.useEffect(()=>{var y,x;s(!1),i({type:"stateUpdated",payload:{stepName:Ct.WINDOW_MANAGEMENT,state:Eh?(y=t.statuses[Ct.WINDOW_MANAGEMENT])==null?void 0:y.state:"denied"}}),i({type:"stateUpdated",payload:{stepName:Ct.NOTIFICATIONS,state:(x=t.statuses[Ct.NOTIFICATIONS])==null?void 0:x.state}})},[t.statuses]),d.jsxs(XI,{description:u.description,heading:u.heading,Image:u.Image,title:"Platform Setup",children:[d.jsx(S6,{activeStepName:p,showWarnIcon:a&&p!==Ct.POPUPS,stepsStatuses:r}),d.jsx("p",{className:"io-text-default-lh16",children:a?u.instructions.additional:u.instructions.initial}),d.jsxs(We,{children:[d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-primary setup-flow-btn",disabled:c,onClick:m,children:u.actionBtnText}),p!==f&&p!==Ct.WINDOW_MANAGEMENT&&d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-outline setup-flow-btn",disabled:c,onClick:g,children:"Skip"})]}),c&&d.jsx(VI,{})]})};const qh=({components:{Logo:e=Fs,Loader:t=Br}={},settings:n={}})=>{const{permission:o}=Dr();return o.isLoading?d.jsx(t,{text:"Checking browser permissions..."}):d.jsx(WI,{Logo:e,children:d.jsx(R6,{settings:{...NN,...n}})})};const Qh=({errorMessage:e})=>{const t="https://support.interop.io",n=d.jsxs(d.Fragment,{children:["It seems that the following error prevents io.Connect Browser",d.jsx("br",{}),"from operating properly:",d.jsxs("span",{className:"browser-start-failed-error",children:["“",e,"”"]}),d.jsxs("span",{className:"help-center-info",children:["For further assistance, visit our"," ",d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"help center"}),"."]}),d.jsx("span",{className:"thank-you",children:"Thank you for your cooperation."})]});return d.jsx(WI,{Logo:Fs,children:d.jsx(XI,{className:"io-init-error-card",heading:"Oops! io.Connect Browser couldn't start...",description:n,Image:jN,children:d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-primary",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Visit the interop.io Help Center"})})})},UI=()=>d.jsxs(d.Fragment,{children:[d.jsx(bo,{tag:"h1",className:"login-title",text:"Making Your Work Flow",size:"large"}),d.jsxs("p",{className:"io-text-default-lh16 login-description",children:["Integrate apps, simplify user experiences and accelerate",d.jsx("br",{}),"digital transformation."]})]}),JI=({Logo:e,children:t,className:n})=>d.jsx("div",{className:"login-page-background",children:d.jsxs("div",{className:jo(n,"login-form-container flex flex-column ai-center"),children:[d.jsx(e,{}),t]})}),L6=({onLogin:e,isLoading:t,validationError:n,components:{Logo:o=Fs,Heading:r=UI,Loader:i=Br}={}})=>t?d.jsx(i,{text:"Verifying credentials..."}):d.jsxs(JI,{Logo:o,children:[d.jsx(r,{}),d.jsx(Ze,{className:"auth0-login-btn",onClick:e,size:"large",variant:"primary",children:"Log In"}),n&&d.jsx(pk,{variant:"critical",text:n.message})]}),zv=(e,t)=>{const n=t.value,o=n.trim().length>3;return{value:n,isValid:o}},_6=({onLogin:e,setIsLoading:t,loginError:n,setLoginError:o,userInputName:r="email"})=>{const[i,a]=v.useReducer(zv,{value:"",isValid:!1}),[s,c]=v.useReducer(zv,{value:"",isValid:!1}),[l,u]=v.useState(!1),[p,f]=v.useState(!1),{isValid:h}=i,{isValid:m}=s,g=h&&m,y=b=>a({value:b.target.value}),x=b=>c({value:b.target.value}),C=()=>{h||u(!0)},w=()=>{m||f(!0)},I=async b=>{if(b.preventDefault(),!!g){t(!0);try{await e(i.value,s.value)}catch(k){o(k)}t(!1)}};return d.jsxs("form",{className:"simple-login-form",onSubmit:I,children:[d.jsx(qn,{id:"user",errorMessage:l?`The ${r} is too short`:void 0,autoFocus:!0,autoComplete:"off",type:"text",placeholder:`Enter your ${r}`,value:i.value,onChange:y,onBlur:C,onFocus:()=>u(!1)}),d.jsx(qn,{id:"password",errorMessage:p?"The password is too short":void 0,autoComplete:"off",type:"password",placeholder:"Enter your password",value:s.value,onChange:x,onBlur:w,onFocus:()=>f(!1)}),d.jsx(Ze,{type:"submit",size:"large",variant:"primary",children:"Log In"}),n&&d.jsxs("div",{className:"login-error-feedback",children:[d.jsx(wt,{className:"error-icon",variant:"close",size:"12"}),n.message]})]})};const M6=({onLogin:e,userInputName:t,components:{Logo:n=Fs,Heading:o=UI,Loader:r=Br}={}})=>{const[i,a]=v.useState(!1),[s,c]=v.useState(null);return i?d.jsx(r,{text:"Verifying credentials..."}):d.jsxs(JI,{Logo:n,children:[d.jsx(o,{}),d.jsx(_6,{onLogin:e,setIsLoading:a,loginError:s,setLoginError:c,userInputName:t})]})};function D6(e,t){const[n,o]=v.useState(!0),r=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{let i;return(async()=>{if(!r.workspaces)return;let a;try{a=await r.workspaces.getWorkspaceById(e)}catch(c){console.warn(c);return}const s=a.getAllGroups().find(c=>c.id===t);s&&(i=await s.onLockConfigurationChanged(({showAddWindowButton:c})=>{c!==void 0&&o(c)}),o(!!s.showAddWindowButton))})(),()=>i==null?void 0:i()},[e,t,r.workspaces]),n}const B6=({groupId:e,workspaceId:t})=>{const n=D6(t,e),o=v.useCallback(r=>{Ja.showAddApplicationPopup({bounds:r,groupId:e,workspaceId:t})},[e,t]);return n&&d.jsx(Ja.AddWindowButton,{title:"Add App",visible:n,showPopup:o})},H6=e=>d.jsx(Ja.GroupHeaderButtons,{...e,addWindow:{visible:!1,showPopup:e.addWindow.showPopup}}),G6=()=>null;const YI=({className:e,components:t,onClose:n,title:o})=>{const{NotificationsProvider:r,NotificationsPanelProvider:i,SettingsPanel:a}=Ah;return d.jsx(r,{children:d.jsx(i,{children:d.jsx(a,{className:e,components:t,onClose:n,title:o})})})};const KI=Xj.Panel;const{DIALOG_TEMPLATE_NAMES:W6,useActiveLayout:V6}=Dt,qI=({className:e,components:t,onClose:n,title:o})=>{const r=v.useContext(Se.IOConnectContext),{onLogout:i}=LC(),{setActiveLayout:a}=V6(),{login:{setIsLoggingOut:s}}=Dr(),c=v.useCallback(async()=>{var l;if("modals"in r&&r.modals){const u="log-out",{isEnterPressed:p,responseButtonClicked:f}=await r.modals.dialogs.request({templateName:W6.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:"Logging out of io.Connect Browser",text:"This will terminate your session.",actionButtons:[{variant:"primary",text:"Log out",id:u,autofocus:!0},{variant:"outline",text:"Cancel",id:"cancel"}]}});if(!(p||(f==null?void 0:f.id)===u))return}Bo.flushSync(()=>s(!0)),a(null),await((l=r.webPlatform)==null?void 0:l.system.shutdown());try{i==null||i()}catch(u){console.error(u)}},[r,i]);return d.jsx(IC.Panel,{className:e,components:t,onClose:n,onLogout:c,title:o})},F6=[{name:"platformPreferences",displayName:"Platform Preferences",icon:"cog",onClick:e=>e(KI)},{name:"notificationSettings",displayName:"Notification Settings",icon:"bell",onClick:e=>e(YI),separatorAfter:!0},{name:"profile",displayName:"Profile",icon:"user",onClick:e=>e(qI)}],z6=e=>({onClose:t})=>d.jsx(e,{className:"system-menu-panel",onClose:t});const QI=({actions:e,panelWrapperClassName:t})=>{const[n,o]=v.useState(),r=v.useRef(null),i=CN(),a=v.useCallback(()=>o(void 0),[]),s=!!n;v.useEffect(()=>{!s||i!=="Escape"||a()},[s,i]);const c=v.useCallback((l,u)=>{const p=e.find(({name:h})=>h===u.name);if(!p){console.error(`Action named ${u.name} is not part of the provided list of actions: ${JSON.stringify(e)}!`);return}const f=h=>{const m=z6(h);o(()=>m)};p.onClick(f)},[e]);return DC({eventType:"mouseup",handler:a,ref:r,skip:!s}),MC({handler:a,skip:!s}),d.jsxs(d.Fragment,{children:[d.jsx(Vf,{buttonSize:"32",iconSize:"16",actions:e,onActionItemClick:c,icon:"ellipsis-vertical",buttonVariant:"circle",placement:"bottom-end",offset:[0,8],"data-testid":"system-menu-button",contextMenuDataTestId:"system-menu"}),d.jsx(HC,{className:jo("system-menu-panel-wrapper",t),isOpen:s,onClose:a,Panel:n,position:"right",ref:r})]})},$6=()=>d.jsx("li",{className:"default-header-system-menu",children:d.jsx(QI,{actions:F6})}),Z6=()=>{const{showNotificationBadge:e}=oN(),t=_C(),o=v.useMemo(()=>t.filter(({state:r})=>r==="Active"||r==="Stale"),[t]).length;return o>0&&e?d.jsx("div",{className:"io-badge io-badge-primary notifications-badge",children:o<100?o:"99+"}):null};const ek=e=>{const{className:t,active:n,...o}=e;return d.jsxs("div",{className:jo(t,"notifications-panel-button"),...o,children:[d.jsx(Ue,{icon:"bell",size:"32",iconSize:"16",variant:"circle"}),d.jsx(Z6,{})]})},tk=({className:e,components:t,onClose:n,settings:o,title:r})=>{const{NotificationsProvider:i,NotificationsPanelProvider:a,Panel:s}=Ah;return d.jsx(i,{children:d.jsx(a,{children:d.jsx(s,{className:e,components:t,onClose:n,settings:o,title:r})})})},nk=({Button:e=ek,Panel:t=tk,position:n="right",...o})=>{const r=_C(),i=v.useContext(Se.IOConnectContext),a=v.useCallback(async()=>{await Promise.all(r.map(({id:s})=>i.notifications.setState(s,"Seen")))},[r]);return d.jsx(Ph,{Button:e,Panel:t,position:n,onClose:a,...o})};const{WorkspaceTabsOverflowButton:$v}=uk,X6=({workspaceTabsOverflow:e})=>d.jsxs(d.Fragment,{children:[$v&&d.jsx($v,{visible:e==null?void 0:e.visible,title:e==null?void 0:e.title}),d.jsx(nk,{tag:"li"}),d.jsx($6,{})]}),em=({onLogout:e,workspaces:t,launchpad:n,Loader:o=Br,isBeforeunloadDialogEnabled:r})=>{var g,y,x,C;const{LogoComponent:i,SystemButtonsComponent:a}=((g=t==null?void 0:t.components)==null?void 0:g.header)??{},{setPlatformWindow:s}=Nh(),{isInitialSetupCompleted:c}=Cb(),l=(y=window.iobrowser)==null?void 0:y.platformStarted,u=i??(l?GC:G6),p=a??(l?X6:void 0),f=Qj(),{login:{isLoggingOut:h}}=Dr();qj(r===!1||h),v.useEffect(()=>{l&&s({name:window.name})},[l,s]);const m=v.useMemo(()=>({onLogout:e,launchpadSettings:n==null?void 0:n.settings,launchpadComponents:n==null?void 0:n.components}),[e,n==null?void 0:n.settings,n==null?void 0:n.components]);return d.jsxs(RC.Provider,{value:m,children:[(!f||!c)&&d.jsx(o,{text:"Loading io.Connect Home..."}),d.jsx(Ja,{components:{...t==null?void 0:t.components,header:{...(x=t==null?void 0:t.components)==null?void 0:x.header,LogoComponent:u,SystemButtonsComponent:p},groupHeader:{AfterTabsComponent:B6,ButtonsComponent:H6,...(C=t==null?void 0:t.components)==null?void 0:C.groupHeader}}})]})},U6=It({id:xn,username:Ge(xn),email:Ge(xn),firstName:Ge(xn),lastName:Ge(xn),token:Ge(xn),password:Ge(xn)}),J6=({config:e})=>{var x,C,w,I;const{setupFlow:t,login:n,workspaces:o,launchpad:r,getIOConnectConfig:i}=e,[a,s]=mi("localStorage",iN,U6),[c]=mi("localStorage",Rs,Ls),[l,u]=v.useState(null),{login:{isLoggingOut:p}}=Dr(),f=jh(),h=((x=e.components)==null?void 0:x.SystemLoader)??Br,m=((C=e.components)==null?void 0:C.IOInitErrorScreen)??Qh,g=v.useCallback(async(b,k)=>{const S=await n.onLogin(b,k);s(S)},[n,s]),y=v.useCallback(()=>{var b;(b=n.onLogout)==null||b.call(n),s(null),window.location.reload()},[n.onLogout,s]);return p?d.jsx(h,{text:"Logging out..."}):a?!(c!=null&&c.isCompleted)&&(t==null?void 0:t.enabled)!==!1&&!f?d.jsx(qh,{settings:t==null?void 0:t.settings,components:{...t==null?void 0:t.components,Loader:h}}):l&&!l.message.includes("has already been started")?d.jsx(m,{errorMessage:l.message}):d.jsx(Se.IOConnectProvider,{settings:i({type:"simple",user:a}),onInitError:u,fallback:d.jsx(h,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(w=r==null?void 0:r.settings)==null?void 0:w.mode,children:d.jsx(em,{workspaces:o,launchpad:r,onLogout:y,isBeforeunloadDialogEnabled:(I=e.settings)==null?void 0:I.isBeforeunloadDialogEnabled,Loader:h})})}):d.jsx(M6,{onLogin:g,userInputName:n.userInputName,components:{...n.components,Loader:h}})},Y6=It({message:xn}),K6=e=>{const t=GI(),[n,o]=v.useState(void 0),[r,i]=mi("sessionStorage",rN,Y6),a=v.useMemo(()=>t.user?(e==null?void 0:e(t.user))??{ok:!0}:null,[t.user,e]),s=(a==null?void 0:a.ok)===!1,c=t.isLoading||t.isAuthenticated&&!n,l=s||c,u=v.useMemo(()=>{var p;return a!=null&&a.ok&&((p=t.user)!=null&&p.email)&&n?{username:t.user.name,id:t.user.email,token:n}:null},[t.user,n,a==null?void 0:a.ok]);return v.useEffect(()=>{t.isAuthenticated&&t.getAccessTokenSilently().then(o).catch(console.warn)},[t]),v.useEffect(()=>{if(a){if(a.ok){i(null);return}i({message:a.message}),t.logout()}},[t,i,a]),{isLoading:l,validationError:r,user:u}},uf={POPUP:"popup",REDIRECT:"redirect"},q6=({config:e})=>{var w,I,b,k;const t=GI(),{setupFlow:n,login:o,launchpad:r,workspaces:i,getIOConnectConfig:a}=e,{isLoading:s,validationError:c,user:l}=K6(o.validateUser),p=(o.loginType??uf.REDIRECT)===uf.REDIRECT?t.loginWithRedirect:t.loginWithPopup,[f]=mi("localStorage",Rs,Ls),[h,m]=v.useState(null),{login:{isLoggingOut:g}}=Dr(),y=jh(),x=((w=e.components)==null?void 0:w.SystemLoader)??Br,C=((I=e.components)==null?void 0:I.IOInitErrorScreen)??Qh;return g?d.jsx(x,{text:"Logging out..."}):l?!(f!=null&&f.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&!y?d.jsx(qh,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:x}}):h&&!h.message.includes("has already been started")?d.jsx(C,{errorMessage:h.message}):d.jsx(Se.IOConnectProvider,{settings:a({type:"auth0",user:{...t.user,id:l.id,token:l.token}}),onInitError:m,fallback:d.jsx(x,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(b=r==null?void 0:r.settings)==null?void 0:b.mode,children:d.jsx(em,{workspaces:i,launchpad:r,onLogout:t.logout,isBeforeunloadDialogEnabled:(k=e.settings)==null?void 0:k.isBeforeunloadDialogEnabled,Loader:x})})}):d.jsx(L6,{onLogin:p,isLoading:s,validationError:c,components:{...o.components,Loader:x}})},Zv=({config:e})=>{var g,y,x,C;const{setupFlow:t,launchpad:n,workspaces:o,getIOConnectConfig:r}=e,{onLogout:i,user:a}=e.login??{},{isPlatformWindow:s}=Nh(),[c]=mi("localStorage",Rs,Ls),[l,u]=v.useState(null),{login:{isLoggingOut:p}}=Dr(),f=jh(),h=((g=e.components)==null?void 0:g.SystemLoader)??Br,m=((y=e.components)==null?void 0:y.IOInitErrorScreen)??Qh;return p?d.jsx(h,{text:"Logging out..."}):!(c!=null&&c.isCompleted)&&(t==null?void 0:t.enabled)!==!1&&s&&!f?d.jsx(qh,{settings:t==null?void 0:t.settings,components:{...t==null?void 0:t.components,Loader:h}}):l&&!l.message.includes("has already been started")?d.jsx(m,{errorMessage:l.message}):d.jsx(Se.IOConnectProvider,{settings:r({type:"custom",user:a}),onInitError:u,fallback:d.jsx(h,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(x=n==null?void 0:n.settings)==null?void 0:x.mode,children:d.jsx(em,{workspaces:o,launchpad:n,onLogout:i,isBeforeunloadDialogEnabled:(C=e.settings)==null?void 0:C.isBeforeunloadDialogEnabled,Loader:h})})})},ok=It({Logo:Ge(rn().andThen(e=>Nn(e,"Logo"))),Heading:Ge(rn().andThen(e=>Nn(e,"Heading")))}),Q6=us(...Object.values(uf).map(e=>Rr(e))),eO=It({type:Rr("auth0"),validateUser:Ge(rn().andThen(e=>Nn(e,"validateUser"))),loginType:Ge(Q6),providerOptions:rn(),components:Ge(ok)}),tO=It({type:Rr("simple"),onLogin:rn().andThen(e=>Nn(e,"onLogin")),onLogout:Ge(rn().andThen(e=>Nn(e,"onLogout"))),userInputName:Ge(xn),components:Ge(ok)}),nO=It({id:xn,username:xn}),oO=It({type:Rr("custom"),onLogout:rn().andThen(e=>Nn(e,"onLogout")),user:nO}),rO=us(eO,tO,oO),iO=It({edgeNotificationsPermissionTimeout:Ge(yN)}),aO=It({Logo:Ge(rn().andThen(e=>Nn(e,"Logo")))}),sO=It({enabled:Ge(ls()),components:Ge(aO),settings:Ge(iO)}),cO=It({components:Ge(rn())}),lO=It({BeforeSearch:us(Rr(null),Ge(rn().andThen(e=>Nn(e,"BeforeSearch")))),AfterSearch:us(Rr(null),Ge(rn().andThen(e=>Nn(e,"AfterSearch"))))}),uO=It({Component:rn().andThen(e=>Nn(e,"Component")),placementId:xn}),dO=It({header:Ge(lO),sections:Ge(gN(uO))}),pO=It({showHeader:Ge(ls()),showSearch:Ge(ls())}),fO=It({header:Ge(pO),mode:Ge(us(Rr("pinned"),Rr("default")))}),hO=It({components:Ge(dO),settings:Ge(fO)}),mO=It({SystemLoader:Ge(rn().andThen(e=>Nn(e,"SystemLoader"))),IOInitErrorScreen:Ge(rn().andThen(e=>Nn(e,"IOInitErrorScreen")))}),gO=It({isBeforeunloadDialogEnabled:Ge(ls())}),vO=It({getIOConnectConfig:rn().andThen(e=>Nn(e,"getIOConnectConfig")),login:Ge(rO),setupFlow:Ge(sO),workspaces:Ge(cO),launchpad:Ge(hO),components:Ge(mO),settings:Ge(gO)}),yO=({config:e})=>{var i;const t=v.useMemo(()=>vO.runWithException(e),[e]),n=t.login,{isPlatformWindow:o}=Nh();if(!n||!o){const{login:a,...s}=t;return d.jsx(Zv,{config:s})}if(n.type==="custom")return d.jsx(Zv,{config:t});if(n.type==="simple")return d.jsx(J6,{config:t});const{providerOptions:r}=n;return d.jsx(q9,{...r,authorizationParams:{...r.authorizationParams,redirect_uri:((i=r.authorizationParams)==null?void 0:i.redirect_uri)??window.location.origin},children:d.jsx(q6,{config:t})})};const bO=({config:e})=>d.jsx(IN,{children:d.jsx(yO,{config:e})}),wO=Dt.ApplicationsSection,xO=Dt.FavoritesSection,CO=Dt.Panel,IO=Dt.Body,kO=Dt.ContentsContainer,SO=Dt.Header,AO=Dt.PinButton,EO=Dt.Section,jO=Dt.WorkspacesSection,NO=Dt.useFavorites,PO=Dt.useIsLaunchpadCollapsed;exports.ApplicationsSection=wO;exports.FavoritesSection=xO;exports.IOActivePanelRenderer=y4;exports.IOConnectHome=bO;exports.IODownloadManager=YA;exports.IONotifications=Ah;exports.IOPreferencesDesktop=Dj;exports.IOProfile=IC;exports.Launchpad=CO;exports.LaunchpadAccess=GC;exports.LaunchpadBody=IO;exports.LaunchpadContentsContainer=kO;exports.LaunchpadHeader=SO;exports.LaunchpadPinButton=AO;exports.NotificationSettingsPanel=YI;exports.NotificationsPanel=tk;exports.NotificationsPanelButton=ek;exports.NotificationsPanelWithToggleButton=nk;exports.PanelWithToggleButton=Ph;exports.PlatformPrefsProvider=Bl;exports.PreferencesPanel=KI;exports.ProfilePanel=qI;exports.Section=EO;exports.SystemLoader=Br;exports.SystemMenu=QI;exports.WorkspacesSection=jO;exports.useFavorites=NO;exports.useIsLaunchpadCollapsed=PO;exports.usePlatformPref=St;exports.usePlatformPrefs=Cb;
87
+ */var Nd,Bv;function r6(){if(Bv)return Nd;Bv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Nd=r()?Object.assign:function(i,a){for(var s,c=o(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var p in s)t.call(s,p)&&(c[p]=s[p]);if(e){l=e(s);for(var f=0;f<l.length;f++)n.call(s,l[f])&&(c[l[f]]=s[l[f]])}}return c},Nd}var Od,Hv;function qh(){if(Hv)return Od;Hv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Od=e,Od}var Td,Gv;function FI(){return Gv||(Gv=1,Td=Function.call.bind(Object.prototype.hasOwnProperty)),Td}var Rd,Wv;function i6(){if(Wv)return Rd;Wv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qh(),n={},o=FI();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(o(i,u)){var p;try{if(typeof i[u]!="function"){var f=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}p=i[u](a,u,c,s,null,t)}catch(m){p=m}if(p&&!(p instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+p.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Rd=r,Rd}var Ld,Vv;function a6(){if(Vv)return Ld;Vv=1;var e=VI(),t=r6(),n=qh(),o=FI(),r=i6(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Ld=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function p(B){var F=B&&(l&&B[l]||B[u]);if(typeof F=="function")return F}var f="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:C(),arrayOf:w,element:I(),elementType:b(),instanceOf:k,node:A(),objectOf:E,oneOf:S,oneOfType:N,shape:j,exact:G};function m(B,F){return B===F?B!==0||1/B===1/F:B!==B&&F!==F}function g(B,F){this.message=B,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function y(B){if(process.env.NODE_ENV!=="production")var F={},$=0;function Z(R,L,D,K,J,Y,ee){if(K=K||f,Y=Y||D,ee!==n){if(c){var X=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=K+":"+D;!F[ae]&&$<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[ae]=!0,$++)}}return L[D]==null?R?L[D]===null?new g("The "+J+" `"+Y+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new g("The "+J+" `"+Y+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:B(L,D,K,J,Y)}var _=Z.bind(null,!1);return _.isRequired=Z.bind(null,!0),_}function x(B){function F($,Z,_,R,L,D){var K=$[Z],J=H(K);if(J!==B){var Y=V(K);return new g("Invalid "+R+" `"+L+"` of type "+("`"+Y+"` supplied to `"+_+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return y(F)}function C(){return y(a)}function w(B){function F($,Z,_,R,L){if(typeof B!="function")return new g("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var D=$[Z];if(!Array.isArray(D)){var K=H(D);return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected an array."))}for(var J=0;J<D.length;J++){var Y=B(D,J,_,R,L+"["+J+"]",n);if(Y instanceof Error)return Y}return null}return y(F)}function I(){function B(F,$,Z,_,R){var L=F[$];if(!s(L)){var D=H(L);return new g("Invalid "+_+" `"+R+"` of type "+("`"+D+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return y(B)}function b(){function B(F,$,Z,_,R){var L=F[$];if(!e.isValidElementType(L)){var D=H(L);return new g("Invalid "+_+" `"+R+"` of type "+("`"+D+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return y(B)}function k(B){function F($,Z,_,R,L){if(!($[Z]instanceof B)){var D=B.name||f,K=O($[Z]);return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected ")+("instance of `"+D+"`."))}return null}return y(F)}function S(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function F($,Z,_,R,L){for(var D=$[Z],K=0;K<B.length;K++)if(m(D,B[K]))return null;var J=JSON.stringify(B,function(ee,X){var ae=V(X);return ae==="symbol"?String(X):X});return new g("Invalid "+R+" `"+L+"` of value `"+String(D)+"` "+("supplied to `"+_+"`, expected one of "+J+"."))}return y(F)}function E(B){function F($,Z,_,R,L){if(typeof B!="function")return new g("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type "+("`"+K+"` supplied to `"+_+"`, expected an object."));for(var J in D)if(o(D,J)){var Y=B(D,J,_,R,L+"."+J,n);if(Y instanceof Error)return Y}return null}return y(F)}function N(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var F=0;F<B.length;F++){var $=B[F];if(typeof $!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z($)+" at index "+F+"."),a}function Z(_,R,L,D,K){for(var J=[],Y=0;Y<B.length;Y++){var ee=B[Y],X=ee(_,R,L,D,K,n);if(X==null)return null;X.data&&o(X.data,"expectedType")&&J.push(X.data.expectedType)}var ae=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new g("Invalid "+D+" `"+K+"` supplied to "+("`"+L+"`"+ae+"."))}return y(Z)}function A(){function B(F,$,Z,_,R){return M(F[$])?null:new g("Invalid "+_+" `"+R+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return y(B)}function P(B,F,$,Z,_){return new g((B||"React class")+": "+F+" type `"+$+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function j(B){function F($,Z,_,R,L){var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type `"+K+"` "+("supplied to `"+_+"`, expected `object`."));for(var J in B){var Y=B[J];if(typeof Y!="function")return P(_,R,L,J,V(Y));var ee=Y(D,J,_,R,L+"."+J,n);if(ee)return ee}return null}return y(F)}function G(B){function F($,Z,_,R,L){var D=$[Z],K=H(D);if(K!=="object")return new g("Invalid "+R+" `"+L+"` of type `"+K+"` "+("supplied to `"+_+"`, expected `object`."));var J=t({},$[Z],B);for(var Y in J){var ee=B[Y];if(o(B,Y)&&typeof ee!="function")return P(_,R,L,Y,V(ee));if(!ee)return new g("Invalid "+R+" `"+L+"` key `"+Y+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify($[Z],null," ")+`
88
+ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var X=ee(D,Y,_,R,L+"."+Y,n);if(X)return X}return null}return y(F)}function M(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(M);if(B===null||s(B))return!0;var F=p(B);if(F){var $=F.call(B),Z;if(F!==B.entries){for(;!(Z=$.next()).done;)if(!M(Z.value))return!1}else for(;!(Z=$.next()).done;){var _=Z.value;if(_&&!M(_[1]))return!1}}else return!1;return!0;default:return!1}}function T(B,F){return B==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function H(B){var F=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":T(F,B)?"symbol":F}function V(B){if(typeof B>"u"||B===null)return""+B;var F=H(B);if(F==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return F}function z(B){var F=V(B);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function O(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Ld}var _d,Fv;function s6(){if(Fv)return _d;Fv=1;var e=qh();function t(){}function n(){}return n.resetWarningCache=t,_d=function(){function o(a,s,c,l,u,p){if(p!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},_d}if(process.env.NODE_ENV!=="production"){var c6=VI(),l6=!0;sf.exports=a6()(c6.isElement,l6)}else sf.exports=s6()();var u6=sf.exports;const _e=NC(u6);function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}var d6;function zI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d6;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}var p6=(typeof window>"u"?"undefined":cf(window))==="object"&&window.Element||function(){};function f6(e,t,n){if(!(e[t]instanceof p6))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}_e.oneOfType([_e.string,_e.func,f6,_e.shape({current:_e.any})]);var h6=_e.oneOfType([_e.func,_e.string,_e.shape({$$typeof:_e.symbol,render:_e.func}),_e.arrayOf(_e.oneOfType([_e.func,_e.string,_e.shape({$$typeof:_e.symbol,render:_e.func})]))]),m6=["className","cssModule","variant","innerRef"];function lf(){return lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},lf.apply(this,arguments)}function zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function g6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zv(Object(n),!0).forEach(function(o){v6(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function v6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y6(e,t){if(e==null)return{};var n=b6(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function b6(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var w6={active:_e.bool,"aria-label":_e.string,onClick:_e.func,variant:_e.oneOf(["white"]),className:_e.string,cssModule:_e.object,innerRef:_e.oneOfType([_e.object,_e.string,_e.func])};function $I(e){var t=e.className;e.cssModule;var n=e.variant,o=e.innerRef,r=y6(e,m6),i=zI(jo(t,"btn-close",n&&"btn-close-".concat(n)));return v.createElement("button",lf({ref:o,type:"button",className:i},g6({"aria-label":"close"},r)))}$I.propTypes=w6;var x6=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},uf.apply(this,arguments)}function C6(e,t){if(e==null)return{};var n=I6(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function I6(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var k6={active:_e.bool,"aria-label":_e.string,block:_e.bool,children:_e.node,className:_e.string,cssModule:_e.object,close:_e.bool,color:_e.string,disabled:_e.bool,innerRef:_e.oneOfType([_e.object,_e.func,_e.string]),onClick:_e.func,outline:_e.bool,size:_e.string,tag:h6};function Sl(e){var t=v.useCallback(function(C){if(e.disabled){C.preventDefault();return}if(e.onClick)return e.onClick(C)},[e.onClick,e.disabled]),n=e.active,o=e["aria-label"],r=e.block,i=e.className,a=e.close,s=e.cssModule,c=e.color,l=c===void 0?"secondary":c,u=e.outline,p=e.size,f=e.tag,h=f===void 0?"button":f,m=e.innerRef,g=C6(e,x6);if(a)return v.createElement($I,g);var y="btn".concat(u?"-outline":"","-").concat(l),x=zI(jo(i,"btn",y,p?"btn-".concat(p):!1,r?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return g.href&&h==="button"&&(h="a"),v.createElement(h,uf({type:h==="button"&&g.onClick?"button":void 0},g,{className:x,ref:m,onClick:t,"aria-label":o}))}Sl.propTypes=k6;const ZI=({children:e,description:t,heading:n,Image:o,title:r,className:i})=>d.jsxs("div",{className:jo("info-card",i),children:[r&&d.jsx("h1",{className:"info-card-title io-title-large",children:r}),o&&d.jsx("div",{className:"info-card-image",children:d.jsx(o,{})}),n&&d.jsx("h3",{className:"info-card-heading io-title",children:n}),d.jsx("p",{className:"info-card-description io-text-default-lh16",children:t}),e]}),S6=({activeStepName:e,showWarnIcon:t,stepsStatuses:n})=>d.jsx("ul",{className:"setup-flow-list io-text-default-lh16",children:Dc.map(({name:o,label:r},i)=>{const a=o===e,s=n[o].state,c=t&&a?d.jsx(wt,{variant:"exclamation-mark",size:"12"}):d.jsxs("span",{children:[i+1,"."]});return d.jsx("li",{className:jo(a&&"active"),children:d.jsxs("div",{className:"setup-flow-list-item",children:[d.jsxs("div",{className:"setup-flow-list-item-icon-wrapper",children:[s==="prompt"&&c,s==="granted"&&d.jsx(wt,{variant:"check-solid",size:"12"}),s==="denied"&&d.jsx(wt,{variant:"close",size:"12"})]}),r]})},o)})}),A6=({edgeNotificationsPermissionTimeout:e,isNotificationsPermissionPromptOpen:t})=>{const{name:n}=nP(),[o,r]=v.useState(!1);return v.useEffect(()=>{if(!t||n!=="Edge")return;const i=setTimeout(()=>r(!0),e);return()=>clearTimeout(i)},[n,e,t]),v.useEffect(()=>{t&&!o||r(!1)},[t,o,r]),{hasEdgeNotificationsPermissionError:o}},E6=(e,t)=>{const{type:n,payload:o}=t;switch(n){case"completed":return{...e,[o.stepName]:{...e[o.stepName],isCompleted:!0}};case"skipped":return{...e,[o.stepName]:{isCompleted:!0,state:"denied"}};case"stateUpdated":{if(!o.state)throw Error('"stateUpdated" action invoked without state in payload');return{...e,[o.stepName]:{isCompleted:o.stepName===Ct.POPUPS?o.state==="granted":o.state!=="prompt",state:o.state}}}default:throw Error("Unknown action: "+n)}},j6=e=>{const{handleDeferredStep:t,handleOperationComplete:n}=e;window.getScreenDetails().catch(async()=>{const{state:o}=await navigator.permissions.query({name:jr.WINDOW_MANAGEMENT});o==="prompt"&&t()}).finally(n)},P6=e=>{const{handleDeferredStep:t,handleOperationComplete:n}=e;Notification.requestPermission().then(async()=>{const{state:o}=await navigator.permissions.query({name:jr.NOTIFICATIONS});o==="prompt"&&t()}).finally(n)},N6=e=>{const{handleDeferredStep:t,handleOperationComplete:n,dispatchAction:o}=e,r="about:blank",i="popup,width=1,height=1,top=9999,left=9999",a=window.open(r,void 0,i),s=window.open(r,void 0,i);a==null||a.close(),s==null||s.close();const c=!(a&&s);c&&t(),o({type:"stateUpdated",payload:{stepName:Ct.POPUPS,state:c?"denied":"granted"}}),n()},O6=e=>{const{dispatchAction:t}=e;t({type:"completed",payload:{stepName:Ct.PWA_INSTALL}})},T6={[Ct.WINDOW_MANAGEMENT]:j6,[Ct.NOTIFICATIONS]:P6,[Ct.POPUPS]:N6,[Ct.PWA_INSTALL]:O6},R6=({settings:e})=>{const{permission:t}=Dr(),[n,o]=mi("localStorage",Rs,Ls),[r,i]=v.useReducer(E6,LP),[a,s]=v.useState(!1),[c,l]=v.useState(!1),u=Dc.find(y=>!r[y.name].isCompleted);if(!u)throw new Error("All setup steps are completed. The SetupSteps component should not be used in such case.");const p=u.name,f=Dc[Dc.length-1].name,{hasEdgeNotificationsPermissionError:h}=A6({edgeNotificationsPermissionTimeout:e.edgeNotificationsPermissionTimeout,isNotificationsPermissionPromptOpen:c&&p===jr.NOTIFICATIONS}),m=()=>{s(!1),l(!0),T6[p]({handleDeferredStep:()=>s(!0),handleOperationComplete:()=>l(!1),dispatchAction:y=>i(y)}),p===f&&o({isCompleted:!0})},g=()=>{s(!1),i({type:"skipped",payload:{stepName:p}})};return v.useEffect(()=>{h&&(l(!1),s(!0))},[h]),v.useEffect(()=>{var y,x;s(!1),i({type:"stateUpdated",payload:{stepName:Ct.WINDOW_MANAGEMENT,state:jh?(y=t.statuses[Ct.WINDOW_MANAGEMENT])==null?void 0:y.state:"denied"}}),i({type:"stateUpdated",payload:{stepName:Ct.NOTIFICATIONS,state:(x=t.statuses[Ct.NOTIFICATIONS])==null?void 0:x.state}})},[t.statuses]),d.jsxs(ZI,{description:u.description,heading:u.heading,Image:u.Image,title:"Platform Setup",children:[d.jsx(S6,{activeStepName:p,showWarnIcon:a&&p!==Ct.POPUPS,stepsStatuses:r}),d.jsx("p",{className:"io-text-default-lh16",children:a?u.instructions.additional:u.instructions.initial}),d.jsxs(We,{children:[d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-primary setup-flow-btn",disabled:c,onClick:m,children:u.actionBtnText}),p!==f&&p!==Ct.WINDOW_MANAGEMENT&&d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-outline setup-flow-btn",disabled:c,onClick:g,children:"Skip"})]}),c&&d.jsx(WI,{})]})};const Qh=({components:{Logo:e=Fs,Loader:t=Br}={},settings:n={}})=>{const{permission:o}=Dr();return o.isLoading?d.jsx(t,{text:"Checking browser permissions..."}):d.jsx(GI,{Logo:e,children:d.jsx(R6,{settings:{...PP,...n}})})};const em=({errorMessage:e})=>{const t="https://support.interop.io",n=d.jsxs(d.Fragment,{children:["It seems that the following error prevents io.Connect Browser",d.jsx("br",{}),"from operating properly:",d.jsxs("span",{className:"browser-start-failed-error",children:["“",e,"”"]}),d.jsxs("span",{className:"help-center-info",children:["For further assistance, visit our"," ",d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"help center"}),"."]}),d.jsx("span",{className:"thank-you",children:"Thank you for your cooperation."})]});return d.jsx(GI,{Logo:Fs,children:d.jsx(ZI,{className:"io-init-error-card",heading:"Oops! io.Connect Browser couldn't start...",description:n,Image:jP,children:d.jsx(Sl,{className:"io-btn io-btn-lg io-btn-primary",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Visit the interop.io Help Center"})})})},XI=()=>d.jsxs(d.Fragment,{children:[d.jsx(bo,{tag:"h1",className:"login-title",text:"Making Your Work Flow",size:"large"}),d.jsxs("p",{className:"io-text-default-lh16 login-description",children:["Integrate apps, simplify user experiences and accelerate",d.jsx("br",{}),"digital transformation."]})]}),UI=({Logo:e,children:t,className:n})=>d.jsx("div",{className:"login-page-background",children:d.jsxs("div",{className:jo(n,"login-form-container flex flex-column ai-center"),children:[d.jsx(e,{}),t]})}),L6=({onLogin:e,isLoading:t,validationError:n,components:{Logo:o=Fs,Heading:r=XI,Loader:i=Br}={}})=>t?d.jsx(i,{text:"Verifying credentials..."}):d.jsxs(UI,{Logo:o,children:[d.jsx(r,{}),d.jsx(Ze,{className:"auth0-login-btn",onClick:e,size:"large",variant:"primary",children:"Log In"}),n&&d.jsx(dk,{variant:"critical",text:n.message})]}),$v=(e,t)=>{const n=t.value,o=n.trim().length>3;return{value:n,isValid:o}},_6=({onLogin:e,setIsLoading:t,loginError:n,setLoginError:o,userInputName:r="email"})=>{const[i,a]=v.useReducer($v,{value:"",isValid:!1}),[s,c]=v.useReducer($v,{value:"",isValid:!1}),[l,u]=v.useState(!1),[p,f]=v.useState(!1),{isValid:h}=i,{isValid:m}=s,g=h&&m,y=b=>a({value:b.target.value}),x=b=>c({value:b.target.value}),C=()=>{h||u(!0)},w=()=>{m||f(!0)},I=async b=>{if(b.preventDefault(),!!g){t(!0);try{await e(i.value,s.value)}catch(k){o(k)}t(!1)}};return d.jsxs("form",{className:"simple-login-form",onSubmit:I,children:[d.jsx(qn,{id:"user",errorMessage:l?`The ${r} is too short`:void 0,autoFocus:!0,autoComplete:"off",type:"text",placeholder:`Enter your ${r}`,value:i.value,onChange:y,onBlur:C,onFocus:()=>u(!1)}),d.jsx(qn,{id:"password",errorMessage:p?"The password is too short":void 0,autoComplete:"off",type:"password",placeholder:"Enter your password",value:s.value,onChange:x,onBlur:w,onFocus:()=>f(!1)}),d.jsx(Ze,{type:"submit",size:"large",variant:"primary",children:"Log In"}),n&&d.jsxs("div",{className:"login-error-feedback",children:[d.jsx(wt,{className:"error-icon",variant:"close",size:"12"}),n.message]})]})};const M6=({onLogin:e,userInputName:t,components:{Logo:n=Fs,Heading:o=XI,Loader:r=Br}={}})=>{const[i,a]=v.useState(!1),[s,c]=v.useState(null);return i?d.jsx(r,{text:"Verifying credentials..."}):d.jsxs(UI,{Logo:n,children:[d.jsx(o,{}),d.jsx(_6,{onLogin:e,setIsLoading:a,loginError:s,setLoginError:c,userInputName:t})]})};function D6(e,t){const[n,o]=v.useState(!0),r=v.useContext(Se.IOConnectContext);return v.useEffect(()=>{let i;return(async()=>{if(!r.workspaces)return;let a;try{a=await r.workspaces.getWorkspaceById(e)}catch(c){console.warn(c);return}const s=a.getAllGroups().find(c=>c.id===t);s&&(i=await s.onLockConfigurationChanged(({showAddWindowButton:c})=>{c!==void 0&&o(c)}),o(!!s.showAddWindowButton))})(),()=>i==null?void 0:i()},[e,t,r.workspaces]),n}const B6=({groupId:e,workspaceId:t})=>{const n=D6(t,e),o=v.useCallback(r=>{Ja.showAddApplicationPopup({bounds:r,groupId:e,workspaceId:t})},[e,t]);return n&&d.jsx(Ja.AddWindowButton,{title:"Add App",visible:n,showPopup:o})},H6=e=>d.jsx(Ja.GroupHeaderButtons,{...e,addWindow:{visible:!1,showPopup:e.addWindow.showPopup}}),G6=()=>null;const JI=({className:e,components:t,onClose:n,title:o})=>{const{NotificationsProvider:r,NotificationsPanelProvider:i,SettingsPanel:a}=Eh;return d.jsx(r,{children:d.jsx(i,{children:d.jsx(a,{className:e,components:t,onClose:n,title:o})})})};const YI=Xj.Panel;const{DIALOG_TEMPLATE_NAMES:W6,useActiveLayout:V6}=Dt,KI=({className:e,components:t,onClose:n,title:o})=>{const r=v.useContext(Se.IOConnectContext),{onLogout:i}=RC(),{setActiveLayout:a}=V6(),{login:{setIsLoggingOut:s}}=Dr(),c=v.useCallback(async()=>{var l;if("modals"in r&&r.modals){const u="log-out",{isEnterPressed:p,responseButtonClicked:f}=await r.modals.dialogs.request({templateName:W6.NO_INPUTS_CONFIRMATION_DIALOG,variables:{heading:"Logging out of io.Connect Browser",text:"This will terminate your session.",actionButtons:[{variant:"primary",text:"Log out",id:u,autofocus:!0},{variant:"outline",text:"Cancel",id:"cancel"}]}});if(!(p||(f==null?void 0:f.id)===u))return}Bo.flushSync(()=>s(!0)),a(null),await((l=r.webPlatform)==null?void 0:l.system.shutdown());try{i==null||i()}catch(u){console.error(u)}},[r,i]);return d.jsx(CC.Panel,{className:e,components:t,onClose:n,onLogout:c,title:o})},F6=[{name:"platformPreferences",displayName:"Platform Preferences",icon:"cog",onClick:e=>e(YI)},{name:"notificationSettings",displayName:"Notification Settings",icon:"bell",onClick:e=>e(JI),separatorAfter:!0},{name:"profile",displayName:"Profile",icon:"user",onClick:e=>e(KI)}],z6=e=>({onClose:t})=>d.jsx(e,{className:"system-menu-panel",onClose:t});const qI=({actions:e,panelWrapperClassName:t})=>{const[n,o]=v.useState(),r=v.useRef(null),i=CP(),a=v.useCallback(()=>o(void 0),[]),s=!!n;v.useEffect(()=>{!s||i!=="Escape"||a()},[s,i]);const c=v.useCallback((l,u)=>{const p=e.find(({name:h})=>h===u.name);if(!p){console.error(`Action named ${u.name} is not part of the provided list of actions: ${JSON.stringify(e)}!`);return}const f=h=>{const m=z6(h);o(()=>m)};p.onClick(f)},[e]);return MC({eventType:"mouseup",handler:a,ref:r,skip:!s}),_C({handler:a,skip:!s}),d.jsxs(d.Fragment,{children:[d.jsx(Ff,{buttonSize:"32",iconSize:"16",actions:e,onActionItemClick:c,icon:"ellipsis-vertical",buttonVariant:"circle",placement:"bottom-end",offset:[0,8],"data-testid":"system-menu-button",contextMenuDataTestId:"system-menu"}),d.jsx(BC,{className:jo("system-menu-panel-wrapper",t),isOpen:s,onClose:a,Panel:n,position:"right",ref:r})]})},$6=()=>d.jsx("li",{className:"default-header-system-menu",children:d.jsx(qI,{actions:F6})}),Z6=()=>{const{showNotificationBadge:e}=oP(),t=LC(),o=v.useMemo(()=>t.filter(({state:r})=>r==="Active"||r==="Stale"),[t]).length;return o>0&&e?d.jsx("div",{className:"io-badge io-badge-primary notifications-badge",children:o<100?o:"99+"}):null};const QI=e=>{const{className:t,active:n,...o}=e;return d.jsxs("div",{className:jo(t,"notifications-panel-button"),...o,children:[d.jsx(Ue,{icon:"bell",size:"32",iconSize:"16",variant:"circle"}),d.jsx(Z6,{})]})},ek=({className:e,components:t,onClose:n,settings:o,title:r})=>{const{NotificationsProvider:i,NotificationsPanelProvider:a,Panel:s}=Eh;return d.jsx(i,{children:d.jsx(a,{children:d.jsx(s,{className:e,components:t,onClose:n,settings:o,title:r})})})},tk=({Button:e=QI,Panel:t=ek,position:n="right",...o})=>{const r=LC(),i=v.useContext(Se.IOConnectContext),a=v.useCallback(async()=>{await Promise.all(r.map(({id:s})=>i.notifications.setState(s,"Seen")))},[r]);return d.jsx(Oh,{Button:e,Panel:t,position:n,onClose:a,...o})};const{WorkspaceTabsOverflowButton:Zv}=lk,X6=({workspaceTabsOverflow:e})=>d.jsxs(d.Fragment,{children:[Zv&&d.jsx(Zv,{visible:e==null?void 0:e.visible,title:e==null?void 0:e.title}),d.jsx(tk,{tag:"li"}),d.jsx($6,{})]}),tm=({onLogout:e,workspaces:t,launchpad:n,Loader:o=Br,isBeforeunloadDialogEnabled:r})=>{var g,y,x,C;const{LogoComponent:i,SystemButtonsComponent:a}=((g=t==null?void 0:t.components)==null?void 0:g.header)??{},{setPlatformWindow:s}=Nh(),{isInitialSetupCompleted:c}=Ib(),l=(y=window.iobrowser)==null?void 0:y.platformStarted,u=i??(l?HC:G6),p=a??(l?X6:void 0),f=Qj(),{login:{isLoggingOut:h}}=Dr();qj(r===!1||h),v.useEffect(()=>{l&&s({name:window.name})},[l,s]);const m=v.useMemo(()=>({onLogout:e,launchpadSettings:n==null?void 0:n.settings,launchpadComponents:n==null?void 0:n.components}),[e,n==null?void 0:n.settings,n==null?void 0:n.components]);return d.jsxs(TC.Provider,{value:m,children:[(!f||!c)&&d.jsx(o,{text:"Loading io.Connect Home..."}),d.jsx(Ja,{components:{...t==null?void 0:t.components,header:{...(x=t==null?void 0:t.components)==null?void 0:x.header,LogoComponent:u,SystemButtonsComponent:p},groupHeader:{AfterTabsComponent:B6,ButtonsComponent:H6,...(C=t==null?void 0:t.components)==null?void 0:C.groupHeader}}})]})},U6=It({id:xn,username:Ge(xn),email:Ge(xn),firstName:Ge(xn),lastName:Ge(xn),token:Ge(xn),password:Ge(xn)}),J6=({config:e})=>{var x,C,w,I;const{setupFlow:t,login:n,workspaces:o,launchpad:r,getIOConnectConfig:i}=e,[a,s]=mi("localStorage",iP,U6),[c]=mi("localStorage",Rs,Ls),[l,u]=v.useState(null),{login:{isLoggingOut:p}}=Dr(),f=Ph(),h=((x=e.components)==null?void 0:x.SystemLoader)??Br,m=((C=e.components)==null?void 0:C.IOInitErrorScreen)??em,g=v.useCallback(async(b,k)=>{const S=await n.onLogin(b,k);s(S)},[n,s]),y=v.useCallback(()=>{var b;(b=n.onLogout)==null||b.call(n),s(null),window.location.reload()},[n.onLogout,s]);return p?d.jsx(h,{text:"Logging out..."}):a?!(c!=null&&c.isCompleted)&&(t==null?void 0:t.enabled)!==!1&&!f?d.jsx(Qh,{settings:t==null?void 0:t.settings,components:{...t==null?void 0:t.components,Loader:h}}):l&&!l.message.includes("has already been started")?d.jsx(m,{errorMessage:l.message}):d.jsx(Se.IOConnectProvider,{settings:i({type:"simple",user:a}),onInitError:u,fallback:d.jsx(h,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(w=r==null?void 0:r.settings)==null?void 0:w.mode,children:d.jsx(tm,{workspaces:o,launchpad:r,onLogout:y,isBeforeunloadDialogEnabled:(I=e.settings)==null?void 0:I.isBeforeunloadDialogEnabled,Loader:h})})}):d.jsx(M6,{onLogin:g,userInputName:n.userInputName,components:{...n.components,Loader:h}})},Y6=It({message:xn}),K6=e=>{const t=HI(),[n,o]=v.useState(void 0),[r,i]=mi("sessionStorage",rP,Y6),a=v.useMemo(()=>t.user?(e==null?void 0:e(t.user))??{ok:!0}:null,[t.user,e]),s=(a==null?void 0:a.ok)===!1,c=t.isLoading||t.isAuthenticated&&!n,l=s||c,u=v.useMemo(()=>{var p;return a!=null&&a.ok&&((p=t.user)!=null&&p.email)&&n?{username:t.user.name,id:t.user.email,token:n}:null},[t.user,n,a==null?void 0:a.ok]);return v.useEffect(()=>{t.isAuthenticated&&t.getAccessTokenSilently().then(o).catch(console.warn)},[t]),v.useEffect(()=>{if(a){if(a.ok){i(null);return}i({message:a.message}),t.logout()}},[t,i,a]),{isLoading:l,validationError:r,user:u}},df={POPUP:"popup",REDIRECT:"redirect"},q6=({config:e})=>{var w,I,b,k;const t=HI(),{setupFlow:n,login:o,launchpad:r,workspaces:i,getIOConnectConfig:a}=e,{isLoading:s,validationError:c,user:l}=K6(o.validateUser),p=(o.loginType??df.REDIRECT)===df.REDIRECT?t.loginWithRedirect:t.loginWithPopup,[f]=mi("localStorage",Rs,Ls),[h,m]=v.useState(null),{login:{isLoggingOut:g}}=Dr(),y=Ph(),x=((w=e.components)==null?void 0:w.SystemLoader)??Br,C=((I=e.components)==null?void 0:I.IOInitErrorScreen)??em;return g?d.jsx(x,{text:"Logging out..."}):l?!(f!=null&&f.isCompleted)&&(n==null?void 0:n.enabled)!==!1&&!y?d.jsx(Qh,{settings:n==null?void 0:n.settings,components:{...n==null?void 0:n.components,Loader:x}}):h&&!h.message.includes("has already been started")?d.jsx(C,{errorMessage:h.message}):d.jsx(Se.IOConnectProvider,{settings:a({type:"auth0",user:{...t.user,id:l.id,token:l.token}}),onInitError:m,fallback:d.jsx(x,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(b=r==null?void 0:r.settings)==null?void 0:b.mode,children:d.jsx(tm,{workspaces:i,launchpad:r,onLogout:t.logout,isBeforeunloadDialogEnabled:(k=e.settings)==null?void 0:k.isBeforeunloadDialogEnabled,Loader:x})})}):d.jsx(L6,{onLogin:p,isLoading:s,validationError:c,components:{...o.components,Loader:x}})},Xv=({config:e})=>{var g,y,x,C;const{setupFlow:t,launchpad:n,workspaces:o,getIOConnectConfig:r}=e,{onLogout:i,user:a}=e.login??{},{isPlatformWindow:s}=Nh(),[c]=mi("localStorage",Rs,Ls),[l,u]=v.useState(null),{login:{isLoggingOut:p}}=Dr(),f=Ph(),h=((g=e.components)==null?void 0:g.SystemLoader)??Br,m=((y=e.components)==null?void 0:y.IOInitErrorScreen)??em;return p?d.jsx(h,{text:"Logging out..."}):!(c!=null&&c.isCompleted)&&(t==null?void 0:t.enabled)!==!1&&s&&!f?d.jsx(Qh,{settings:t==null?void 0:t.settings,components:{...t==null?void 0:t.components,Loader:h}}):l&&!l.message.includes("has already been started")?d.jsx(m,{errorMessage:l.message}):d.jsx(Se.IOConnectProvider,{settings:r({type:"custom",user:a}),onInitError:u,fallback:d.jsx(h,{text:"Initializing the platform..."}),children:d.jsx(Bl,{launchpadMode:(x=n==null?void 0:n.settings)==null?void 0:x.mode,children:d.jsx(tm,{workspaces:o,launchpad:n,onLogout:i,isBeforeunloadDialogEnabled:(C=e.settings)==null?void 0:C.isBeforeunloadDialogEnabled,Loader:h})})})},nk=It({Logo:Ge(rn().andThen(e=>Pn(e,"Logo"))),Heading:Ge(rn().andThen(e=>Pn(e,"Heading")))}),Q6=us(...Object.values(df).map(e=>Rr(e))),eO=It({type:Rr("auth0"),validateUser:Ge(rn().andThen(e=>Pn(e,"validateUser"))),loginType:Ge(Q6),providerOptions:rn(),components:Ge(nk)}),tO=It({type:Rr("simple"),onLogin:rn().andThen(e=>Pn(e,"onLogin")),onLogout:Ge(rn().andThen(e=>Pn(e,"onLogout"))),userInputName:Ge(xn),components:Ge(nk)}),nO=It({id:xn,username:xn}),oO=It({type:Rr("custom"),onLogout:rn().andThen(e=>Pn(e,"onLogout")),user:nO}),rO=us(eO,tO,oO),iO=It({edgeNotificationsPermissionTimeout:Ge(yP)}),aO=It({Logo:Ge(rn().andThen(e=>Pn(e,"Logo")))}),sO=It({enabled:Ge(ls()),components:Ge(aO),settings:Ge(iO)}),cO=It({components:Ge(rn())}),lO=It({BeforeSearch:us(Rr(null),Ge(rn().andThen(e=>Pn(e,"BeforeSearch")))),AfterSearch:us(Rr(null),Ge(rn().andThen(e=>Pn(e,"AfterSearch"))))}),uO=It({Component:rn().andThen(e=>Pn(e,"Component")),placementId:xn}),dO=It({header:Ge(lO),sections:Ge(gP(uO))}),pO=It({showHeader:Ge(ls()),showSearch:Ge(ls())}),fO=It({header:Ge(pO),mode:Ge(us(Rr("pinned"),Rr("default")))}),hO=It({components:Ge(dO),settings:Ge(fO)}),mO=It({SystemLoader:Ge(rn().andThen(e=>Pn(e,"SystemLoader"))),IOInitErrorScreen:Ge(rn().andThen(e=>Pn(e,"IOInitErrorScreen")))}),gO=It({isBeforeunloadDialogEnabled:Ge(ls())}),vO=It({getIOConnectConfig:rn().andThen(e=>Pn(e,"getIOConnectConfig")),login:Ge(rO),setupFlow:Ge(sO),workspaces:Ge(cO),launchpad:Ge(hO),components:Ge(mO),settings:Ge(gO)}),yO=({config:e})=>{var i;const t=v.useMemo(()=>vO.runWithException(e),[e]),n=t.login,{isPlatformWindow:o}=Nh();if(!n||!o){const{login:a,...s}=t;return d.jsx(Xv,{config:s})}if(n.type==="custom")return d.jsx(Xv,{config:t});if(n.type==="simple")return d.jsx(J6,{config:t});const{providerOptions:r}=n;return d.jsx(q9,{...r,authorizationParams:{...r.authorizationParams,redirect_uri:((i=r.authorizationParams)==null?void 0:i.redirect_uri)??window.location.origin},children:d.jsx(q6,{config:t})})};const bO=({config:e})=>d.jsx(IP,{children:d.jsx(yO,{config:e})}),wO=Dt.ApplicationsSection,xO=Dt.FavoritesSection,CO=Dt.Panel,IO=Dt.Body,kO=Dt.ContentsContainer,SO=Dt.Header,AO=Dt.PinButton,EO=Dt.Section,jO=Dt.WorkspacesSection,PO=Dt.useFavorites,NO=Dt.useIsLaunchpadCollapsed;exports.ApplicationsSection=wO;exports.FavoritesSection=xO;exports.IOActivePanelRenderer=y4;exports.IOConnectHome=bO;exports.IODownloadManager=JA;exports.IONotifications=Eh;exports.IOPreferencesDesktop=Dj;exports.IOProfile=CC;exports.Launchpad=CO;exports.LaunchpadAccess=HC;exports.LaunchpadBody=IO;exports.LaunchpadContentsContainer=kO;exports.LaunchpadHeader=SO;exports.LaunchpadPinButton=AO;exports.NotificationSettingsPanel=JI;exports.NotificationsPanel=ek;exports.NotificationsPanelButton=QI;exports.NotificationsPanelWithToggleButton=tk;exports.PanelWithToggleButton=Oh;exports.PlatformPrefsProvider=Bl;exports.PreferencesPanel=YI;exports.ProfilePanel=KI;exports.Section=EO;exports.SystemLoader=Br;exports.SystemMenu=qI;exports.WorkspacesSection=jO;exports.useFavorites=PO;exports.useIsLaunchpadCollapsed=NO;exports.usePlatformPref=St;exports.usePlatformPrefs=Ib;
89
89
  //# sourceMappingURL=index.js.map