@xras/ui 0.5.0 → 0.5.1

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/xras-ui.cjs CHANGED
@@ -290,7 +290,7 @@ Valid keys: `+JSON.stringify(Object.keys(Y),null," "));var Ae=ft(we,tt,Ne,le,ve
290
290
  Copyright (c) 2018 Jed Watson.
291
291
  Licensed under the MIT License (MIT), see
292
292
  http://jedwatson.github.io/classnames
293
- */(function(n){(function(){var r={}.hasOwnProperty;function i(){for(var d="",h=0;h<arguments.length;h++){var v=arguments[h];v&&(d=l(d,u(v)))}return d}function u(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return i.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var h="";for(var v in d)r.call(d,v)&&d[v]&&(h=l(h,v));return h}function l(d,h){return h?d?d+" "+h:d+h:d}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(qA);var J$=qA.exports;const qt=qp(J$);function iR(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function v0(n,r){return v0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,l){return u.__proto__=l,u},v0(n,r)}function q$(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,v0(n,r)}const N_={disabled:!1};var QA={},Q$=QA.NODE_ENV!=="production"?_t.oneOfType([_t.number,_t.shape({enter:_t.number,exit:_t.number,appear:_t.number}).isRequired]):null;QA.NODE_ENV!=="production"&&_t.oneOfType([_t.string,_t.shape({enter:_t.string,exit:_t.string,active:_t.string}),_t.shape({enter:_t.string,enterDone:_t.string,enterActive:_t.string,exit:_t.string,exitDone:_t.string,exitActive:_t.string})]);const KA=kr.createContext(null);var K$=function(r){return r.scrollTop},e3={},dm="unmounted",dc="exited",Zl="entering",pc="entered",h0="exiting",au=function(n){q$(r,n);function r(u,l){var d;d=n.call(this,u,l)||this;var h=l,v=h&&!h.isMounting?u.enter:u.appear,y;return d.appearStatus=null,u.in?v?(y=dc,d.appearStatus=Zl):y=pc:u.unmountOnExit||u.mountOnEnter?y=dm:y=dc,d.state={status:y},d.nextCallback=null,d}r.getDerivedStateFromProps=function(l,d){var h=l.in;return h&&d.status===dm?{status:dc}:null};var i=r.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(l){var d=null;if(l!==this.props){var h=this.state.status;this.props.in?h!==Zl&&h!==pc&&(d=Zl):(h===Zl||h===pc)&&(d=h0)}this.updateStatus(!1,d)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var l=this.props.timeout,d,h,v;return d=h=v=l,l!=null&&typeof l!="number"&&(d=l.exit,h=l.enter,v=l.appear!==void 0?l.appear:h),{exit:d,enter:h,appear:v}},i.updateStatus=function(l,d){if(l===void 0&&(l=!1),d!==null)if(this.cancelNextCallback(),d===Zl){if(this.props.unmountOnExit||this.props.mountOnEnter){var h=this.props.nodeRef?this.props.nodeRef.current:Bf.findDOMNode(this);h&&K$(h)}this.performEnter(l)}else this.performExit();else this.props.unmountOnExit&&this.state.status===dc&&this.setState({status:dm})},i.performEnter=function(l){var d=this,h=this.props.enter,v=this.context?this.context.isMounting:l,y=this.props.nodeRef?[v]:[Bf.findDOMNode(this),v],C=y[0],x=y[1],R=this.getTimeouts(),T=v?R.appear:R.enter;if(!l&&!h||N_.disabled){this.safeSetState({status:pc},function(){d.props.onEntered(C)});return}this.props.onEnter(C,x),this.safeSetState({status:Zl},function(){d.props.onEntering(C,x),d.onTransitionEnd(T,function(){d.safeSetState({status:pc},function(){d.props.onEntered(C,x)})})})},i.performExit=function(){var l=this,d=this.props.exit,h=this.getTimeouts(),v=this.props.nodeRef?void 0:Bf.findDOMNode(this);if(!d||N_.disabled){this.safeSetState({status:dc},function(){l.props.onExited(v)});return}this.props.onExit(v),this.safeSetState({status:h0},function(){l.props.onExiting(v),l.onTransitionEnd(h.exit,function(){l.safeSetState({status:dc},function(){l.props.onExited(v)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(l,d){d=this.setNextCallback(d),this.setState(l,d)},i.setNextCallback=function(l){var d=this,h=!0;return this.nextCallback=function(v){h&&(h=!1,d.nextCallback=null,l(v))},this.nextCallback.cancel=function(){h=!1},this.nextCallback},i.onTransitionEnd=function(l,d){this.setNextCallback(d);var h=this.props.nodeRef?this.props.nodeRef.current:Bf.findDOMNode(this),v=l==null&&!this.props.addEndListener;if(!h||v){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var y=this.props.nodeRef?[this.nextCallback]:[h,this.nextCallback],C=y[0],x=y[1];this.props.addEndListener(C,x)}l!=null&&setTimeout(this.nextCallback,l)},i.render=function(){var l=this.state.status;if(l===dm)return null;var d=this.props,h=d.children;d.in,d.mountOnEnter,d.unmountOnExit,d.appear,d.enter,d.exit,d.timeout,d.addEndListener,d.onEnter,d.onEntering,d.onEntered,d.onExit,d.onExiting,d.onExited,d.nodeRef;var v=iR(d,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return kr.createElement(KA.Provider,{value:null},typeof h=="function"?h(l,v):kr.cloneElement(kr.Children.only(h),v))},r}(kr.Component);au.contextType=KA;au.propTypes=e3.NODE_ENV!=="production"?{nodeRef:_t.shape({current:typeof Element>"u"?_t.any:function(n,r,i,u,l,d){var h=n[r];return _t.instanceOf(h&&"ownerDocument"in h?h.ownerDocument.defaultView.Element:Element)(n,r,i,u,l,d)}}),children:_t.oneOfType([_t.func.isRequired,_t.element.isRequired]).isRequired,in:_t.bool,mountOnEnter:_t.bool,unmountOnExit:_t.bool,appear:_t.bool,enter:_t.bool,exit:_t.bool,timeout:function(r){var i=Q$;r.addEndListener||(i=i.isRequired);for(var u=arguments.length,l=new Array(u>1?u-1:0),d=1;d<u;d++)l[d-1]=arguments[d];return i.apply(void 0,[r].concat(l))},addEndListener:_t.func,onEnter:_t.func,onEntering:_t.func,onEntered:_t.func,onExit:_t.func,onExiting:_t.func,onExited:_t.func}:{};function Dp(){}au.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Dp,onEntering:Dp,onEntered:Dp,onExit:Dp,onExiting:Dp,onExited:Dp};au.UNMOUNTED=dm;au.EXITED=dc;au.ENTERING=Zl;au.ENTERED=pc;au.EXITING=h0;const t3=au;function ev(n){return n&&n.ownerDocument||document}function n3(n){var r=ev(n);return r&&r.defaultView||window}function r3(n,r){return n3(n).getComputedStyle(n,r)}var a3=/([A-Z])/g;function i3(n){return n.replace(a3,"-$1").toLowerCase()}var o3=/^ms-/;function Db(n){return i3(n).replace(o3,"-ms-")}var s3=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function l3(n){return!!(n&&s3.test(n))}function Kl(n,r){var i="",u="";if(typeof r=="string")return n.style.getPropertyValue(Db(r))||r3(n).getPropertyValue(Db(r));Object.keys(r).forEach(function(l){var d=r[l];!d&&d!==0?n.style.removeProperty(Db(l)):l3(l)?u+=l+"("+d+") ":i+=Db(l)+": "+d+";"}),u&&(i+="transform: "+u+";"),n.style.cssText+=";"+i}const tv=!!(typeof window<"u"&&window.document&&window.document.createElement);var bw=!1,Cw=!1;try{var VE={get passive(){return bw=!0},get once(){return Cw=bw=!0}};tv&&(window.addEventListener("test",VE,VE),window.removeEventListener("test",VE,!0))}catch{}function oR(n,r,i,u){if(u&&typeof u!="boolean"&&!Cw){var l=u.once,d=u.capture,h=i;!Cw&&l&&(h=i.__once||function v(y){this.removeEventListener(r,v,d),i.call(this,y)},i.__once=h),n.addEventListener(r,h,bw?u:d)}n.addEventListener(r,i,u)}function xw(n,r,i,u){var l=u&&typeof u!="boolean"?u.capture:u;n.removeEventListener(r,i,l),i.__once&&n.removeEventListener(r,i.__once,l)}function ql(n,r,i,u){return oR(n,r,i,u),function(){xw(n,r,i,u)}}function u3(n,r,i,u){if(i===void 0&&(i=!1),u===void 0&&(u=!0),n){var l=document.createEvent("HTMLEvents");l.initEvent(r,i,u),n.dispatchEvent(l)}}function c3(n){var r=Kl(n,"transitionDuration")||"",i=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*i}function f3(n,r,i){i===void 0&&(i=5);var u=!1,l=setTimeout(function(){u||u3(n,"transitionend",!0)},r+i),d=ql(n,"transitionend",function(){u=!0},{once:!0});return function(){clearTimeout(l),d()}}function ej(n,r,i,u){i==null&&(i=c3(n)||0);var l=f3(n,i,u),d=ql(n,"transitionend",r);return function(){l(),d()}}function __(n,r){const i=Kl(n,r)||"",u=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*u}function tj(n,r){const i=__(n,"transitionDuration"),u=__(n,"transitionDelay"),l=ej(n,d=>{d.target===n&&(l(),r(d))},i+u)}function nj(n){n.offsetHeight}function m0(n){return n&&"setState"in n?Bf.findDOMNode(n):n??null}const d3=kr.forwardRef(({onEnter:n,onEntering:r,onEntered:i,onExit:u,onExiting:l,onExited:d,addEndListener:h,children:v,childRef:y,...C},x)=>{const R=M.useRef(null),T=ds(R,y),j=U=>{T(m0(U))},N=U=>J=>{U&&R.current&&U(R.current,J)},O=M.useCallback(N(n),[n]),_=M.useCallback(N(r),[r]),L=M.useCallback(N(i),[i]),F=M.useCallback(N(u),[u]),V=M.useCallback(N(l),[l]),H=M.useCallback(N(d),[d]),z=M.useCallback(N(h),[h]);return b.jsx(t3,{ref:x,...C,onEnter:O,onEntered:L,onEntering:_,onExit:F,onExited:H,onExiting:V,addEndListener:z,nodeRef:R,children:typeof v=="function"?(U,J)=>v(U,{...J,ref:j}):kr.cloneElement(v,{ref:j})})}),rj=d3,p3={[Zl]:"show",[pc]:"show"},aj=M.forwardRef(({className:n,children:r,transitionClasses:i={},onEnter:u,...l},d)=>{const h={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...l},v=M.useCallback((y,C)=>{nj(y),u==null||u(y,C)},[u]);return b.jsx(rj,{ref:d,addEndListener:tj,...h,onEnter:v,childRef:r.ref,children:(y,C)=>M.cloneElement(r,{...C,className:qt("fade",n,r.props.className,p3[y],i[y])})})});aj.displayName="Fade";const $p=aj;function sR(n){return typeof n=="boolean"?n?$p:aR:n}const ij=({transition:n,...r})=>b.jsx(JA,{...r,transition:sR(n)});ij.displayName="TabContainer";const v3=ij,h3=["xxl","xl","lg","md","sm","xs"],m3="xs",oj=M.createContext({prefixes:{},breakpoints:h3,minBreakpoint:m3});function bn(n,r){const{prefixes:i}=M.useContext(oj);return n||i[r]||r}function P0(){const{dir:n}=M.useContext(oj);return n==="rtl"}const sj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"tab-content"),b.jsx(i,{ref:l,className:qt(n,r),...u})));sj.displayName="TabContent";const lj=sj,uj=M.forwardRef(({bsPrefix:n,transition:r,...i},u)=>{const[{className:l,as:d="div",...h},{isActive:v,onEnter:y,onEntering:C,onEntered:x,onExit:R,onExiting:T,onExited:j,mountOnEnter:N,unmountOnExit:O,transition:_=$p}]=XA({...i,transition:sR(r)}),L=bn(n,"tab-pane");return b.jsx(Kp.Provider,{value:null,children:b.jsx(nu.Provider,{value:null,children:b.jsx(_,{in:v,onEnter:y,onEntering:C,onEntered:x,onExit:R,onExiting:T,onExited:j,mountOnEnter:N,unmountOnExit:O,children:b.jsx(d,{...h,ref:u,className:qt(l,L,v&&"active")})})})})});uj.displayName="TabPane";const cj=uj,g3={eventKey:_t.oneOfType([_t.string,_t.number]),title:_t.node.isRequired,disabled:_t.bool,tabClassName:_t.string,tabAttrs:_t.object},fj=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};fj.propTypes=g3;const kb=Object.assign(fj,{Container:v3,Content:lj,Pane:cj});function Rt(){return Rt=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},Rt.apply(this,arguments)}var y3={},b3=function(n,r,i,u,l,d,h,v){if(y3.NODE_ENV!=="production"&&r===void 0)throw new Error("invariant requires an error message argument");if(!n){var y;if(r===void 0)y=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var C=[i,u,l,d,h,v],x=0;y=new Error(r.replace(/%s/g,function(){return C[x++]})),y.name="Invariant Violation"}throw y.framesToPop=1,y}},C3=b3;const O_=qp(C3);function A_(n){return"default"+n.charAt(0).toUpperCase()+n.substr(1)}function x3(n){var r=S3(n,"string");return typeof r=="symbol"?r:String(r)}function S3(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var u=i.call(n,r||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function dj(n,r,i){var u=M.useRef(n!==void 0),l=M.useState(r),d=l[0],h=l[1],v=n!==void 0,y=u.current;return u.current=v,!v&&y&&d!==r&&h(r),[v?n:d,M.useCallback(function(C){for(var x=arguments.length,R=new Array(x>1?x-1:0),T=1;T<x;T++)R[T-1]=arguments[T];i&&i.apply(void 0,[C].concat(R)),h(C)},[i])]}function F0(n,r){return Object.keys(r).reduce(function(i,u){var l,d=i,h=d[A_(u)],v=d[u],y=iR(d,[A_(u),u].map(x3)),C=r[u],x=dj(v,h,n[C]),R=x[0],T=x[1];return Rt({},y,(l={},l[u]=R,l[C]=T,l))},n)}var j_={exports:{}},Sw={exports:{}};(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=i;function i(u){function l(h,v,y,C,x,R){var T=C||"<<anonymous>>",j=R||y;if(v[y]==null)return h?new Error("Required "+x+" `"+j+"` was not specified "+("in `"+T+"`.")):null;for(var N=arguments.length,O=Array(N>6?N-6:0),_=6;_<N;_++)O[_-6]=arguments[_];return u.apply(void 0,[v,y,T,x,j].concat(O))}var d=l.bind(null,!1);return d.isRequired=l.bind(null,!0),d}n.exports=r.default})(Sw,Sw.exports);var E3=Sw.exports;(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=d;var i=E3,u=l(i);function l(h){return h&&h.__esModule?h:{default:h}}function d(){for(var h=arguments.length,v=Array(h),y=0;y<h;y++)v[y]=arguments[y];function C(){for(var x=arguments.length,R=Array(x),T=0;T<x;T++)R[T]=arguments[T];var j=null;return v.forEach(function(N){if(j==null){var O=N.apply(void 0,R);O!=null&&(j=O)}}),j}return(0,u.default)(C)}n.exports=r.default})(j_,j_.exports);var w3=Function.prototype.bind.call(Function.prototype.call,[].slice);function Jl(n,r){return w3(n.querySelectorAll(r))}function pj(){const[,n]=M.useReducer(r=>!r,!1);return n}const vj=M.createContext(null);vj.displayName="NavContext";const lR=vj,R3="data-rr-ui-",T3="rrUi";function nv(n){return`${R3}${n}`}function I3(n){return`${T3}${n}`}const N3=["as","disabled"];function _3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function O3(n){return!n||n.trim()==="#"}function uR({tagName:n,disabled:r,href:i,target:u,rel:l,role:d,onClick:h,tabIndex:v=0,type:y}){n||(i!=null||u!=null||l!=null?n="a":n="button");const C={tagName:n};if(n==="button")return[{type:y||"button",disabled:r},C];const x=T=>{if((r||n==="a"&&O3(i))&&T.preventDefault(),r){T.stopPropagation();return}h==null||h(T)},R=T=>{T.key===" "&&(T.preventDefault(),x(T))};return n==="a"&&(i||(i="#"),r&&(i=void 0)),[{role:d??"button",disabled:void 0,tabIndex:r?void 0:v,href:i,target:n==="a"?u:void 0,"aria-disabled":r||void 0,rel:n==="a"?l:void 0,onClick:x,onKeyDown:R},C]}const cR=M.forwardRef((n,r)=>{let{as:i,disabled:u}=n,l=_3(n,N3);const[d,{tagName:h}]=uR(Object.assign({tagName:i,disabled:u},l));return b.jsx(h,Object.assign({},l,d,{ref:r}))});cR.displayName="Button";const A3=["as","active","eventKey"];function j3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function hj({key:n,onClick:r,active:i,id:u,role:l,disabled:d}){const h=M.useContext(nu),v=M.useContext(lR),y=M.useContext(Kp);let C=i;const x={role:l};if(v){!l&&v.role==="tablist"&&(x.role="tab");const R=v.getControllerId(n??null),T=v.getControlledId(n??null);x[nv("event-key")]=n,x.id=R||u,C=i==null&&n!=null?v.activeKey===n:i,(C||!(y!=null&&y.unmountOnExit)&&!(y!=null&&y.mountOnEnter))&&(x["aria-controls"]=T)}return x.role==="tab"&&(x["aria-selected"]=C,C||(x.tabIndex=-1),d&&(x.tabIndex=-1,x["aria-disabled"]=!0)),x.onClick=gr(R=>{d||(r==null||r(R),n!=null&&h&&!R.isPropagationStopped()&&h(n,R))}),[x,{isActive:C}]}const mj=M.forwardRef((n,r)=>{let{as:i=cR,active:u,eventKey:l}=n,d=j3(n,A3);const[h,v]=hj(Object.assign({key:Wf(l,d.href),active:u},d));return h[nv("active")]=v.isActive,b.jsx(i,Object.assign({},d,h,{ref:r}))});mj.displayName="NavItem";const D3=mj,k3=["as","onSelect","activeKey","role","onKeyDown"];function M3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const D_=()=>{},k_=nv("event-key"),gj=M.forwardRef((n,r)=>{let{as:i="div",onSelect:u,activeKey:l,role:d,onKeyDown:h}=n,v=M3(n,k3);const y=pj(),C=M.useRef(!1),x=M.useContext(nu),R=M.useContext(Kp);let T,j;R&&(d=d||"tablist",l=R.activeKey,T=R.getControlledId,j=R.getControllerId);const N=M.useRef(null),O=V=>{const H=N.current;if(!H)return null;const z=Jl(H,`[${k_}]:not([aria-disabled=true])`),U=H.querySelector("[aria-selected=true]");if(!U||U!==document.activeElement)return null;const J=z.indexOf(U);if(J===-1)return null;let q=J+V;return q>=z.length&&(q=0),q<0&&(q=z.length-1),z[q]},_=(V,H)=>{V!=null&&(u==null||u(V,H),x==null||x(V,H))},L=V=>{if(h==null||h(V),!R)return;let H;switch(V.key){case"ArrowLeft":case"ArrowUp":H=O(-1);break;case"ArrowRight":case"ArrowDown":H=O(1);break;default:return}H&&(V.preventDefault(),_(H.dataset[I3("EventKey")]||null,V),C.current=!0,y())};M.useEffect(()=>{if(N.current&&C.current){const V=N.current.querySelector(`[${k_}][aria-selected=true]`);V==null||V.focus()}C.current=!1});const F=ds(r,N);return b.jsx(nu.Provider,{value:_,children:b.jsx(lR.Provider,{value:{role:d,activeKey:Wf(l),getControlledId:T||D_,getControllerId:j||D_},children:b.jsx(i,Object.assign({},v,{onKeyDown:L,ref:F,role:d}))})})});gj.displayName="Nav";const L3=Object.assign(gj,{Item:D3}),yj=M.createContext(null);yj.displayName="NavbarContext";const bj=yj,Cj=M.createContext(null);Cj.displayName="CardHeaderContext";const P3=Cj,xj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"nav-item"),b.jsx(i,{ref:l,className:qt(n,r),...u})));xj.displayName="NavItem";const Sj=xj;function g0(){return M.useState(null)}function F3(n,r,i,u=!1){const l=gr(i);M.useEffect(()=>{const d=typeof n=="function"?n():n;return d.addEventListener(r,l,u),()=>d.removeEventListener(r,l,u)},[n])}function fR(){const n=M.useRef(!0),r=M.useRef(()=>n.current);return M.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),r.current}function Ej(n){const r=M.useRef(null);return M.useEffect(()=>{r.current=n}),r.current}const V3=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",B3=typeof document<"u",y0=B3||V3?M.useLayoutEffect:M.useEffect,z3=["onKeyDown"];function H3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function U3(n){return!n||n.trim()==="#"}const wj=M.forwardRef((n,r)=>{let{onKeyDown:i}=n,u=H3(n,z3);const[l]=uR(Object.assign({tagName:"a"},u)),d=gr(h=>{l.onKeyDown(h),i==null||i(h)});return U3(u.href)||u.role==="button"?b.jsx("a",Object.assign({ref:r},u,l,{onKeyDown:d})):b.jsx("a",Object.assign({ref:r},u,{onKeyDown:i}))});wj.displayName="Anchor";const Rj=wj,Tj=M.forwardRef(({bsPrefix:n,className:r,as:i=Rj,active:u,eventKey:l,disabled:d=!1,...h},v)=>{n=bn(n,"nav-link");const[y,C]=hj({key:Wf(l,h.href),active:u,disabled:d,...h});return b.jsx(i,{...h,...y,ref:v,disabled:d,className:qt(r,n,d&&"disabled",C.isActive&&"active")})});Tj.displayName="NavLink";const Ij=Tj,Nj=M.forwardRef((n,r)=>{const{as:i="div",bsPrefix:u,variant:l,fill:d=!1,justify:h=!1,navbar:v,navbarScroll:y,className:C,activeKey:x,...R}=F0(n,{activeKey:"onSelect"}),T=bn(u,"nav");let j,N,O=!1;const _=M.useContext(bj),L=M.useContext(P3);return _?(j=_.bsPrefix,O=v??!0):L&&({cardHeaderBsPrefix:N}=L),b.jsx(L3,{as:i,ref:r,activeKey:x,className:qt(C,{[T]:!O,[`${j}-nav`]:O,[`${j}-nav-scroll`]:O&&y,[`${N}-${l}`]:!!N,[`${T}-${l}`]:!!l,[`${T}-fill`]:d,[`${T}-justified`]:h}),...R})});Nj.displayName="Nav";const $3=Object.assign(Nj,{Item:Sj,Link:Ij});function M_(n,r){let i=0;return M.Children.map(n,u=>M.isValidElement(u)?r(u,i++):u)}function G3(n,r){let i=0;M.Children.forEach(n,u=>{M.isValidElement(u)&&r(u,i++)})}function W3(n){let r;return G3(n,i=>{r==null&&(r=i.props.eventKey)}),r}function X3(n){const{title:r,eventKey:i,disabled:u,tabClassName:l,tabAttrs:d,id:h}=n.props;return r==null?null:b.jsx(Sj,{as:"li",role:"presentation",children:b.jsx(Ij,{as:"button",type:"button",eventKey:i,disabled:u,id:h,className:l,...d,children:r})})}const _j=n=>{const{id:r,onSelect:i,transition:u,mountOnEnter:l=!1,unmountOnExit:d=!1,variant:h="tabs",children:v,activeKey:y=W3(v),...C}=F0(n,{activeKey:"onSelect"});return b.jsxs(JA,{id:r,activeKey:y,onSelect:i,transition:sR(u),mountOnEnter:l,unmountOnExit:d,children:[b.jsx($3,{...C,role:"tablist",as:"ul",variant:h,children:M_(v,X3)}),b.jsx(lj,{children:M_(v,x=>{const R={...x.props};return delete R.title,delete R.disabled,delete R.tabClassName,delete R.tabAttrs,b.jsx(cj,{...R})})})]})};_j.displayName="Tabs";const Y3=_j,Z3=M.createContext(null),V0=Z3;var L_=Object.prototype.hasOwnProperty;function P_(n,r,i){for(i of n.keys())if(pm(i,r))return i}function pm(n,r){var i,u,l;if(n===r)return!0;if(n&&r&&(i=n.constructor)===r.constructor){if(i===Date)return n.getTime()===r.getTime();if(i===RegExp)return n.toString()===r.toString();if(i===Array){if((u=n.length)===r.length)for(;u--&&pm(n[u],r[u]););return u===-1}if(i===Set){if(n.size!==r.size)return!1;for(u of n)if(l=u,l&&typeof l=="object"&&(l=P_(r,l),!l)||!r.has(l))return!1;return!0}if(i===Map){if(n.size!==r.size)return!1;for(u of n)if(l=u[0],l&&typeof l=="object"&&(l=P_(r,l),!l)||!pm(u[1],r.get(l)))return!1;return!0}if(i===ArrayBuffer)n=new Uint8Array(n),r=new Uint8Array(r);else if(i===DataView){if((u=n.byteLength)===r.byteLength)for(;u--&&n.getInt8(u)===r.getInt8(u););return u===-1}if(ArrayBuffer.isView(n)){if((u=n.byteLength)===r.byteLength)for(;u--&&n[u]===r[u];);return u===-1}if(!i||typeof n=="object"){u=0;for(i in n)if(L_.call(n,i)&&++u&&!L_.call(r,i)||!(i in r)||!pm(n[i],r[i]))return!1;return Object.keys(r).length===u}}return n!==n&&r!==r}function J3(n){const r=fR();return[n[0],M.useCallback(i=>{if(r())return n[1](i)},[r,n[1]])]}var Oi="top",wo="bottom",Ro="right",Ai="left",dR="auto",Am=[Oi,wo,Ro,Ai],Gp="start",bm="end",q3="clippingParents",Oj="viewport",am="popper",Q3="reference",F_=Am.reduce(function(n,r){return n.concat([r+"-"+Gp,r+"-"+bm])},[]),Aj=[].concat(Am,[dR]).reduce(function(n,r){return n.concat([r,r+"-"+Gp,r+"-"+bm])},[]),K3="beforeRead",eG="read",tG="afterRead",nG="beforeMain",rG="main",aG="afterMain",iG="beforeWrite",oG="write",sG="afterWrite",lG=[K3,eG,tG,nG,rG,aG,iG,oG,sG];function Ks(n){return n.split("-")[0]}function qi(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var r=n.ownerDocument;return r&&r.defaultView||window}return n}function Xf(n){var r=qi(n).Element;return n instanceof r||n instanceof Element}function el(n){var r=qi(n).HTMLElement;return n instanceof r||n instanceof HTMLElement}function pR(n){if(typeof ShadowRoot>"u")return!1;var r=qi(n).ShadowRoot;return n instanceof r||n instanceof ShadowRoot}var Uf=Math.max,b0=Math.min,Wp=Math.round;function Ew(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(r){return r.brand+"/"+r.version}).join(" "):navigator.userAgent}function jj(){return!/^((?!chrome|android).)*safari/i.test(Ew())}function Xp(n,r,i){r===void 0&&(r=!1),i===void 0&&(i=!1);var u=n.getBoundingClientRect(),l=1,d=1;r&&el(n)&&(l=n.offsetWidth>0&&Wp(u.width)/n.offsetWidth||1,d=n.offsetHeight>0&&Wp(u.height)/n.offsetHeight||1);var h=Xf(n)?qi(n):window,v=h.visualViewport,y=!jj()&&i,C=(u.left+(y&&v?v.offsetLeft:0))/l,x=(u.top+(y&&v?v.offsetTop:0))/d,R=u.width/l,T=u.height/d;return{width:R,height:T,top:x,right:C+R,bottom:x+T,left:C,x:C,y:x}}function vR(n){var r=Xp(n),i=n.offsetWidth,u=n.offsetHeight;return Math.abs(r.width-i)<=1&&(i=r.width),Math.abs(r.height-u)<=1&&(u=r.height),{x:n.offsetLeft,y:n.offsetTop,width:i,height:u}}function Dj(n,r){var i=r.getRootNode&&r.getRootNode();if(n.contains(r))return!0;if(i&&pR(i)){var u=r;do{if(u&&n.isSameNode(u))return!0;u=u.parentNode||u.host}while(u)}return!1}function gc(n){return n?(n.nodeName||"").toLowerCase():null}function ru(n){return qi(n).getComputedStyle(n)}function uG(n){return["table","td","th"].indexOf(gc(n))>=0}function yc(n){return((Xf(n)?n.ownerDocument:n.document)||window.document).documentElement}function B0(n){return gc(n)==="html"?n:n.assignedSlot||n.parentNode||(pR(n)?n.host:null)||yc(n)}function V_(n){return!el(n)||ru(n).position==="fixed"?null:n.offsetParent}function cG(n){var r=/firefox/i.test(Ew()),i=/Trident/i.test(Ew());if(i&&el(n)){var u=ru(n);if(u.position==="fixed")return null}var l=B0(n);for(pR(l)&&(l=l.host);el(l)&&["html","body"].indexOf(gc(l))<0;){var d=ru(l);if(d.transform!=="none"||d.perspective!=="none"||d.contain==="paint"||["transform","perspective"].indexOf(d.willChange)!==-1||r&&d.willChange==="filter"||r&&d.filter&&d.filter!=="none")return l;l=l.parentNode}return null}function jm(n){for(var r=qi(n),i=V_(n);i&&uG(i)&&ru(i).position==="static";)i=V_(i);return i&&(gc(i)==="html"||gc(i)==="body"&&ru(i).position==="static")?r:i||cG(n)||r}function hR(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function vm(n,r,i){return Uf(n,b0(r,i))}function fG(n,r,i){var u=vm(n,r,i);return u>i?i:u}function kj(){return{top:0,right:0,bottom:0,left:0}}function Mj(n){return Object.assign({},kj(),n)}function Lj(n,r){return r.reduce(function(i,u){return i[u]=n,i},{})}var dG=function(r,i){return r=typeof r=="function"?r(Object.assign({},i.rects,{placement:i.placement})):r,Mj(typeof r!="number"?r:Lj(r,Am))};function pG(n){var r,i=n.state,u=n.name,l=n.options,d=i.elements.arrow,h=i.modifiersData.popperOffsets,v=Ks(i.placement),y=hR(v),C=[Ai,Ro].indexOf(v)>=0,x=C?"height":"width";if(!(!d||!h)){var R=dG(l.padding,i),T=vR(d),j=y==="y"?Oi:Ai,N=y==="y"?wo:Ro,O=i.rects.reference[x]+i.rects.reference[y]-h[y]-i.rects.popper[x],_=h[y]-i.rects.reference[y],L=jm(d),F=L?y==="y"?L.clientHeight||0:L.clientWidth||0:0,V=O/2-_/2,H=R[j],z=F-T[x]-R[N],U=F/2-T[x]/2+V,J=vm(H,U,z),q=y;i.modifiersData[u]=(r={},r[q]=J,r.centerOffset=J-U,r)}}function vG(n){var r=n.state,i=n.options,u=i.element,l=u===void 0?"[data-popper-arrow]":u;l!=null&&(typeof l=="string"&&(l=r.elements.popper.querySelector(l),!l)||Dj(r.elements.popper,l)&&(r.elements.arrow=l))}const hG={name:"arrow",enabled:!0,phase:"main",fn:pG,effect:vG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yp(n){return n.split("-")[1]}var mG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gG(n,r){var i=n.x,u=n.y,l=r.devicePixelRatio||1;return{x:Wp(i*l)/l||0,y:Wp(u*l)/l||0}}function B_(n){var r,i=n.popper,u=n.popperRect,l=n.placement,d=n.variation,h=n.offsets,v=n.position,y=n.gpuAcceleration,C=n.adaptive,x=n.roundOffsets,R=n.isFixed,T=h.x,j=T===void 0?0:T,N=h.y,O=N===void 0?0:N,_=typeof x=="function"?x({x:j,y:O}):{x:j,y:O};j=_.x,O=_.y;var L=h.hasOwnProperty("x"),F=h.hasOwnProperty("y"),V=Ai,H=Oi,z=window;if(C){var U=jm(i),J="clientHeight",q="clientWidth";if(U===qi(i)&&(U=yc(i),ru(U).position!=="static"&&v==="absolute"&&(J="scrollHeight",q="scrollWidth")),U=U,l===Oi||(l===Ai||l===Ro)&&d===bm){H=wo;var Re=R&&U===z&&z.visualViewport?z.visualViewport.height:U[J];O-=Re-u.height,O*=y?1:-1}if(l===Ai||(l===Oi||l===wo)&&d===bm){V=Ro;var he=R&&U===z&&z.visualViewport?z.visualViewport.width:U[q];j-=he-u.width,j*=y?1:-1}}var ge=Object.assign({position:v},C&&mG),fe=x===!0?gG({x:j,y:O},qi(i)):{x:j,y:O};if(j=fe.x,O=fe.y,y){var Oe;return Object.assign({},ge,(Oe={},Oe[H]=F?"0":"",Oe[V]=L?"0":"",Oe.transform=(z.devicePixelRatio||1)<=1?"translate("+j+"px, "+O+"px)":"translate3d("+j+"px, "+O+"px, 0)",Oe))}return Object.assign({},ge,(r={},r[H]=F?O+"px":"",r[V]=L?j+"px":"",r.transform="",r))}function yG(n){var r=n.state,i=n.options,u=i.gpuAcceleration,l=u===void 0?!0:u,d=i.adaptive,h=d===void 0?!0:d,v=i.roundOffsets,y=v===void 0?!0:v,C={placement:Ks(r.placement),variation:Yp(r.placement),popper:r.elements.popper,popperRect:r.rects.popper,gpuAcceleration:l,isFixed:r.options.strategy==="fixed"};r.modifiersData.popperOffsets!=null&&(r.styles.popper=Object.assign({},r.styles.popper,B_(Object.assign({},C,{offsets:r.modifiersData.popperOffsets,position:r.options.strategy,adaptive:h,roundOffsets:y})))),r.modifiersData.arrow!=null&&(r.styles.arrow=Object.assign({},r.styles.arrow,B_(Object.assign({},C,{offsets:r.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:y})))),r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-placement":r.placement})}const bG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yG,data:{}};var Mb={passive:!0};function CG(n){var r=n.state,i=n.instance,u=n.options,l=u.scroll,d=l===void 0?!0:l,h=u.resize,v=h===void 0?!0:h,y=qi(r.elements.popper),C=[].concat(r.scrollParents.reference,r.scrollParents.popper);return d&&C.forEach(function(x){x.addEventListener("scroll",i.update,Mb)}),v&&y.addEventListener("resize",i.update,Mb),function(){d&&C.forEach(function(x){x.removeEventListener("scroll",i.update,Mb)}),v&&y.removeEventListener("resize",i.update,Mb)}}const xG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:CG,data:{}};var SG={left:"right",right:"left",bottom:"top",top:"bottom"};function qb(n){return n.replace(/left|right|bottom|top/g,function(r){return SG[r]})}var EG={start:"end",end:"start"};function z_(n){return n.replace(/start|end/g,function(r){return EG[r]})}function mR(n){var r=qi(n),i=r.pageXOffset,u=r.pageYOffset;return{scrollLeft:i,scrollTop:u}}function gR(n){return Xp(yc(n)).left+mR(n).scrollLeft}function wG(n,r){var i=qi(n),u=yc(n),l=i.visualViewport,d=u.clientWidth,h=u.clientHeight,v=0,y=0;if(l){d=l.width,h=l.height;var C=jj();(C||!C&&r==="fixed")&&(v=l.offsetLeft,y=l.offsetTop)}return{width:d,height:h,x:v+gR(n),y}}function RG(n){var r,i=yc(n),u=mR(n),l=(r=n.ownerDocument)==null?void 0:r.body,d=Uf(i.scrollWidth,i.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),h=Uf(i.scrollHeight,i.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),v=-u.scrollLeft+gR(n),y=-u.scrollTop;return ru(l||i).direction==="rtl"&&(v+=Uf(i.clientWidth,l?l.clientWidth:0)-d),{width:d,height:h,x:v,y}}function yR(n){var r=ru(n),i=r.overflow,u=r.overflowX,l=r.overflowY;return/auto|scroll|overlay|hidden/.test(i+l+u)}function Pj(n){return["html","body","#document"].indexOf(gc(n))>=0?n.ownerDocument.body:el(n)&&yR(n)?n:Pj(B0(n))}function hm(n,r){var i;r===void 0&&(r=[]);var u=Pj(n),l=u===((i=n.ownerDocument)==null?void 0:i.body),d=qi(u),h=l?[d].concat(d.visualViewport||[],yR(u)?u:[]):u,v=r.concat(h);return l?v:v.concat(hm(B0(h)))}function ww(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function TG(n,r){var i=Xp(n,!1,r==="fixed");return i.top=i.top+n.clientTop,i.left=i.left+n.clientLeft,i.bottom=i.top+n.clientHeight,i.right=i.left+n.clientWidth,i.width=n.clientWidth,i.height=n.clientHeight,i.x=i.left,i.y=i.top,i}function H_(n,r,i){return r===Oj?ww(wG(n,i)):Xf(r)?TG(r,i):ww(RG(yc(n)))}function IG(n){var r=hm(B0(n)),i=["absolute","fixed"].indexOf(ru(n).position)>=0,u=i&&el(n)?jm(n):n;return Xf(u)?r.filter(function(l){return Xf(l)&&Dj(l,u)&&gc(l)!=="body"}):[]}function NG(n,r,i,u){var l=r==="clippingParents"?IG(n):[].concat(r),d=[].concat(l,[i]),h=d[0],v=d.reduce(function(y,C){var x=H_(n,C,u);return y.top=Uf(x.top,y.top),y.right=b0(x.right,y.right),y.bottom=b0(x.bottom,y.bottom),y.left=Uf(x.left,y.left),y},H_(n,h,u));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}function Fj(n){var r=n.reference,i=n.element,u=n.placement,l=u?Ks(u):null,d=u?Yp(u):null,h=r.x+r.width/2-i.width/2,v=r.y+r.height/2-i.height/2,y;switch(l){case Oi:y={x:h,y:r.y-i.height};break;case wo:y={x:h,y:r.y+r.height};break;case Ro:y={x:r.x+r.width,y:v};break;case Ai:y={x:r.x-i.width,y:v};break;default:y={x:r.x,y:r.y}}var C=l?hR(l):null;if(C!=null){var x=C==="y"?"height":"width";switch(d){case Gp:y[C]=y[C]-(r[x]/2-i[x]/2);break;case bm:y[C]=y[C]+(r[x]/2-i[x]/2);break}}return y}function Cm(n,r){r===void 0&&(r={});var i=r,u=i.placement,l=u===void 0?n.placement:u,d=i.strategy,h=d===void 0?n.strategy:d,v=i.boundary,y=v===void 0?q3:v,C=i.rootBoundary,x=C===void 0?Oj:C,R=i.elementContext,T=R===void 0?am:R,j=i.altBoundary,N=j===void 0?!1:j,O=i.padding,_=O===void 0?0:O,L=Mj(typeof _!="number"?_:Lj(_,Am)),F=T===am?Q3:am,V=n.rects.popper,H=n.elements[N?F:T],z=NG(Xf(H)?H:H.contextElement||yc(n.elements.popper),y,x,h),U=Xp(n.elements.reference),J=Fj({reference:U,element:V,strategy:"absolute",placement:l}),q=ww(Object.assign({},V,J)),Re=T===am?q:U,he={top:z.top-Re.top+L.top,bottom:Re.bottom-z.bottom+L.bottom,left:z.left-Re.left+L.left,right:Re.right-z.right+L.right},ge=n.modifiersData.offset;if(T===am&&ge){var fe=ge[l];Object.keys(he).forEach(function(Oe){var Te=[Ro,wo].indexOf(Oe)>=0?1:-1,xe=[Oi,wo].indexOf(Oe)>=0?"y":"x";he[Oe]+=fe[xe]*Te})}return he}function _G(n,r){r===void 0&&(r={});var i=r,u=i.placement,l=i.boundary,d=i.rootBoundary,h=i.padding,v=i.flipVariations,y=i.allowedAutoPlacements,C=y===void 0?Aj:y,x=Yp(u),R=x?v?F_:F_.filter(function(N){return Yp(N)===x}):Am,T=R.filter(function(N){return C.indexOf(N)>=0});T.length===0&&(T=R);var j=T.reduce(function(N,O){return N[O]=Cm(n,{placement:O,boundary:l,rootBoundary:d,padding:h})[Ks(O)],N},{});return Object.keys(j).sort(function(N,O){return j[N]-j[O]})}function OG(n){if(Ks(n)===dR)return[];var r=qb(n);return[z_(n),r,z_(r)]}function AG(n){var r=n.state,i=n.options,u=n.name;if(!r.modifiersData[u]._skip){for(var l=i.mainAxis,d=l===void 0?!0:l,h=i.altAxis,v=h===void 0?!0:h,y=i.fallbackPlacements,C=i.padding,x=i.boundary,R=i.rootBoundary,T=i.altBoundary,j=i.flipVariations,N=j===void 0?!0:j,O=i.allowedAutoPlacements,_=r.options.placement,L=Ks(_),F=L===_,V=y||(F||!N?[qb(_)]:OG(_)),H=[_].concat(V).reduce(function(Se,Ne){return Se.concat(Ks(Ne)===dR?_G(r,{placement:Ne,boundary:x,rootBoundary:R,padding:C,flipVariations:N,allowedAutoPlacements:O}):Ne)},[]),z=r.rects.reference,U=r.rects.popper,J=new Map,q=!0,Re=H[0],he=0;he<H.length;he++){var ge=H[he],fe=Ks(ge),Oe=Yp(ge)===Gp,Te=[Oi,wo].indexOf(fe)>=0,xe=Te?"width":"height",je=Cm(r,{placement:ge,boundary:x,rootBoundary:R,altBoundary:T,padding:C}),Le=Te?Oe?Ro:Ai:Oe?wo:Oi;z[xe]>U[xe]&&(Le=qb(Le));var ne=qb(Le),_e=[];if(d&&_e.push(je[fe]<=0),v&&_e.push(je[Le]<=0,je[ne]<=0),_e.every(function(Se){return Se})){Re=ge,q=!1;break}J.set(ge,_e)}if(q)for(var G=N?3:1,Y=function(Ne){var le=H.find(function(ve){var we=J.get(ve);if(we)return we.slice(0,Ne).every(function(Ve){return Ve})});if(le)return Re=le,"break"},re=G;re>0;re--){var ye=Y(re);if(ye==="break")break}r.placement!==Re&&(r.modifiersData[u]._skip=!0,r.placement=Re,r.reset=!0)}}const jG={name:"flip",enabled:!0,phase:"main",fn:AG,requiresIfExists:["offset"],data:{_skip:!1}};function U_(n,r,i){return i===void 0&&(i={x:0,y:0}),{top:n.top-r.height-i.y,right:n.right-r.width+i.x,bottom:n.bottom-r.height+i.y,left:n.left-r.width-i.x}}function $_(n){return[Oi,Ro,wo,Ai].some(function(r){return n[r]>=0})}function DG(n){var r=n.state,i=n.name,u=r.rects.reference,l=r.rects.popper,d=r.modifiersData.preventOverflow,h=Cm(r,{elementContext:"reference"}),v=Cm(r,{altBoundary:!0}),y=U_(h,u),C=U_(v,l,d),x=$_(y),R=$_(C);r.modifiersData[i]={referenceClippingOffsets:y,popperEscapeOffsets:C,isReferenceHidden:x,hasPopperEscaped:R},r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-reference-hidden":x,"data-popper-escaped":R})}const kG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:DG};function MG(n,r,i){var u=Ks(n),l=[Ai,Oi].indexOf(u)>=0?-1:1,d=typeof i=="function"?i(Object.assign({},r,{placement:n})):i,h=d[0],v=d[1];return h=h||0,v=(v||0)*l,[Ai,Ro].indexOf(u)>=0?{x:v,y:h}:{x:h,y:v}}function LG(n){var r=n.state,i=n.options,u=n.name,l=i.offset,d=l===void 0?[0,0]:l,h=Aj.reduce(function(x,R){return x[R]=MG(R,r.rects,d),x},{}),v=h[r.placement],y=v.x,C=v.y;r.modifiersData.popperOffsets!=null&&(r.modifiersData.popperOffsets.x+=y,r.modifiersData.popperOffsets.y+=C),r.modifiersData[u]=h}const PG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:LG};function FG(n){var r=n.state,i=n.name;r.modifiersData[i]=Fj({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})}const VG={name:"popperOffsets",enabled:!0,phase:"read",fn:FG,data:{}};function BG(n){return n==="x"?"y":"x"}function zG(n){var r=n.state,i=n.options,u=n.name,l=i.mainAxis,d=l===void 0?!0:l,h=i.altAxis,v=h===void 0?!1:h,y=i.boundary,C=i.rootBoundary,x=i.altBoundary,R=i.padding,T=i.tether,j=T===void 0?!0:T,N=i.tetherOffset,O=N===void 0?0:N,_=Cm(r,{boundary:y,rootBoundary:C,padding:R,altBoundary:x}),L=Ks(r.placement),F=Yp(r.placement),V=!F,H=hR(L),z=BG(H),U=r.modifiersData.popperOffsets,J=r.rects.reference,q=r.rects.popper,Re=typeof O=="function"?O(Object.assign({},r.rects,{placement:r.placement})):O,he=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),ge=r.modifiersData.offset?r.modifiersData.offset[r.placement]:null,fe={x:0,y:0};if(U){if(d){var Oe,Te=H==="y"?Oi:Ai,xe=H==="y"?wo:Ro,je=H==="y"?"height":"width",Le=U[H],ne=Le+_[Te],_e=Le-_[xe],G=j?-q[je]/2:0,Y=F===Gp?J[je]:q[je],re=F===Gp?-q[je]:-J[je],ye=r.elements.arrow,Se=j&&ye?vR(ye):{width:0,height:0},Ne=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:kj(),le=Ne[Te],ve=Ne[xe],we=vm(0,J[je],Se[je]),Ve=V?J[je]/2-G-we-le-he.mainAxis:Y-we-le-he.mainAxis,et=V?-J[je]/2+G+we+ve+he.mainAxis:re+we+ve+he.mainAxis,tt=r.elements.arrow&&jm(r.elements.arrow),ft=tt?H==="y"?tt.clientTop||0:tt.clientLeft||0:0,Ae=(Oe=ge==null?void 0:ge[H])!=null?Oe:0,It=Le+Ve-Ae-ft,pt=Le+et-Ae,Kt=vm(j?b0(ne,It):ne,Le,j?Uf(_e,pt):_e);U[H]=Kt,fe[H]=Kt-Le}if(v){var on,sn=H==="x"?Oi:Ai,_n=H==="x"?wo:Ro,Vt=U[z],Cn=z==="y"?"height":"width",qn=Vt+_[sn],Rr=Vt-_[_n],$n=[Oi,Ai].indexOf(L)!==-1,Tr=(on=ge==null?void 0:ge[z])!=null?on:0,xt=$n?qn:Vt-J[Cn]-q[Cn]-Tr+he.altAxis,Pn=$n?Vt+J[Cn]+q[Cn]-Tr-he.altAxis:Rr,ln=j&&$n?fG(xt,Vt,Pn):vm(j?xt:qn,Vt,j?Pn:Rr);U[z]=ln,fe[z]=ln-Vt}r.modifiersData[u]=fe}}const HG={name:"preventOverflow",enabled:!0,phase:"main",fn:zG,requiresIfExists:["offset"]};function UG(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function $G(n){return n===qi(n)||!el(n)?mR(n):UG(n)}function GG(n){var r=n.getBoundingClientRect(),i=Wp(r.width)/n.offsetWidth||1,u=Wp(r.height)/n.offsetHeight||1;return i!==1||u!==1}function WG(n,r,i){i===void 0&&(i=!1);var u=el(r),l=el(r)&&GG(r),d=yc(r),h=Xp(n,l,i),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(u||!u&&!i)&&((gc(r)!=="body"||yR(d))&&(v=$G(r)),el(r)?(y=Xp(r,!0),y.x+=r.clientLeft,y.y+=r.clientTop):d&&(y.x=gR(d))),{x:h.left+v.scrollLeft-y.x,y:h.top+v.scrollTop-y.y,width:h.width,height:h.height}}function XG(n){var r=new Map,i=new Set,u=[];n.forEach(function(d){r.set(d.name,d)});function l(d){i.add(d.name);var h=[].concat(d.requires||[],d.requiresIfExists||[]);h.forEach(function(v){if(!i.has(v)){var y=r.get(v);y&&l(y)}}),u.push(d)}return n.forEach(function(d){i.has(d.name)||l(d)}),u}function YG(n){var r=XG(n);return lG.reduce(function(i,u){return i.concat(r.filter(function(l){return l.phase===u}))},[])}function ZG(n){var r;return function(){return r||(r=new Promise(function(i){Promise.resolve().then(function(){r=void 0,i(n())})})),r}}function JG(n){var r=n.reduce(function(i,u){var l=i[u.name];return i[u.name]=l?Object.assign({},l,u,{options:Object.assign({},l.options,u.options),data:Object.assign({},l.data,u.data)}):u,i},{});return Object.keys(r).map(function(i){return r[i]})}var G_={placement:"bottom",modifiers:[],strategy:"absolute"};function W_(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return!r.some(function(u){return!(u&&typeof u.getBoundingClientRect=="function")})}function qG(n){n===void 0&&(n={});var r=n,i=r.defaultModifiers,u=i===void 0?[]:i,l=r.defaultOptions,d=l===void 0?G_:l;return function(v,y,C){C===void 0&&(C=d);var x={placement:"bottom",orderedModifiers:[],options:Object.assign({},G_,d),modifiersData:{},elements:{reference:v,popper:y},attributes:{},styles:{}},R=[],T=!1,j={state:x,setOptions:function(L){var F=typeof L=="function"?L(x.options):L;O(),x.options=Object.assign({},d,x.options,F),x.scrollParents={reference:Xf(v)?hm(v):v.contextElement?hm(v.contextElement):[],popper:hm(y)};var V=YG(JG([].concat(u,x.options.modifiers)));return x.orderedModifiers=V.filter(function(H){return H.enabled}),N(),j.update()},forceUpdate:function(){if(!T){var L=x.elements,F=L.reference,V=L.popper;if(W_(F,V)){x.rects={reference:WG(F,jm(V),x.options.strategy==="fixed"),popper:vR(V)},x.reset=!1,x.placement=x.options.placement,x.orderedModifiers.forEach(function(he){return x.modifiersData[he.name]=Object.assign({},he.data)});for(var H=0;H<x.orderedModifiers.length;H++){if(x.reset===!0){x.reset=!1,H=-1;continue}var z=x.orderedModifiers[H],U=z.fn,J=z.options,q=J===void 0?{}:J,Re=z.name;typeof U=="function"&&(x=U({state:x,options:q,name:Re,instance:j})||x)}}}},update:ZG(function(){return new Promise(function(_){j.forceUpdate(),_(x)})}),destroy:function(){O(),T=!0}};if(!W_(v,y))return j;j.setOptions(C).then(function(_){!T&&C.onFirstUpdate&&C.onFirstUpdate(_)});function N(){x.orderedModifiers.forEach(function(_){var L=_.name,F=_.options,V=F===void 0?{}:F,H=_.effect;if(typeof H=="function"){var z=H({state:x,name:L,instance:j,options:V}),U=function(){};R.push(z||U)}})}function O(){R.forEach(function(_){return _()}),R=[]}return j}}const QG=qG({defaultModifiers:[kG,VG,bG,xG,PG,jG,HG,hG]}),KG=["enabled","placement","strategy","modifiers"];function e9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const t9={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},n9={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:n})=>()=>{const{reference:r,popper:i}=n.elements;if("removeAttribute"in r){const u=(r.getAttribute("aria-describedby")||"").split(",").filter(l=>l.trim()!==i.id);u.length?r.setAttribute("aria-describedby",u.join(",")):r.removeAttribute("aria-describedby")}},fn:({state:n})=>{var r;const{popper:i,reference:u}=n.elements,l=(r=i.getAttribute("role"))==null?void 0:r.toLowerCase();if(i.id&&l==="tooltip"&&"setAttribute"in u){const d=u.getAttribute("aria-describedby");if(d&&d.split(",").indexOf(i.id)!==-1)return;u.setAttribute("aria-describedby",d?`${d},${i.id}`:i.id)}}},r9=[];function Vj(n,r,i={}){let{enabled:u=!0,placement:l="bottom",strategy:d="absolute",modifiers:h=r9}=i,v=e9(i,KG);const y=M.useRef(h),C=M.useRef(),x=M.useCallback(()=>{var _;(_=C.current)==null||_.update()},[]),R=M.useCallback(()=>{var _;(_=C.current)==null||_.forceUpdate()},[]),[T,j]=J3(M.useState({placement:l,update:x,forceUpdate:R,attributes:{},styles:{popper:{},arrow:{}}})),N=M.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:_})=>{const L={},F={};Object.keys(_.elements).forEach(V=>{L[V]=_.styles[V],F[V]=_.attributes[V]}),j({state:_,styles:L,attributes:F,update:x,forceUpdate:R,placement:_.placement})}}),[x,R,j]),O=M.useMemo(()=>(pm(y.current,h)||(y.current=h),y.current),[h]);return M.useEffect(()=>{!C.current||!u||C.current.setOptions({placement:l,strategy:d,modifiers:[...O,N,t9]})},[d,l,N,u,O]),M.useEffect(()=>{if(!(!u||n==null||r==null))return C.current=QG(n,r,Object.assign({},v,{placement:l,strategy:d,modifiers:[...O,n9,N]})),()=>{C.current!=null&&(C.current.destroy(),C.current=void 0,j(_=>Object.assign({},_,{attributes:{},styles:{popper:{}}})))}},[u,n,r]),T}function xm(n,r){if(n.contains)return n.contains(r);if(n.compareDocumentPosition)return n===r||!!(n.compareDocumentPosition(r)&16)}var a9={},i9=a9.NODE_ENV!=="production",Bj=function(){};if(i9){var o9=function(r,i){var u=arguments.length;i=new Array(u>1?u-1:0);for(var l=1;l<u;l++)i[l-1]=arguments[l];var d=0,h="Warning: "+r.replace(/%s/g,function(){return i[d++]});typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}};Bj=function(n,r,i){var u=arguments.length;i=new Array(u>2?u-2:0);for(var l=2;l<u;l++)i[l-2]=arguments[l];if(r===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");n||o9.apply(null,[r].concat(i))}}var s9=Bj;const bR=qp(s9),X_=()=>{};function l9(n){return n.button===0}function u9(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}const Qb=n=>n&&("current"in n?n.current:n),Y_={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function zj(n,r=X_,{disabled:i,clickTrigger:u="click"}={}){const l=M.useRef(!1),d=M.useRef(!1),h=M.useCallback(C=>{const x=Qb(n);bR(!!x,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),l.current=!x||u9(C)||!l9(C)||!!xm(x,C.target)||d.current,d.current=!1},[n]),v=gr(C=>{const x=Qb(n);x&&xm(x,C.target)&&(d.current=!0)}),y=gr(C=>{l.current||r(C)});M.useEffect(()=>{var C,x;if(i||n==null)return;const R=ev(Qb(n)),T=R.defaultView||window;let j=(C=T.event)!=null?C:(x=T.parent)==null?void 0:x.event,N=null;Y_[u]&&(N=ql(R,Y_[u],v,!0));const O=ql(R,u,h,!0),_=ql(R,u,F=>{if(F===j){j=void 0;return}y(F)});let L=[];return"ontouchstart"in R.documentElement&&(L=[].slice.call(R.body.children).map(F=>ql(F,"mousemove",X_))),()=>{N==null||N(),O(),_(),L.forEach(F=>F())}},[n,i,u,h,v,y])}function c9(n){const r={};return Array.isArray(n)?(n==null||n.forEach(i=>{r[i.name]=i}),r):n||r}function f9(n={}){return Array.isArray(n)?n:Object.keys(n).map(r=>(n[r].name=r,n[r]))}function Hj({enabled:n,enableEvents:r,placement:i,flip:u,offset:l,fixed:d,containerPadding:h,arrowElement:v,popperConfig:y={}}){var C,x,R,T,j;const N=c9(y.modifiers);return Object.assign({},y,{placement:i,enabled:n,strategy:d?"fixed":y.strategy,modifiers:f9(Object.assign({},N,{eventListeners:{enabled:r,options:(C=N.eventListeners)==null?void 0:C.options},preventOverflow:Object.assign({},N.preventOverflow,{options:h?Object.assign({padding:h},(x=N.preventOverflow)==null?void 0:x.options):(R=N.preventOverflow)==null?void 0:R.options}),offset:{options:Object.assign({offset:l},(T=N.offset)==null?void 0:T.options)},arrow:Object.assign({},N.arrow,{enabled:!!v,options:Object.assign({},(j=N.arrow)==null?void 0:j.options,{element:v})}),flip:Object.assign({enabled:!!u},N.flip)}))})}const d9=["children"];function p9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const v9=()=>{};function Uj(n={}){const r=M.useContext(V0),[i,u]=g0(),l=M.useRef(!1),{flip:d,offset:h,rootCloseEvent:v,fixed:y=!1,placement:C,popperConfig:x={},enableEventListeners:R=!0,usePopper:T=!!r}=n,j=(r==null?void 0:r.show)==null?!!n.show:r.show;j&&!l.current&&(l.current=!0);const N=U=>{r==null||r.toggle(!1,U)},{placement:O,setMenu:_,menuElement:L,toggleElement:F}=r||{},V=Vj(F,L,Hj({placement:C||O||"bottom-start",enabled:T,enableEvents:R??j,offset:h,flip:d,fixed:y,arrowElement:i,popperConfig:x})),H=Object.assign({ref:_||v9,"aria-labelledby":F==null?void 0:F.id},V.attributes.popper,{style:V.styles.popper}),z={show:j,placement:O,hasShown:l.current,toggle:r==null?void 0:r.toggle,popper:T?V:null,arrowProps:T?Object.assign({ref:u},V.attributes.arrow,{style:V.styles.arrow}):{}};return zj(L,N,{clickTrigger:v,disabled:!j}),[H,z]}const h9={usePopper:!0};function CR(n){let{children:r}=n,i=p9(n,d9);const[u,l]=Uj(i);return b.jsx(b.Fragment,{children:r(u,l)})}CR.displayName="DropdownMenu";CR.defaultProps=h9;const $j=n=>{var r;return((r=n.getAttribute("role"))==null?void 0:r.toLowerCase())==="menu"},Z_=()=>{};function Gj(){const n=WA(),{show:r=!1,toggle:i=Z_,setToggle:u,menuElement:l}=M.useContext(V0)||{},d=M.useCallback(v=>{i(!r,v)},[r,i]),h={id:n,ref:u||Z_,onClick:d,"aria-expanded":!!r};return l&&$j(l)&&(h["aria-haspopup"]=!0),[h,{show:r,toggle:i}]}function Wj({children:n}){const[r,i]=Gj();return b.jsx(b.Fragment,{children:n(r,i)})}Wj.displayName="DropdownToggle";const m9=["eventKey","disabled","onClick","active","as"];function g9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function Xj({key:n,href:r,active:i,disabled:u,onClick:l}){const d=M.useContext(nu),h=M.useContext(lR),{activeKey:v}=h||{},y=Wf(n,r),C=i==null&&n!=null?Wf(v)===y:i;return[{onClick:gr(R=>{u||(l==null||l(R),d&&!R.isPropagationStopped()&&d(y,R))}),"aria-disabled":u||void 0,"aria-selected":C,[nv("dropdown-item")]:""},{isActive:C}]}const Yj=M.forwardRef((n,r)=>{let{eventKey:i,disabled:u,onClick:l,active:d,as:h=cR}=n,v=g9(n,m9);const[y]=Xj({key:i,href:v.href,disabled:u,onClick:l,active:d});return b.jsx(h,Object.assign({},v,{ref:r},y))});Yj.displayName="DropdownItem";const Zj=M.createContext(tv?window:void 0);Zj.Provider;function z0(){return M.useContext(Zj)}function J_(){const n=pj(),r=M.useRef(null),i=M.useCallback(u=>{r.current=u,n()},[n]);return[r,i]}function Dm({defaultShow:n,show:r,onSelect:i,onToggle:u,itemSelector:l=`* [${nv("dropdown-item")}]`,focusFirstItemOnShow:d,placement:h="bottom-start",children:v}){const y=z0(),[C,x]=UA(r,n,u),[R,T]=J_(),j=R.current,[N,O]=J_(),_=N.current,L=Ej(C),F=M.useRef(null),V=M.useRef(!1),H=M.useContext(nu),z=M.useCallback((ge,fe,Oe=fe==null?void 0:fe.type)=>{x(ge,{originalEvent:fe,source:Oe})},[x]),U=gr((ge,fe)=>{i==null||i(ge,fe),z(!1,fe,"select"),fe.isPropagationStopped()||H==null||H(ge,fe)}),J=M.useMemo(()=>({toggle:z,placement:h,show:C,menuElement:j,toggleElement:_,setMenu:T,setToggle:O}),[z,h,C,j,_,T,O]);j&&L&&!C&&(V.current=j.contains(j.ownerDocument.activeElement));const q=gr(()=>{_&&_.focus&&_.focus()}),Re=gr(()=>{const ge=F.current;let fe=d;if(fe==null&&(fe=R.current&&$j(R.current)?"keyboard":!1),fe===!1||fe==="keyboard"&&!/^key.+$/.test(ge))return;const Oe=Jl(R.current,l)[0];Oe&&Oe.focus&&Oe.focus()});M.useEffect(()=>{C?Re():V.current&&(V.current=!1,q())},[C,V,q,Re]),M.useEffect(()=>{F.current=null});const he=(ge,fe)=>{if(!R.current)return null;const Oe=Jl(R.current,l);let Te=Oe.indexOf(ge)+fe;return Te=Math.max(0,Math.min(Te,Oe.length)),Oe[Te]};return F3(M.useCallback(()=>y.document,[y]),"keydown",ge=>{var fe,Oe;const{key:Te}=ge,xe=ge.target,je=(fe=R.current)==null?void 0:fe.contains(xe),Le=(Oe=N.current)==null?void 0:Oe.contains(xe);if(/input|textarea/i.test(xe.tagName)&&(Te===" "||Te!=="Escape"&&je||Te==="Escape"&&xe.type==="search")||!je&&!Le||Te==="Tab"&&(!R.current||!C))return;F.current=ge.type;const _e={originalEvent:ge,source:ge.type};switch(Te){case"ArrowUp":{const G=he(xe,-1);G&&G.focus&&G.focus(),ge.preventDefault();return}case"ArrowDown":if(ge.preventDefault(),!C)x(!0,_e);else{const G=he(xe,1);G&&G.focus&&G.focus()}return;case"Tab":oR(xe.ownerDocument,"keyup",G=>{var Y;(G.key==="Tab"&&!G.target||!((Y=R.current)!=null&&Y.contains(G.target)))&&x(!1,_e)},{once:!0});break;case"Escape":Te==="Escape"&&(ge.preventDefault(),ge.stopPropagation()),x(!1,_e);break}}),b.jsx(nu.Provider,{value:U,children:b.jsx(V0.Provider,{value:J,children:v})})}Dm.displayName="Dropdown";Dm.Menu=CR;Dm.Toggle=Wj;Dm.Item=Yj;const Jj=M.createContext({});Jj.displayName="DropdownContext";const qj=Jj,Qj=M.forwardRef(({className:n,bsPrefix:r,as:i="hr",role:u="separator",...l},d)=>(r=bn(r,"dropdown-divider"),b.jsx(i,{ref:d,className:qt(n,r),role:u,...l})));Qj.displayName="DropdownDivider";const y9=Qj,Kj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",role:u="heading",...l},d)=>(r=bn(r,"dropdown-header"),b.jsx(i,{ref:d,className:qt(n,r),role:u,...l})));Kj.displayName="DropdownHeader";const b9=Kj,eD=M.forwardRef(({bsPrefix:n,className:r,eventKey:i,disabled:u=!1,onClick:l,active:d,as:h=Rj,...v},y)=>{const C=bn(n,"dropdown-item"),[x,R]=Xj({key:i,href:v.href,disabled:u,onClick:l,active:d});return b.jsx(h,{...v,...x,ref:y,className:qt(r,C,R.isActive&&"active",u&&"disabled")})});eD.displayName="DropdownItem";const C9=eD,tD=M.forwardRef(({className:n,bsPrefix:r,as:i="span",...u},l)=>(r=bn(r,"dropdown-item-text"),b.jsx(i,{ref:l,className:qt(n,r),...u})));tD.displayName="DropdownItemText";const x9=tD,nD=M.createContext(null);nD.displayName="InputGroupContext";const rD=nD;var q_={};function aD(n,r){if(q_.NODE_ENV==="production")return n;const i=M.useCallback(u=>{u==null||!u.isReactComponent||(q_.NODE_ENV!=="production"?O_(!1,`${r} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):O_(!1))},[r]);return ds(i,n)}var S9={};function iD(n,r,i){const u=i?"top-end":"top-start",l=i?"top-start":"top-end",d=i?"bottom-end":"bottom-start",h=i?"bottom-start":"bottom-end",v=i?"right-start":"left-start",y=i?"right-end":"left-end",C=i?"left-start":"right-start",x=i?"left-end":"right-end";let R=n?h:d;return r==="up"?R=n?l:u:r==="end"?R=n?x:C:r==="start"?R=n?y:v:r==="down-centered"?R="bottom":r==="up-centered"&&(R="top"),R}const oD=M.forwardRef(({bsPrefix:n,className:r,align:i,rootCloseEvent:u,flip:l=!0,show:d,renderOnMount:h,as:v="div",popperConfig:y,variant:C,...x},R)=>{let T=!1;const j=M.useContext(bj),N=bn(n,"dropdown-menu"),{align:O,drop:_,isRTL:L}=M.useContext(qj);i=i||O;const F=M.useContext(rD),V=[];if(i)if(typeof i=="object"){const ge=Object.keys(i);if(S9.NODE_ENV!=="production"&&bR(ge.length===1,"There should only be 1 breakpoint when passing an object to `align`"),ge.length){const fe=ge[0],Oe=i[fe];T=Oe==="start",V.push(`${N}-${fe}-${Oe}`)}}else i==="end"&&(T=!0);const H=iD(T,_,L),[z,{hasShown:U,popper:J,show:q,toggle:Re}]=Uj({flip:l,rootCloseEvent:u,show:d,usePopper:!j&&V.length===0,offset:[0,2],popperConfig:y,placement:H});if(z.ref=ds(aD(R,"DropdownMenu"),z.ref),y0(()=>{q&&(J==null||J.update())},[q]),!U&&!h&&!F)return null;typeof v!="string"&&(z.show=q,z.close=()=>Re==null?void 0:Re(!1),z.align=i);let he=x.style;return J!=null&&J.placement&&(he={...x.style,...z.style},x["x-placement"]=J.placement),b.jsx(v,{...x,...z,style:he,...(V.length||j)&&{"data-bs-popper":"static"},className:qt(r,N,q&&"show",T&&`${N}-end`,C&&`${N}-${C}`,...V)})});oD.displayName="DropdownMenu";const E9=oD,sD=M.forwardRef(({as:n,bsPrefix:r,variant:i="primary",size:u,active:l=!1,disabled:d=!1,className:h,...v},y)=>{const C=bn(r,"btn"),[x,{tagName:R}]=uR({tagName:n,disabled:d,...v}),T=R;return b.jsx(T,{...x,...v,ref:y,disabled:d,className:qt(h,C,l&&"active",i&&`${C}-${i}`,u&&`${C}-${u}`,v.href&&d&&"disabled")})});sD.displayName="Button";const w9=sD,lD=M.forwardRef(({bsPrefix:n,split:r,className:i,childBsPrefix:u,as:l=w9,...d},h)=>{const v=bn(n,"dropdown-toggle"),y=M.useContext(V0);u!==void 0&&(d.bsPrefix=u);const[C]=Gj();return C.ref=ds(C.ref,aD(h,"DropdownToggle")),b.jsx(l,{className:qt(i,v,r&&`${v}-split`,(y==null?void 0:y.show)&&"show"),...C,...d})});lD.displayName="DropdownToggle";const R9=lD,uD=M.forwardRef((n,r)=>{const{bsPrefix:i,drop:u="down",show:l,className:d,align:h="start",onSelect:v,onToggle:y,focusFirstItemOnShow:C,as:x="div",navbar:R,autoClose:T=!0,...j}=F0(n,{show:"onToggle"}),N=M.useContext(rD),O=bn(i,"dropdown"),_=P0(),L=J=>T===!1?J==="click":T==="inside"?J!=="rootClose":T==="outside"?J!=="select":!0,F=gr((J,q)=>{var Re,he;!((Re=q.originalEvent)==null||(he=Re.target)==null)&&he.classList.contains("dropdown-toggle")&&q.source==="mousedown"||(q.originalEvent.currentTarget===document&&(q.source!=="keydown"||q.originalEvent.key==="Escape")&&(q.source="rootClose"),L(q.source)&&(y==null||y(J,q)))}),H=iD(h==="end",u,_),z=M.useMemo(()=>({align:h,drop:u,isRTL:_}),[h,u,_]),U={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return b.jsx(qj.Provider,{value:z,children:b.jsx(Dm,{placement:H,show:l,onSelect:v,onToggle:F,focusFirstItemOnShow:C,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:N?j.children:b.jsx(x,{...j,ref:r,className:qt(d,l&&"show",U[u])})})})});uD.displayName="Dropdown";const Lb=Object.assign(uD,{Toggle:R9,Menu:E9,Item:C9,ItemText:x9,Divider:y9,Header:b9});var Pb;function Q_(n){if((!Pb&&Pb!==0||n)&&tv){var r=document.createElement("div");r.style.position="absolute",r.style.top="-9999px",r.style.width="50px",r.style.height="50px",r.style.overflow="scroll",document.body.appendChild(r),Pb=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return Pb}function T9(n){const r=M.useRef(n);return r.current=n,r}function xR(n){const r=T9(n);M.useEffect(()=>()=>r.current(),[])}function BE(n){n===void 0&&(n=ev());try{var r=n.activeElement;return!r||!r.nodeName?null:r}catch{return n.body}}function I9(n=document){const r=n.defaultView;return Math.abs(r.innerWidth-n.documentElement.clientWidth)}const K_=nv("modal-open");class N9{constructor({ownerDocument:r,handleContainerOverflow:i=!0,isRTL:u=!1}={}){this.handleContainerOverflow=i,this.isRTL=u,this.modals=[],this.ownerDocument=r}getScrollbarWidth(){return I9(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(r){}removeModalAttributes(r){}setContainerStyle(r){const i={overflow:"hidden"},u=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();r.style={overflow:l.style.overflow,[u]:l.style[u]},r.scrollBarWidth&&(i[u]=`${parseInt(Kl(l,u)||"0",10)+r.scrollBarWidth}px`),l.setAttribute(K_,""),Kl(l,i)}reset(){[...this.modals].forEach(r=>this.remove(r))}removeContainerStyle(r){const i=this.getElement();i.removeAttribute(K_),Object.assign(i.style,r.style)}add(r){let i=this.modals.indexOf(r);return i!==-1||(i=this.modals.length,this.modals.push(r),this.setModalAttributes(r),i!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),i}remove(r){const i=this.modals.indexOf(r);i!==-1&&(this.modals.splice(i,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(r))}isTopModal(r){return!!this.modals.length&&this.modals[this.modals.length-1]===r}}const SR=N9,zE=(n,r)=>tv?n==null?(r||ev()).body:(typeof n=="function"&&(n=n()),n&&"current"in n&&(n=n.current),n&&("nodeType"in n||n.getBoundingClientRect)?n:null):null;function Rw(n,r){const i=z0(),[u,l]=M.useState(()=>zE(n,i==null?void 0:i.document));if(!u){const d=zE(n);d&&l(d)}return M.useEffect(()=>{r&&u&&r(u)},[r,u]),M.useEffect(()=>{const d=zE(n);d!==u&&l(d)},[n,u]),u}function _9({in:n,onTransition:r}){const i=M.useRef(null),u=M.useRef(!0),l=gr(r);return y0(()=>{if(!i.current)return;let d=!1;return l({in:n,element:i.current,initial:u.current,isStale:()=>d}),()=>{d=!0}},[n,l]),y0(()=>(u.current=!1,()=>{u.current=!0}),[]),i}function O9({children:n,in:r,onExited:i,onEntered:u,transition:l}){const[d,h]=M.useState(!r);r&&d&&h(!1);const v=_9({in:!!r,onTransition:C=>{const x=()=>{C.isStale()||(C.in?u==null||u(C.element,C.initial):(h(!0),i==null||i(C.element)))};Promise.resolve(l(C)).then(x,R=>{throw C.in||h(!0),R})}}),y=ds(v,n.ref);return d&&!r?null:M.cloneElement(n,{ref:y})}function Tw(n,r,i){return n?b.jsx(n,Object.assign({},i)):r?b.jsx(O9,Object.assign({},i,{transition:r})):b.jsx(aR,Object.assign({},i))}function cD(n){return n.code==="Escape"||n.keyCode===27}const A9=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function j9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}let HE;function D9(n){return HE||(HE=new SR({ownerDocument:n==null?void 0:n.document})),HE}function k9(n){const r=z0(),i=n||D9(r),u=M.useRef({dialog:null,backdrop:null});return Object.assign(u.current,{add:()=>i.add(u.current),remove:()=>i.remove(u.current),isTopModal:()=>i.isTopModal(u.current),setDialogRef:M.useCallback(l=>{u.current.dialog=l},[]),setBackdropRef:M.useCallback(l=>{u.current.backdrop=l},[])})}const fD=M.forwardRef((n,r)=>{let{show:i=!1,role:u="dialog",className:l,style:d,children:h,backdrop:v=!0,keyboard:y=!0,onBackdropClick:C,onEscapeKeyDown:x,transition:R,runTransition:T,backdropTransition:j,runBackdropTransition:N,autoFocus:O=!0,enforceFocus:_=!0,restoreFocus:L=!0,restoreFocusOptions:F,renderDialog:V,renderBackdrop:H=pt=>b.jsx("div",Object.assign({},pt)),manager:z,container:U,onShow:J,onHide:q=()=>{},onExit:Re,onExited:he,onExiting:ge,onEnter:fe,onEntering:Oe,onEntered:Te}=n,xe=j9(n,A9);const je=z0(),Le=Rw(U),ne=k9(z),_e=fR(),G=Ej(i),[Y,re]=M.useState(!i),ye=M.useRef(null);M.useImperativeHandle(r,()=>ne,[ne]),tv&&!G&&i&&(ye.current=BE(je==null?void 0:je.document)),i&&Y&&re(!1);const Se=gr(()=>{if(ne.add(),et.current=ql(document,"keydown",we),Ve.current=ql(document,"focus",()=>setTimeout(le),!0),J&&J(),O){var pt,Kt;const on=BE((pt=(Kt=ne.dialog)==null?void 0:Kt.ownerDocument)!=null?pt:je==null?void 0:je.document);ne.dialog&&on&&!xm(ne.dialog,on)&&(ye.current=on,ne.dialog.focus())}}),Ne=gr(()=>{if(ne.remove(),et.current==null||et.current(),Ve.current==null||Ve.current(),L){var pt;(pt=ye.current)==null||pt.focus==null||pt.focus(F),ye.current=null}});M.useEffect(()=>{!i||!Le||Se()},[i,Le,Se]),M.useEffect(()=>{Y&&Ne()},[Y,Ne]),xR(()=>{Ne()});const le=gr(()=>{if(!_||!_e()||!ne.isTopModal())return;const pt=BE(je==null?void 0:je.document);ne.dialog&&pt&&!xm(ne.dialog,pt)&&ne.dialog.focus()}),ve=gr(pt=>{pt.target===pt.currentTarget&&(C==null||C(pt),v===!0&&q())}),we=gr(pt=>{y&&cD(pt)&&ne.isTopModal()&&(x==null||x(pt),pt.defaultPrevented||q())}),Ve=M.useRef(),et=M.useRef(),tt=(...pt)=>{re(!0),he==null||he(...pt)};if(!Le)return null;const ft=Object.assign({role:u,ref:ne.setDialogRef,"aria-modal":u==="dialog"?!0:void 0},xe,{style:d,className:l,tabIndex:-1});let Ae=V?V(ft):b.jsx("div",Object.assign({},ft,{children:M.cloneElement(h,{role:"document"})}));Ae=Tw(R,T,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!i,onExit:Re,onExiting:ge,onExited:tt,onEnter:fe,onEntering:Oe,onEntered:Te,children:Ae});let It=null;return v&&(It=H({ref:ne.setBackdropRef,onClick:ve}),It=Tw(j,N,{in:!!i,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:It})),b.jsx(b.Fragment,{children:Bf.createPortal(b.jsxs(b.Fragment,{children:[It,Ae]}),Le)})});fD.displayName="Modal";const M9=Object.assign(fD,{Manager:SR});function Iw(n,r){return n.classList?!!r&&n.classList.contains(r):(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+r+" ")!==-1}function L9(n,r){n.classList?n.classList.add(r):Iw(n,r)||(typeof n.className=="string"?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r))}function eO(n,r){return n.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function P9(n,r){n.classList?n.classList.remove(r):typeof n.className=="string"?n.className=eO(n.className,r):n.setAttribute("class",eO(n.className&&n.className.baseVal||"",r))}const kp={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class F9 extends SR{adjustAndStore(r,i,u){const l=i.style[r];i.dataset[r]=l,Kl(i,{[r]:`${parseFloat(Kl(i,r))+u}px`})}restore(r,i){const u=i.dataset[r];u!==void 0&&(delete i.dataset[r],Kl(i,{[r]:u}))}setContainerStyle(r){super.setContainerStyle(r);const i=this.getElement();if(L9(i,"modal-open"),!r.scrollBarWidth)return;const u=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";Jl(i,kp.FIXED_CONTENT).forEach(d=>this.adjustAndStore(u,d,r.scrollBarWidth)),Jl(i,kp.STICKY_CONTENT).forEach(d=>this.adjustAndStore(l,d,-r.scrollBarWidth)),Jl(i,kp.NAVBAR_TOGGLER).forEach(d=>this.adjustAndStore(l,d,r.scrollBarWidth))}removeContainerStyle(r){super.removeContainerStyle(r);const i=this.getElement();P9(i,"modal-open");const u=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";Jl(i,kp.FIXED_CONTENT).forEach(d=>this.restore(u,d)),Jl(i,kp.STICKY_CONTENT).forEach(d=>this.restore(l,d)),Jl(i,kp.NAVBAR_TOGGLER).forEach(d=>this.restore(l,d))}}let UE;function V9(n){return UE||(UE=new F9(n)),UE}const dD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"modal-body"),b.jsx(i,{ref:l,className:qt(n,r),...u})));dD.displayName="ModalBody";const B9=dD,z9=M.createContext({onHide(){}}),pD=z9,vD=M.forwardRef(({bsPrefix:n,className:r,contentClassName:i,centered:u,size:l,fullscreen:d,children:h,scrollable:v,...y},C)=>{n=bn(n,"modal");const x=`${n}-dialog`,R=typeof d=="string"?`${n}-fullscreen-${d}`:`${n}-fullscreen`;return b.jsx("div",{...y,ref:C,className:qt(x,r,l&&`${n}-${l}`,u&&`${x}-centered`,v&&`${x}-scrollable`,d&&R),children:b.jsx("div",{className:qt(`${n}-content`,i),children:h})})});vD.displayName="ModalDialog";const hD=vD,mD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"modal-footer"),b.jsx(i,{ref:l,className:qt(n,r),...u})));mD.displayName="ModalFooter";const H9=mD,U9={"aria-label":_t.string,onClick:_t.func,variant:_t.oneOf(["white"])},ER=M.forwardRef(({className:n,variant:r,"aria-label":i="Close",...u},l)=>b.jsx("button",{ref:l,type:"button",className:qt("btn-close",r&&`btn-close-${r}`,n),"aria-label":i,...u}));ER.displayName="CloseButton";ER.propTypes=U9;const $9=ER,G9=M.forwardRef(({closeLabel:n="Close",closeVariant:r,closeButton:i=!1,onHide:u,children:l,...d},h)=>{const v=M.useContext(pD),y=gr(()=>{v==null||v.onHide(),u==null||u()});return b.jsxs("div",{ref:h,...d,children:[l,i&&b.jsx($9,{"aria-label":n,variant:r,onClick:y})]})}),W9=G9,gD=M.forwardRef(({bsPrefix:n,className:r,closeLabel:i="Close",closeButton:u=!1,...l},d)=>(n=bn(n,"modal-header"),b.jsx(W9,{ref:d,...l,className:qt(r,n),closeLabel:i,closeButton:u})));gD.displayName="ModalHeader";const X9=gD,Y9=n=>M.forwardRef((r,i)=>b.jsx("div",{...r,ref:i,className:qt(r.className,n)})),Z9=Y9("h4"),yD=M.forwardRef(({className:n,bsPrefix:r,as:i=Z9,...u},l)=>(r=bn(r,"modal-title"),b.jsx(i,{ref:l,className:qt(n,r),...u})));yD.displayName="ModalTitle";const J9=yD;function q9(n){return b.jsx($p,{...n,timeout:null})}function Q9(n){return b.jsx($p,{...n,timeout:null})}const bD=M.forwardRef(({bsPrefix:n,className:r,style:i,dialogClassName:u,contentClassName:l,children:d,dialogAs:h=hD,"data-bs-theme":v,"aria-labelledby":y,"aria-describedby":C,"aria-label":x,show:R=!1,animation:T=!0,backdrop:j=!0,keyboard:N=!0,onEscapeKeyDown:O,onShow:_,onHide:L,container:F,autoFocus:V=!0,enforceFocus:H=!0,restoreFocus:z=!0,restoreFocusOptions:U,onEntered:J,onExit:q,onExiting:Re,onEnter:he,onEntering:ge,onExited:fe,backdropClassName:Oe,manager:Te,...xe},je)=>{const[Le,ne]=M.useState({}),[_e,G]=M.useState(!1),Y=M.useRef(!1),re=M.useRef(!1),ye=M.useRef(null),[Se,Ne]=g0(),le=ds(je,Ne),ve=gr(L),we=P0();n=bn(n,"modal");const Ve=M.useMemo(()=>({onHide:ve}),[ve]);function et(){return Te||V9({isRTL:we})}function tt(xt){if(!tv)return;const Pn=et().getScrollbarWidth()>0,ln=xt.scrollHeight>ev(xt).documentElement.clientHeight;ne({paddingRight:Pn&&!ln?Q_():void 0,paddingLeft:!Pn&&ln?Q_():void 0})}const ft=gr(()=>{Se&&tt(Se.dialog)});xR(()=>{xw(window,"resize",ft),ye.current==null||ye.current()});const Ae=()=>{Y.current=!0},It=xt=>{Y.current&&Se&&xt.target===Se.dialog&&(re.current=!0),Y.current=!1},pt=()=>{G(!0),ye.current=ej(Se.dialog,()=>{G(!1)})},Kt=xt=>{xt.target===xt.currentTarget&&pt()},on=xt=>{if(j==="static"){Kt(xt);return}if(re.current||xt.target!==xt.currentTarget){re.current=!1;return}L==null||L()},sn=xt=>{N?O==null||O(xt):(xt.preventDefault(),j==="static"&&pt())},_n=(xt,Pn)=>{xt&&tt(xt),he==null||he(xt,Pn)},Vt=xt=>{ye.current==null||ye.current(),q==null||q(xt)},Cn=(xt,Pn)=>{ge==null||ge(xt,Pn),oR(window,"resize",ft)},qn=xt=>{xt&&(xt.style.display=""),fe==null||fe(xt),xw(window,"resize",ft)},Rr=M.useCallback(xt=>b.jsx("div",{...xt,className:qt(`${n}-backdrop`,Oe,!T&&"show")}),[T,Oe,n]),$n={...i,...Le};$n.display="block";const Tr=xt=>b.jsx("div",{role:"dialog",...xt,style:$n,className:qt(r,n,_e&&`${n}-static`,!T&&"show"),onClick:j?on:void 0,onMouseUp:It,"data-bs-theme":v,"aria-label":x,"aria-labelledby":y,"aria-describedby":C,children:b.jsx(h,{...xe,onMouseDown:Ae,className:u,contentClassName:l,children:d})});return b.jsx(pD.Provider,{value:Ve,children:b.jsx(M9,{show:R,ref:le,backdrop:j,container:F,keyboard:!0,autoFocus:V,enforceFocus:H,restoreFocus:z,restoreFocusOptions:U,onEscapeKeyDown:sn,onShow:_,onHide:L,onEnter:_n,onEntering:Cn,onEntered:J,onExit:Vt,onExiting:Re,onExited:qn,manager:et(),transition:T?q9:void 0,backdropTransition:T?Q9:void 0,renderBackdrop:Rr,renderDialog:Tr})})});bD.displayName="Modal";const Ln=Object.assign(bD,{Body:B9,Header:X9,Title:J9,Footer:H9,Dialog:hD,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),K9=kr.forwardRef(({children:n,onClick:r},i)=>b.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:i,onClick:u=>{u.preventDefault(),r(u)},children:b.jsx("span",{className:"dropdown-toggle",children:n})}));function e4({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u}=ri(n,r),{project:l}=Ji(r||i.grantNumber);if(!i||!l||i.error||l.error)return;const d=Nn.routes.request_action_path(n,"new"),h=i.allowedActions.Renewal?Array.isArray(i.allowedActions.Renewal)?[...i.allowedActions.Renewal]:[i.allowedActions.Renewal]:[];h.sort((C,x)=>C.opportunityId<x.opportunityId?-1:1);const v=[{id:"extension",action:`${d}?action_type=Extension`,isEnabled:"Extension"in i.allowedActions,button:"Request an Extension",enabled:i.usesCredits?b.jsx("p",{children:"Need more time to use your current credits and allocations? You can extend your project's end date up to six months past your funding end date, or up to 12 months at a time for projects not supported by a funding award."}):b.jsx("p",{children:"Need more time to use your current allocations? A one-time extension can extend your project end date by up to six months."}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",i.usesCredits?b.jsxs(b.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${d}?action_type=Supplement`,isEnabled:"Supplement"in i.allowedActions,button:"Request a Supplement",enabled:i.usesCredits?b.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",i.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[i.allocationType]," ","additional ACCESS credits."]}):b.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",i.allocationType," project is eligible for a supplement of additional units."]}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",i.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:h.map(C=>[C.opportunityName,`${Nn.routes.renew_request_path(n)}?opportunity_id=${C.opportunityId}`,"post"]),isEnabled:"Renewal"in i.allowedActions,button:"Request a Renewal",enabled:b.jsxs("p",{children:["Your ",i.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",b.jsx("a",{href:Nn.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for renewal.",i.usesCredits&&b.jsxs(b.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),i.isMaximize&&b.jsxs(b.Fragment,{children:[" ","You can submit a renewal request to the Maximize ACCESS opportunity closest to your project's current end date."]})]})},{id:"help",action:[["Learn How to Manage Allocations",Nn.routes.how_to_path(),"get"],["Submit a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:b.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",b.jsxs("em",{children:["grant number ",l.grantNumber]})," and a detailed description of the problem."]})}];v.sort((C,x)=>C.isEnabled<x.isEnabled?1:-1);const y=v.map(({id:C,action:x,isEnabled:R,button:T,enabled:j,disabled:N})=>b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(x)&&x.length?b.jsxs(Lb,{className:"d-flex flex-column",children:[b.jsx(Lb.Toggle,{as:K9,children:T}),b.jsx(Lb.Menu,{children:x.map(([O,_,L])=>b.jsx(Lb.Item,{href:_,onClick:F=>{L!=="get"&&(F.preventDefault(),F.target.dataset.method=L,$&&$.rails&&$.rails.handleMethod($(F.target)))},children:O},_))})]}):b.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${R?"":"disabled"}`,href:R?x:"",children:b.jsx("span",{children:T})})}),b.jsx("div",{className:"col-sm-8 mb-2",children:R?j:N})]},C));return b.jsxs(Ln,{size:"lg",show:i.showActionsModal,onHide:u,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Manage Your Project"})}),b.jsxs(Ln.Body,{children:[b.jsxs("p",{children:["Please select an action to manage your project"," ",b.jsxs("strong",{children:[l.grantNumber,": ",l.title]}),"."]}),y]})]})}function t4({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u,toggleConfirmModal:l}=ri(n,r),{project:d}=Ji(r||i.grantNumber);if(!i||!d||i.error||d.error)return;const h=i.usesCredits?"credits":"units",v=(1-MA(i))*100;return b.jsxs(Ln,{size:"lg",show:i.showConfirmModal,onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Consider Requesting an Exchange"})}),b.jsx(Ln.Body,{children:b.jsxs("p",{children:[b.jsxs("strong",{children:[Math.round(v),"% of your allocation is unused."]})," ","Are you sure you want to request more ",h,"? You can exchange"," ",i.usesCredits?"credits for resources or ":""," one resource for another by changing the ",b.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:l,children:"Return to Exchange"}),b.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{l(),u()},children:["Request More ",h]})]})})]})}function n4({requestId:n,grantNumber:r,actionId:i}){const{deleteAction:u,request:l,toggleDeleteModal:d}=ri(n,r);if(!l||l.error)return;const h=l.actions.find(T=>T.actionId==i);if(!h)return;const{deleteStatus:v,isRequest:y}=h,C=v==ea.pending,x=v==ea.error,R=()=>d(i);return b.jsxs(Ln,{show:h.showDeleteModal,onHide:R,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Confirm Deletion"})}),b.jsxs(Ln.Body,{children:[x&&b.jsxs(na,{color:"danger",children:["Deletion of the ",y?"request":"action"," failed."]}),b.jsxs("p",{children:["Are you sure you want to delete"," ",!y&&b.jsxs(b.Fragment,{children:["action"," ",b.jsxs("strong",{children:[h.type,": ",Vp(h.date)]})," ","on"," "]}),"request ",b.jsx("strong",{children:Kw(l)}),"? Deletions cannot be undone."]})]}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:R,disabled:C,children:"Cancel"}),b.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>u(i),disabled:C,children:C?"Deleting...":"Delete"})]})})]})}function CD({action:n,request:r,toggleDeleteModal:i}){const u=n.allowedOperations||[],l=[];u.includes("Edit")&&l.push(b.jsx(c0,{href:n.isRequest?Nn.routes.edit_request_path(r.requestId):Nn.routes.edit_request_action_path(r.requestId,n.actionId),icon:"pencil",title:"Edit action"},"edit")),u.includes("Delete")&&l.push(b.jsx(c0,{color:"danger",icon:"trash",onClick:()=>i(n.actionId),title:"Edit action"},"delete"));const d=`${n.type}: ${Vp(n.date)}`;return b.jsxs(b.Fragment,{children:[n.detailAvailable?b.jsx("a",{href:Nn.routes.request_action_path(r.requestId,n.actionId),children:d}):d,l]})}const r4="_grid_15z6r_1",a4="_important_15z6r_32",i4="_input_15z6r_36",o4="_edited_15z6r_40",s4="_disabled_15z6r_48",Bp={grid:r4,important:a4,input:i4,edited:o4,disabled:s4};function l4({column:n,row:r,style:i={}}){const u=n.format?n.format(r[n.key],r):r[n.key],l=["cell"];return n.class&&l.push(n.class),n.rowClass&&l.push(n.rowClass(r)),b.jsx("td",{className:l.join(" "),style:i,children:u})}const u4={text:l4};function Qf({columns:n,rows:r,classes:i,frozenColumns:u=0,minWidth:l,rowClasses:d=[],scrollBehavior:h="smooth",scrollRowIndex:v=0}){const y=M.useRef();M.useLayoutEffect(()=>{if(!y.current)return;const N=y.current.querySelector(`tbody tr:nth-child(${v+1})`);N&&N.scrollIntoView({behavior:h,block:"nearest",inline:"nearest"})},[v,h]);const C=[0];for(let N=0;N<u;N++)C[N+1]=C[N]+(n[N].width||100);const x=(N,O)=>N<u?{position:"sticky",left:`${C[N]}px`,minWidth:`${n[N].width||100}px`,width:`${n[N].width||100}px`,zIndex:O||1}:{},R=n.map((N,O)=>b.jsx("th",{className:N.headerClass||N.class||"",style:x(O,100),children:N.formatHeader?N.formatHeader(N.name,N):N.name},N.key)),T=r.map((N,O)=>{const _=n.map((L,F)=>{const V=u4[L.type||"text"];return b.jsx(V,{column:L,row:N,style:x(F)},L.key)});return b.jsx("tr",{className:d[O]||"",children:_},O)}),j={};return l&&(j.minWidth=l),b.jsx("div",{className:`${Bp.grid} ${i||""}`,ref:y,children:b.jsxs("table",{className:"table table-bordered",style:j,children:[b.jsx("thead",{children:b.jsx("tr",{children:R})}),b.jsx("tbody",{children:T})]})})}function Zp({status:n,title:r}){const i={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[n]||"dark";return b.jsx("span",{className:`badge text-bg-${i} align-self-center`,title:r,children:n})}const c4=n=>b.jsx("span",{className:n<0?"text-danger":"",children:n===0?"":n.toLocaleString()});function f4({requestId:n,grantNumber:r}){const{request:i,toggleDeleteModal:u}=ri(n,r),{project:l,setRequest:d}=Ji(r||i.grantNumber);if(!i||!l)return;const h=l.requestsList;let v=0;for(;v<h.length&&h[v].requestId!==n;)v++;const y=h[v+1],C=h[v-1],x=(O,_)=>O?b.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>d(O.requestId),children:[_=="prev"?b.jsx("i",{className:"bi bi-chevron-left"}):null,Kw(O),_=="next"?b.jsx("i",{className:"bi bi-chevron-right"}):null]}):b.jsx("span",{}),R=new Set,T=[];for(let O of i.actions)for(let _ of O.resources)R.has(_.resourceId)||(R.add(_.resourceId),T.push(_));T.sort(f0);const j=[{key:"action",name:"Action Details",format:(O,_)=>b.jsx(CD,{action:_,request:i,toggleDeleteModal:u})},{key:"status",name:"Status",format:O=>b.jsx(Zp,{status:O})},...T.map(O=>({key:`resource${O.resourceId}`,name:O.name,icon:O.icon,class:"text-end",format:O.isBoolean?_=>_?eR(_):null:c4,formatHeader:(_,L)=>Hf(L,{userGuide:!1})}))],N=i.actions.map(O=>{const _={...O};for(let{resourceId:L}of T)_[`resource${L}`]=0;for(let{resourceId:L,approved:F,requested:V}of O.resources)_[`resource${L}`]=F||V||0;return _});return b.jsxs("div",{className:"history",children:[b.jsx(Qf,{columns:j,rows:N}),b.jsxs("div",{className:"buttons d-flex justify-content-between",children:[x(y,"prev"),x(C,"next")]})]})}function d4({requestId:n,grantNumber:r}){const{request:i,toggleDeleteModal:u}=ri(n,r);if(!i)return;const l=[{key:"type",name:"Action Details",format:(d,h)=>b.jsx(CD,{action:h,request:i,toggleDeleteModal:u})},{key:"status",name:"Status",format:d=>b.jsx(Zp,{status:d})}];if(i.actions&&i.actions.length)return b.jsx(Qf,{rows:i.actions,columns:l})}function im(...n){return n.filter(r=>r!=null).reduce((r,i)=>{if(typeof i!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return r===null?i:function(...l){r.apply(this,l),i.apply(this,l)}},null)}const p4={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function v4(n,r){const i=`offset${n[0].toUpperCase()}${n.slice(1)}`,u=r[i],l=p4[n];return u+parseInt(Kl(r,l[0]),10)+parseInt(Kl(r,l[1]),10)}const h4={[dc]:"collapse",[h0]:"collapsing",[Zl]:"collapsing",[pc]:"collapse show"},m4=kr.forwardRef(({onEnter:n,onEntering:r,onEntered:i,onExit:u,onExiting:l,className:d,children:h,dimension:v="height",in:y=!1,timeout:C=300,mountOnEnter:x=!1,unmountOnExit:R=!1,appear:T=!1,getDimensionValue:j=v4,...N},O)=>{const _=typeof v=="function"?v():v,L=M.useMemo(()=>im(U=>{U.style[_]="0"},n),[_,n]),F=M.useMemo(()=>im(U=>{const J=`scroll${_[0].toUpperCase()}${_.slice(1)}`;U.style[_]=`${U[J]}px`},r),[_,r]),V=M.useMemo(()=>im(U=>{U.style[_]=null},i),[_,i]),H=M.useMemo(()=>im(U=>{U.style[_]=`${j(_,U)}px`,nj(U)},u),[u,j,_]),z=M.useMemo(()=>im(U=>{U.style[_]=null},l),[_,l]);return b.jsx(rj,{ref:O,addEndListener:tj,...N,"aria-expanded":N.role?y:null,onEnter:L,onEntering:F,onEntered:V,onExit:H,onExiting:z,childRef:h.ref,in:y,timeout:C,mountOnEnter:x,unmountOnExit:R,appear:T,children:(U,J)=>kr.cloneElement(h,{...J,className:qt(d,h.props.className,h4[U],_==="width"&&"collapse-horizontal")})})}),g4=m4;function xD(n,r){return Array.isArray(n)?n.includes(r):n===r}const SD=M.createContext({});SD.displayName="AccordionContext";const H0=SD,ED=M.forwardRef(({as:n="div",bsPrefix:r,className:i,children:u,eventKey:l,...d},h)=>{const{activeEventKey:v}=M.useContext(H0);return r=bn(r,"accordion-collapse"),b.jsx(g4,{ref:h,in:xD(v,l),...d,className:qt(i,r),children:b.jsx(n,{children:M.Children.only(u)})})});ED.displayName="AccordionCollapse";const wD=ED,RD=M.createContext({eventKey:""});RD.displayName="AccordionItemContext";const wR=RD,TD=M.forwardRef(({as:n="div",bsPrefix:r,className:i,onEnter:u,onEntering:l,onEntered:d,onExit:h,onExiting:v,onExited:y,...C},x)=>{r=bn(r,"accordion-body");const{eventKey:R}=M.useContext(wR);return b.jsx(wD,{eventKey:R,onEnter:u,onEntering:l,onEntered:d,onExit:h,onExiting:v,onExited:y,children:b.jsx(n,{ref:x,...C,className:qt(i,r)})})});TD.displayName="AccordionBody";const y4=TD;function b4(n,r){const{activeEventKey:i,onSelect:u,alwaysOpen:l}=M.useContext(H0);return d=>{let h=n===i?null:n;l&&(Array.isArray(i)?i.includes(n)?h=i.filter(v=>v!==n):h=[...i,n]:h=[n]),u==null||u(h,d),r==null||r(d)}}const ID=M.forwardRef(({as:n="button",bsPrefix:r,className:i,onClick:u,...l},d)=>{r=bn(r,"accordion-button");const{eventKey:h}=M.useContext(wR),v=b4(h,u),{activeEventKey:y}=M.useContext(H0);return n==="button"&&(l.type="button"),b.jsx(n,{ref:d,onClick:v,...l,"aria-expanded":Array.isArray(y)?y.includes(h):h===y,className:qt(i,r,!xD(y,h)&&"collapsed")})});ID.displayName="AccordionButton";const ND=ID,_D=M.forwardRef(({as:n="h2",bsPrefix:r,className:i,children:u,onClick:l,...d},h)=>(r=bn(r,"accordion-header"),b.jsx(n,{ref:h,...d,className:qt(i,r),children:b.jsx(ND,{onClick:l,children:u})})));_D.displayName="AccordionHeader";const C4=_D,OD=M.forwardRef(({as:n="div",bsPrefix:r,className:i,eventKey:u,...l},d)=>{r=bn(r,"accordion-item");const h=M.useMemo(()=>({eventKey:u}),[u]);return b.jsx(wR.Provider,{value:h,children:b.jsx(n,{ref:d,...l,className:qt(i,r)})})});OD.displayName="AccordionItem";const x4=OD,AD=M.forwardRef((n,r)=>{const{as:i="div",activeKey:u,bsPrefix:l,className:d,onSelect:h,flush:v,alwaysOpen:y,...C}=F0(n,{activeKey:"onSelect"}),x=bn(l,"accordion"),R=M.useMemo(()=>({activeEventKey:u,onSelect:h,alwaysOpen:y}),[u,h,y]);return b.jsx(H0.Provider,{value:R,children:b.jsx(i,{ref:r,...C,className:qt(d,x,v&&`${x}-flush`)})})});AD.displayName="Accordion";const os=Object.assign(AD,{Button:ND,Collapse:wD,Item:x4,Header:C4,Body:y4}),Nw=2**31-1;function jD(n,r,i){const u=i-Date.now();n.current=u<=Nw?setTimeout(r,u):setTimeout(()=>jD(n,r,i),Nw)}function S4(){const n=fR(),r=M.useRef();return xR(()=>clearTimeout(r.current)),M.useMemo(()=>{const i=()=>clearTimeout(r.current);function u(l,d=0){n()&&(i(),d<=Nw?r.current=setTimeout(l,d):jD(r,l,Date.now()+d))}return{set:u,clear:i,handleRef:r}},[])}const E4=()=>{};function w4(n,r,{disabled:i,clickTrigger:u}={}){const l=r||E4;zj(n,l,{disabled:i,clickTrigger:u});const d=gr(h=>{cD(h)&&l(h)});M.useEffect(()=>{if(i||n==null)return;const h=ev(Qb(n));let v=(h.defaultView||window).event;const y=ql(h,"keyup",C=>{if(C===v){v=void 0;return}d(C)});return()=>{y()}},[n,i,d])}const DD=M.forwardRef((n,r)=>{const{flip:i,offset:u,placement:l,containerPadding:d,popperConfig:h={},transition:v,runTransition:y}=n,[C,x]=g0(),[R,T]=g0(),j=ds(x,r),N=Rw(n.container),O=Rw(n.target),[_,L]=M.useState(!n.show),F=Vj(O,C,Hj({placement:l,enableEvents:!!n.show,containerPadding:d||5,flip:i,offset:u,arrowElement:R,popperConfig:h}));n.show&&_&&L(!1);const V=(...ge)=>{L(!0),n.onExited&&n.onExited(...ge)},H=n.show||!_;if(w4(C,n.onHide,{disabled:!n.rootClose||n.rootCloseDisabled,clickTrigger:n.rootCloseEvent}),!H)return null;const{onExit:z,onExiting:U,onEnter:J,onEntering:q,onEntered:Re}=n;let he=n.children(Object.assign({},F.attributes.popper,{style:F.styles.popper,ref:j}),{popper:F,placement:l,show:!!n.show,arrowProps:Object.assign({},F.attributes.arrow,{style:F.styles.arrow,ref:T})});return he=Tw(v,y,{in:!!n.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:he,onExit:z,onExiting:U,onExited:V,onEnter:J,onEntering:q,onEntered:Re}),N?Bf.createPortal(he,N):null});DD.displayName="Overlay";const R4=DD,kD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"popover-header"),b.jsx(i,{ref:l,className:qt(n,r),...u})));kD.displayName="PopoverHeader";const T4=kD,MD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"popover-body"),b.jsx(i,{ref:l,className:qt(n,r),...u})));MD.displayName="PopoverBody";const LD=MD;function PD(n,r){let i=n;return n==="left"?i=r?"end":"start":n==="right"&&(i=r?"start":"end"),i}function FD(n="absolute"){return{position:n,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const I4=M.forwardRef(({bsPrefix:n,placement:r="right",className:i,style:u,children:l,body:d,arrowProps:h,hasDoneInitialMeasure:v,popper:y,show:C,...x},R)=>{const T=bn(n,"popover"),j=P0(),[N]=(r==null?void 0:r.split("-"))||[],O=PD(N,j);let _=u;return C&&!v&&(_={...u,...FD(y==null?void 0:y.strategy)}),b.jsxs("div",{ref:R,role:"tooltip",style:_,"x-placement":N,className:qt(i,T,N&&`bs-popover-${O}`),...x,children:[b.jsx("div",{className:"popover-arrow",...h}),d?b.jsx(LD,{children:l}):l]})}),N4=Object.assign(I4,{Header:T4,Body:LD,POPPER_OFFSET:[0,8]}),VD=M.forwardRef(({bsPrefix:n,placement:r="right",className:i,style:u,children:l,arrowProps:d,hasDoneInitialMeasure:h,popper:v,show:y,...C},x)=>{n=bn(n,"tooltip");const R=P0(),[T]=(r==null?void 0:r.split("-"))||[],j=PD(T,R);let N=u;return y&&!h&&(N={...u,...FD(v==null?void 0:v.strategy)}),b.jsxs("div",{ref:x,style:N,role:"tooltip","x-placement":T,className:qt(i,n,`bs-tooltip-${j}`),...C,children:[b.jsx("div",{className:"tooltip-arrow",...d}),b.jsx("div",{className:`${n}-inner`,children:l})]})});VD.displayName="Tooltip";const RR=Object.assign(VD,{TOOLTIP_OFFSET:[0,6]});function _4(n){const r=M.useRef(null),i=bn(void 0,"popover"),u=bn(void 0,"tooltip"),l=M.useMemo(()=>({name:"offset",options:{offset:()=>{if(n)return n;if(r.current){if(Iw(r.current,i))return N4.POPPER_OFFSET;if(Iw(r.current,u))return RR.TOOLTIP_OFFSET}return[0,0]}}}),[n,i,u]);return[r,[l]]}function O4(n,r){const{ref:i}=n,{ref:u}=r;n.ref=i.__wrapped||(i.__wrapped=l=>i(m0(l))),r.ref=u.__wrapped||(u.__wrapped=l=>u(m0(l)))}const BD=M.forwardRef(({children:n,transition:r=$p,popperConfig:i={},rootClose:u=!1,placement:l="top",show:d=!1,...h},v)=>{const y=M.useRef({}),[C,x]=M.useState(null),[R,T]=_4(h.offset),j=ds(v,R),N=r===!0?$p:r||void 0,O=gr(_=>{x(_),i==null||i.onFirstUpdate==null||i.onFirstUpdate(_)});return y0(()=>{C&&h.target&&(y.current.scheduleUpdate==null||y.current.scheduleUpdate())},[C,h.target]),M.useEffect(()=>{d||x(null)},[d]),b.jsx(R4,{...h,ref:j,popperConfig:{...i,modifiers:T.concat(i.modifiers||[]),onFirstUpdate:O},transition:N,rootClose:u,placement:l,show:d,children:(_,{arrowProps:L,popper:F,show:V})=>{var H,z;O4(_,L);const U=F==null?void 0:F.placement,J=Object.assign(y.current,{state:F==null?void 0:F.state,scheduleUpdate:F==null?void 0:F.update,placement:U,outOfBoundaries:(F==null||(H=F.state)==null||(z=H.modifiersData.hide)==null?void 0:z.isReferenceHidden)||!1,strategy:i.strategy}),q=!!C;return typeof n=="function"?n({..._,placement:U,show:V,...!r&&V&&{className:"show"},popper:J,arrowProps:L,hasDoneInitialMeasure:q}):M.cloneElement(n,{..._,placement:U,arrowProps:L,popper:J,hasDoneInitialMeasure:q,className:qt(n.props.className,!r&&V&&"show"),style:{...n.props.style,..._.style}})}})});BD.displayName="Overlay";const zD=BD;var A4={};function j4(n){return n&&typeof n=="object"?n:{show:n,hide:n}}function tO(n,r,i){const[u]=r,l=u.currentTarget,d=u.relatedTarget||u.nativeEvent[i];(!d||d!==l)&&!xm(l,d)&&n(...r)}_t.oneOf(["click","hover","focus"]);const D4=({trigger:n=["hover","focus"],overlay:r,children:i,popperConfig:u={},show:l,defaultShow:d=!1,onToggle:h,delay:v,placement:y,flip:C=y&&y.indexOf("auto")!==-1,...x})=>{const R=M.useRef(null),T=ds(R,i.ref),j=S4(),N=M.useRef(""),[O,_]=dj(l,d,h),L=j4(v),{onFocus:F,onBlur:V,onClick:H}=typeof i!="function"?M.Children.only(i).props:{},z=xe=>{T(m0(xe))},U=M.useCallback(()=>{if(j.clear(),N.current="show",!L.show){_(!0);return}j.set(()=>{N.current==="show"&&_(!0)},L.show)},[L.show,_,j]),J=M.useCallback(()=>{if(j.clear(),N.current="hide",!L.hide){_(!1);return}j.set(()=>{N.current==="hide"&&_(!1)},L.hide)},[L.hide,_,j]),q=M.useCallback((...xe)=>{U(),F==null||F(...xe)},[U,F]),Re=M.useCallback((...xe)=>{J(),V==null||V(...xe)},[J,V]),he=M.useCallback((...xe)=>{_(!O),H==null||H(...xe)},[H,_,O]),ge=M.useCallback((...xe)=>{tO(U,xe,"fromElement")},[U]),fe=M.useCallback((...xe)=>{tO(J,xe,"toElement")},[J]),Oe=n==null?[]:[].concat(n),Te={ref:z};return Oe.indexOf("click")!==-1&&(Te.onClick=he),Oe.indexOf("focus")!==-1&&(Te.onFocus=q,Te.onBlur=Re),Oe.indexOf("hover")!==-1&&(A4.NODE_ENV!=="production"&&bR(Oe.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),Te.onMouseOver=ge,Te.onMouseOut=fe),b.jsxs(b.Fragment,{children:[typeof i=="function"?i(Te):M.cloneElement(i,Te),b.jsx(zD,{...x,show:O,onHide:J,flip:C,placement:y,popperConfig:u,target:R.current,children:r})]})},HD=D4;function k4({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u}=Ji(r||i.grantNumber),{setTab:l}=Ji(r||i.grantNumber);if(!i||!u)return;let d;const h={};for(let T of u.users||[])for(let j of T.resourceIds)h[j]=h[j]||0,h[j]+=1;const v=(i.resources||[]).filter(T=>T.isCredit?(d=T,!1):T.allocated>0).map((T,j)=>({...T,userCount:h[T.resourceId]||0,color:pw[j%pw.length]})),y=d?d.allocated:0,C="Exchange"in i.allowedActions,x=i.exchangeActionId!==null,R=[{key:"name",name:"Resource",format:(T,j)=>Hf(j)},{key:"isActive",name:"Status",format:T=>b.jsx(Zp,{status:T?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(T,j)=>{if(j.isBoolean)return eR(j.allocated);const N=j.allocated-T,O=Math.max(N,0)*100/j.allocated;return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:`usage bg-${j.color}`,style:{width:`${Math.min(O,100)}%`}}),ni(N,{abbreviate:!0})," of"," ",ni(j.allocated,{abbreviate:!0})," ",j.unit," ","remaining (",Math.round(O),"%)"]})}},{key:"endDate",name:"End Date",format:T=>Vp(T)}];return u.isManager&&R.push({key:"userCount",name:"Users",class:"text-end",format:ni}),u.currentUser&&R.push({key:"resourceUsername",name:"My Username",format:(T,j)=>{const N=u.currentUser.resourceUsernames[j.resourceId];if(N)return N;if(u.currentUser.resourceAccountPendingIds.includes(j.resourceId))return b.jsx(Zp,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(u.currentUser.resourceIds.includes(j.resourceId)||!j.isActive)return b.jsx(b.Fragment,{children:"—"});if(u.isManager)return b.jsx("a",{href:"#",onClick:_=>{_.preventDefault(),l("users")},children:"Grant access"});const O=b.jsxs(RR,{children:["Please contact ",tR(u)," to request access to this resource."]});return b.jsx(HD,{overlay:O,children:b.jsx("a",{href:"#",onClick:_=>{_.preventDefault()},children:"Request access"})})}}),b.jsxs("div",{className:"overview",children:[C&&!x&&y>Nn.creditAlertThreshold?b.jsxs("button",{onClick:()=>l("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[b.jsxs("span",{children:[b.jsxs("span",{className:"fs-3",children:[mc(Nn.resourceTypeIcons[d.icon])," ",ni(y)]})," ",d.unit," available"]}),b.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",b.jsx("span",{className:"fs-3",children:mc("chevron-right")})]})]}):null,v.length?b.jsx(Qf,{columns:R,rows:v}):null]})}const M4=[{key:"role",name:"Role",format:n=>b.jsxs(b.Fragment,{children:[mc(Nn.roleIcons[n])," ",n]})},{key:"users",name:"Users",format:n=>{const r=n.slice(0,3);return n.length>4&&(r[2]=`${ni(n.length-3)} others`),r.map((i,u)=>{const l=r.length-u;return`${i}${l>2?",":l==2&&r.length>1?" and":""}`}).join(" ")}}],L4=({requestId:n,grantNumber:r})=>{const{project:i}=Ji(r);if(!i)return;const u=L0.map(({role:l,name:d})=>({role:d,users:(i.users||[]).filter(h=>h.role===l).map(h=>`${h.firstName} ${h.lastName}`)})).filter(l=>l.users.length>0);return u.length?b.jsx(Qf,{rows:u,columns:M4}):null};function P4({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u,username:l}=Ji(r||i.grantNumber);if(!(!i||!u||i.error||u.error)&&i)return b.jsxs("div",{className:"overview",children:[b.jsx(k4,{requestId:n,grantNumber:r}),u.isManager?b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-lg-6",children:b.jsx(L4,{requestId:n,grantNumber:r})}),b.jsx("div",{className:"col-lg-6",children:b.jsx(d4,{requestId:n})})]}):null]})}function Yf(n){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yf(n)}function F4(n,r){if(Yf(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var u=i.call(n,r||"default");if(Yf(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function UD(n){var r=F4(n,"string");return Yf(r)=="symbol"?r:String(r)}function Lp(n,r,i){return r=UD(r),r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n}function nO(n,r){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);r&&(u=u.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),i.push.apply(i,u)}return i}function yt(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?nO(Object(i),!0).forEach(function(u){Lp(n,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):nO(Object(i)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(i,u))})}return n}function V4(n){if(Array.isArray(n))return n}function B4(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var u,l,d,h,v=[],y=!0,C=!1;try{if(d=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;y=!1}else for(;!(y=(u=d.call(i)).done)&&(v.push(u.value),v.length!==r);y=!0);}catch(x){C=!0,l=x}finally{try{if(!y&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(C)throw l}}return v}}function _w(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,u=new Array(r);i<r;i++)u[i]=n[i];return u}function $D(n,r){if(n){if(typeof n=="string")return _w(n,r);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _w(n,r)}}function z4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
293
+ */(function(n){(function(){var r={}.hasOwnProperty;function i(){for(var d="",h=0;h<arguments.length;h++){var v=arguments[h];v&&(d=l(d,u(v)))}return d}function u(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return i.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var h="";for(var v in d)r.call(d,v)&&d[v]&&(h=l(h,v));return h}function l(d,h){return h?d?d+" "+h:d+h:d}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(qA);var J$=qA.exports;const qt=qp(J$);function iR(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function v0(n,r){return v0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,l){return u.__proto__=l,u},v0(n,r)}function q$(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,v0(n,r)}const N_={disabled:!1};var QA={},Q$=QA.NODE_ENV!=="production"?_t.oneOfType([_t.number,_t.shape({enter:_t.number,exit:_t.number,appear:_t.number}).isRequired]):null;QA.NODE_ENV!=="production"&&_t.oneOfType([_t.string,_t.shape({enter:_t.string,exit:_t.string,active:_t.string}),_t.shape({enter:_t.string,enterDone:_t.string,enterActive:_t.string,exit:_t.string,exitDone:_t.string,exitActive:_t.string})]);const KA=kr.createContext(null);var K$=function(r){return r.scrollTop},e3={},dm="unmounted",dc="exited",Zl="entering",pc="entered",h0="exiting",au=function(n){q$(r,n);function r(u,l){var d;d=n.call(this,u,l)||this;var h=l,v=h&&!h.isMounting?u.enter:u.appear,y;return d.appearStatus=null,u.in?v?(y=dc,d.appearStatus=Zl):y=pc:u.unmountOnExit||u.mountOnEnter?y=dm:y=dc,d.state={status:y},d.nextCallback=null,d}r.getDerivedStateFromProps=function(l,d){var h=l.in;return h&&d.status===dm?{status:dc}:null};var i=r.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(l){var d=null;if(l!==this.props){var h=this.state.status;this.props.in?h!==Zl&&h!==pc&&(d=Zl):(h===Zl||h===pc)&&(d=h0)}this.updateStatus(!1,d)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var l=this.props.timeout,d,h,v;return d=h=v=l,l!=null&&typeof l!="number"&&(d=l.exit,h=l.enter,v=l.appear!==void 0?l.appear:h),{exit:d,enter:h,appear:v}},i.updateStatus=function(l,d){if(l===void 0&&(l=!1),d!==null)if(this.cancelNextCallback(),d===Zl){if(this.props.unmountOnExit||this.props.mountOnEnter){var h=this.props.nodeRef?this.props.nodeRef.current:Bf.findDOMNode(this);h&&K$(h)}this.performEnter(l)}else this.performExit();else this.props.unmountOnExit&&this.state.status===dc&&this.setState({status:dm})},i.performEnter=function(l){var d=this,h=this.props.enter,v=this.context?this.context.isMounting:l,y=this.props.nodeRef?[v]:[Bf.findDOMNode(this),v],C=y[0],x=y[1],R=this.getTimeouts(),T=v?R.appear:R.enter;if(!l&&!h||N_.disabled){this.safeSetState({status:pc},function(){d.props.onEntered(C)});return}this.props.onEnter(C,x),this.safeSetState({status:Zl},function(){d.props.onEntering(C,x),d.onTransitionEnd(T,function(){d.safeSetState({status:pc},function(){d.props.onEntered(C,x)})})})},i.performExit=function(){var l=this,d=this.props.exit,h=this.getTimeouts(),v=this.props.nodeRef?void 0:Bf.findDOMNode(this);if(!d||N_.disabled){this.safeSetState({status:dc},function(){l.props.onExited(v)});return}this.props.onExit(v),this.safeSetState({status:h0},function(){l.props.onExiting(v),l.onTransitionEnd(h.exit,function(){l.safeSetState({status:dc},function(){l.props.onExited(v)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(l,d){d=this.setNextCallback(d),this.setState(l,d)},i.setNextCallback=function(l){var d=this,h=!0;return this.nextCallback=function(v){h&&(h=!1,d.nextCallback=null,l(v))},this.nextCallback.cancel=function(){h=!1},this.nextCallback},i.onTransitionEnd=function(l,d){this.setNextCallback(d);var h=this.props.nodeRef?this.props.nodeRef.current:Bf.findDOMNode(this),v=l==null&&!this.props.addEndListener;if(!h||v){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var y=this.props.nodeRef?[this.nextCallback]:[h,this.nextCallback],C=y[0],x=y[1];this.props.addEndListener(C,x)}l!=null&&setTimeout(this.nextCallback,l)},i.render=function(){var l=this.state.status;if(l===dm)return null;var d=this.props,h=d.children;d.in,d.mountOnEnter,d.unmountOnExit,d.appear,d.enter,d.exit,d.timeout,d.addEndListener,d.onEnter,d.onEntering,d.onEntered,d.onExit,d.onExiting,d.onExited,d.nodeRef;var v=iR(d,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return kr.createElement(KA.Provider,{value:null},typeof h=="function"?h(l,v):kr.cloneElement(kr.Children.only(h),v))},r}(kr.Component);au.contextType=KA;au.propTypes=e3.NODE_ENV!=="production"?{nodeRef:_t.shape({current:typeof Element>"u"?_t.any:function(n,r,i,u,l,d){var h=n[r];return _t.instanceOf(h&&"ownerDocument"in h?h.ownerDocument.defaultView.Element:Element)(n,r,i,u,l,d)}}),children:_t.oneOfType([_t.func.isRequired,_t.element.isRequired]).isRequired,in:_t.bool,mountOnEnter:_t.bool,unmountOnExit:_t.bool,appear:_t.bool,enter:_t.bool,exit:_t.bool,timeout:function(r){var i=Q$;r.addEndListener||(i=i.isRequired);for(var u=arguments.length,l=new Array(u>1?u-1:0),d=1;d<u;d++)l[d-1]=arguments[d];return i.apply(void 0,[r].concat(l))},addEndListener:_t.func,onEnter:_t.func,onEntering:_t.func,onEntered:_t.func,onExit:_t.func,onExiting:_t.func,onExited:_t.func}:{};function Dp(){}au.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Dp,onEntering:Dp,onEntered:Dp,onExit:Dp,onExiting:Dp,onExited:Dp};au.UNMOUNTED=dm;au.EXITED=dc;au.ENTERING=Zl;au.ENTERED=pc;au.EXITING=h0;const t3=au;function ev(n){return n&&n.ownerDocument||document}function n3(n){var r=ev(n);return r&&r.defaultView||window}function r3(n,r){return n3(n).getComputedStyle(n,r)}var a3=/([A-Z])/g;function i3(n){return n.replace(a3,"-$1").toLowerCase()}var o3=/^ms-/;function Db(n){return i3(n).replace(o3,"-ms-")}var s3=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function l3(n){return!!(n&&s3.test(n))}function Kl(n,r){var i="",u="";if(typeof r=="string")return n.style.getPropertyValue(Db(r))||r3(n).getPropertyValue(Db(r));Object.keys(r).forEach(function(l){var d=r[l];!d&&d!==0?n.style.removeProperty(Db(l)):l3(l)?u+=l+"("+d+") ":i+=Db(l)+": "+d+";"}),u&&(i+="transform: "+u+";"),n.style.cssText+=";"+i}const tv=!!(typeof window<"u"&&window.document&&window.document.createElement);var bw=!1,Cw=!1;try{var VE={get passive(){return bw=!0},get once(){return Cw=bw=!0}};tv&&(window.addEventListener("test",VE,VE),window.removeEventListener("test",VE,!0))}catch{}function oR(n,r,i,u){if(u&&typeof u!="boolean"&&!Cw){var l=u.once,d=u.capture,h=i;!Cw&&l&&(h=i.__once||function v(y){this.removeEventListener(r,v,d),i.call(this,y)},i.__once=h),n.addEventListener(r,h,bw?u:d)}n.addEventListener(r,i,u)}function xw(n,r,i,u){var l=u&&typeof u!="boolean"?u.capture:u;n.removeEventListener(r,i,l),i.__once&&n.removeEventListener(r,i.__once,l)}function ql(n,r,i,u){return oR(n,r,i,u),function(){xw(n,r,i,u)}}function u3(n,r,i,u){if(i===void 0&&(i=!1),u===void 0&&(u=!0),n){var l=document.createEvent("HTMLEvents");l.initEvent(r,i,u),n.dispatchEvent(l)}}function c3(n){var r=Kl(n,"transitionDuration")||"",i=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*i}function f3(n,r,i){i===void 0&&(i=5);var u=!1,l=setTimeout(function(){u||u3(n,"transitionend",!0)},r+i),d=ql(n,"transitionend",function(){u=!0},{once:!0});return function(){clearTimeout(l),d()}}function ej(n,r,i,u){i==null&&(i=c3(n)||0);var l=f3(n,i,u),d=ql(n,"transitionend",r);return function(){l(),d()}}function __(n,r){const i=Kl(n,r)||"",u=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*u}function tj(n,r){const i=__(n,"transitionDuration"),u=__(n,"transitionDelay"),l=ej(n,d=>{d.target===n&&(l(),r(d))},i+u)}function nj(n){n.offsetHeight}function m0(n){return n&&"setState"in n?Bf.findDOMNode(n):n??null}const d3=kr.forwardRef(({onEnter:n,onEntering:r,onEntered:i,onExit:u,onExiting:l,onExited:d,addEndListener:h,children:v,childRef:y,...C},x)=>{const R=M.useRef(null),T=ds(R,y),j=U=>{T(m0(U))},N=U=>J=>{U&&R.current&&U(R.current,J)},O=M.useCallback(N(n),[n]),_=M.useCallback(N(r),[r]),L=M.useCallback(N(i),[i]),F=M.useCallback(N(u),[u]),V=M.useCallback(N(l),[l]),H=M.useCallback(N(d),[d]),z=M.useCallback(N(h),[h]);return b.jsx(t3,{ref:x,...C,onEnter:O,onEntered:L,onEntering:_,onExit:F,onExited:H,onExiting:V,addEndListener:z,nodeRef:R,children:typeof v=="function"?(U,J)=>v(U,{...J,ref:j}):kr.cloneElement(v,{ref:j})})}),rj=d3,p3={[Zl]:"show",[pc]:"show"},aj=M.forwardRef(({className:n,children:r,transitionClasses:i={},onEnter:u,...l},d)=>{const h={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...l},v=M.useCallback((y,C)=>{nj(y),u==null||u(y,C)},[u]);return b.jsx(rj,{ref:d,addEndListener:tj,...h,onEnter:v,childRef:r.ref,children:(y,C)=>M.cloneElement(r,{...C,className:qt("fade",n,r.props.className,p3[y],i[y])})})});aj.displayName="Fade";const $p=aj;function sR(n){return typeof n=="boolean"?n?$p:aR:n}const ij=({transition:n,...r})=>b.jsx(JA,{...r,transition:sR(n)});ij.displayName="TabContainer";const v3=ij,h3=["xxl","xl","lg","md","sm","xs"],m3="xs",oj=M.createContext({prefixes:{},breakpoints:h3,minBreakpoint:m3});function bn(n,r){const{prefixes:i}=M.useContext(oj);return n||i[r]||r}function P0(){const{dir:n}=M.useContext(oj);return n==="rtl"}const sj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"tab-content"),b.jsx(i,{ref:l,className:qt(n,r),...u})));sj.displayName="TabContent";const lj=sj,uj=M.forwardRef(({bsPrefix:n,transition:r,...i},u)=>{const[{className:l,as:d="div",...h},{isActive:v,onEnter:y,onEntering:C,onEntered:x,onExit:R,onExiting:T,onExited:j,mountOnEnter:N,unmountOnExit:O,transition:_=$p}]=XA({...i,transition:sR(r)}),L=bn(n,"tab-pane");return b.jsx(Kp.Provider,{value:null,children:b.jsx(nu.Provider,{value:null,children:b.jsx(_,{in:v,onEnter:y,onEntering:C,onEntered:x,onExit:R,onExiting:T,onExited:j,mountOnEnter:N,unmountOnExit:O,children:b.jsx(d,{...h,ref:u,className:qt(l,L,v&&"active")})})})})});uj.displayName="TabPane";const cj=uj,g3={eventKey:_t.oneOfType([_t.string,_t.number]),title:_t.node.isRequired,disabled:_t.bool,tabClassName:_t.string,tabAttrs:_t.object},fj=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};fj.propTypes=g3;const kb=Object.assign(fj,{Container:v3,Content:lj,Pane:cj});function Rt(){return Rt=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},Rt.apply(this,arguments)}var y3={},b3=function(n,r,i,u,l,d,h,v){if(y3.NODE_ENV!=="production"&&r===void 0)throw new Error("invariant requires an error message argument");if(!n){var y;if(r===void 0)y=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var C=[i,u,l,d,h,v],x=0;y=new Error(r.replace(/%s/g,function(){return C[x++]})),y.name="Invariant Violation"}throw y.framesToPop=1,y}},C3=b3;const O_=qp(C3);function A_(n){return"default"+n.charAt(0).toUpperCase()+n.substr(1)}function x3(n){var r=S3(n,"string");return typeof r=="symbol"?r:String(r)}function S3(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var u=i.call(n,r||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function dj(n,r,i){var u=M.useRef(n!==void 0),l=M.useState(r),d=l[0],h=l[1],v=n!==void 0,y=u.current;return u.current=v,!v&&y&&d!==r&&h(r),[v?n:d,M.useCallback(function(C){for(var x=arguments.length,R=new Array(x>1?x-1:0),T=1;T<x;T++)R[T-1]=arguments[T];i&&i.apply(void 0,[C].concat(R)),h(C)},[i])]}function F0(n,r){return Object.keys(r).reduce(function(i,u){var l,d=i,h=d[A_(u)],v=d[u],y=iR(d,[A_(u),u].map(x3)),C=r[u],x=dj(v,h,n[C]),R=x[0],T=x[1];return Rt({},y,(l={},l[u]=R,l[C]=T,l))},n)}var j_={exports:{}},Sw={exports:{}};(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=i;function i(u){function l(h,v,y,C,x,R){var T=C||"<<anonymous>>",j=R||y;if(v[y]==null)return h?new Error("Required "+x+" `"+j+"` was not specified "+("in `"+T+"`.")):null;for(var N=arguments.length,O=Array(N>6?N-6:0),_=6;_<N;_++)O[_-6]=arguments[_];return u.apply(void 0,[v,y,T,x,j].concat(O))}var d=l.bind(null,!1);return d.isRequired=l.bind(null,!0),d}n.exports=r.default})(Sw,Sw.exports);var E3=Sw.exports;(function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=d;var i=E3,u=l(i);function l(h){return h&&h.__esModule?h:{default:h}}function d(){for(var h=arguments.length,v=Array(h),y=0;y<h;y++)v[y]=arguments[y];function C(){for(var x=arguments.length,R=Array(x),T=0;T<x;T++)R[T]=arguments[T];var j=null;return v.forEach(function(N){if(j==null){var O=N.apply(void 0,R);O!=null&&(j=O)}}),j}return(0,u.default)(C)}n.exports=r.default})(j_,j_.exports);var w3=Function.prototype.bind.call(Function.prototype.call,[].slice);function Jl(n,r){return w3(n.querySelectorAll(r))}function pj(){const[,n]=M.useReducer(r=>!r,!1);return n}const vj=M.createContext(null);vj.displayName="NavContext";const lR=vj,R3="data-rr-ui-",T3="rrUi";function nv(n){return`${R3}${n}`}function I3(n){return`${T3}${n}`}const N3=["as","disabled"];function _3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function O3(n){return!n||n.trim()==="#"}function uR({tagName:n,disabled:r,href:i,target:u,rel:l,role:d,onClick:h,tabIndex:v=0,type:y}){n||(i!=null||u!=null||l!=null?n="a":n="button");const C={tagName:n};if(n==="button")return[{type:y||"button",disabled:r},C];const x=T=>{if((r||n==="a"&&O3(i))&&T.preventDefault(),r){T.stopPropagation();return}h==null||h(T)},R=T=>{T.key===" "&&(T.preventDefault(),x(T))};return n==="a"&&(i||(i="#"),r&&(i=void 0)),[{role:d??"button",disabled:void 0,tabIndex:r?void 0:v,href:i,target:n==="a"?u:void 0,"aria-disabled":r||void 0,rel:n==="a"?l:void 0,onClick:x,onKeyDown:R},C]}const cR=M.forwardRef((n,r)=>{let{as:i,disabled:u}=n,l=_3(n,N3);const[d,{tagName:h}]=uR(Object.assign({tagName:i,disabled:u},l));return b.jsx(h,Object.assign({},l,d,{ref:r}))});cR.displayName="Button";const A3=["as","active","eventKey"];function j3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function hj({key:n,onClick:r,active:i,id:u,role:l,disabled:d}){const h=M.useContext(nu),v=M.useContext(lR),y=M.useContext(Kp);let C=i;const x={role:l};if(v){!l&&v.role==="tablist"&&(x.role="tab");const R=v.getControllerId(n??null),T=v.getControlledId(n??null);x[nv("event-key")]=n,x.id=R||u,C=i==null&&n!=null?v.activeKey===n:i,(C||!(y!=null&&y.unmountOnExit)&&!(y!=null&&y.mountOnEnter))&&(x["aria-controls"]=T)}return x.role==="tab"&&(x["aria-selected"]=C,C||(x.tabIndex=-1),d&&(x.tabIndex=-1,x["aria-disabled"]=!0)),x.onClick=gr(R=>{d||(r==null||r(R),n!=null&&h&&!R.isPropagationStopped()&&h(n,R))}),[x,{isActive:C}]}const mj=M.forwardRef((n,r)=>{let{as:i=cR,active:u,eventKey:l}=n,d=j3(n,A3);const[h,v]=hj(Object.assign({key:Wf(l,d.href),active:u},d));return h[nv("active")]=v.isActive,b.jsx(i,Object.assign({},d,h,{ref:r}))});mj.displayName="NavItem";const D3=mj,k3=["as","onSelect","activeKey","role","onKeyDown"];function M3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const D_=()=>{},k_=nv("event-key"),gj=M.forwardRef((n,r)=>{let{as:i="div",onSelect:u,activeKey:l,role:d,onKeyDown:h}=n,v=M3(n,k3);const y=pj(),C=M.useRef(!1),x=M.useContext(nu),R=M.useContext(Kp);let T,j;R&&(d=d||"tablist",l=R.activeKey,T=R.getControlledId,j=R.getControllerId);const N=M.useRef(null),O=V=>{const H=N.current;if(!H)return null;const z=Jl(H,`[${k_}]:not([aria-disabled=true])`),U=H.querySelector("[aria-selected=true]");if(!U||U!==document.activeElement)return null;const J=z.indexOf(U);if(J===-1)return null;let q=J+V;return q>=z.length&&(q=0),q<0&&(q=z.length-1),z[q]},_=(V,H)=>{V!=null&&(u==null||u(V,H),x==null||x(V,H))},L=V=>{if(h==null||h(V),!R)return;let H;switch(V.key){case"ArrowLeft":case"ArrowUp":H=O(-1);break;case"ArrowRight":case"ArrowDown":H=O(1);break;default:return}H&&(V.preventDefault(),_(H.dataset[I3("EventKey")]||null,V),C.current=!0,y())};M.useEffect(()=>{if(N.current&&C.current){const V=N.current.querySelector(`[${k_}][aria-selected=true]`);V==null||V.focus()}C.current=!1});const F=ds(r,N);return b.jsx(nu.Provider,{value:_,children:b.jsx(lR.Provider,{value:{role:d,activeKey:Wf(l),getControlledId:T||D_,getControllerId:j||D_},children:b.jsx(i,Object.assign({},v,{onKeyDown:L,ref:F,role:d}))})})});gj.displayName="Nav";const L3=Object.assign(gj,{Item:D3}),yj=M.createContext(null);yj.displayName="NavbarContext";const bj=yj,Cj=M.createContext(null);Cj.displayName="CardHeaderContext";const P3=Cj,xj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"nav-item"),b.jsx(i,{ref:l,className:qt(n,r),...u})));xj.displayName="NavItem";const Sj=xj;function g0(){return M.useState(null)}function F3(n,r,i,u=!1){const l=gr(i);M.useEffect(()=>{const d=typeof n=="function"?n():n;return d.addEventListener(r,l,u),()=>d.removeEventListener(r,l,u)},[n])}function fR(){const n=M.useRef(!0),r=M.useRef(()=>n.current);return M.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),r.current}function Ej(n){const r=M.useRef(null);return M.useEffect(()=>{r.current=n}),r.current}const V3=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",B3=typeof document<"u",y0=B3||V3?M.useLayoutEffect:M.useEffect,z3=["onKeyDown"];function H3(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function U3(n){return!n||n.trim()==="#"}const wj=M.forwardRef((n,r)=>{let{onKeyDown:i}=n,u=H3(n,z3);const[l]=uR(Object.assign({tagName:"a"},u)),d=gr(h=>{l.onKeyDown(h),i==null||i(h)});return U3(u.href)||u.role==="button"?b.jsx("a",Object.assign({ref:r},u,l,{onKeyDown:d})):b.jsx("a",Object.assign({ref:r},u,{onKeyDown:i}))});wj.displayName="Anchor";const Rj=wj,Tj=M.forwardRef(({bsPrefix:n,className:r,as:i=Rj,active:u,eventKey:l,disabled:d=!1,...h},v)=>{n=bn(n,"nav-link");const[y,C]=hj({key:Wf(l,h.href),active:u,disabled:d,...h});return b.jsx(i,{...h,...y,ref:v,disabled:d,className:qt(r,n,d&&"disabled",C.isActive&&"active")})});Tj.displayName="NavLink";const Ij=Tj,Nj=M.forwardRef((n,r)=>{const{as:i="div",bsPrefix:u,variant:l,fill:d=!1,justify:h=!1,navbar:v,navbarScroll:y,className:C,activeKey:x,...R}=F0(n,{activeKey:"onSelect"}),T=bn(u,"nav");let j,N,O=!1;const _=M.useContext(bj),L=M.useContext(P3);return _?(j=_.bsPrefix,O=v??!0):L&&({cardHeaderBsPrefix:N}=L),b.jsx(L3,{as:i,ref:r,activeKey:x,className:qt(C,{[T]:!O,[`${j}-nav`]:O,[`${j}-nav-scroll`]:O&&y,[`${N}-${l}`]:!!N,[`${T}-${l}`]:!!l,[`${T}-fill`]:d,[`${T}-justified`]:h}),...R})});Nj.displayName="Nav";const $3=Object.assign(Nj,{Item:Sj,Link:Ij});function M_(n,r){let i=0;return M.Children.map(n,u=>M.isValidElement(u)?r(u,i++):u)}function G3(n,r){let i=0;M.Children.forEach(n,u=>{M.isValidElement(u)&&r(u,i++)})}function W3(n){let r;return G3(n,i=>{r==null&&(r=i.props.eventKey)}),r}function X3(n){const{title:r,eventKey:i,disabled:u,tabClassName:l,tabAttrs:d,id:h}=n.props;return r==null?null:b.jsx(Sj,{as:"li",role:"presentation",children:b.jsx(Ij,{as:"button",type:"button",eventKey:i,disabled:u,id:h,className:l,...d,children:r})})}const _j=n=>{const{id:r,onSelect:i,transition:u,mountOnEnter:l=!1,unmountOnExit:d=!1,variant:h="tabs",children:v,activeKey:y=W3(v),...C}=F0(n,{activeKey:"onSelect"});return b.jsxs(JA,{id:r,activeKey:y,onSelect:i,transition:sR(u),mountOnEnter:l,unmountOnExit:d,children:[b.jsx($3,{...C,role:"tablist",as:"ul",variant:h,children:M_(v,X3)}),b.jsx(lj,{children:M_(v,x=>{const R={...x.props};return delete R.title,delete R.disabled,delete R.tabClassName,delete R.tabAttrs,b.jsx(cj,{...R})})})]})};_j.displayName="Tabs";const Y3=_j,Z3=M.createContext(null),V0=Z3;var L_=Object.prototype.hasOwnProperty;function P_(n,r,i){for(i of n.keys())if(pm(i,r))return i}function pm(n,r){var i,u,l;if(n===r)return!0;if(n&&r&&(i=n.constructor)===r.constructor){if(i===Date)return n.getTime()===r.getTime();if(i===RegExp)return n.toString()===r.toString();if(i===Array){if((u=n.length)===r.length)for(;u--&&pm(n[u],r[u]););return u===-1}if(i===Set){if(n.size!==r.size)return!1;for(u of n)if(l=u,l&&typeof l=="object"&&(l=P_(r,l),!l)||!r.has(l))return!1;return!0}if(i===Map){if(n.size!==r.size)return!1;for(u of n)if(l=u[0],l&&typeof l=="object"&&(l=P_(r,l),!l)||!pm(u[1],r.get(l)))return!1;return!0}if(i===ArrayBuffer)n=new Uint8Array(n),r=new Uint8Array(r);else if(i===DataView){if((u=n.byteLength)===r.byteLength)for(;u--&&n.getInt8(u)===r.getInt8(u););return u===-1}if(ArrayBuffer.isView(n)){if((u=n.byteLength)===r.byteLength)for(;u--&&n[u]===r[u];);return u===-1}if(!i||typeof n=="object"){u=0;for(i in n)if(L_.call(n,i)&&++u&&!L_.call(r,i)||!(i in r)||!pm(n[i],r[i]))return!1;return Object.keys(r).length===u}}return n!==n&&r!==r}function J3(n){const r=fR();return[n[0],M.useCallback(i=>{if(r())return n[1](i)},[r,n[1]])]}var Oi="top",wo="bottom",Ro="right",Ai="left",dR="auto",Am=[Oi,wo,Ro,Ai],Gp="start",bm="end",q3="clippingParents",Oj="viewport",am="popper",Q3="reference",F_=Am.reduce(function(n,r){return n.concat([r+"-"+Gp,r+"-"+bm])},[]),Aj=[].concat(Am,[dR]).reduce(function(n,r){return n.concat([r,r+"-"+Gp,r+"-"+bm])},[]),K3="beforeRead",eG="read",tG="afterRead",nG="beforeMain",rG="main",aG="afterMain",iG="beforeWrite",oG="write",sG="afterWrite",lG=[K3,eG,tG,nG,rG,aG,iG,oG,sG];function Ks(n){return n.split("-")[0]}function qi(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var r=n.ownerDocument;return r&&r.defaultView||window}return n}function Xf(n){var r=qi(n).Element;return n instanceof r||n instanceof Element}function el(n){var r=qi(n).HTMLElement;return n instanceof r||n instanceof HTMLElement}function pR(n){if(typeof ShadowRoot>"u")return!1;var r=qi(n).ShadowRoot;return n instanceof r||n instanceof ShadowRoot}var Uf=Math.max,b0=Math.min,Wp=Math.round;function Ew(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(r){return r.brand+"/"+r.version}).join(" "):navigator.userAgent}function jj(){return!/^((?!chrome|android).)*safari/i.test(Ew())}function Xp(n,r,i){r===void 0&&(r=!1),i===void 0&&(i=!1);var u=n.getBoundingClientRect(),l=1,d=1;r&&el(n)&&(l=n.offsetWidth>0&&Wp(u.width)/n.offsetWidth||1,d=n.offsetHeight>0&&Wp(u.height)/n.offsetHeight||1);var h=Xf(n)?qi(n):window,v=h.visualViewport,y=!jj()&&i,C=(u.left+(y&&v?v.offsetLeft:0))/l,x=(u.top+(y&&v?v.offsetTop:0))/d,R=u.width/l,T=u.height/d;return{width:R,height:T,top:x,right:C+R,bottom:x+T,left:C,x:C,y:x}}function vR(n){var r=Xp(n),i=n.offsetWidth,u=n.offsetHeight;return Math.abs(r.width-i)<=1&&(i=r.width),Math.abs(r.height-u)<=1&&(u=r.height),{x:n.offsetLeft,y:n.offsetTop,width:i,height:u}}function Dj(n,r){var i=r.getRootNode&&r.getRootNode();if(n.contains(r))return!0;if(i&&pR(i)){var u=r;do{if(u&&n.isSameNode(u))return!0;u=u.parentNode||u.host}while(u)}return!1}function gc(n){return n?(n.nodeName||"").toLowerCase():null}function ru(n){return qi(n).getComputedStyle(n)}function uG(n){return["table","td","th"].indexOf(gc(n))>=0}function yc(n){return((Xf(n)?n.ownerDocument:n.document)||window.document).documentElement}function B0(n){return gc(n)==="html"?n:n.assignedSlot||n.parentNode||(pR(n)?n.host:null)||yc(n)}function V_(n){return!el(n)||ru(n).position==="fixed"?null:n.offsetParent}function cG(n){var r=/firefox/i.test(Ew()),i=/Trident/i.test(Ew());if(i&&el(n)){var u=ru(n);if(u.position==="fixed")return null}var l=B0(n);for(pR(l)&&(l=l.host);el(l)&&["html","body"].indexOf(gc(l))<0;){var d=ru(l);if(d.transform!=="none"||d.perspective!=="none"||d.contain==="paint"||["transform","perspective"].indexOf(d.willChange)!==-1||r&&d.willChange==="filter"||r&&d.filter&&d.filter!=="none")return l;l=l.parentNode}return null}function jm(n){for(var r=qi(n),i=V_(n);i&&uG(i)&&ru(i).position==="static";)i=V_(i);return i&&(gc(i)==="html"||gc(i)==="body"&&ru(i).position==="static")?r:i||cG(n)||r}function hR(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function vm(n,r,i){return Uf(n,b0(r,i))}function fG(n,r,i){var u=vm(n,r,i);return u>i?i:u}function kj(){return{top:0,right:0,bottom:0,left:0}}function Mj(n){return Object.assign({},kj(),n)}function Lj(n,r){return r.reduce(function(i,u){return i[u]=n,i},{})}var dG=function(r,i){return r=typeof r=="function"?r(Object.assign({},i.rects,{placement:i.placement})):r,Mj(typeof r!="number"?r:Lj(r,Am))};function pG(n){var r,i=n.state,u=n.name,l=n.options,d=i.elements.arrow,h=i.modifiersData.popperOffsets,v=Ks(i.placement),y=hR(v),C=[Ai,Ro].indexOf(v)>=0,x=C?"height":"width";if(!(!d||!h)){var R=dG(l.padding,i),T=vR(d),j=y==="y"?Oi:Ai,N=y==="y"?wo:Ro,O=i.rects.reference[x]+i.rects.reference[y]-h[y]-i.rects.popper[x],_=h[y]-i.rects.reference[y],L=jm(d),F=L?y==="y"?L.clientHeight||0:L.clientWidth||0:0,V=O/2-_/2,H=R[j],z=F-T[x]-R[N],U=F/2-T[x]/2+V,J=vm(H,U,z),q=y;i.modifiersData[u]=(r={},r[q]=J,r.centerOffset=J-U,r)}}function vG(n){var r=n.state,i=n.options,u=i.element,l=u===void 0?"[data-popper-arrow]":u;l!=null&&(typeof l=="string"&&(l=r.elements.popper.querySelector(l),!l)||Dj(r.elements.popper,l)&&(r.elements.arrow=l))}const hG={name:"arrow",enabled:!0,phase:"main",fn:pG,effect:vG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yp(n){return n.split("-")[1]}var mG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gG(n,r){var i=n.x,u=n.y,l=r.devicePixelRatio||1;return{x:Wp(i*l)/l||0,y:Wp(u*l)/l||0}}function B_(n){var r,i=n.popper,u=n.popperRect,l=n.placement,d=n.variation,h=n.offsets,v=n.position,y=n.gpuAcceleration,C=n.adaptive,x=n.roundOffsets,R=n.isFixed,T=h.x,j=T===void 0?0:T,N=h.y,O=N===void 0?0:N,_=typeof x=="function"?x({x:j,y:O}):{x:j,y:O};j=_.x,O=_.y;var L=h.hasOwnProperty("x"),F=h.hasOwnProperty("y"),V=Ai,H=Oi,z=window;if(C){var U=jm(i),J="clientHeight",q="clientWidth";if(U===qi(i)&&(U=yc(i),ru(U).position!=="static"&&v==="absolute"&&(J="scrollHeight",q="scrollWidth")),U=U,l===Oi||(l===Ai||l===Ro)&&d===bm){H=wo;var Re=R&&U===z&&z.visualViewport?z.visualViewport.height:U[J];O-=Re-u.height,O*=y?1:-1}if(l===Ai||(l===Oi||l===wo)&&d===bm){V=Ro;var he=R&&U===z&&z.visualViewport?z.visualViewport.width:U[q];j-=he-u.width,j*=y?1:-1}}var ge=Object.assign({position:v},C&&mG),fe=x===!0?gG({x:j,y:O},qi(i)):{x:j,y:O};if(j=fe.x,O=fe.y,y){var Oe;return Object.assign({},ge,(Oe={},Oe[H]=F?"0":"",Oe[V]=L?"0":"",Oe.transform=(z.devicePixelRatio||1)<=1?"translate("+j+"px, "+O+"px)":"translate3d("+j+"px, "+O+"px, 0)",Oe))}return Object.assign({},ge,(r={},r[H]=F?O+"px":"",r[V]=L?j+"px":"",r.transform="",r))}function yG(n){var r=n.state,i=n.options,u=i.gpuAcceleration,l=u===void 0?!0:u,d=i.adaptive,h=d===void 0?!0:d,v=i.roundOffsets,y=v===void 0?!0:v,C={placement:Ks(r.placement),variation:Yp(r.placement),popper:r.elements.popper,popperRect:r.rects.popper,gpuAcceleration:l,isFixed:r.options.strategy==="fixed"};r.modifiersData.popperOffsets!=null&&(r.styles.popper=Object.assign({},r.styles.popper,B_(Object.assign({},C,{offsets:r.modifiersData.popperOffsets,position:r.options.strategy,adaptive:h,roundOffsets:y})))),r.modifiersData.arrow!=null&&(r.styles.arrow=Object.assign({},r.styles.arrow,B_(Object.assign({},C,{offsets:r.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:y})))),r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-placement":r.placement})}const bG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yG,data:{}};var Mb={passive:!0};function CG(n){var r=n.state,i=n.instance,u=n.options,l=u.scroll,d=l===void 0?!0:l,h=u.resize,v=h===void 0?!0:h,y=qi(r.elements.popper),C=[].concat(r.scrollParents.reference,r.scrollParents.popper);return d&&C.forEach(function(x){x.addEventListener("scroll",i.update,Mb)}),v&&y.addEventListener("resize",i.update,Mb),function(){d&&C.forEach(function(x){x.removeEventListener("scroll",i.update,Mb)}),v&&y.removeEventListener("resize",i.update,Mb)}}const xG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:CG,data:{}};var SG={left:"right",right:"left",bottom:"top",top:"bottom"};function qb(n){return n.replace(/left|right|bottom|top/g,function(r){return SG[r]})}var EG={start:"end",end:"start"};function z_(n){return n.replace(/start|end/g,function(r){return EG[r]})}function mR(n){var r=qi(n),i=r.pageXOffset,u=r.pageYOffset;return{scrollLeft:i,scrollTop:u}}function gR(n){return Xp(yc(n)).left+mR(n).scrollLeft}function wG(n,r){var i=qi(n),u=yc(n),l=i.visualViewport,d=u.clientWidth,h=u.clientHeight,v=0,y=0;if(l){d=l.width,h=l.height;var C=jj();(C||!C&&r==="fixed")&&(v=l.offsetLeft,y=l.offsetTop)}return{width:d,height:h,x:v+gR(n),y}}function RG(n){var r,i=yc(n),u=mR(n),l=(r=n.ownerDocument)==null?void 0:r.body,d=Uf(i.scrollWidth,i.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),h=Uf(i.scrollHeight,i.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),v=-u.scrollLeft+gR(n),y=-u.scrollTop;return ru(l||i).direction==="rtl"&&(v+=Uf(i.clientWidth,l?l.clientWidth:0)-d),{width:d,height:h,x:v,y}}function yR(n){var r=ru(n),i=r.overflow,u=r.overflowX,l=r.overflowY;return/auto|scroll|overlay|hidden/.test(i+l+u)}function Pj(n){return["html","body","#document"].indexOf(gc(n))>=0?n.ownerDocument.body:el(n)&&yR(n)?n:Pj(B0(n))}function hm(n,r){var i;r===void 0&&(r=[]);var u=Pj(n),l=u===((i=n.ownerDocument)==null?void 0:i.body),d=qi(u),h=l?[d].concat(d.visualViewport||[],yR(u)?u:[]):u,v=r.concat(h);return l?v:v.concat(hm(B0(h)))}function ww(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function TG(n,r){var i=Xp(n,!1,r==="fixed");return i.top=i.top+n.clientTop,i.left=i.left+n.clientLeft,i.bottom=i.top+n.clientHeight,i.right=i.left+n.clientWidth,i.width=n.clientWidth,i.height=n.clientHeight,i.x=i.left,i.y=i.top,i}function H_(n,r,i){return r===Oj?ww(wG(n,i)):Xf(r)?TG(r,i):ww(RG(yc(n)))}function IG(n){var r=hm(B0(n)),i=["absolute","fixed"].indexOf(ru(n).position)>=0,u=i&&el(n)?jm(n):n;return Xf(u)?r.filter(function(l){return Xf(l)&&Dj(l,u)&&gc(l)!=="body"}):[]}function NG(n,r,i,u){var l=r==="clippingParents"?IG(n):[].concat(r),d=[].concat(l,[i]),h=d[0],v=d.reduce(function(y,C){var x=H_(n,C,u);return y.top=Uf(x.top,y.top),y.right=b0(x.right,y.right),y.bottom=b0(x.bottom,y.bottom),y.left=Uf(x.left,y.left),y},H_(n,h,u));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}function Fj(n){var r=n.reference,i=n.element,u=n.placement,l=u?Ks(u):null,d=u?Yp(u):null,h=r.x+r.width/2-i.width/2,v=r.y+r.height/2-i.height/2,y;switch(l){case Oi:y={x:h,y:r.y-i.height};break;case wo:y={x:h,y:r.y+r.height};break;case Ro:y={x:r.x+r.width,y:v};break;case Ai:y={x:r.x-i.width,y:v};break;default:y={x:r.x,y:r.y}}var C=l?hR(l):null;if(C!=null){var x=C==="y"?"height":"width";switch(d){case Gp:y[C]=y[C]-(r[x]/2-i[x]/2);break;case bm:y[C]=y[C]+(r[x]/2-i[x]/2);break}}return y}function Cm(n,r){r===void 0&&(r={});var i=r,u=i.placement,l=u===void 0?n.placement:u,d=i.strategy,h=d===void 0?n.strategy:d,v=i.boundary,y=v===void 0?q3:v,C=i.rootBoundary,x=C===void 0?Oj:C,R=i.elementContext,T=R===void 0?am:R,j=i.altBoundary,N=j===void 0?!1:j,O=i.padding,_=O===void 0?0:O,L=Mj(typeof _!="number"?_:Lj(_,Am)),F=T===am?Q3:am,V=n.rects.popper,H=n.elements[N?F:T],z=NG(Xf(H)?H:H.contextElement||yc(n.elements.popper),y,x,h),U=Xp(n.elements.reference),J=Fj({reference:U,element:V,strategy:"absolute",placement:l}),q=ww(Object.assign({},V,J)),Re=T===am?q:U,he={top:z.top-Re.top+L.top,bottom:Re.bottom-z.bottom+L.bottom,left:z.left-Re.left+L.left,right:Re.right-z.right+L.right},ge=n.modifiersData.offset;if(T===am&&ge){var fe=ge[l];Object.keys(he).forEach(function(Oe){var Te=[Ro,wo].indexOf(Oe)>=0?1:-1,xe=[Oi,wo].indexOf(Oe)>=0?"y":"x";he[Oe]+=fe[xe]*Te})}return he}function _G(n,r){r===void 0&&(r={});var i=r,u=i.placement,l=i.boundary,d=i.rootBoundary,h=i.padding,v=i.flipVariations,y=i.allowedAutoPlacements,C=y===void 0?Aj:y,x=Yp(u),R=x?v?F_:F_.filter(function(N){return Yp(N)===x}):Am,T=R.filter(function(N){return C.indexOf(N)>=0});T.length===0&&(T=R);var j=T.reduce(function(N,O){return N[O]=Cm(n,{placement:O,boundary:l,rootBoundary:d,padding:h})[Ks(O)],N},{});return Object.keys(j).sort(function(N,O){return j[N]-j[O]})}function OG(n){if(Ks(n)===dR)return[];var r=qb(n);return[z_(n),r,z_(r)]}function AG(n){var r=n.state,i=n.options,u=n.name;if(!r.modifiersData[u]._skip){for(var l=i.mainAxis,d=l===void 0?!0:l,h=i.altAxis,v=h===void 0?!0:h,y=i.fallbackPlacements,C=i.padding,x=i.boundary,R=i.rootBoundary,T=i.altBoundary,j=i.flipVariations,N=j===void 0?!0:j,O=i.allowedAutoPlacements,_=r.options.placement,L=Ks(_),F=L===_,V=y||(F||!N?[qb(_)]:OG(_)),H=[_].concat(V).reduce(function(Se,Ne){return Se.concat(Ks(Ne)===dR?_G(r,{placement:Ne,boundary:x,rootBoundary:R,padding:C,flipVariations:N,allowedAutoPlacements:O}):Ne)},[]),z=r.rects.reference,U=r.rects.popper,J=new Map,q=!0,Re=H[0],he=0;he<H.length;he++){var ge=H[he],fe=Ks(ge),Oe=Yp(ge)===Gp,Te=[Oi,wo].indexOf(fe)>=0,xe=Te?"width":"height",je=Cm(r,{placement:ge,boundary:x,rootBoundary:R,altBoundary:T,padding:C}),Le=Te?Oe?Ro:Ai:Oe?wo:Oi;z[xe]>U[xe]&&(Le=qb(Le));var ne=qb(Le),_e=[];if(d&&_e.push(je[fe]<=0),v&&_e.push(je[Le]<=0,je[ne]<=0),_e.every(function(Se){return Se})){Re=ge,q=!1;break}J.set(ge,_e)}if(q)for(var G=N?3:1,Y=function(Ne){var le=H.find(function(ve){var we=J.get(ve);if(we)return we.slice(0,Ne).every(function(Ve){return Ve})});if(le)return Re=le,"break"},re=G;re>0;re--){var ye=Y(re);if(ye==="break")break}r.placement!==Re&&(r.modifiersData[u]._skip=!0,r.placement=Re,r.reset=!0)}}const jG={name:"flip",enabled:!0,phase:"main",fn:AG,requiresIfExists:["offset"],data:{_skip:!1}};function U_(n,r,i){return i===void 0&&(i={x:0,y:0}),{top:n.top-r.height-i.y,right:n.right-r.width+i.x,bottom:n.bottom-r.height+i.y,left:n.left-r.width-i.x}}function $_(n){return[Oi,Ro,wo,Ai].some(function(r){return n[r]>=0})}function DG(n){var r=n.state,i=n.name,u=r.rects.reference,l=r.rects.popper,d=r.modifiersData.preventOverflow,h=Cm(r,{elementContext:"reference"}),v=Cm(r,{altBoundary:!0}),y=U_(h,u),C=U_(v,l,d),x=$_(y),R=$_(C);r.modifiersData[i]={referenceClippingOffsets:y,popperEscapeOffsets:C,isReferenceHidden:x,hasPopperEscaped:R},r.attributes.popper=Object.assign({},r.attributes.popper,{"data-popper-reference-hidden":x,"data-popper-escaped":R})}const kG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:DG};function MG(n,r,i){var u=Ks(n),l=[Ai,Oi].indexOf(u)>=0?-1:1,d=typeof i=="function"?i(Object.assign({},r,{placement:n})):i,h=d[0],v=d[1];return h=h||0,v=(v||0)*l,[Ai,Ro].indexOf(u)>=0?{x:v,y:h}:{x:h,y:v}}function LG(n){var r=n.state,i=n.options,u=n.name,l=i.offset,d=l===void 0?[0,0]:l,h=Aj.reduce(function(x,R){return x[R]=MG(R,r.rects,d),x},{}),v=h[r.placement],y=v.x,C=v.y;r.modifiersData.popperOffsets!=null&&(r.modifiersData.popperOffsets.x+=y,r.modifiersData.popperOffsets.y+=C),r.modifiersData[u]=h}const PG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:LG};function FG(n){var r=n.state,i=n.name;r.modifiersData[i]=Fj({reference:r.rects.reference,element:r.rects.popper,strategy:"absolute",placement:r.placement})}const VG={name:"popperOffsets",enabled:!0,phase:"read",fn:FG,data:{}};function BG(n){return n==="x"?"y":"x"}function zG(n){var r=n.state,i=n.options,u=n.name,l=i.mainAxis,d=l===void 0?!0:l,h=i.altAxis,v=h===void 0?!1:h,y=i.boundary,C=i.rootBoundary,x=i.altBoundary,R=i.padding,T=i.tether,j=T===void 0?!0:T,N=i.tetherOffset,O=N===void 0?0:N,_=Cm(r,{boundary:y,rootBoundary:C,padding:R,altBoundary:x}),L=Ks(r.placement),F=Yp(r.placement),V=!F,H=hR(L),z=BG(H),U=r.modifiersData.popperOffsets,J=r.rects.reference,q=r.rects.popper,Re=typeof O=="function"?O(Object.assign({},r.rects,{placement:r.placement})):O,he=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),ge=r.modifiersData.offset?r.modifiersData.offset[r.placement]:null,fe={x:0,y:0};if(U){if(d){var Oe,Te=H==="y"?Oi:Ai,xe=H==="y"?wo:Ro,je=H==="y"?"height":"width",Le=U[H],ne=Le+_[Te],_e=Le-_[xe],G=j?-q[je]/2:0,Y=F===Gp?J[je]:q[je],re=F===Gp?-q[je]:-J[je],ye=r.elements.arrow,Se=j&&ye?vR(ye):{width:0,height:0},Ne=r.modifiersData["arrow#persistent"]?r.modifiersData["arrow#persistent"].padding:kj(),le=Ne[Te],ve=Ne[xe],we=vm(0,J[je],Se[je]),Ve=V?J[je]/2-G-we-le-he.mainAxis:Y-we-le-he.mainAxis,et=V?-J[je]/2+G+we+ve+he.mainAxis:re+we+ve+he.mainAxis,tt=r.elements.arrow&&jm(r.elements.arrow),ft=tt?H==="y"?tt.clientTop||0:tt.clientLeft||0:0,Ae=(Oe=ge==null?void 0:ge[H])!=null?Oe:0,It=Le+Ve-Ae-ft,pt=Le+et-Ae,Kt=vm(j?b0(ne,It):ne,Le,j?Uf(_e,pt):_e);U[H]=Kt,fe[H]=Kt-Le}if(v){var on,sn=H==="x"?Oi:Ai,_n=H==="x"?wo:Ro,Vt=U[z],Cn=z==="y"?"height":"width",qn=Vt+_[sn],Rr=Vt-_[_n],$n=[Oi,Ai].indexOf(L)!==-1,Tr=(on=ge==null?void 0:ge[z])!=null?on:0,xt=$n?qn:Vt-J[Cn]-q[Cn]-Tr+he.altAxis,Pn=$n?Vt+J[Cn]+q[Cn]-Tr-he.altAxis:Rr,ln=j&&$n?fG(xt,Vt,Pn):vm(j?xt:qn,Vt,j?Pn:Rr);U[z]=ln,fe[z]=ln-Vt}r.modifiersData[u]=fe}}const HG={name:"preventOverflow",enabled:!0,phase:"main",fn:zG,requiresIfExists:["offset"]};function UG(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function $G(n){return n===qi(n)||!el(n)?mR(n):UG(n)}function GG(n){var r=n.getBoundingClientRect(),i=Wp(r.width)/n.offsetWidth||1,u=Wp(r.height)/n.offsetHeight||1;return i!==1||u!==1}function WG(n,r,i){i===void 0&&(i=!1);var u=el(r),l=el(r)&&GG(r),d=yc(r),h=Xp(n,l,i),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(u||!u&&!i)&&((gc(r)!=="body"||yR(d))&&(v=$G(r)),el(r)?(y=Xp(r,!0),y.x+=r.clientLeft,y.y+=r.clientTop):d&&(y.x=gR(d))),{x:h.left+v.scrollLeft-y.x,y:h.top+v.scrollTop-y.y,width:h.width,height:h.height}}function XG(n){var r=new Map,i=new Set,u=[];n.forEach(function(d){r.set(d.name,d)});function l(d){i.add(d.name);var h=[].concat(d.requires||[],d.requiresIfExists||[]);h.forEach(function(v){if(!i.has(v)){var y=r.get(v);y&&l(y)}}),u.push(d)}return n.forEach(function(d){i.has(d.name)||l(d)}),u}function YG(n){var r=XG(n);return lG.reduce(function(i,u){return i.concat(r.filter(function(l){return l.phase===u}))},[])}function ZG(n){var r;return function(){return r||(r=new Promise(function(i){Promise.resolve().then(function(){r=void 0,i(n())})})),r}}function JG(n){var r=n.reduce(function(i,u){var l=i[u.name];return i[u.name]=l?Object.assign({},l,u,{options:Object.assign({},l.options,u.options),data:Object.assign({},l.data,u.data)}):u,i},{});return Object.keys(r).map(function(i){return r[i]})}var G_={placement:"bottom",modifiers:[],strategy:"absolute"};function W_(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return!r.some(function(u){return!(u&&typeof u.getBoundingClientRect=="function")})}function qG(n){n===void 0&&(n={});var r=n,i=r.defaultModifiers,u=i===void 0?[]:i,l=r.defaultOptions,d=l===void 0?G_:l;return function(v,y,C){C===void 0&&(C=d);var x={placement:"bottom",orderedModifiers:[],options:Object.assign({},G_,d),modifiersData:{},elements:{reference:v,popper:y},attributes:{},styles:{}},R=[],T=!1,j={state:x,setOptions:function(L){var F=typeof L=="function"?L(x.options):L;O(),x.options=Object.assign({},d,x.options,F),x.scrollParents={reference:Xf(v)?hm(v):v.contextElement?hm(v.contextElement):[],popper:hm(y)};var V=YG(JG([].concat(u,x.options.modifiers)));return x.orderedModifiers=V.filter(function(H){return H.enabled}),N(),j.update()},forceUpdate:function(){if(!T){var L=x.elements,F=L.reference,V=L.popper;if(W_(F,V)){x.rects={reference:WG(F,jm(V),x.options.strategy==="fixed"),popper:vR(V)},x.reset=!1,x.placement=x.options.placement,x.orderedModifiers.forEach(function(he){return x.modifiersData[he.name]=Object.assign({},he.data)});for(var H=0;H<x.orderedModifiers.length;H++){if(x.reset===!0){x.reset=!1,H=-1;continue}var z=x.orderedModifiers[H],U=z.fn,J=z.options,q=J===void 0?{}:J,Re=z.name;typeof U=="function"&&(x=U({state:x,options:q,name:Re,instance:j})||x)}}}},update:ZG(function(){return new Promise(function(_){j.forceUpdate(),_(x)})}),destroy:function(){O(),T=!0}};if(!W_(v,y))return j;j.setOptions(C).then(function(_){!T&&C.onFirstUpdate&&C.onFirstUpdate(_)});function N(){x.orderedModifiers.forEach(function(_){var L=_.name,F=_.options,V=F===void 0?{}:F,H=_.effect;if(typeof H=="function"){var z=H({state:x,name:L,instance:j,options:V}),U=function(){};R.push(z||U)}})}function O(){R.forEach(function(_){return _()}),R=[]}return j}}const QG=qG({defaultModifiers:[kG,VG,bG,xG,PG,jG,HG,hG]}),KG=["enabled","placement","strategy","modifiers"];function e9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const t9={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},n9={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:n})=>()=>{const{reference:r,popper:i}=n.elements;if("removeAttribute"in r){const u=(r.getAttribute("aria-describedby")||"").split(",").filter(l=>l.trim()!==i.id);u.length?r.setAttribute("aria-describedby",u.join(",")):r.removeAttribute("aria-describedby")}},fn:({state:n})=>{var r;const{popper:i,reference:u}=n.elements,l=(r=i.getAttribute("role"))==null?void 0:r.toLowerCase();if(i.id&&l==="tooltip"&&"setAttribute"in u){const d=u.getAttribute("aria-describedby");if(d&&d.split(",").indexOf(i.id)!==-1)return;u.setAttribute("aria-describedby",d?`${d},${i.id}`:i.id)}}},r9=[];function Vj(n,r,i={}){let{enabled:u=!0,placement:l="bottom",strategy:d="absolute",modifiers:h=r9}=i,v=e9(i,KG);const y=M.useRef(h),C=M.useRef(),x=M.useCallback(()=>{var _;(_=C.current)==null||_.update()},[]),R=M.useCallback(()=>{var _;(_=C.current)==null||_.forceUpdate()},[]),[T,j]=J3(M.useState({placement:l,update:x,forceUpdate:R,attributes:{},styles:{popper:{},arrow:{}}})),N=M.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:_})=>{const L={},F={};Object.keys(_.elements).forEach(V=>{L[V]=_.styles[V],F[V]=_.attributes[V]}),j({state:_,styles:L,attributes:F,update:x,forceUpdate:R,placement:_.placement})}}),[x,R,j]),O=M.useMemo(()=>(pm(y.current,h)||(y.current=h),y.current),[h]);return M.useEffect(()=>{!C.current||!u||C.current.setOptions({placement:l,strategy:d,modifiers:[...O,N,t9]})},[d,l,N,u,O]),M.useEffect(()=>{if(!(!u||n==null||r==null))return C.current=QG(n,r,Object.assign({},v,{placement:l,strategy:d,modifiers:[...O,n9,N]})),()=>{C.current!=null&&(C.current.destroy(),C.current=void 0,j(_=>Object.assign({},_,{attributes:{},styles:{popper:{}}})))}},[u,n,r]),T}function xm(n,r){if(n.contains)return n.contains(r);if(n.compareDocumentPosition)return n===r||!!(n.compareDocumentPosition(r)&16)}var a9={},i9=a9.NODE_ENV!=="production",Bj=function(){};if(i9){var o9=function(r,i){var u=arguments.length;i=new Array(u>1?u-1:0);for(var l=1;l<u;l++)i[l-1]=arguments[l];var d=0,h="Warning: "+r.replace(/%s/g,function(){return i[d++]});typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}};Bj=function(n,r,i){var u=arguments.length;i=new Array(u>2?u-2:0);for(var l=2;l<u;l++)i[l-2]=arguments[l];if(r===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");n||o9.apply(null,[r].concat(i))}}var s9=Bj;const bR=qp(s9),X_=()=>{};function l9(n){return n.button===0}function u9(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}const Qb=n=>n&&("current"in n?n.current:n),Y_={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function zj(n,r=X_,{disabled:i,clickTrigger:u="click"}={}){const l=M.useRef(!1),d=M.useRef(!1),h=M.useCallback(C=>{const x=Qb(n);bR(!!x,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),l.current=!x||u9(C)||!l9(C)||!!xm(x,C.target)||d.current,d.current=!1},[n]),v=gr(C=>{const x=Qb(n);x&&xm(x,C.target)&&(d.current=!0)}),y=gr(C=>{l.current||r(C)});M.useEffect(()=>{var C,x;if(i||n==null)return;const R=ev(Qb(n)),T=R.defaultView||window;let j=(C=T.event)!=null?C:(x=T.parent)==null?void 0:x.event,N=null;Y_[u]&&(N=ql(R,Y_[u],v,!0));const O=ql(R,u,h,!0),_=ql(R,u,F=>{if(F===j){j=void 0;return}y(F)});let L=[];return"ontouchstart"in R.documentElement&&(L=[].slice.call(R.body.children).map(F=>ql(F,"mousemove",X_))),()=>{N==null||N(),O(),_(),L.forEach(F=>F())}},[n,i,u,h,v,y])}function c9(n){const r={};return Array.isArray(n)?(n==null||n.forEach(i=>{r[i.name]=i}),r):n||r}function f9(n={}){return Array.isArray(n)?n:Object.keys(n).map(r=>(n[r].name=r,n[r]))}function Hj({enabled:n,enableEvents:r,placement:i,flip:u,offset:l,fixed:d,containerPadding:h,arrowElement:v,popperConfig:y={}}){var C,x,R,T,j;const N=c9(y.modifiers);return Object.assign({},y,{placement:i,enabled:n,strategy:d?"fixed":y.strategy,modifiers:f9(Object.assign({},N,{eventListeners:{enabled:r,options:(C=N.eventListeners)==null?void 0:C.options},preventOverflow:Object.assign({},N.preventOverflow,{options:h?Object.assign({padding:h},(x=N.preventOverflow)==null?void 0:x.options):(R=N.preventOverflow)==null?void 0:R.options}),offset:{options:Object.assign({offset:l},(T=N.offset)==null?void 0:T.options)},arrow:Object.assign({},N.arrow,{enabled:!!v,options:Object.assign({},(j=N.arrow)==null?void 0:j.options,{element:v})}),flip:Object.assign({enabled:!!u},N.flip)}))})}const d9=["children"];function p9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}const v9=()=>{};function Uj(n={}){const r=M.useContext(V0),[i,u]=g0(),l=M.useRef(!1),{flip:d,offset:h,rootCloseEvent:v,fixed:y=!1,placement:C,popperConfig:x={},enableEventListeners:R=!0,usePopper:T=!!r}=n,j=(r==null?void 0:r.show)==null?!!n.show:r.show;j&&!l.current&&(l.current=!0);const N=U=>{r==null||r.toggle(!1,U)},{placement:O,setMenu:_,menuElement:L,toggleElement:F}=r||{},V=Vj(F,L,Hj({placement:C||O||"bottom-start",enabled:T,enableEvents:R??j,offset:h,flip:d,fixed:y,arrowElement:i,popperConfig:x})),H=Object.assign({ref:_||v9,"aria-labelledby":F==null?void 0:F.id},V.attributes.popper,{style:V.styles.popper}),z={show:j,placement:O,hasShown:l.current,toggle:r==null?void 0:r.toggle,popper:T?V:null,arrowProps:T?Object.assign({ref:u},V.attributes.arrow,{style:V.styles.arrow}):{}};return zj(L,N,{clickTrigger:v,disabled:!j}),[H,z]}const h9={usePopper:!0};function CR(n){let{children:r}=n,i=p9(n,d9);const[u,l]=Uj(i);return b.jsx(b.Fragment,{children:r(u,l)})}CR.displayName="DropdownMenu";CR.defaultProps=h9;const $j=n=>{var r;return((r=n.getAttribute("role"))==null?void 0:r.toLowerCase())==="menu"},Z_=()=>{};function Gj(){const n=WA(),{show:r=!1,toggle:i=Z_,setToggle:u,menuElement:l}=M.useContext(V0)||{},d=M.useCallback(v=>{i(!r,v)},[r,i]),h={id:n,ref:u||Z_,onClick:d,"aria-expanded":!!r};return l&&$j(l)&&(h["aria-haspopup"]=!0),[h,{show:r,toggle:i}]}function Wj({children:n}){const[r,i]=Gj();return b.jsx(b.Fragment,{children:n(r,i)})}Wj.displayName="DropdownToggle";const m9=["eventKey","disabled","onClick","active","as"];function g9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}function Xj({key:n,href:r,active:i,disabled:u,onClick:l}){const d=M.useContext(nu),h=M.useContext(lR),{activeKey:v}=h||{},y=Wf(n,r),C=i==null&&n!=null?Wf(v)===y:i;return[{onClick:gr(R=>{u||(l==null||l(R),d&&!R.isPropagationStopped()&&d(y,R))}),"aria-disabled":u||void 0,"aria-selected":C,[nv("dropdown-item")]:""},{isActive:C}]}const Yj=M.forwardRef((n,r)=>{let{eventKey:i,disabled:u,onClick:l,active:d,as:h=cR}=n,v=g9(n,m9);const[y]=Xj({key:i,href:v.href,disabled:u,onClick:l,active:d});return b.jsx(h,Object.assign({},v,{ref:r},y))});Yj.displayName="DropdownItem";const Zj=M.createContext(tv?window:void 0);Zj.Provider;function z0(){return M.useContext(Zj)}function J_(){const n=pj(),r=M.useRef(null),i=M.useCallback(u=>{r.current=u,n()},[n]);return[r,i]}function Dm({defaultShow:n,show:r,onSelect:i,onToggle:u,itemSelector:l=`* [${nv("dropdown-item")}]`,focusFirstItemOnShow:d,placement:h="bottom-start",children:v}){const y=z0(),[C,x]=UA(r,n,u),[R,T]=J_(),j=R.current,[N,O]=J_(),_=N.current,L=Ej(C),F=M.useRef(null),V=M.useRef(!1),H=M.useContext(nu),z=M.useCallback((ge,fe,Oe=fe==null?void 0:fe.type)=>{x(ge,{originalEvent:fe,source:Oe})},[x]),U=gr((ge,fe)=>{i==null||i(ge,fe),z(!1,fe,"select"),fe.isPropagationStopped()||H==null||H(ge,fe)}),J=M.useMemo(()=>({toggle:z,placement:h,show:C,menuElement:j,toggleElement:_,setMenu:T,setToggle:O}),[z,h,C,j,_,T,O]);j&&L&&!C&&(V.current=j.contains(j.ownerDocument.activeElement));const q=gr(()=>{_&&_.focus&&_.focus()}),Re=gr(()=>{const ge=F.current;let fe=d;if(fe==null&&(fe=R.current&&$j(R.current)?"keyboard":!1),fe===!1||fe==="keyboard"&&!/^key.+$/.test(ge))return;const Oe=Jl(R.current,l)[0];Oe&&Oe.focus&&Oe.focus()});M.useEffect(()=>{C?Re():V.current&&(V.current=!1,q())},[C,V,q,Re]),M.useEffect(()=>{F.current=null});const he=(ge,fe)=>{if(!R.current)return null;const Oe=Jl(R.current,l);let Te=Oe.indexOf(ge)+fe;return Te=Math.max(0,Math.min(Te,Oe.length)),Oe[Te]};return F3(M.useCallback(()=>y.document,[y]),"keydown",ge=>{var fe,Oe;const{key:Te}=ge,xe=ge.target,je=(fe=R.current)==null?void 0:fe.contains(xe),Le=(Oe=N.current)==null?void 0:Oe.contains(xe);if(/input|textarea/i.test(xe.tagName)&&(Te===" "||Te!=="Escape"&&je||Te==="Escape"&&xe.type==="search")||!je&&!Le||Te==="Tab"&&(!R.current||!C))return;F.current=ge.type;const _e={originalEvent:ge,source:ge.type};switch(Te){case"ArrowUp":{const G=he(xe,-1);G&&G.focus&&G.focus(),ge.preventDefault();return}case"ArrowDown":if(ge.preventDefault(),!C)x(!0,_e);else{const G=he(xe,1);G&&G.focus&&G.focus()}return;case"Tab":oR(xe.ownerDocument,"keyup",G=>{var Y;(G.key==="Tab"&&!G.target||!((Y=R.current)!=null&&Y.contains(G.target)))&&x(!1,_e)},{once:!0});break;case"Escape":Te==="Escape"&&(ge.preventDefault(),ge.stopPropagation()),x(!1,_e);break}}),b.jsx(nu.Provider,{value:U,children:b.jsx(V0.Provider,{value:J,children:v})})}Dm.displayName="Dropdown";Dm.Menu=CR;Dm.Toggle=Wj;Dm.Item=Yj;const Jj=M.createContext({});Jj.displayName="DropdownContext";const qj=Jj,Qj=M.forwardRef(({className:n,bsPrefix:r,as:i="hr",role:u="separator",...l},d)=>(r=bn(r,"dropdown-divider"),b.jsx(i,{ref:d,className:qt(n,r),role:u,...l})));Qj.displayName="DropdownDivider";const y9=Qj,Kj=M.forwardRef(({className:n,bsPrefix:r,as:i="div",role:u="heading",...l},d)=>(r=bn(r,"dropdown-header"),b.jsx(i,{ref:d,className:qt(n,r),role:u,...l})));Kj.displayName="DropdownHeader";const b9=Kj,eD=M.forwardRef(({bsPrefix:n,className:r,eventKey:i,disabled:u=!1,onClick:l,active:d,as:h=Rj,...v},y)=>{const C=bn(n,"dropdown-item"),[x,R]=Xj({key:i,href:v.href,disabled:u,onClick:l,active:d});return b.jsx(h,{...v,...x,ref:y,className:qt(r,C,R.isActive&&"active",u&&"disabled")})});eD.displayName="DropdownItem";const C9=eD,tD=M.forwardRef(({className:n,bsPrefix:r,as:i="span",...u},l)=>(r=bn(r,"dropdown-item-text"),b.jsx(i,{ref:l,className:qt(n,r),...u})));tD.displayName="DropdownItemText";const x9=tD,nD=M.createContext(null);nD.displayName="InputGroupContext";const rD=nD;var q_={};function aD(n,r){if(q_.NODE_ENV==="production")return n;const i=M.useCallback(u=>{u==null||!u.isReactComponent||(q_.NODE_ENV!=="production"?O_(!1,`${r} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):O_(!1))},[r]);return ds(i,n)}var S9={};function iD(n,r,i){const u=i?"top-end":"top-start",l=i?"top-start":"top-end",d=i?"bottom-end":"bottom-start",h=i?"bottom-start":"bottom-end",v=i?"right-start":"left-start",y=i?"right-end":"left-end",C=i?"left-start":"right-start",x=i?"left-end":"right-end";let R=n?h:d;return r==="up"?R=n?l:u:r==="end"?R=n?x:C:r==="start"?R=n?y:v:r==="down-centered"?R="bottom":r==="up-centered"&&(R="top"),R}const oD=M.forwardRef(({bsPrefix:n,className:r,align:i,rootCloseEvent:u,flip:l=!0,show:d,renderOnMount:h,as:v="div",popperConfig:y,variant:C,...x},R)=>{let T=!1;const j=M.useContext(bj),N=bn(n,"dropdown-menu"),{align:O,drop:_,isRTL:L}=M.useContext(qj);i=i||O;const F=M.useContext(rD),V=[];if(i)if(typeof i=="object"){const ge=Object.keys(i);if(S9.NODE_ENV!=="production"&&bR(ge.length===1,"There should only be 1 breakpoint when passing an object to `align`"),ge.length){const fe=ge[0],Oe=i[fe];T=Oe==="start",V.push(`${N}-${fe}-${Oe}`)}}else i==="end"&&(T=!0);const H=iD(T,_,L),[z,{hasShown:U,popper:J,show:q,toggle:Re}]=Uj({flip:l,rootCloseEvent:u,show:d,usePopper:!j&&V.length===0,offset:[0,2],popperConfig:y,placement:H});if(z.ref=ds(aD(R,"DropdownMenu"),z.ref),y0(()=>{q&&(J==null||J.update())},[q]),!U&&!h&&!F)return null;typeof v!="string"&&(z.show=q,z.close=()=>Re==null?void 0:Re(!1),z.align=i);let he=x.style;return J!=null&&J.placement&&(he={...x.style,...z.style},x["x-placement"]=J.placement),b.jsx(v,{...x,...z,style:he,...(V.length||j)&&{"data-bs-popper":"static"},className:qt(r,N,q&&"show",T&&`${N}-end`,C&&`${N}-${C}`,...V)})});oD.displayName="DropdownMenu";const E9=oD,sD=M.forwardRef(({as:n,bsPrefix:r,variant:i="primary",size:u,active:l=!1,disabled:d=!1,className:h,...v},y)=>{const C=bn(r,"btn"),[x,{tagName:R}]=uR({tagName:n,disabled:d,...v}),T=R;return b.jsx(T,{...x,...v,ref:y,disabled:d,className:qt(h,C,l&&"active",i&&`${C}-${i}`,u&&`${C}-${u}`,v.href&&d&&"disabled")})});sD.displayName="Button";const w9=sD,lD=M.forwardRef(({bsPrefix:n,split:r,className:i,childBsPrefix:u,as:l=w9,...d},h)=>{const v=bn(n,"dropdown-toggle"),y=M.useContext(V0);u!==void 0&&(d.bsPrefix=u);const[C]=Gj();return C.ref=ds(C.ref,aD(h,"DropdownToggle")),b.jsx(l,{className:qt(i,v,r&&`${v}-split`,(y==null?void 0:y.show)&&"show"),...C,...d})});lD.displayName="DropdownToggle";const R9=lD,uD=M.forwardRef((n,r)=>{const{bsPrefix:i,drop:u="down",show:l,className:d,align:h="start",onSelect:v,onToggle:y,focusFirstItemOnShow:C,as:x="div",navbar:R,autoClose:T=!0,...j}=F0(n,{show:"onToggle"}),N=M.useContext(rD),O=bn(i,"dropdown"),_=P0(),L=J=>T===!1?J==="click":T==="inside"?J!=="rootClose":T==="outside"?J!=="select":!0,F=gr((J,q)=>{var Re,he;!((Re=q.originalEvent)==null||(he=Re.target)==null)&&he.classList.contains("dropdown-toggle")&&q.source==="mousedown"||(q.originalEvent.currentTarget===document&&(q.source!=="keydown"||q.originalEvent.key==="Escape")&&(q.source="rootClose"),L(q.source)&&(y==null||y(J,q)))}),H=iD(h==="end",u,_),z=M.useMemo(()=>({align:h,drop:u,isRTL:_}),[h,u,_]),U={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return b.jsx(qj.Provider,{value:z,children:b.jsx(Dm,{placement:H,show:l,onSelect:v,onToggle:F,focusFirstItemOnShow:C,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:N?j.children:b.jsx(x,{...j,ref:r,className:qt(d,l&&"show",U[u])})})})});uD.displayName="Dropdown";const Lb=Object.assign(uD,{Toggle:R9,Menu:E9,Item:C9,ItemText:x9,Divider:y9,Header:b9});var Pb;function Q_(n){if((!Pb&&Pb!==0||n)&&tv){var r=document.createElement("div");r.style.position="absolute",r.style.top="-9999px",r.style.width="50px",r.style.height="50px",r.style.overflow="scroll",document.body.appendChild(r),Pb=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return Pb}function T9(n){const r=M.useRef(n);return r.current=n,r}function xR(n){const r=T9(n);M.useEffect(()=>()=>r.current(),[])}function BE(n){n===void 0&&(n=ev());try{var r=n.activeElement;return!r||!r.nodeName?null:r}catch{return n.body}}function I9(n=document){const r=n.defaultView;return Math.abs(r.innerWidth-n.documentElement.clientWidth)}const K_=nv("modal-open");class N9{constructor({ownerDocument:r,handleContainerOverflow:i=!0,isRTL:u=!1}={}){this.handleContainerOverflow=i,this.isRTL=u,this.modals=[],this.ownerDocument=r}getScrollbarWidth(){return I9(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(r){}removeModalAttributes(r){}setContainerStyle(r){const i={overflow:"hidden"},u=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();r.style={overflow:l.style.overflow,[u]:l.style[u]},r.scrollBarWidth&&(i[u]=`${parseInt(Kl(l,u)||"0",10)+r.scrollBarWidth}px`),l.setAttribute(K_,""),Kl(l,i)}reset(){[...this.modals].forEach(r=>this.remove(r))}removeContainerStyle(r){const i=this.getElement();i.removeAttribute(K_),Object.assign(i.style,r.style)}add(r){let i=this.modals.indexOf(r);return i!==-1||(i=this.modals.length,this.modals.push(r),this.setModalAttributes(r),i!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),i}remove(r){const i=this.modals.indexOf(r);i!==-1&&(this.modals.splice(i,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(r))}isTopModal(r){return!!this.modals.length&&this.modals[this.modals.length-1]===r}}const SR=N9,zE=(n,r)=>tv?n==null?(r||ev()).body:(typeof n=="function"&&(n=n()),n&&"current"in n&&(n=n.current),n&&("nodeType"in n||n.getBoundingClientRect)?n:null):null;function Rw(n,r){const i=z0(),[u,l]=M.useState(()=>zE(n,i==null?void 0:i.document));if(!u){const d=zE(n);d&&l(d)}return M.useEffect(()=>{r&&u&&r(u)},[r,u]),M.useEffect(()=>{const d=zE(n);d!==u&&l(d)},[n,u]),u}function _9({in:n,onTransition:r}){const i=M.useRef(null),u=M.useRef(!0),l=gr(r);return y0(()=>{if(!i.current)return;let d=!1;return l({in:n,element:i.current,initial:u.current,isStale:()=>d}),()=>{d=!0}},[n,l]),y0(()=>(u.current=!1,()=>{u.current=!0}),[]),i}function O9({children:n,in:r,onExited:i,onEntered:u,transition:l}){const[d,h]=M.useState(!r);r&&d&&h(!1);const v=_9({in:!!r,onTransition:C=>{const x=()=>{C.isStale()||(C.in?u==null||u(C.element,C.initial):(h(!0),i==null||i(C.element)))};Promise.resolve(l(C)).then(x,R=>{throw C.in||h(!0),R})}}),y=ds(v,n.ref);return d&&!r?null:M.cloneElement(n,{ref:y})}function Tw(n,r,i){return n?b.jsx(n,Object.assign({},i)):r?b.jsx(O9,Object.assign({},i,{transition:r})):b.jsx(aR,Object.assign({},i))}function cD(n){return n.code==="Escape"||n.keyCode===27}const A9=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function j9(n,r){if(n==null)return{};var i={},u=Object.keys(n),l,d;for(d=0;d<u.length;d++)l=u[d],!(r.indexOf(l)>=0)&&(i[l]=n[l]);return i}let HE;function D9(n){return HE||(HE=new SR({ownerDocument:n==null?void 0:n.document})),HE}function k9(n){const r=z0(),i=n||D9(r),u=M.useRef({dialog:null,backdrop:null});return Object.assign(u.current,{add:()=>i.add(u.current),remove:()=>i.remove(u.current),isTopModal:()=>i.isTopModal(u.current),setDialogRef:M.useCallback(l=>{u.current.dialog=l},[]),setBackdropRef:M.useCallback(l=>{u.current.backdrop=l},[])})}const fD=M.forwardRef((n,r)=>{let{show:i=!1,role:u="dialog",className:l,style:d,children:h,backdrop:v=!0,keyboard:y=!0,onBackdropClick:C,onEscapeKeyDown:x,transition:R,runTransition:T,backdropTransition:j,runBackdropTransition:N,autoFocus:O=!0,enforceFocus:_=!0,restoreFocus:L=!0,restoreFocusOptions:F,renderDialog:V,renderBackdrop:H=pt=>b.jsx("div",Object.assign({},pt)),manager:z,container:U,onShow:J,onHide:q=()=>{},onExit:Re,onExited:he,onExiting:ge,onEnter:fe,onEntering:Oe,onEntered:Te}=n,xe=j9(n,A9);const je=z0(),Le=Rw(U),ne=k9(z),_e=fR(),G=Ej(i),[Y,re]=M.useState(!i),ye=M.useRef(null);M.useImperativeHandle(r,()=>ne,[ne]),tv&&!G&&i&&(ye.current=BE(je==null?void 0:je.document)),i&&Y&&re(!1);const Se=gr(()=>{if(ne.add(),et.current=ql(document,"keydown",we),Ve.current=ql(document,"focus",()=>setTimeout(le),!0),J&&J(),O){var pt,Kt;const on=BE((pt=(Kt=ne.dialog)==null?void 0:Kt.ownerDocument)!=null?pt:je==null?void 0:je.document);ne.dialog&&on&&!xm(ne.dialog,on)&&(ye.current=on,ne.dialog.focus())}}),Ne=gr(()=>{if(ne.remove(),et.current==null||et.current(),Ve.current==null||Ve.current(),L){var pt;(pt=ye.current)==null||pt.focus==null||pt.focus(F),ye.current=null}});M.useEffect(()=>{!i||!Le||Se()},[i,Le,Se]),M.useEffect(()=>{Y&&Ne()},[Y,Ne]),xR(()=>{Ne()});const le=gr(()=>{if(!_||!_e()||!ne.isTopModal())return;const pt=BE(je==null?void 0:je.document);ne.dialog&&pt&&!xm(ne.dialog,pt)&&ne.dialog.focus()}),ve=gr(pt=>{pt.target===pt.currentTarget&&(C==null||C(pt),v===!0&&q())}),we=gr(pt=>{y&&cD(pt)&&ne.isTopModal()&&(x==null||x(pt),pt.defaultPrevented||q())}),Ve=M.useRef(),et=M.useRef(),tt=(...pt)=>{re(!0),he==null||he(...pt)};if(!Le)return null;const ft=Object.assign({role:u,ref:ne.setDialogRef,"aria-modal":u==="dialog"?!0:void 0},xe,{style:d,className:l,tabIndex:-1});let Ae=V?V(ft):b.jsx("div",Object.assign({},ft,{children:M.cloneElement(h,{role:"document"})}));Ae=Tw(R,T,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!i,onExit:Re,onExiting:ge,onExited:tt,onEnter:fe,onEntering:Oe,onEntered:Te,children:Ae});let It=null;return v&&(It=H({ref:ne.setBackdropRef,onClick:ve}),It=Tw(j,N,{in:!!i,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:It})),b.jsx(b.Fragment,{children:Bf.createPortal(b.jsxs(b.Fragment,{children:[It,Ae]}),Le)})});fD.displayName="Modal";const M9=Object.assign(fD,{Manager:SR});function Iw(n,r){return n.classList?!!r&&n.classList.contains(r):(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+r+" ")!==-1}function L9(n,r){n.classList?n.classList.add(r):Iw(n,r)||(typeof n.className=="string"?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r))}function eO(n,r){return n.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function P9(n,r){n.classList?n.classList.remove(r):typeof n.className=="string"?n.className=eO(n.className,r):n.setAttribute("class",eO(n.className&&n.className.baseVal||"",r))}const kp={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class F9 extends SR{adjustAndStore(r,i,u){const l=i.style[r];i.dataset[r]=l,Kl(i,{[r]:`${parseFloat(Kl(i,r))+u}px`})}restore(r,i){const u=i.dataset[r];u!==void 0&&(delete i.dataset[r],Kl(i,{[r]:u}))}setContainerStyle(r){super.setContainerStyle(r);const i=this.getElement();if(L9(i,"modal-open"),!r.scrollBarWidth)return;const u=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";Jl(i,kp.FIXED_CONTENT).forEach(d=>this.adjustAndStore(u,d,r.scrollBarWidth)),Jl(i,kp.STICKY_CONTENT).forEach(d=>this.adjustAndStore(l,d,-r.scrollBarWidth)),Jl(i,kp.NAVBAR_TOGGLER).forEach(d=>this.adjustAndStore(l,d,r.scrollBarWidth))}removeContainerStyle(r){super.removeContainerStyle(r);const i=this.getElement();P9(i,"modal-open");const u=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";Jl(i,kp.FIXED_CONTENT).forEach(d=>this.restore(u,d)),Jl(i,kp.STICKY_CONTENT).forEach(d=>this.restore(l,d)),Jl(i,kp.NAVBAR_TOGGLER).forEach(d=>this.restore(l,d))}}let UE;function V9(n){return UE||(UE=new F9(n)),UE}const dD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"modal-body"),b.jsx(i,{ref:l,className:qt(n,r),...u})));dD.displayName="ModalBody";const B9=dD,z9=M.createContext({onHide(){}}),pD=z9,vD=M.forwardRef(({bsPrefix:n,className:r,contentClassName:i,centered:u,size:l,fullscreen:d,children:h,scrollable:v,...y},C)=>{n=bn(n,"modal");const x=`${n}-dialog`,R=typeof d=="string"?`${n}-fullscreen-${d}`:`${n}-fullscreen`;return b.jsx("div",{...y,ref:C,className:qt(x,r,l&&`${n}-${l}`,u&&`${x}-centered`,v&&`${x}-scrollable`,d&&R),children:b.jsx("div",{className:qt(`${n}-content`,i),children:h})})});vD.displayName="ModalDialog";const hD=vD,mD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"modal-footer"),b.jsx(i,{ref:l,className:qt(n,r),...u})));mD.displayName="ModalFooter";const H9=mD,U9={"aria-label":_t.string,onClick:_t.func,variant:_t.oneOf(["white"])},ER=M.forwardRef(({className:n,variant:r,"aria-label":i="Close",...u},l)=>b.jsx("button",{ref:l,type:"button",className:qt("btn-close",r&&`btn-close-${r}`,n),"aria-label":i,...u}));ER.displayName="CloseButton";ER.propTypes=U9;const $9=ER,G9=M.forwardRef(({closeLabel:n="Close",closeVariant:r,closeButton:i=!1,onHide:u,children:l,...d},h)=>{const v=M.useContext(pD),y=gr(()=>{v==null||v.onHide(),u==null||u()});return b.jsxs("div",{ref:h,...d,children:[l,i&&b.jsx($9,{"aria-label":n,variant:r,onClick:y})]})}),W9=G9,gD=M.forwardRef(({bsPrefix:n,className:r,closeLabel:i="Close",closeButton:u=!1,...l},d)=>(n=bn(n,"modal-header"),b.jsx(W9,{ref:d,...l,className:qt(r,n),closeLabel:i,closeButton:u})));gD.displayName="ModalHeader";const X9=gD,Y9=n=>M.forwardRef((r,i)=>b.jsx("div",{...r,ref:i,className:qt(r.className,n)})),Z9=Y9("h4"),yD=M.forwardRef(({className:n,bsPrefix:r,as:i=Z9,...u},l)=>(r=bn(r,"modal-title"),b.jsx(i,{ref:l,className:qt(n,r),...u})));yD.displayName="ModalTitle";const J9=yD;function q9(n){return b.jsx($p,{...n,timeout:null})}function Q9(n){return b.jsx($p,{...n,timeout:null})}const bD=M.forwardRef(({bsPrefix:n,className:r,style:i,dialogClassName:u,contentClassName:l,children:d,dialogAs:h=hD,"data-bs-theme":v,"aria-labelledby":y,"aria-describedby":C,"aria-label":x,show:R=!1,animation:T=!0,backdrop:j=!0,keyboard:N=!0,onEscapeKeyDown:O,onShow:_,onHide:L,container:F,autoFocus:V=!0,enforceFocus:H=!0,restoreFocus:z=!0,restoreFocusOptions:U,onEntered:J,onExit:q,onExiting:Re,onEnter:he,onEntering:ge,onExited:fe,backdropClassName:Oe,manager:Te,...xe},je)=>{const[Le,ne]=M.useState({}),[_e,G]=M.useState(!1),Y=M.useRef(!1),re=M.useRef(!1),ye=M.useRef(null),[Se,Ne]=g0(),le=ds(je,Ne),ve=gr(L),we=P0();n=bn(n,"modal");const Ve=M.useMemo(()=>({onHide:ve}),[ve]);function et(){return Te||V9({isRTL:we})}function tt(xt){if(!tv)return;const Pn=et().getScrollbarWidth()>0,ln=xt.scrollHeight>ev(xt).documentElement.clientHeight;ne({paddingRight:Pn&&!ln?Q_():void 0,paddingLeft:!Pn&&ln?Q_():void 0})}const ft=gr(()=>{Se&&tt(Se.dialog)});xR(()=>{xw(window,"resize",ft),ye.current==null||ye.current()});const Ae=()=>{Y.current=!0},It=xt=>{Y.current&&Se&&xt.target===Se.dialog&&(re.current=!0),Y.current=!1},pt=()=>{G(!0),ye.current=ej(Se.dialog,()=>{G(!1)})},Kt=xt=>{xt.target===xt.currentTarget&&pt()},on=xt=>{if(j==="static"){Kt(xt);return}if(re.current||xt.target!==xt.currentTarget){re.current=!1;return}L==null||L()},sn=xt=>{N?O==null||O(xt):(xt.preventDefault(),j==="static"&&pt())},_n=(xt,Pn)=>{xt&&tt(xt),he==null||he(xt,Pn)},Vt=xt=>{ye.current==null||ye.current(),q==null||q(xt)},Cn=(xt,Pn)=>{ge==null||ge(xt,Pn),oR(window,"resize",ft)},qn=xt=>{xt&&(xt.style.display=""),fe==null||fe(xt),xw(window,"resize",ft)},Rr=M.useCallback(xt=>b.jsx("div",{...xt,className:qt(`${n}-backdrop`,Oe,!T&&"show")}),[T,Oe,n]),$n={...i,...Le};$n.display="block";const Tr=xt=>b.jsx("div",{role:"dialog",...xt,style:$n,className:qt(r,n,_e&&`${n}-static`,!T&&"show"),onClick:j?on:void 0,onMouseUp:It,"data-bs-theme":v,"aria-label":x,"aria-labelledby":y,"aria-describedby":C,children:b.jsx(h,{...xe,onMouseDown:Ae,className:u,contentClassName:l,children:d})});return b.jsx(pD.Provider,{value:Ve,children:b.jsx(M9,{show:R,ref:le,backdrop:j,container:F,keyboard:!0,autoFocus:V,enforceFocus:H,restoreFocus:z,restoreFocusOptions:U,onEscapeKeyDown:sn,onShow:_,onHide:L,onEnter:_n,onEntering:Cn,onEntered:J,onExit:Vt,onExiting:Re,onExited:qn,manager:et(),transition:T?q9:void 0,backdropTransition:T?Q9:void 0,renderBackdrop:Rr,renderDialog:Tr})})});bD.displayName="Modal";const Ln=Object.assign(bD,{Body:B9,Header:X9,Title:J9,Footer:H9,Dialog:hD,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),K9=kr.forwardRef(({children:n,onClick:r},i)=>b.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:i,onClick:u=>{u.preventDefault(),r(u)},children:b.jsx("span",{className:"dropdown-toggle",children:n})}));function e4({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u}=ri(n,r),{project:l}=Ji(r||i.grantNumber);if(!i||!l||i.error||l.error)return;const d=Nn.routes.request_action_path(n,"new"),h=i.allowedActions.Renewal?Array.isArray(i.allowedActions.Renewal)?[...i.allowedActions.Renewal]:[i.allowedActions.Renewal]:[];h.sort((C,x)=>C.opportunityId<x.opportunityId?-1:1);const v=[{id:"extension",action:`${d}?action_type=Extension`,isEnabled:"Extension"in i.allowedActions,button:"Request an Extension",enabled:i.usesCredits?b.jsx("p",{children:"Need more time to use your current credits and allocations? You can extend your project's end date up to six months past your funding end date, or up to 12 months at a time for projects not supported by a funding award."}):b.jsx("p",{children:"Need more time to use your current allocations? A one-time extension can extend your project end date by up to six months."}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",i.usesCredits?b.jsxs(b.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${d}?action_type=Supplement`,isEnabled:"Supplement"in i.allowedActions,button:"Request a Supplement",enabled:i.usesCredits?b.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",i.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[i.allocationType]," ","additional ACCESS credits."]}):b.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",i.allocationType," project is eligible for a supplement of additional units."]}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",i.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:h.map(C=>[C.opportunityName,`${Nn.routes.renew_request_path(n)}?opportunity_id=${C.opportunityId}`,"post"]),isEnabled:"Renewal"in i.allowedActions,button:"Request a Renewal",enabled:b.jsxs("p",{children:["Your ",i.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",b.jsx("a",{href:Nn.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:b.jsxs("p",{children:["Your project is not currently eligible for renewal.",i.usesCredits&&b.jsxs(b.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),i.isMaximize&&b.jsxs(b.Fragment,{children:[" ","You can submit a renewal request to the Maximize ACCESS opportunity closest to your project's current end date."]})]})},{id:"help",action:[["Learn How to Manage Allocations",Nn.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:b.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",b.jsxs("em",{children:["grant number ",l.grantNumber]})," and a detailed description of the problem."]})}];v.sort((C,x)=>C.isEnabled<x.isEnabled?1:-1);const y=v.map(({id:C,action:x,isEnabled:R,button:T,enabled:j,disabled:N})=>b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(x)&&x.length?b.jsxs(Lb,{className:"d-flex flex-column",children:[b.jsx(Lb.Toggle,{as:K9,children:T}),b.jsx(Lb.Menu,{children:x.map(([O,_,L])=>b.jsx(Lb.Item,{href:_,onClick:F=>{L!=="get"&&(F.preventDefault(),F.target.dataset.method=L,$&&$.rails&&$.rails.handleMethod($(F.target)))},children:O},_))})]}):b.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${R?"":"disabled"}`,href:R?x:"",children:b.jsx("span",{children:T})})}),b.jsx("div",{className:"col-sm-8 mb-2",children:R?j:N})]},C));return b.jsxs(Ln,{size:"lg",show:i.showActionsModal,onHide:u,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Manage Your Project"})}),b.jsxs(Ln.Body,{children:[b.jsxs("p",{children:["Please select an action to manage your project"," ",b.jsxs("strong",{children:[l.grantNumber,": ",l.title]}),"."]}),y]})]})}function t4({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u,toggleConfirmModal:l}=ri(n,r),{project:d}=Ji(r||i.grantNumber);if(!i||!d||i.error||d.error)return;const h=i.usesCredits?"credits":"units",v=(1-MA(i))*100;return b.jsxs(Ln,{size:"lg",show:i.showConfirmModal,onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Consider Requesting an Exchange"})}),b.jsx(Ln.Body,{children:b.jsxs("p",{children:[b.jsxs("strong",{children:[Math.round(v),"% of your allocation is unused."]})," ","Are you sure you want to request more ",h,"? You can exchange"," ",i.usesCredits?"credits for resources or ":""," one resource for another by changing the ",b.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:l,children:"Return to Exchange"}),b.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{l(),u()},children:["Request More ",h]})]})})]})}function n4({requestId:n,grantNumber:r,actionId:i}){const{deleteAction:u,request:l,toggleDeleteModal:d}=ri(n,r);if(!l||l.error)return;const h=l.actions.find(T=>T.actionId==i);if(!h)return;const{deleteStatus:v,isRequest:y}=h,C=v==ea.pending,x=v==ea.error,R=()=>d(i);return b.jsxs(Ln,{show:h.showDeleteModal,onHide:R,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Confirm Deletion"})}),b.jsxs(Ln.Body,{children:[x&&b.jsxs(na,{color:"danger",children:["Deletion of the ",y?"request":"action"," failed."]}),b.jsxs("p",{children:["Are you sure you want to delete"," ",!y&&b.jsxs(b.Fragment,{children:["action"," ",b.jsxs("strong",{children:[h.type,": ",Vp(h.date)]})," ","on"," "]}),"request ",b.jsx("strong",{children:Kw(l)}),"? Deletions cannot be undone."]})]}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:R,disabled:C,children:"Cancel"}),b.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>u(i),disabled:C,children:C?"Deleting...":"Delete"})]})})]})}function CD({action:n,request:r,toggleDeleteModal:i}){const u=n.allowedOperations||[],l=[];u.includes("Edit")&&l.push(b.jsx(c0,{href:n.isRequest?Nn.routes.edit_request_path(r.requestId):Nn.routes.edit_request_action_path(r.requestId,n.actionId),icon:"pencil",title:"Edit action"},"edit")),u.includes("Delete")&&l.push(b.jsx(c0,{color:"danger",icon:"trash",onClick:()=>i(n.actionId),title:"Edit action"},"delete"));const d=`${n.type}: ${Vp(n.date)}`;return b.jsxs(b.Fragment,{children:[n.detailAvailable?b.jsx("a",{href:Nn.routes.request_action_path(r.requestId,n.actionId),children:d}):d,l]})}const r4="_grid_15z6r_1",a4="_important_15z6r_32",i4="_input_15z6r_36",o4="_edited_15z6r_40",s4="_disabled_15z6r_48",Bp={grid:r4,important:a4,input:i4,edited:o4,disabled:s4};function l4({column:n,row:r,style:i={}}){const u=n.format?n.format(r[n.key],r):r[n.key],l=["cell"];return n.class&&l.push(n.class),n.rowClass&&l.push(n.rowClass(r)),b.jsx("td",{className:l.join(" "),style:i,children:u})}const u4={text:l4};function Qf({columns:n,rows:r,classes:i,frozenColumns:u=0,minWidth:l,rowClasses:d=[],scrollBehavior:h="smooth",scrollRowIndex:v=0}){const y=M.useRef();M.useLayoutEffect(()=>{if(!y.current)return;const N=y.current.querySelector(`tbody tr:nth-child(${v+1})`);N&&N.scrollIntoView({behavior:h,block:"nearest",inline:"nearest"})},[v,h]);const C=[0];for(let N=0;N<u;N++)C[N+1]=C[N]+(n[N].width||100);const x=(N,O)=>N<u?{position:"sticky",left:`${C[N]}px`,minWidth:`${n[N].width||100}px`,width:`${n[N].width||100}px`,zIndex:O||1}:{},R=n.map((N,O)=>b.jsx("th",{className:N.headerClass||N.class||"",style:x(O,100),children:N.formatHeader?N.formatHeader(N.name,N):N.name},N.key)),T=r.map((N,O)=>{const _=n.map((L,F)=>{const V=u4[L.type||"text"];return b.jsx(V,{column:L,row:N,style:x(F)},L.key)});return b.jsx("tr",{className:d[O]||"",children:_},O)}),j={};return l&&(j.minWidth=l),b.jsx("div",{className:`${Bp.grid} ${i||""}`,ref:y,children:b.jsxs("table",{className:"table table-bordered",style:j,children:[b.jsx("thead",{children:b.jsx("tr",{children:R})}),b.jsx("tbody",{children:T})]})})}function Zp({status:n,title:r}){const i={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[n]||"dark";return b.jsx("span",{className:`badge text-bg-${i} align-self-center`,title:r,children:n})}const c4=n=>b.jsx("span",{className:n<0?"text-danger":"",children:n===0?"":n.toLocaleString()});function f4({requestId:n,grantNumber:r}){const{request:i,toggleDeleteModal:u}=ri(n,r),{project:l,setRequest:d}=Ji(r||i.grantNumber);if(!i||!l)return;const h=l.requestsList;let v=0;for(;v<h.length&&h[v].requestId!==n;)v++;const y=h[v+1],C=h[v-1],x=(O,_)=>O?b.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>d(O.requestId),children:[_=="prev"?b.jsx("i",{className:"bi bi-chevron-left"}):null,Kw(O),_=="next"?b.jsx("i",{className:"bi bi-chevron-right"}):null]}):b.jsx("span",{}),R=new Set,T=[];for(let O of i.actions)for(let _ of O.resources)R.has(_.resourceId)||(R.add(_.resourceId),T.push(_));T.sort(f0);const j=[{key:"action",name:"Action Details",format:(O,_)=>b.jsx(CD,{action:_,request:i,toggleDeleteModal:u})},{key:"status",name:"Status",format:O=>b.jsx(Zp,{status:O})},...T.map(O=>({key:`resource${O.resourceId}`,name:O.name,icon:O.icon,class:"text-end",format:O.isBoolean?_=>_?eR(_):null:c4,formatHeader:(_,L)=>Hf(L,{userGuide:!1})}))],N=i.actions.map(O=>{const _={...O};for(let{resourceId:L}of T)_[`resource${L}`]=0;for(let{resourceId:L,approved:F,requested:V}of O.resources)_[`resource${L}`]=F||V||0;return _});return b.jsxs("div",{className:"history",children:[b.jsx(Qf,{columns:j,rows:N}),b.jsxs("div",{className:"buttons d-flex justify-content-between",children:[x(y,"prev"),x(C,"next")]})]})}function d4({requestId:n,grantNumber:r}){const{request:i,toggleDeleteModal:u}=ri(n,r);if(!i)return;const l=[{key:"type",name:"Action Details",format:(d,h)=>b.jsx(CD,{action:h,request:i,toggleDeleteModal:u})},{key:"status",name:"Status",format:d=>b.jsx(Zp,{status:d})}];if(i.actions&&i.actions.length)return b.jsx(Qf,{rows:i.actions,columns:l})}function im(...n){return n.filter(r=>r!=null).reduce((r,i)=>{if(typeof i!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return r===null?i:function(...l){r.apply(this,l),i.apply(this,l)}},null)}const p4={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function v4(n,r){const i=`offset${n[0].toUpperCase()}${n.slice(1)}`,u=r[i],l=p4[n];return u+parseInt(Kl(r,l[0]),10)+parseInt(Kl(r,l[1]),10)}const h4={[dc]:"collapse",[h0]:"collapsing",[Zl]:"collapsing",[pc]:"collapse show"},m4=kr.forwardRef(({onEnter:n,onEntering:r,onEntered:i,onExit:u,onExiting:l,className:d,children:h,dimension:v="height",in:y=!1,timeout:C=300,mountOnEnter:x=!1,unmountOnExit:R=!1,appear:T=!1,getDimensionValue:j=v4,...N},O)=>{const _=typeof v=="function"?v():v,L=M.useMemo(()=>im(U=>{U.style[_]="0"},n),[_,n]),F=M.useMemo(()=>im(U=>{const J=`scroll${_[0].toUpperCase()}${_.slice(1)}`;U.style[_]=`${U[J]}px`},r),[_,r]),V=M.useMemo(()=>im(U=>{U.style[_]=null},i),[_,i]),H=M.useMemo(()=>im(U=>{U.style[_]=`${j(_,U)}px`,nj(U)},u),[u,j,_]),z=M.useMemo(()=>im(U=>{U.style[_]=null},l),[_,l]);return b.jsx(rj,{ref:O,addEndListener:tj,...N,"aria-expanded":N.role?y:null,onEnter:L,onEntering:F,onEntered:V,onExit:H,onExiting:z,childRef:h.ref,in:y,timeout:C,mountOnEnter:x,unmountOnExit:R,appear:T,children:(U,J)=>kr.cloneElement(h,{...J,className:qt(d,h.props.className,h4[U],_==="width"&&"collapse-horizontal")})})}),g4=m4;function xD(n,r){return Array.isArray(n)?n.includes(r):n===r}const SD=M.createContext({});SD.displayName="AccordionContext";const H0=SD,ED=M.forwardRef(({as:n="div",bsPrefix:r,className:i,children:u,eventKey:l,...d},h)=>{const{activeEventKey:v}=M.useContext(H0);return r=bn(r,"accordion-collapse"),b.jsx(g4,{ref:h,in:xD(v,l),...d,className:qt(i,r),children:b.jsx(n,{children:M.Children.only(u)})})});ED.displayName="AccordionCollapse";const wD=ED,RD=M.createContext({eventKey:""});RD.displayName="AccordionItemContext";const wR=RD,TD=M.forwardRef(({as:n="div",bsPrefix:r,className:i,onEnter:u,onEntering:l,onEntered:d,onExit:h,onExiting:v,onExited:y,...C},x)=>{r=bn(r,"accordion-body");const{eventKey:R}=M.useContext(wR);return b.jsx(wD,{eventKey:R,onEnter:u,onEntering:l,onEntered:d,onExit:h,onExiting:v,onExited:y,children:b.jsx(n,{ref:x,...C,className:qt(i,r)})})});TD.displayName="AccordionBody";const y4=TD;function b4(n,r){const{activeEventKey:i,onSelect:u,alwaysOpen:l}=M.useContext(H0);return d=>{let h=n===i?null:n;l&&(Array.isArray(i)?i.includes(n)?h=i.filter(v=>v!==n):h=[...i,n]:h=[n]),u==null||u(h,d),r==null||r(d)}}const ID=M.forwardRef(({as:n="button",bsPrefix:r,className:i,onClick:u,...l},d)=>{r=bn(r,"accordion-button");const{eventKey:h}=M.useContext(wR),v=b4(h,u),{activeEventKey:y}=M.useContext(H0);return n==="button"&&(l.type="button"),b.jsx(n,{ref:d,onClick:v,...l,"aria-expanded":Array.isArray(y)?y.includes(h):h===y,className:qt(i,r,!xD(y,h)&&"collapsed")})});ID.displayName="AccordionButton";const ND=ID,_D=M.forwardRef(({as:n="h2",bsPrefix:r,className:i,children:u,onClick:l,...d},h)=>(r=bn(r,"accordion-header"),b.jsx(n,{ref:h,...d,className:qt(i,r),children:b.jsx(ND,{onClick:l,children:u})})));_D.displayName="AccordionHeader";const C4=_D,OD=M.forwardRef(({as:n="div",bsPrefix:r,className:i,eventKey:u,...l},d)=>{r=bn(r,"accordion-item");const h=M.useMemo(()=>({eventKey:u}),[u]);return b.jsx(wR.Provider,{value:h,children:b.jsx(n,{ref:d,...l,className:qt(i,r)})})});OD.displayName="AccordionItem";const x4=OD,AD=M.forwardRef((n,r)=>{const{as:i="div",activeKey:u,bsPrefix:l,className:d,onSelect:h,flush:v,alwaysOpen:y,...C}=F0(n,{activeKey:"onSelect"}),x=bn(l,"accordion"),R=M.useMemo(()=>({activeEventKey:u,onSelect:h,alwaysOpen:y}),[u,h,y]);return b.jsx(H0.Provider,{value:R,children:b.jsx(i,{ref:r,...C,className:qt(d,x,v&&`${x}-flush`)})})});AD.displayName="Accordion";const os=Object.assign(AD,{Button:ND,Collapse:wD,Item:x4,Header:C4,Body:y4}),Nw=2**31-1;function jD(n,r,i){const u=i-Date.now();n.current=u<=Nw?setTimeout(r,u):setTimeout(()=>jD(n,r,i),Nw)}function S4(){const n=fR(),r=M.useRef();return xR(()=>clearTimeout(r.current)),M.useMemo(()=>{const i=()=>clearTimeout(r.current);function u(l,d=0){n()&&(i(),d<=Nw?r.current=setTimeout(l,d):jD(r,l,Date.now()+d))}return{set:u,clear:i,handleRef:r}},[])}const E4=()=>{};function w4(n,r,{disabled:i,clickTrigger:u}={}){const l=r||E4;zj(n,l,{disabled:i,clickTrigger:u});const d=gr(h=>{cD(h)&&l(h)});M.useEffect(()=>{if(i||n==null)return;const h=ev(Qb(n));let v=(h.defaultView||window).event;const y=ql(h,"keyup",C=>{if(C===v){v=void 0;return}d(C)});return()=>{y()}},[n,i,d])}const DD=M.forwardRef((n,r)=>{const{flip:i,offset:u,placement:l,containerPadding:d,popperConfig:h={},transition:v,runTransition:y}=n,[C,x]=g0(),[R,T]=g0(),j=ds(x,r),N=Rw(n.container),O=Rw(n.target),[_,L]=M.useState(!n.show),F=Vj(O,C,Hj({placement:l,enableEvents:!!n.show,containerPadding:d||5,flip:i,offset:u,arrowElement:R,popperConfig:h}));n.show&&_&&L(!1);const V=(...ge)=>{L(!0),n.onExited&&n.onExited(...ge)},H=n.show||!_;if(w4(C,n.onHide,{disabled:!n.rootClose||n.rootCloseDisabled,clickTrigger:n.rootCloseEvent}),!H)return null;const{onExit:z,onExiting:U,onEnter:J,onEntering:q,onEntered:Re}=n;let he=n.children(Object.assign({},F.attributes.popper,{style:F.styles.popper,ref:j}),{popper:F,placement:l,show:!!n.show,arrowProps:Object.assign({},F.attributes.arrow,{style:F.styles.arrow,ref:T})});return he=Tw(v,y,{in:!!n.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:he,onExit:z,onExiting:U,onExited:V,onEnter:J,onEntering:q,onEntered:Re}),N?Bf.createPortal(he,N):null});DD.displayName="Overlay";const R4=DD,kD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"popover-header"),b.jsx(i,{ref:l,className:qt(n,r),...u})));kD.displayName="PopoverHeader";const T4=kD,MD=M.forwardRef(({className:n,bsPrefix:r,as:i="div",...u},l)=>(r=bn(r,"popover-body"),b.jsx(i,{ref:l,className:qt(n,r),...u})));MD.displayName="PopoverBody";const LD=MD;function PD(n,r){let i=n;return n==="left"?i=r?"end":"start":n==="right"&&(i=r?"start":"end"),i}function FD(n="absolute"){return{position:n,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const I4=M.forwardRef(({bsPrefix:n,placement:r="right",className:i,style:u,children:l,body:d,arrowProps:h,hasDoneInitialMeasure:v,popper:y,show:C,...x},R)=>{const T=bn(n,"popover"),j=P0(),[N]=(r==null?void 0:r.split("-"))||[],O=PD(N,j);let _=u;return C&&!v&&(_={...u,...FD(y==null?void 0:y.strategy)}),b.jsxs("div",{ref:R,role:"tooltip",style:_,"x-placement":N,className:qt(i,T,N&&`bs-popover-${O}`),...x,children:[b.jsx("div",{className:"popover-arrow",...h}),d?b.jsx(LD,{children:l}):l]})}),N4=Object.assign(I4,{Header:T4,Body:LD,POPPER_OFFSET:[0,8]}),VD=M.forwardRef(({bsPrefix:n,placement:r="right",className:i,style:u,children:l,arrowProps:d,hasDoneInitialMeasure:h,popper:v,show:y,...C},x)=>{n=bn(n,"tooltip");const R=P0(),[T]=(r==null?void 0:r.split("-"))||[],j=PD(T,R);let N=u;return y&&!h&&(N={...u,...FD(v==null?void 0:v.strategy)}),b.jsxs("div",{ref:x,style:N,role:"tooltip","x-placement":T,className:qt(i,n,`bs-tooltip-${j}`),...C,children:[b.jsx("div",{className:"tooltip-arrow",...d}),b.jsx("div",{className:`${n}-inner`,children:l})]})});VD.displayName="Tooltip";const RR=Object.assign(VD,{TOOLTIP_OFFSET:[0,6]});function _4(n){const r=M.useRef(null),i=bn(void 0,"popover"),u=bn(void 0,"tooltip"),l=M.useMemo(()=>({name:"offset",options:{offset:()=>{if(n)return n;if(r.current){if(Iw(r.current,i))return N4.POPPER_OFFSET;if(Iw(r.current,u))return RR.TOOLTIP_OFFSET}return[0,0]}}}),[n,i,u]);return[r,[l]]}function O4(n,r){const{ref:i}=n,{ref:u}=r;n.ref=i.__wrapped||(i.__wrapped=l=>i(m0(l))),r.ref=u.__wrapped||(u.__wrapped=l=>u(m0(l)))}const BD=M.forwardRef(({children:n,transition:r=$p,popperConfig:i={},rootClose:u=!1,placement:l="top",show:d=!1,...h},v)=>{const y=M.useRef({}),[C,x]=M.useState(null),[R,T]=_4(h.offset),j=ds(v,R),N=r===!0?$p:r||void 0,O=gr(_=>{x(_),i==null||i.onFirstUpdate==null||i.onFirstUpdate(_)});return y0(()=>{C&&h.target&&(y.current.scheduleUpdate==null||y.current.scheduleUpdate())},[C,h.target]),M.useEffect(()=>{d||x(null)},[d]),b.jsx(R4,{...h,ref:j,popperConfig:{...i,modifiers:T.concat(i.modifiers||[]),onFirstUpdate:O},transition:N,rootClose:u,placement:l,show:d,children:(_,{arrowProps:L,popper:F,show:V})=>{var H,z;O4(_,L);const U=F==null?void 0:F.placement,J=Object.assign(y.current,{state:F==null?void 0:F.state,scheduleUpdate:F==null?void 0:F.update,placement:U,outOfBoundaries:(F==null||(H=F.state)==null||(z=H.modifiersData.hide)==null?void 0:z.isReferenceHidden)||!1,strategy:i.strategy}),q=!!C;return typeof n=="function"?n({..._,placement:U,show:V,...!r&&V&&{className:"show"},popper:J,arrowProps:L,hasDoneInitialMeasure:q}):M.cloneElement(n,{..._,placement:U,arrowProps:L,popper:J,hasDoneInitialMeasure:q,className:qt(n.props.className,!r&&V&&"show"),style:{...n.props.style,..._.style}})}})});BD.displayName="Overlay";const zD=BD;var A4={};function j4(n){return n&&typeof n=="object"?n:{show:n,hide:n}}function tO(n,r,i){const[u]=r,l=u.currentTarget,d=u.relatedTarget||u.nativeEvent[i];(!d||d!==l)&&!xm(l,d)&&n(...r)}_t.oneOf(["click","hover","focus"]);const D4=({trigger:n=["hover","focus"],overlay:r,children:i,popperConfig:u={},show:l,defaultShow:d=!1,onToggle:h,delay:v,placement:y,flip:C=y&&y.indexOf("auto")!==-1,...x})=>{const R=M.useRef(null),T=ds(R,i.ref),j=S4(),N=M.useRef(""),[O,_]=dj(l,d,h),L=j4(v),{onFocus:F,onBlur:V,onClick:H}=typeof i!="function"?M.Children.only(i).props:{},z=xe=>{T(m0(xe))},U=M.useCallback(()=>{if(j.clear(),N.current="show",!L.show){_(!0);return}j.set(()=>{N.current==="show"&&_(!0)},L.show)},[L.show,_,j]),J=M.useCallback(()=>{if(j.clear(),N.current="hide",!L.hide){_(!1);return}j.set(()=>{N.current==="hide"&&_(!1)},L.hide)},[L.hide,_,j]),q=M.useCallback((...xe)=>{U(),F==null||F(...xe)},[U,F]),Re=M.useCallback((...xe)=>{J(),V==null||V(...xe)},[J,V]),he=M.useCallback((...xe)=>{_(!O),H==null||H(...xe)},[H,_,O]),ge=M.useCallback((...xe)=>{tO(U,xe,"fromElement")},[U]),fe=M.useCallback((...xe)=>{tO(J,xe,"toElement")},[J]),Oe=n==null?[]:[].concat(n),Te={ref:z};return Oe.indexOf("click")!==-1&&(Te.onClick=he),Oe.indexOf("focus")!==-1&&(Te.onFocus=q,Te.onBlur=Re),Oe.indexOf("hover")!==-1&&(A4.NODE_ENV!=="production"&&bR(Oe.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),Te.onMouseOver=ge,Te.onMouseOut=fe),b.jsxs(b.Fragment,{children:[typeof i=="function"?i(Te):M.cloneElement(i,Te),b.jsx(zD,{...x,show:O,onHide:J,flip:C,placement:y,popperConfig:u,target:R.current,children:r})]})},HD=D4;function k4({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u}=Ji(r||i.grantNumber),{setTab:l}=Ji(r||i.grantNumber);if(!i||!u)return;let d;const h={};for(let T of u.users||[])for(let j of T.resourceIds)h[j]=h[j]||0,h[j]+=1;const v=(i.resources||[]).filter(T=>T.isCredit?(d=T,!1):T.allocated>0).map((T,j)=>({...T,userCount:h[T.resourceId]||0,color:pw[j%pw.length]})),y=d?d.allocated:0,C="Exchange"in i.allowedActions,x=i.exchangeActionId!==null,R=[{key:"name",name:"Resource",format:(T,j)=>Hf(j)},{key:"isActive",name:"Status",format:T=>b.jsx(Zp,{status:T?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(T,j)=>{if(j.isBoolean)return eR(j.allocated);const N=j.allocated-T,O=Math.max(N,0)*100/j.allocated;return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:`usage bg-${j.color}`,style:{width:`${Math.min(O,100)}%`}}),ni(N,{abbreviate:!0})," of"," ",ni(j.allocated,{abbreviate:!0})," ",j.unit," ","remaining (",Math.round(O),"%)"]})}},{key:"endDate",name:"End Date",format:T=>Vp(T)}];return u.isManager&&R.push({key:"userCount",name:"Users",class:"text-end",format:ni}),u.currentUser&&R.push({key:"resourceUsername",name:"My Username",format:(T,j)=>{const N=u.currentUser.resourceUsernames[j.resourceId];if(N)return N;if(u.currentUser.resourceAccountPendingIds.includes(j.resourceId))return b.jsx(Zp,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(u.currentUser.resourceIds.includes(j.resourceId)||!j.isActive)return b.jsx(b.Fragment,{children:"—"});if(u.isManager)return b.jsx("a",{href:"#",onClick:_=>{_.preventDefault(),l("users")},children:"Grant access"});const O=b.jsxs(RR,{children:["Please contact ",tR(u)," to request access to this resource."]});return b.jsx(HD,{overlay:O,children:b.jsx("a",{href:"#",onClick:_=>{_.preventDefault()},children:"Request access"})})}}),b.jsxs("div",{className:"overview",children:[C&&!x&&y>Nn.creditAlertThreshold?b.jsxs("button",{onClick:()=>l("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[b.jsxs("span",{children:[b.jsxs("span",{className:"fs-3",children:[mc(Nn.resourceTypeIcons[d.icon])," ",ni(y)]})," ",d.unit," available"]}),b.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",b.jsx("span",{className:"fs-3",children:mc("chevron-right")})]})]}):null,v.length?b.jsx(Qf,{columns:R,rows:v}):null]})}const M4=[{key:"role",name:"Role",format:n=>b.jsxs(b.Fragment,{children:[mc(Nn.roleIcons[n])," ",n]})},{key:"users",name:"Users",format:n=>{const r=n.slice(0,3);return n.length>4&&(r[2]=`${ni(n.length-3)} others`),r.map((i,u)=>{const l=r.length-u;return`${i}${l>2?",":l==2&&r.length>1?" and":""}`}).join(" ")}}],L4=({requestId:n,grantNumber:r})=>{const{project:i}=Ji(r);if(!i)return;const u=L0.map(({role:l,name:d})=>({role:d,users:(i.users||[]).filter(h=>h.role===l).map(h=>`${h.firstName} ${h.lastName}`)})).filter(l=>l.users.length>0);return u.length?b.jsx(Qf,{rows:u,columns:M4}):null};function P4({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u,username:l}=Ji(r||i.grantNumber);if(!(!i||!u||i.error||u.error)&&i)return b.jsxs("div",{className:"overview",children:[b.jsx(k4,{requestId:n,grantNumber:r}),u.isManager?b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-lg-6",children:b.jsx(L4,{requestId:n,grantNumber:r})}),b.jsx("div",{className:"col-lg-6",children:b.jsx(d4,{requestId:n})})]}):null]})}function Yf(n){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yf(n)}function F4(n,r){if(Yf(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var u=i.call(n,r||"default");if(Yf(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function UD(n){var r=F4(n,"string");return Yf(r)=="symbol"?r:String(r)}function Lp(n,r,i){return r=UD(r),r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n}function nO(n,r){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);r&&(u=u.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),i.push.apply(i,u)}return i}function yt(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?nO(Object(i),!0).forEach(function(u){Lp(n,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):nO(Object(i)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(i,u))})}return n}function V4(n){if(Array.isArray(n))return n}function B4(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var u,l,d,h,v=[],y=!0,C=!1;try{if(d=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;y=!1}else for(;!(y=(u=d.call(i)).done)&&(v.push(u.value),v.length!==r);y=!0);}catch(x){C=!0,l=x}finally{try{if(!y&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(C)throw l}}return v}}function _w(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,u=new Array(r);i<r;i++)u[i]=n[i];return u}function $D(n,r){if(n){if(typeof n=="string")return _w(n,r);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _w(n,r)}}function z4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
294
294
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ta(n,r){return V4(n)||B4(n,r)||$D(n,r)||z4()}function nl(n,r){if(n==null)return{};var i=iR(n,r),u,l;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(l=0;l<d.length;l++)u=d[l],!(r.indexOf(u)>=0)&&Object.prototype.propertyIsEnumerable.call(n,u)&&(i[u]=n[u])}return i}var H4=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function GD(n){var r=n.defaultInputValue,i=r===void 0?"":r,u=n.defaultMenuIsOpen,l=u===void 0?!1:u,d=n.defaultValue,h=d===void 0?null:d,v=n.inputValue,y=n.menuIsOpen,C=n.onChange,x=n.onInputChange,R=n.onMenuClose,T=n.onMenuOpen,j=n.value,N=nl(n,H4),O=M.useState(v!==void 0?v:i),_=ta(O,2),L=_[0],F=_[1],V=M.useState(y!==void 0?y:l),H=ta(V,2),z=H[0],U=H[1],J=M.useState(j!==void 0?j:h),q=ta(J,2),Re=q[0],he=q[1],ge=M.useCallback(function(ne,_e){typeof C=="function"&&C(ne,_e),he(ne)},[C]),fe=M.useCallback(function(ne,_e){var G;typeof x=="function"&&(G=x(ne,_e)),F(G!==void 0?G:ne)},[x]),Oe=M.useCallback(function(){typeof T=="function"&&T(),U(!0)},[T]),Te=M.useCallback(function(){typeof R=="function"&&R(),U(!1)},[R]),xe=v!==void 0?v:L,je=y!==void 0?y:z,Le=j!==void 0?j:Re;return yt(yt({},N),{},{inputValue:xe,menuIsOpen:je,onChange:ge,onInputChange:fe,onMenuClose:Te,onMenuOpen:Oe,value:Le})}function U4(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function rO(n,r){for(var i=0;i<r.length;i++){var u=r[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,UD(u.key),u)}}function $4(n,r,i){return r&&rO(n.prototype,r),i&&rO(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function G4(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&v0(n,r)}function C0(n){return C0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},C0(n)}function WD(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WD=function(){return!!n})()}function W4(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function X4(n,r){if(r&&(Yf(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W4(n)}function Y4(n){var r=WD();return function(){var u=C0(n),l;if(r){var d=C0(this).constructor;l=Reflect.construct(u,arguments,d)}else l=u.apply(this,arguments);return X4(this,l)}}function Z4(n){if(Array.isArray(n))return _w(n)}function J4(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function q4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
295
295
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TR(n){return Z4(n)||J4(n)||$D(n)||q4()}var Fb={};function Q4(n){if(n.sheet)return n.sheet;for(var r=0;r<document.styleSheets.length;r++)if(document.styleSheets[r].ownerNode===n)return document.styleSheets[r]}function K4(n){var r=document.createElement("style");return r.setAttribute("data-emotion",n.key),n.nonce!==void 0&&r.setAttribute("nonce",n.nonce),r.appendChild(document.createTextNode("")),r.setAttribute("data-s",""),r}var eW=function(){function n(i){var u=this;this._insertTag=function(l){var d;u.tags.length===0?u.insertionPoint?d=u.insertionPoint.nextSibling:u.prepend?d=u.container.firstChild:d=u.before:d=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(l,d),u.tags.push(l)},this.isSpeedy=i.speedy===void 0?Fb.NODE_ENV==="production":i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var r=n.prototype;return r.hydrate=function(u){u.forEach(this._insertTag)},r.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(K4(this));var l=this.tags[this.tags.length-1];if(Fb.NODE_ENV!=="production"){var d=u.charCodeAt(0)===64&&u.charCodeAt(1)===105;d&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
296
296
  `+u+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!d}if(this.isSpeedy){var h=Q4(l);try{h.insertRule(u,h.cssRules.length)}catch(v){Fb.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(u)&&console.error('There was a problem inserting the following rule: "'+u+'"',v)}}else l.appendChild(document.createTextNode(u));this.ctr++},r.flush=function(){this.tags.forEach(function(u){return u.parentNode&&u.parentNode.removeChild(u)}),this.tags=[],this.ctr=0,Fb.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},n}(),Va="-ms-",x0="-moz-",gn="-webkit-",IR="comm",NR="rule",_R="decl",tW="@import",XD="@keyframes",nW="@layer",rW=Math.abs,U0=String.fromCharCode,aW=Object.assign;function iW(n,r){return ma(n,0)^45?(((r<<2^ma(n,0))<<2^ma(n,1))<<2^ma(n,2))<<2^ma(n,3):0}function YD(n){return n.trim()}function oW(n,r){return(n=r.exec(n))?n[0]:n}function yn(n,r,i){return n.replace(r,i)}function Ow(n,r){return n.indexOf(r)}function ma(n,r){return n.charCodeAt(r)|0}function Sm(n,r,i){return n.slice(r,i)}function Qs(n){return n.length}function OR(n){return n.length}function Vb(n,r){return r.push(n),n}function sW(n,r){return n.map(r).join("")}var $0=1,Jp=1,ZD=0,ji=0,Dr=0,rv="";function G0(n,r,i,u,l,d,h){return{value:n,root:r,parent:i,type:u,props:l,children:d,line:$0,column:Jp,length:h,return:""}}function om(n,r){return aW(G0("",null,null,"",null,null,0),n,{length:-n.length},r)}function lW(){return Dr}function uW(){return Dr=ji>0?ma(rv,--ji):0,Jp--,Dr===10&&(Jp=1,$0--),Dr}function Xi(){return Dr=ji<ZD?ma(rv,ji++):0,Jp++,Dr===10&&(Jp=1,$0++),Dr}function tl(){return ma(rv,ji)}function Kb(){return ji}function km(n,r){return Sm(rv,n,r)}function Em(n){switch(n){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 JD(n){return $0=Jp=1,ZD=Qs(rv=n),ji=0,[]}function qD(n){return rv="",n}function e0(n){return YD(km(ji-1,Aw(n===91?n+2:n===40?n+1:n)))}function cW(n){for(;(Dr=tl())&&Dr<33;)Xi();return Em(n)>2||Em(Dr)>3?"":" "}function fW(n,r){for(;--r&&Xi()&&!(Dr<48||Dr>102||Dr>57&&Dr<65||Dr>70&&Dr<97););return km(n,Kb()+(r<6&&tl()==32&&Xi()==32))}function Aw(n){for(;Xi();)switch(Dr){case n:return ji;case 34:case 39:n!==34&&n!==39&&Aw(Dr);break;case 40:n===41&&Aw(n);break;case 92:Xi();break}return ji}function dW(n,r){for(;Xi()&&n+Dr!==57;)if(n+Dr===84&&tl()===47)break;return"/*"+km(r,ji-1)+"*"+U0(n===47?n:Xi())}function pW(n){for(;!Em(tl());)Xi();return km(n,ji)}function vW(n){return qD(t0("",null,null,null,[""],n=JD(n),0,[0],n))}function t0(n,r,i,u,l,d,h,v,y){for(var C=0,x=0,R=h,T=0,j=0,N=0,O=1,_=1,L=1,F=0,V="",H=l,z=d,U=u,J=V;_;)switch(N=F,F=Xi()){case 40:if(N!=108&&ma(J,R-1)==58){Ow(J+=yn(e0(F),"&","&\f"),"&\f")!=-1&&(L=-1);break}case 34:case 39:case 91:J+=e0(F);break;case 9:case 10:case 13:case 32:J+=cW(N);break;case 92:J+=fW(Kb()-1,7);continue;case 47:switch(tl()){case 42:case 47:Vb(hW(dW(Xi(),Kb()),r,i),y);break;default:J+="/"}break;case 123*O:v[C++]=Qs(J)*L;case 125*O:case 59:case 0:switch(F){case 0:case 125:_=0;case 59+x:L==-1&&(J=yn(J,/\f/g,"")),j>0&&Qs(J)-R&&Vb(j>32?iO(J+";",u,i,R-1):iO(yn(J," ","")+";",u,i,R-2),y);break;case 59:J+=";";default:if(Vb(U=aO(J,r,i,C,x,l,v,V,H=[],z=[],R),d),F===123)if(x===0)t0(J,r,U,U,H,d,R,v,z);else switch(T===99&&ma(J,3)===110?100:T){case 100:case 108:case 109:case 115:t0(n,U,U,u&&Vb(aO(n,U,U,0,0,l,v,V,l,H=[],R),z),l,z,R,v,u?H:z);break;default:t0(J,U,U,U,[""],z,0,v,z)}}C=x=j=0,O=L=1,V=J="",R=h;break;case 58:R=1+Qs(J),j=N;default:if(O<1){if(F==123)--O;else if(F==125&&O++==0&&uW()==125)continue}switch(J+=U0(F),F*O){case 38:L=x>0?1:(J+="\f",-1);break;case 44:v[C++]=(Qs(J)-1)*L,L=1;break;case 64:tl()===45&&(J+=e0(Xi())),T=tl(),x=R=Qs(V=J+=pW(Kb())),F++;break;case 45:N===45&&Qs(J)==2&&(O=0)}}return d}function aO(n,r,i,u,l,d,h,v,y,C,x){for(var R=l-1,T=l===0?d:[""],j=OR(T),N=0,O=0,_=0;N<u;++N)for(var L=0,F=Sm(n,R+1,R=rW(O=h[N])),V=n;L<j;++L)(V=YD(O>0?T[L]+" "+F:yn(F,/&\f/g,T[L])))&&(y[_++]=V);return G0(n,r,i,l===0?NR:v,y,C,x)}function hW(n,r,i){return G0(n,r,i,IR,U0(lW()),Sm(n,2,-2),0)}function iO(n,r,i,u){return G0(n,r,i,_R,Sm(n,0,u),Sm(n,u+1,-1),u)}function zp(n,r){for(var i="",u=OR(n),l=0;l<u;l++)i+=r(n[l],l,n,r)||"";return i}function mW(n,r,i,u){switch(n.type){case nW:if(n.children.length)break;case tW:case _R:return n.return=n.return||n.value;case IR:return"";case XD:return n.return=n.value+"{"+zp(n.children,u)+"}";case NR:n.value=n.props.join(",")}return Qs(i=zp(n.children,u))?n.return=n.value+"{"+i+"}":""}function gW(n){var r=OR(n);return function(i,u,l,d){for(var h="",v=0;v<r;v++)h+=n[v](i,u,l,d)||"";return h}}function yW(n){return function(r){r.root||(r=r.return)&&n(r)}}function bW(n){var r=Object.create(null);return function(i){return r[i]===void 0&&(r[i]=n(i)),r[i]}}var sm={},CW=function(r,i,u){for(var l=0,d=0;l=d,d=tl(),l===38&&d===12&&(i[u]=1),!Em(d);)Xi();return km(r,ji)},xW=function(r,i){var u=-1,l=44;do switch(Em(l)){case 0:l===38&&tl()===12&&(i[u]=1),r[u]+=CW(ji-1,i,u);break;case 2:r[u]+=e0(l);break;case 4:if(l===44){r[++u]=tl()===58?"&\f":"",i[u]=r[u].length;break}default:r[u]+=U0(l)}while(l=Xi());return r},SW=function(r,i){return qD(xW(JD(r),i))},oO=new WeakMap,EW=function(r){if(!(r.type!=="rule"||!r.parent||r.length<1)){for(var i=r.value,u=r.parent,l=r.column===u.column&&r.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(r.props.length===1&&i.charCodeAt(0)!==58&&!oO.get(u))&&!l){oO.set(r,!0);for(var d=[],h=SW(i,d),v=u.props,y=0,C=0;y<h.length;y++)for(var x=0;x<v.length;x++,C++)r.props[C]=d[y]?h[y].replace(/&\f/g,v[x]):v[x]+" "+h[y]}}},wW=function(r){if(r.type==="decl"){var i=r.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(r.return="",r.value="")}},RW="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",TW=function(r){return r.type==="comm"&&r.children.indexOf(RW)>-1},IW=function(r){return function(i,u,l){if(!(i.type!=="rule"||r.compat)){var d=i.value.match(/(:first|:nth|:nth-last)-child/g);if(d){for(var h=!!i.parent,v=h?i.parent.children:l,y=v.length-1;y>=0;y--){var C=v[y];if(C.line<i.line)break;if(C.column<i.column){if(TW(C))return;break}}d.forEach(function(x){console.error('The pseudo class "'+x+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+x.split("-child")[0]+'-of-type".')})}}}},QD=function(r){return r.type.charCodeAt(1)===105&&r.type.charCodeAt(0)===64},NW=function(r,i){for(var u=r-1;u>=0;u--)if(!QD(i[u]))return!0;return!1},sO=function(r){r.type="",r.value="",r.return="",r.children="",r.props=""},_W=function(r,i,u){QD(r)&&(r.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),sO(r)):NW(i,u)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),sO(r)))};function KD(n,r){switch(iW(n,r)){case 5103:return gn+"print-"+n+n;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 gn+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return gn+n+x0+n+Va+n+n;case 6828:case 4268:return gn+n+Va+n+n;case 6165:return gn+n+Va+"flex-"+n+n;case 5187:return gn+n+yn(n,/(\w+).+(:[^]+)/,gn+"box-$1$2"+Va+"flex-$1$2")+n;case 5443:return gn+n+Va+"flex-item-"+yn(n,/flex-|-self/,"")+n;case 4675:return gn+n+Va+"flex-line-pack"+yn(n,/align-content|flex-|-self/,"")+n;case 5548:return gn+n+Va+yn(n,"shrink","negative")+n;case 5292:return gn+n+Va+yn(n,"basis","preferred-size")+n;case 6060:return gn+"box-"+yn(n,"-grow","")+gn+n+Va+yn(n,"grow","positive")+n;case 4554:return gn+yn(n,/([^-])(transform)/g,"$1"+gn+"$2")+n;case 6187:return yn(yn(yn(n,/(zoom-|grab)/,gn+"$1"),/(image-set)/,gn+"$1"),n,"")+n;case 5495:case 3959:return yn(n,/(image-set\([^]*)/,gn+"$1$`$1");case 4968:return yn(yn(n,/(.+:)(flex-)?(.*)/,gn+"box-pack:$3"+Va+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gn+n+n;case 4095:case 3583:case 4068:case 2532:return yn(n,/(.+)-inline(.+)/,gn+"$1$2")+n;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(Qs(n)-1-r>6)switch(ma(n,r+1)){case 109:if(ma(n,r+4)!==45)break;case 102:return yn(n,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+x0+(ma(n,r+3)==108?"$3":"$2-$3"))+n;case 115:return~Ow(n,"stretch")?KD(yn(n,"stretch","fill-available"),r)+n:n}break;case 4949:if(ma(n,r+1)!==115)break;case 6444:switch(ma(n,Qs(n)-3-(~Ow(n,"!important")&&10))){case 107:return yn(n,":",":"+gn)+n;case 101:return yn(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(ma(n,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Va+"$2box$3")+n}break;case 5936:switch(ma(n,r+11)){case 114:return gn+n+Va+yn(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return gn+n+Va+yn(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return gn+n+Va+yn(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return gn+n+Va+n+n}return n}var OW=function(r,i,u,l){if(r.length>-1&&!r.return)switch(r.type){case _R:r.return=KD(r.value,r.length);break;case XD:return zp([om(r,{value:yn(r.value,"@","@"+gn)})],l);case NR:if(r.length)return sW(r.props,function(d){switch(oW(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zp([om(r,{props:[yn(d,/:(read-\w+)/,":"+x0+"$1")]})],l);case"::placeholder":return zp([om(r,{props:[yn(d,/:(plac\w+)/,":"+gn+"input-$1")]}),om(r,{props:[yn(d,/:(plac\w+)/,":"+x0+"$1")]}),om(r,{props:[yn(d,/:(plac\w+)/,Va+"input-$1")]})],l)}return""})}},AW=[OW],jW=function(r){var i=r.key;if(sm.NODE_ENV!=="production"&&!i)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
@@ -306,4 +306,4 @@ You should wrap it with \`css\` like this:
306
306
  `),u=0;u<i.length;u++){var l=XW(i[u]);if(l){if(YW.has(l))break;if(/^[A-Z]/.test(l))return ZW(l)}}},jw="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Dw="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",qW=function(r,i){if(Zf.NODE_ENV!=="production"&&typeof i.css=="string"&&i.css.indexOf(":")!==-1)throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+i.css+"`");var u={};for(var l in i)kR.call(i,l)&&(u[l]=i[l]);if(u[jw]=r,Zf.NODE_ENV!=="production"&&i.css&&(typeof i.css!="object"||typeof i.css.name!="string"||i.css.name.indexOf("-")===-1)){var d=JW(new Error().stack);d&&(u[Dw]=d)}return u},QW=function(r){var i=r.cache,u=r.serialized,l=r.isStringTag;return AR(i,u,l),sk(function(){return jR(i,u,l)}),null},lk=LR(function(n,r,i){var u=n.css;typeof u=="string"&&r.registered[u]!==void 0&&(u=r.registered[u]);var l=n[jw],d=[u],h="";typeof n.className=="string"?h=nk(r.registered,d,n.className):n.className!=null&&(h=n.className+" ");var v=Rm(d,void 0,M.useContext(W0));if(Zf.NODE_ENV!=="production"&&v.name.indexOf("-")===-1){var y=n[Dw];y&&(v=Rm([v,"label:"+y+";"]))}h+=r.key+"-"+v.name;var C={};for(var x in n)kR.call(n,x)&&x!=="css"&&x!==jw&&(Zf.NODE_ENV==="production"||x!==Dw)&&(C[x]=n[x]);return C.ref=i,C.className=h,M.createElement(M.Fragment,null,M.createElement(QW,{cache:r,serialized:v,isStringTag:typeof l=="string"}),M.createElement(l,C))});Zf.NODE_ENV!=="production"&&(lk.displayName="EmotionCssPropInternal");var KW=lk,Jf={},e5={name:"@emotion/react",version:"11.11.3",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",browser:{"./dist/emotion-react.esm.js":"./dist/emotion-react.browser.esm.js"},exports:{".":{module:{worker:"./dist/emotion-react.worker.esm.js",browser:"./dist/emotion-react.browser.esm.js",default:"./dist/emotion-react.esm.js"},import:"./dist/emotion-react.cjs.mjs",default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{module:{worker:"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",browser:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"},import:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{module:{worker:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",browser:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"},import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{module:{worker:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",browser:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"},import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}},types:"types/index.d.ts",files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/*.d.ts","macro.*"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.11.0","@emotion/cache":"^11.11.0","@emotion/serialize":"^1.1.3","@emotion/use-insertion-effect-with-fallbacks":"^1.0.1","@emotion/utils":"^1.2.1","@emotion/weak-memoize":"^0.3.1","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.11.2","@emotion/css-prettifier":"1.1.3","@emotion/server":"11.11.0","@emotion/styled":"11.11.0","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^4.5.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.js","./jsx-runtime.js","./jsx-dev-runtime.js","./_isolated-hnrs.js"],umdName:"emotionReact",exports:{envConditions:["browser","worker"],extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}}}}},Et=function(r,i){var u=arguments;if(i==null||!kR.call(i,"css"))return M.createElement.apply(void 0,u);var l=u.length,d=new Array(l);d[0]=KW,d[1]=qW(r,i);for(var h=2;h<l;h++)d[h]=u[h];return M.createElement.apply(null,d)},vO=!1,t5=LR(function(n,r){Jf.NODE_ENV!=="production"&&!vO&&(n.className||n.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),vO=!0);var i=n.styles,u=Rm([i],void 0,M.useContext(W0)),l=M.useRef();return dO(function(){var d=r.key+"-global",h=new r.sheet.constructor({key:d,nonce:r.sheet.nonce,container:r.sheet.container,speedy:r.sheet.isSpeedy}),v=!1,y=document.querySelector('style[data-emotion="'+d+" "+u.name+'"]');return r.sheet.tags.length&&(h.before=r.sheet.tags[0]),y!==null&&(v=!0,y.setAttribute("data-emotion",d),h.hydrate([y])),l.current=[h,v],function(){h.flush()}},[r]),dO(function(){var d=l.current,h=d[0],v=d[1];if(v){d[1]=!1;return}if(u.next!==void 0&&jR(r,u.next,!0),h.tags.length){var y=h.tags[h.tags.length-1].nextElementSibling;h.before=y,h.flush()}r.insert("",u,h,!1)},[r,u.name]),null});Jf.NODE_ENV!=="production"&&(t5.displayName="EmotionGlobal");function PR(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rm(r)}var n5=function(){var r=PR.apply(void 0,arguments),i="animation-"+r.name;return{name:i,styles:"@keyframes "+i+"{"+r.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},r5=function n(r){for(var i=r.length,u=0,l="";u<i;u++){var d=r[u];if(d!=null){var h=void 0;switch(typeof d){case"boolean":break;case"object":{if(Array.isArray(d))h=n(d);else{Jf.NODE_ENV!=="production"&&d.styles!==void 0&&d.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),h="";for(var v in d)d[v]&&v&&(h&&(h+=" "),h+=v)}break}default:h=d}h&&(l&&(l+=" "),l+=h)}}return l};function a5(n,r,i){var u=[],l=nk(n,u,i);return u.length<2?i:l+r(u)}var i5=function(r){var i=r.cache,u=r.serializedArr;return sk(function(){for(var l=0;l<u.length;l++)jR(i,u[l],!1)}),null},o5=LR(function(n,r){var i=!1,u=[],l=function(){if(i&&Jf.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var C=arguments.length,x=new Array(C),R=0;R<C;R++)x[R]=arguments[R];var T=Rm(x,r.registered);return u.push(T),AR(r,T,!1),r.key+"-"+T.name},d=function(){if(i&&Jf.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var C=arguments.length,x=new Array(C),R=0;R<C;R++)x[R]=arguments[R];return a5(r.registered,l,r5(x))},h={css:l,cx:d,theme:M.useContext(W0)},v=n.children(h);return i=!0,M.createElement(M.Fragment,null,M.createElement(i5,{cache:r,serializedArr:u}),v)});Jf.NODE_ENV!=="production"&&(o5.displayName="EmotionClassNames");if(Jf.NODE_ENV!=="production"){var hO=!0,s5=typeof jest<"u"||typeof vi<"u";if(hO&&!s5){var mO=typeof globalThis<"u"?globalThis:hO?window:global,gO="__EMOTION_REACT_"+e5.version.split(".")[0]+"__";mO[gO]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),mO[gO]=!0}}function l5(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}const u5=Math.min,c5=Math.max,E0=Math.round,Bb=Math.floor,w0=n=>({x:n,y:n});function f5(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function uk(n){return fk(n)?(n.nodeName||"").toLowerCase():"#document"}function cs(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function ck(n){var r;return(r=(fk(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function fk(n){return n instanceof Node||n instanceof cs(n).Node}function kw(n){return n instanceof Element||n instanceof cs(n).Element}function FR(n){return n instanceof HTMLElement||n instanceof cs(n).HTMLElement}function yO(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof cs(n).ShadowRoot}function dk(n){const{overflow:r,overflowX:i,overflowY:u,display:l}=VR(n);return/auto|scroll|overlay|hidden|clip/.test(r+u+i)&&!["inline","contents"].includes(l)}function d5(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function p5(n){return["html","body","#document"].includes(uk(n))}function VR(n){return cs(n).getComputedStyle(n)}function v5(n){if(uk(n)==="html")return n;const r=n.assignedSlot||n.parentNode||yO(n)&&n.host||ck(n);return yO(r)?r.host:r}function pk(n){const r=v5(n);return p5(r)?n.ownerDocument?n.ownerDocument.body:n.body:FR(r)&&dk(r)?r:pk(r)}function R0(n,r,i){var u;r===void 0&&(r=[]),i===void 0&&(i=!0);const l=pk(n),d=l===((u=n.ownerDocument)==null?void 0:u.body),h=cs(l);return d?r.concat(h,h.visualViewport||[],dk(l)?l:[],h.frameElement&&i?R0(h.frameElement):[]):r.concat(l,R0(l,[],i))}function h5(n){const r=VR(n);let i=parseFloat(r.width)||0,u=parseFloat(r.height)||0;const l=FR(n),d=l?n.offsetWidth:i,h=l?n.offsetHeight:u,v=E0(i)!==d||E0(u)!==h;return v&&(i=d,u=h),{width:i,height:u,$:v}}function BR(n){return kw(n)?n:n.contextElement}function GE(n){const r=BR(n);if(!FR(r))return w0(1);const i=r.getBoundingClientRect(),{width:u,height:l,$:d}=h5(r);let h=(d?E0(i.width):i.width)/u,v=(d?E0(i.height):i.height)/l;return(!h||!Number.isFinite(h))&&(h=1),(!v||!Number.isFinite(v))&&(v=1),{x:h,y:v}}const m5=w0(0);function g5(n){const r=cs(n);return!d5()||!r.visualViewport?m5:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function y5(n,r,i){return r===void 0&&(r=!1),!i||r&&i!==cs(n)?!1:r}function bO(n,r,i,u){r===void 0&&(r=!1),i===void 0&&(i=!1);const l=n.getBoundingClientRect(),d=BR(n);let h=w0(1);r&&(u?kw(u)&&(h=GE(u)):h=GE(n));const v=y5(d,i,u)?g5(d):w0(0);let y=(l.left+v.x)/h.x,C=(l.top+v.y)/h.y,x=l.width/h.x,R=l.height/h.y;if(d){const T=cs(d),j=u&&kw(u)?cs(u):u;let N=T.frameElement;for(;N&&u&&j!==T;){const O=GE(N),_=N.getBoundingClientRect(),L=VR(N),F=_.left+(N.clientLeft+parseFloat(L.paddingLeft))*O.x,V=_.top+(N.clientTop+parseFloat(L.paddingTop))*O.y;y*=O.x,C*=O.y,x*=O.x,R*=O.y,y+=F,C+=V,N=cs(N).frameElement}}return f5({width:x,height:R,x:y,y:C})}function b5(n,r){let i=null,u;const l=ck(n);function d(){var v;clearTimeout(u),(v=i)==null||v.disconnect(),i=null}function h(v,y){v===void 0&&(v=!1),y===void 0&&(y=1),d();const{left:C,top:x,width:R,height:T}=n.getBoundingClientRect();if(v||r(),!R||!T)return;const j=Bb(x),N=Bb(l.clientWidth-(C+R)),O=Bb(l.clientHeight-(x+T)),_=Bb(C),F={rootMargin:-j+"px "+-N+"px "+-O+"px "+-_+"px",threshold:c5(0,u5(1,y))||1};let V=!0;function H(z){const U=z[0].intersectionRatio;if(U!==y){if(!V)return h();U?h(!1,U):u=setTimeout(()=>{h(!1,1e-7)},100)}V=!1}try{i=new IntersectionObserver(H,{...F,root:l.ownerDocument})}catch{i=new IntersectionObserver(H,F)}i.observe(n)}return h(!0),d}function C5(n,r,i,u){u===void 0&&(u={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:v=typeof IntersectionObserver=="function",animationFrame:y=!1}=u,C=BR(n),x=l||d?[...C?R0(C):[],...R0(r)]:[];x.forEach(L=>{l&&L.addEventListener("scroll",i,{passive:!0}),d&&L.addEventListener("resize",i)});const R=C&&v?b5(C,i):null;let T=-1,j=null;h&&(j=new ResizeObserver(L=>{let[F]=L;F&&F.target===C&&j&&(j.unobserve(r),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var V;(V=j)==null||V.observe(r)})),i()}),C&&!y&&j.observe(C),j.observe(r));let N,O=y?bO(n):null;y&&_();function _(){const L=bO(n);O&&(L.x!==O.x||L.y!==O.y||L.width!==O.width||L.height!==O.height)&&i(),O=L,N=requestAnimationFrame(_)}return i(),()=>{var L;x.forEach(F=>{l&&F.removeEventListener("scroll",i),d&&F.removeEventListener("resize",i)}),R==null||R(),(L=j)==null||L.disconnect(),j=null,y&&cancelAnimationFrame(N)}}var Mw=M.useLayoutEffect,Lw={},x5=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],T0=function(){};function S5(n,r){return r?r[0]==="-"?n+r:n+"__"+r:n}function E5(n,r){for(var i=arguments.length,u=new Array(i>2?i-2:0),l=2;l<i;l++)u[l-2]=arguments[l];var d=[].concat(u);if(r&&n)for(var h in r)r.hasOwnProperty(h)&&r[h]&&d.push("".concat(S5(n,h)));return d.filter(function(v){return v}).map(function(v){return String(v).trim()}).join(" ")}var CO=function(r){return D5(r)?r.filter(Boolean):Yf(r)==="object"&&r!==null?[r]:[]},vk=function(r){r.className,r.clearValue,r.cx,r.getStyles,r.getClassNames,r.getValue,r.hasValue,r.isMulti,r.isRtl,r.options,r.selectOption,r.selectProps,r.setValue,r.theme;var i=nl(r,x5);return yt({},i)},yr=function(r,i,u){var l=r.cx,d=r.getStyles,h=r.getClassNames,v=r.className;return{css:d(i,r),className:l(u??{},h(i,r),v)}};function w5(n,r,i){if(i){var u=i(n,r);if(typeof u=="string")return u}return n}function X0(n){return[document.documentElement,document.body,window].indexOf(n)>-1}function R5(n){return X0(n)?window.innerHeight:n.clientHeight}function hk(n){return X0(n)?window.pageYOffset:n.scrollTop}function I0(n,r){if(X0(n)){window.scrollTo(0,r);return}n.scrollTop=r}function T5(n){var r=getComputedStyle(n),i=r.position==="absolute",u=/(auto|scroll)/;if(r.position==="fixed")return document.documentElement;for(var l=n;l=l.parentElement;)if(r=getComputedStyle(l),!(i&&r.position==="static")&&u.test(r.overflow+r.overflowY+r.overflowX))return l;return document.documentElement}function I5(n,r,i,u){return i*((n=n/u-1)*n*n+1)+r}function zb(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T0,l=hk(n),d=r-l,h=10,v=0;function y(){v+=h;var C=I5(v,l,d,i);I0(n,C),v<i?window.requestAnimationFrame(y):u(n)}y()}function xO(n,r){var i=n.getBoundingClientRect(),u=r.getBoundingClientRect(),l=r.offsetHeight/3;u.bottom+l>i.bottom?I0(n,Math.min(r.offsetTop+r.clientHeight-n.offsetHeight+l,n.scrollHeight)):u.top-l<i.top&&I0(n,Math.max(r.offsetTop-l,0))}function N5(n){var r=n.getBoundingClientRect();return{bottom:r.bottom,height:r.height,left:r.left,right:r.right,top:r.top,width:r.width}}function SO(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function _5(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var mk=!1,O5={get passive(){return mk=!0}},Hb=typeof window<"u"?window:{};Hb.addEventListener&&Hb.removeEventListener&&(Hb.addEventListener("p",T0,O5),Hb.removeEventListener("p",T0,!1));var A5=mk;function j5(n){return n!=null}function D5(n){return Array.isArray(n)}function Ub(n,r,i){return n?r:i}var k5=function(r){for(var i=arguments.length,u=new Array(i>1?i-1:0),l=1;l<i;l++)u[l-1]=arguments[l];var d=Object.entries(r).filter(function(h){var v=ta(h,1),y=v[0];return!u.includes(y)});return d.reduce(function(h,v){var y=ta(v,2),C=y[0],x=y[1];return h[C]=x,h},{})},M5=["children","innerProps"],L5=["children","innerProps"];function P5(n){var r=n.maxHeight,i=n.menuEl,u=n.minHeight,l=n.placement,d=n.shouldScroll,h=n.isFixedPosition,v=n.controlHeight,y=T5(i),C={placement:"bottom",maxHeight:r};if(!i||!i.offsetParent)return C;var x=y.getBoundingClientRect(),R=x.height,T=i.getBoundingClientRect(),j=T.bottom,N=T.height,O=T.top,_=i.offsetParent.getBoundingClientRect(),L=_.top,F=h?window.innerHeight:R5(y),V=hk(y),H=parseInt(getComputedStyle(i).marginBottom,10),z=parseInt(getComputedStyle(i).marginTop,10),U=L-z,J=F-O,q=U+V,Re=R-V-O,he=j-F+V+H,ge=V+O-z,fe=160;switch(l){case"auto":case"bottom":if(J>=N)return{placement:"bottom",maxHeight:r};if(Re>=N&&!h)return d&&zb(y,he,fe),{placement:"bottom",maxHeight:r};if(!h&&Re>=u||h&&J>=u){d&&zb(y,he,fe);var Oe=h?J-H:Re-H;return{placement:"bottom",maxHeight:Oe}}if(l==="auto"||h){var Te=r,xe=h?U:q;return xe>=u&&(Te=Math.min(xe-H-v,r)),{placement:"top",maxHeight:Te}}if(l==="bottom")return d&&I0(y,he),{placement:"bottom",maxHeight:r};break;case"top":if(U>=N)return{placement:"top",maxHeight:r};if(q>=N&&!h)return d&&zb(y,ge,fe),{placement:"top",maxHeight:r};if(!h&&q>=u||h&&U>=u){var je=r;return(!h&&q>=u||h&&U>=u)&&(je=h?U-z:q-z),d&&zb(y,ge,fe),{placement:"top",maxHeight:je}}return{placement:"bottom",maxHeight:r};default:throw new Error('Invalid placement provided "'.concat(l,'".'))}return C}function F5(n){var r={bottom:"top",top:"bottom"};return n?r[n]:"bottom"}var gk=function(r){return r==="auto"?"bottom":r},V5=function(r,i){var u,l=r.placement,d=r.theme,h=d.borderRadius,v=d.spacing,y=d.colors;return yt((u={label:"menu"},Lp(u,F5(l),"100%"),Lp(u,"position","absolute"),Lp(u,"width","100%"),Lp(u,"zIndex",1),u),i?{}:{backgroundColor:y.neutral0,borderRadius:h,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:v.menuGutter,marginTop:v.menuGutter})},yk=M.createContext(null),B5=function(r){var i=r.children,u=r.minMenuHeight,l=r.maxMenuHeight,d=r.menuPlacement,h=r.menuPosition,v=r.menuShouldScrollIntoView,y=r.theme,C=M.useContext(yk)||{},x=C.setPortalPlacement,R=M.useRef(null),T=M.useState(l),j=ta(T,2),N=j[0],O=j[1],_=M.useState(null),L=ta(_,2),F=L[0],V=L[1],H=y.spacing.controlHeight;return Mw(function(){var z=R.current;if(z){var U=h==="fixed",J=v&&!U,q=P5({maxHeight:l,menuEl:z,minHeight:u,placement:d,shouldScroll:J,isFixedPosition:U,controlHeight:H});O(q.maxHeight),V(q.placement),x==null||x(q.placement)}},[l,d,h,v,u,x,H]),i({ref:R,placerProps:yt(yt({},r),{},{placement:F||gk(d),maxHeight:N})})},z5=function(r){var i=r.children,u=r.innerRef,l=r.innerProps;return Et("div",Rt({},yr(r,"menu",{menu:!0}),{ref:u},l),i)},H5=z5,U5=function(r,i){var u=r.maxHeight,l=r.theme.spacing.baseUnit;return yt({maxHeight:u,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},i?{}:{paddingBottom:l,paddingTop:l})},$5=function(r){var i=r.children,u=r.innerProps,l=r.innerRef,d=r.isMulti;return Et("div",Rt({},yr(r,"menuList",{"menu-list":!0,"menu-list--is-multi":d}),{ref:l},u),i)},bk=function(r,i){var u=r.theme,l=u.spacing.baseUnit,d=u.colors;return yt({textAlign:"center"},i?{}:{color:d.neutral40,padding:"".concat(l*2,"px ").concat(l*3,"px")})},G5=bk,W5=bk,X5=function(r){var i=r.children,u=i===void 0?"No options":i,l=r.innerProps,d=nl(r,M5);return Et("div",Rt({},yr(yt(yt({},d),{},{children:u,innerProps:l}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),l),u)},Y5=function(r){var i=r.children,u=i===void 0?"Loading...":i,l=r.innerProps,d=nl(r,L5);return Et("div",Rt({},yr(yt(yt({},d),{},{children:u,innerProps:l}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),l),u)},Z5=function(r){var i=r.rect,u=r.offset,l=r.position;return{left:i.left,position:l,top:u,width:i.width,zIndex:1}},J5=function(r){var i=r.appendTo,u=r.children,l=r.controlElement,d=r.innerProps,h=r.menuPlacement,v=r.menuPosition,y=M.useRef(null),C=M.useRef(null),x=M.useState(gk(h)),R=ta(x,2),T=R[0],j=R[1],N=M.useMemo(function(){return{setPortalPlacement:j}},[]),O=M.useState(null),_=ta(O,2),L=_[0],F=_[1],V=M.useCallback(function(){if(l){var J=N5(l),q=v==="fixed"?0:window.pageYOffset,Re=J[T]+q;(Re!==(L==null?void 0:L.offset)||J.left!==(L==null?void 0:L.rect.left)||J.width!==(L==null?void 0:L.rect.width))&&F({offset:Re,rect:J})}},[l,v,T,L==null?void 0:L.offset,L==null?void 0:L.rect.left,L==null?void 0:L.rect.width]);Mw(function(){V()},[V]);var H=M.useCallback(function(){typeof C.current=="function"&&(C.current(),C.current=null),l&&y.current&&(C.current=C5(l,y.current,V,{elementResize:"ResizeObserver"in window}))},[l,V]);Mw(function(){H()},[H]);var z=M.useCallback(function(J){y.current=J,H()},[H]);if(!i&&v!=="fixed"||!L)return null;var U=Et("div",Rt({ref:z},yr(yt(yt({},r),{},{offset:L.offset,position:v,rect:L.rect}),"menuPortal",{"menu-portal":!0}),d),u);return Et(yk.Provider,{value:N},i?Uw.createPortal(U,i):U)},q5=function(r){var i=r.isDisabled,u=r.isRtl;return{label:"container",direction:u?"rtl":void 0,pointerEvents:i?"none":void 0,position:"relative"}},Q5=function(r){var i=r.children,u=r.innerProps,l=r.isDisabled,d=r.isRtl;return Et("div",Rt({},yr(r,"container",{"--is-disabled":l,"--is-rtl":d}),u),i)},K5=function(r,i){var u=r.theme.spacing,l=r.isMulti,d=r.hasValue,h=r.selectProps.controlShouldRenderValue;return yt({alignItems:"center",display:l&&d&&h?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},i?{}:{padding:"".concat(u.baseUnit/2,"px ").concat(u.baseUnit*2,"px")})},eX=function(r){var i=r.children,u=r.innerProps,l=r.isMulti,d=r.hasValue;return Et("div",Rt({},yr(r,"valueContainer",{"value-container":!0,"value-container--is-multi":l,"value-container--has-value":d}),u),i)},tX=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},nX=function(r){var i=r.children,u=r.innerProps;return Et("div",Rt({},yr(r,"indicatorsContainer",{indicators:!0}),u),i)},EO,rX=["size"],aX=["innerProps","isRtl","size"];function iX(){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)."}var oX=Lw.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vd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QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:iX},Ck=function(r){var i=r.size,u=nl(r,rX);return Et("svg",Rt({height:i,width:i,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:oX},u))},zR=function(r){return Et(Ck,Rt({size:20},r),Et("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"}))},xk=function(r){return Et(Ck,Rt({size:20},r),Et("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"}))},Sk=function(r,i){var u=r.isFocused,l=r.theme,d=l.spacing.baseUnit,h=l.colors;return yt({label:"indicatorContainer",display:"flex",transition:"color 150ms"},i?{}:{color:u?h.neutral60:h.neutral20,padding:d*2,":hover":{color:u?h.neutral80:h.neutral40}})},sX=Sk,lX=function(r){var i=r.children,u=r.innerProps;return Et("div",Rt({},yr(r,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),u),i||Et(xk,null))},uX=Sk,cX=function(r){var i=r.children,u=r.innerProps;return Et("div",Rt({},yr(r,"clearIndicator",{indicator:!0,"clear-indicator":!0}),u),i||Et(zR,null))},fX=function(r,i){var u=r.isDisabled,l=r.theme,d=l.spacing.baseUnit,h=l.colors;return yt({label:"indicatorSeparator",alignSelf:"stretch",width:1},i?{}:{backgroundColor:u?h.neutral10:h.neutral20,marginBottom:d*2,marginTop:d*2})},dX=function(r){var i=r.innerProps;return Et("span",Rt({},i,yr(r,"indicatorSeparator",{"indicator-separator":!0})))},pX=n5(EO||(EO=l5([`
307
307
  0%, 80%, 100% { opacity: 0; }
308
308
  40% { opacity: 1; }
309
- `]))),vX=function(r,i){var u=r.isFocused,l=r.size,d=r.theme,h=d.colors,v=d.spacing.baseUnit;return yt({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:l,lineHeight:1,marginRight:l,textAlign:"center",verticalAlign:"middle"},i?{}:{color:u?h.neutral60:h.neutral20,padding:v*2})},WE=function(r){var i=r.delay,u=r.offset;return Et("span",{css:PR({animation:"".concat(pX," 1s ease-in-out ").concat(i,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:u?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},Lw.NODE_ENV==="production"?"":";label:LoadingDot;",Lw.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZS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h0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},hX=function(r){var i=r.innerProps,u=r.isRtl,l=r.size,d=l===void 0?4:l,h=nl(r,aX);return Et("div",Rt({},yr(yt(yt({},h),{},{innerProps:i,isRtl:u,size:d}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),i),Et(WE,{delay:0,offset:u}),Et(WE,{delay:160,offset:!0}),Et(WE,{delay:320,offset:!u}))},mX=function(r,i){var u=r.isDisabled,l=r.isFocused,d=r.theme,h=d.colors,v=d.borderRadius,y=d.spacing;return yt({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:y.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},i?{}:{backgroundColor:u?h.neutral5:h.neutral0,borderColor:u?h.neutral10:l?h.primary:h.neutral20,borderRadius:v,borderStyle:"solid",borderWidth:1,boxShadow:l?"0 0 0 1px ".concat(h.primary):void 0,"&:hover":{borderColor:l?h.primary:h.neutral30}})},gX=function(r){var i=r.children,u=r.isDisabled,l=r.isFocused,d=r.innerRef,h=r.innerProps,v=r.menuIsOpen;return Et("div",Rt({ref:d},yr(r,"control",{control:!0,"control--is-disabled":u,"control--is-focused":l,"control--menu-is-open":v}),h,{"aria-disabled":u||void 0}),i)},yX=gX,bX=["data"],CX=function(r,i){var u=r.theme.spacing;return i?{}:{paddingBottom:u.baseUnit*2,paddingTop:u.baseUnit*2}},xX=function(r){var i=r.children,u=r.cx,l=r.getStyles,d=r.getClassNames,h=r.Heading,v=r.headingProps,y=r.innerProps,C=r.label,x=r.theme,R=r.selectProps;return Et("div",Rt({},yr(r,"group",{group:!0}),y),Et(h,Rt({},v,{selectProps:R,theme:x,getStyles:l,getClassNames:d,cx:u}),C),Et("div",null,i))},SX=function(r,i){var u=r.theme,l=u.colors,d=u.spacing;return yt({label:"group",cursor:"default",display:"block"},i?{}:{color:l.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:d.baseUnit*3,paddingRight:d.baseUnit*3,textTransform:"uppercase"})},EX=function(r){var i=vk(r);i.data;var u=nl(i,bX);return Et("div",Rt({},yr(r,"groupHeading",{"group-heading":!0}),u))},wX=xX,RX=["innerRef","isDisabled","isHidden","inputClassName"],TX=function(r,i){var u=r.isDisabled,l=r.value,d=r.theme,h=d.spacing,v=d.colors;return yt(yt({visibility:u?"hidden":"visible",transform:l?"translateZ(0)":""},IX),i?{}:{margin:h.baseUnit/2,paddingBottom:h.baseUnit/2,paddingTop:h.baseUnit/2,color:v.neutral80})},Ek={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IX={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":yt({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ek)},NX=function(r){return yt({label:"input",color:"inherit",background:0,opacity:r?0:1,width:"100%"},Ek)},_X=function(r){var i=r.cx,u=r.value,l=vk(r),d=l.innerRef,h=l.isDisabled,v=l.isHidden,y=l.inputClassName,C=nl(l,RX);return Et("div",Rt({},yr(r,"input",{"input-container":!0}),{"data-value":u||""}),Et("input",Rt({className:i({input:!0},y),ref:d,style:NX(v),disabled:h},C)))},OX=_X,AX=function(r,i){var u=r.theme,l=u.spacing,d=u.borderRadius,h=u.colors;return yt({label:"multiValue",display:"flex",minWidth:0},i?{}:{backgroundColor:h.neutral10,borderRadius:d/2,margin:l.baseUnit/2})},jX=function(r,i){var u=r.theme,l=u.borderRadius,d=u.colors,h=r.cropWithEllipsis;return yt({overflow:"hidden",textOverflow:h||h===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},i?{}:{borderRadius:l/2,color:d.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},DX=function(r,i){var u=r.theme,l=u.spacing,d=u.borderRadius,h=u.colors,v=r.isFocused;return yt({alignItems:"center",display:"flex"},i?{}:{borderRadius:d/2,backgroundColor:v?h.dangerLight:void 0,paddingLeft:l.baseUnit,paddingRight:l.baseUnit,":hover":{backgroundColor:h.dangerLight,color:h.danger}})},wk=function(r){var i=r.children,u=r.innerProps;return Et("div",u,i)},kX=wk,MX=wk;function LX(n){var r=n.children,i=n.innerProps;return Et("div",Rt({role:"button"},i),r||Et(zR,{size:14}))}var PX=function(r){var i=r.children,u=r.components,l=r.data,d=r.innerProps,h=r.isDisabled,v=r.removeProps,y=r.selectProps,C=u.Container,x=u.Label,R=u.Remove;return Et(C,{data:l,innerProps:yt(yt({},yr(r,"multiValue",{"multi-value":!0,"multi-value--is-disabled":h})),d),selectProps:y},Et(x,{data:l,innerProps:yt({},yr(r,"multiValueLabel",{"multi-value__label":!0})),selectProps:y},i),Et(R,{data:l,innerProps:yt(yt({},yr(r,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(i||"option")},v),selectProps:y}))},FX=PX,VX=function(r,i){var u=r.isDisabled,l=r.isFocused,d=r.isSelected,h=r.theme,v=h.spacing,y=h.colors;return yt({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},i?{}:{backgroundColor:d?y.primary:l?y.primary25:"transparent",color:u?y.neutral20:d?y.neutral0:"inherit",padding:"".concat(v.baseUnit*2,"px ").concat(v.baseUnit*3,"px"),":active":{backgroundColor:u?void 0:d?y.primary:y.primary50}})},BX=function(r){var i=r.children,u=r.isDisabled,l=r.isFocused,d=r.isSelected,h=r.innerRef,v=r.innerProps;return Et("div",Rt({},yr(r,"option",{option:!0,"option--is-disabled":u,"option--is-focused":l,"option--is-selected":d}),{ref:h,"aria-disabled":u},v),i)},zX=BX,HX=function(r,i){var u=r.theme,l=u.spacing,d=u.colors;return yt({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},i?{}:{color:d.neutral50,marginLeft:l.baseUnit/2,marginRight:l.baseUnit/2})},UX=function(r){var i=r.children,u=r.innerProps;return Et("div",Rt({},yr(r,"placeholder",{placeholder:!0}),u),i)},$X=UX,GX=function(r,i){var u=r.isDisabled,l=r.theme,d=l.spacing,h=l.colors;return yt({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},i?{}:{color:u?h.neutral40:h.neutral80,marginLeft:d.baseUnit/2,marginRight:d.baseUnit/2})},WX=function(r){var i=r.children,u=r.isDisabled,l=r.innerProps;return Et("div",Rt({},yr(r,"singleValue",{"single-value":!0,"single-value--is-disabled":u}),l),i)},XX=WX,YX={ClearIndicator:cX,Control:yX,DropdownIndicator:lX,DownChevron:xk,CrossIcon:zR,Group:wX,GroupHeading:EX,IndicatorsContainer:nX,IndicatorSeparator:dX,Input:OX,LoadingIndicator:hX,Menu:H5,MenuList:$5,MenuPortal:J5,LoadingMessage:Y5,NoOptionsMessage:X5,MultiValue:FX,MultiValueContainer:kX,MultiValueLabel:MX,MultiValueRemove:LX,Option:zX,Placeholder:$X,SelectContainer:Q5,SingleValue:XX,ValueContainer:eX},ZX=function(r){return yt(yt({},YX),r.components)},wO=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function JX(n,r){return!!(n===r||wO(n)&&wO(r))}function qX(n,r){if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!JX(n[i],r[i]))return!1;return!0}function QX(n,r){r===void 0&&(r=qX);var i=null;function u(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];if(i&&i.lastThis===this&&r(l,i.lastArgs))return i.lastResult;var h=n.apply(this,l);return i={lastResult:h,lastArgs:l,lastThis:this},h}return u.clear=function(){i=null},u}var Tm={};function KX(){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)."}var eY=Tm.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:KX},tY=function(r){return Et("span",Rt({css:eY},r))},RO=tY,nY={guidance:function(r){var i=r.isSearchable,u=r.isMulti,l=r.tabSelectsValue,d=r.context,h=r.isInitialFocus;switch(d){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(l?", press Tab to select the option and exit the menu":"",".");case"input":return h?"".concat(r["aria-label"]||"Select"," is focused ").concat(i?",type to refine list":"",", press Down to open the menu, ").concat(u?" 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(r){var i=r.action,u=r.label,l=u===void 0?"":u,d=r.labels,h=r.isDisabled;switch(i){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(l,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(d.length>1?"s":""," ").concat(d.join(","),", selected.");case"select-option":return h?"option ".concat(l," is disabled. Select another option."):"option ".concat(l,", selected.");default:return""}},onFocus:function(r){var i=r.context,u=r.focused,l=r.options,d=r.label,h=d===void 0?"":d,v=r.selectValue,y=r.isDisabled,C=r.isSelected,x=r.isAppleDevice,R=function(O,_){return O&&O.length?"".concat(O.indexOf(_)+1," of ").concat(O.length):""};if(i==="value"&&v)return"value ".concat(h," focused, ").concat(R(v,u),".");if(i==="menu"&&x){var T=y?" disabled":"",j="".concat(C?" selected":"").concat(T);return"".concat(h).concat(j,", ").concat(R(l,u),".")}return""},onFilter:function(r){var i=r.inputValue,u=r.resultsMessage;return"".concat(u).concat(i?" for search term "+i:"",".")}},rY=function(r){var i=r.ariaSelection,u=r.focusedOption,l=r.focusedValue,d=r.focusableOptions,h=r.isFocused,v=r.selectValue,y=r.selectProps,C=r.id,x=r.isAppleDevice,R=y.ariaLiveMessages,T=y.getOptionLabel,j=y.inputValue,N=y.isMulti,O=y.isOptionDisabled,_=y.isSearchable,L=y.menuIsOpen,F=y.options,V=y.screenReaderStatus,H=y.tabSelectsValue,z=y.isLoading,U=y["aria-label"],J=y["aria-live"],q=M.useMemo(function(){return yt(yt({},nY),R||{})},[R]),Re=M.useMemo(function(){var xe="";if(i&&q.onChange){var je=i.option,Le=i.options,ne=i.removedValue,_e=i.removedValues,G=i.value,Y=function(we){return Array.isArray(we)?null:we},re=ne||je||Y(G),ye=re?T(re):"",Se=Le||_e||void 0,Ne=Se?Se.map(T):[],le=yt({isDisabled:re&&O(re,v),label:ye,labels:Ne},i);xe=q.onChange(le)}return xe},[i,q,O,v,T]),he=M.useMemo(function(){var xe="",je=u||l,Le=!!(u&&v&&v.includes(u));if(je&&q.onFocus){var ne={focused:je,label:T(je),isDisabled:O(je,v),isSelected:Le,options:d,context:je===u?"menu":"value",selectValue:v,isAppleDevice:x};xe=q.onFocus(ne)}return xe},[u,l,T,O,q,d,v,x]),ge=M.useMemo(function(){var xe="";if(L&&F.length&&!z&&q.onFilter){var je=V({count:d.length});xe=q.onFilter({inputValue:j,resultsMessage:je})}return xe},[d,j,L,q,F,V,z]),fe=(i==null?void 0:i.action)==="initial-input-focus",Oe=M.useMemo(function(){var xe="";if(q.guidance){var je=l?"value":L?"menu":"input";xe=q.guidance({"aria-label":U,context:je,isDisabled:u&&O(u,v),isMulti:N,isSearchable:_,tabSelectsValue:H,isInitialFocus:fe})}return xe},[U,u,l,N,O,_,L,q,v,H,fe]),Te=Et(M.Fragment,null,Et("span",{id:"aria-selection"},Re),Et("span",{id:"aria-focused"},he),Et("span",{id:"aria-results"},ge),Et("span",{id:"aria-guidance"},Oe));return Et(M.Fragment,null,Et(RO,{id:C},fe&&Te),Et(RO,{"aria-live":J,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},h&&!fe&&Te))},aY=rY,Pw=[{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źẑżžẓẕƶȥɀⱬꝣ"}],iY=new RegExp("["+Pw.map(function(n){return n.letters}).join("")+"]","g"),Rk={};for(var XE=0;XE<Pw.length;XE++)for(var YE=Pw[XE],ZE=0;ZE<YE.letters.length;ZE++)Rk[YE.letters[ZE]]=YE.base;var Tk=function(r){return r.replace(iY,function(i){return Rk[i]})},oY=QX(Tk),TO=function(r){return r.replace(/^\s+|\s+$/g,"")},sY=function(r){return"".concat(r.label," ").concat(r.value)},lY=function(r){return function(i,u){if(i.data.__isNew__)return!0;var l=yt({ignoreCase:!0,ignoreAccents:!0,stringify:sY,trim:!0,matchFrom:"any"},r),d=l.ignoreCase,h=l.ignoreAccents,v=l.stringify,y=l.trim,C=l.matchFrom,x=y?TO(u):u,R=y?TO(v(i)):v(i);return d&&(x=x.toLowerCase(),R=R.toLowerCase()),h&&(x=oY(x),R=Tk(R)),C==="start"?R.substr(0,x.length)===x:R.indexOf(x)>-1}},uY=["innerRef"];function cY(n){var r=n.innerRef,i=nl(n,uY),u=k5(i,"onExited","in","enter","exit","appear");return Et("input",Rt({ref:r},u,{css:PR({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)"},Tm.NODE_ENV==="production"?"":";label:DummyInput;",Tm.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ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mb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var fY=function(r){r.cancelable&&r.preventDefault(),r.stopPropagation()};function dY(n){var r=n.isEnabled,i=n.onBottomArrive,u=n.onBottomLeave,l=n.onTopArrive,d=n.onTopLeave,h=M.useRef(!1),v=M.useRef(!1),y=M.useRef(0),C=M.useRef(null),x=M.useCallback(function(_,L){if(C.current!==null){var F=C.current,V=F.scrollTop,H=F.scrollHeight,z=F.clientHeight,U=C.current,J=L>0,q=H-z-V,Re=!1;q>L&&h.current&&(u&&u(_),h.current=!1),J&&v.current&&(d&&d(_),v.current=!1),J&&L>q?(i&&!h.current&&i(_),U.scrollTop=H,Re=!0,h.current=!0):!J&&-L>V&&(l&&!v.current&&l(_),U.scrollTop=0,Re=!0,v.current=!0),Re&&fY(_)}},[i,u,l,d]),R=M.useCallback(function(_){x(_,_.deltaY)},[x]),T=M.useCallback(function(_){y.current=_.changedTouches[0].clientY},[]),j=M.useCallback(function(_){var L=y.current-_.changedTouches[0].clientY;x(_,L)},[x]),N=M.useCallback(function(_){if(_){var L=A5?{passive:!1}:!1;_.addEventListener("wheel",R,L),_.addEventListener("touchstart",T,L),_.addEventListener("touchmove",j,L)}},[j,T,R]),O=M.useCallback(function(_){_&&(_.removeEventListener("wheel",R,!1),_.removeEventListener("touchstart",T,!1),_.removeEventListener("touchmove",j,!1))},[j,T,R]);return M.useEffect(function(){if(r){var _=C.current;return N(_),function(){O(_)}}},[r,N,O]),function(_){C.current=_}}var IO=["boxSizing","height","overflow","paddingRight","position"],NO={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function _O(n){n.preventDefault()}function OO(n){n.stopPropagation()}function AO(){var n=this.scrollTop,r=this.scrollHeight,i=n+this.offsetHeight;n===0?this.scrollTop=1:i===r&&(this.scrollTop=n-1)}function jO(){return"ontouchstart"in window||navigator.maxTouchPoints}var DO=!!(typeof window<"u"&&window.document&&window.document.createElement),lm=0,Mp={capture:!1,passive:!1};function pY(n){var r=n.isEnabled,i=n.accountForScrollbars,u=i===void 0?!0:i,l=M.useRef({}),d=M.useRef(null),h=M.useCallback(function(y){if(DO){var C=document.body,x=C&&C.style;if(u&&IO.forEach(function(N){var O=x&&x[N];l.current[N]=O}),u&&lm<1){var R=parseInt(l.current.paddingRight,10)||0,T=document.body?document.body.clientWidth:0,j=window.innerWidth-T+R||0;Object.keys(NO).forEach(function(N){var O=NO[N];x&&(x[N]=O)}),x&&(x.paddingRight="".concat(j,"px"))}C&&jO()&&(C.addEventListener("touchmove",_O,Mp),y&&(y.addEventListener("touchstart",AO,Mp),y.addEventListener("touchmove",OO,Mp))),lm+=1}},[u]),v=M.useCallback(function(y){if(DO){var C=document.body,x=C&&C.style;lm=Math.max(lm-1,0),u&&lm<1&&IO.forEach(function(R){var T=l.current[R];x&&(x[R]=T)}),C&&jO()&&(C.removeEventListener("touchmove",_O,Mp),y&&(y.removeEventListener("touchstart",AO,Mp),y.removeEventListener("touchmove",OO,Mp)))}},[u]);return M.useEffect(function(){if(r){var y=d.current;return h(y),function(){v(y)}}},[r,h,v]),function(y){d.current=y}}function vY(){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)."}var hY=function(r){var i=r.target;return i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()},mY=Tm.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47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yaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:vY};function gY(n){var r=n.children,i=n.lockEnabled,u=n.captureEnabled,l=u===void 0?!0:u,d=n.onBottomArrive,h=n.onBottomLeave,v=n.onTopArrive,y=n.onTopLeave,C=dY({isEnabled:l,onBottomArrive:d,onBottomLeave:h,onTopArrive:v,onTopLeave:y}),x=pY({isEnabled:i}),R=function(j){C(j),x(j)};return Et(M.Fragment,null,i&&Et("div",{onClick:hY,css:mY}),r(R))}function yY(){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)."}var bY=Tm.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:yY},CY=function(r){var i=r.name,u=r.onFocus;return Et("input",{required:!0,name:i,tabIndex:-1,"aria-hidden":"true",onFocus:u,css:bY,value:"",onChange:function(){}})},xY=CY;function HR(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function SY(){return HR(/^iPhone/i)}function Ik(){return HR(/^Mac/i)}function EY(){return HR(/^iPad/i)||Ik()&&navigator.maxTouchPoints>1}function wY(){return SY()||EY()}function RY(){return Ik()||wY()}var TY=function(r){return r.label},IY=function(r){return r.label},NY=function(r){return r.value},_Y=function(r){return!!r.isDisabled},OY={clearIndicator:uX,container:q5,control:mX,dropdownIndicator:sX,group:CX,groupHeading:SX,indicatorsContainer:tX,indicatorSeparator:fX,input:TX,loadingIndicator:vX,loadingMessage:W5,menu:V5,menuList:U5,menuPortal:Z5,multiValue:AX,multiValueLabel:jX,multiValueRemove:DX,noOptionsMessage:G5,option:VX,placeholder:HX,singleValue:GX,valueContainer:K5},AY={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%)"},jY=4,Nk=4,DY=38,kY=Nk*2,MY={baseUnit:Nk,controlHeight:DY,menuGutter:kY},JE={borderRadius:jY,colors:AY,spacing:MY},LY={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:SO(),captureMenuScroll:!SO(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:lY(),formatGroupLabel:TY,getOptionLabel:IY,getOptionValue:NY,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:_Y,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!_5(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(r){var i=r.count;return"".concat(i," result").concat(i!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function kO(n,r,i,u){var l=Ak(n,r,i),d=jk(n,r,i),h=Ok(n,r),v=N0(n,r);return{type:"option",data:r,isDisabled:l,isSelected:d,label:h,value:v,index:u}}function n0(n,r){return n.options.map(function(i,u){if("options"in i){var l=i.options.map(function(h,v){return kO(n,h,r,v)}).filter(function(h){return LO(n,h)});return l.length>0?{type:"group",data:i,options:l,index:u}:void 0}var d=kO(n,i,r,u);return LO(n,d)?d:void 0}).filter(j5)}function _k(n){return n.reduce(function(r,i){return i.type==="group"?r.push.apply(r,TR(i.options.map(function(u){return u.data}))):r.push(i.data),r},[])}function MO(n,r){return n.reduce(function(i,u){return u.type==="group"?i.push.apply(i,TR(u.options.map(function(l){return{data:l.data,id:"".concat(r,"-").concat(u.index,"-").concat(l.index)}}))):i.push({data:u.data,id:"".concat(r,"-").concat(u.index)}),i},[])}function PY(n,r){return _k(n0(n,r))}function LO(n,r){var i=n.inputValue,u=i===void 0?"":i,l=r.data,d=r.isSelected,h=r.label,v=r.value;return(!kk(n)||!d)&&Dk(n,{label:h,value:v,data:l},u)}function FY(n,r){var i=n.focusedValue,u=n.selectValue,l=u.indexOf(i);if(l>-1){var d=r.indexOf(i);if(d>-1)return i;if(l<r.length)return r[l]}return null}function VY(n,r){var i=n.focusedOption;return i&&r.indexOf(i)>-1?i:r[0]}var qE=function(r,i){var u,l=(u=r.find(function(d){return d.data===i}))===null||u===void 0?void 0:u.id;return l||null},Ok=function(r,i){return r.getOptionLabel(i)},N0=function(r,i){return r.getOptionValue(i)};function Ak(n,r,i){return typeof n.isOptionDisabled=="function"?n.isOptionDisabled(r,i):!1}function jk(n,r,i){if(i.indexOf(r)>-1)return!0;if(typeof n.isOptionSelected=="function")return n.isOptionSelected(r,i);var u=N0(n,r);return i.some(function(l){return N0(n,l)===u})}function Dk(n,r,i){return n.filterOption?n.filterOption(r,i):!0}var kk=function(r){var i=r.hideSelectedOptions,u=r.isMulti;return i===void 0?u:i},BY=1,UR=function(n){G4(i,n);var r=Y4(i);function i(u){var l;if(U4(this,i),l=r.call(this,u),l.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:""},l.blockOptionHover=!1,l.isComposing=!1,l.commonProps=void 0,l.initialTouchX=0,l.initialTouchY=0,l.openAfterFocus=!1,l.scrollToFocusedOptionOnUpdate=!1,l.userIsDragging=void 0,l.isAppleDevice=RY(),l.controlRef=null,l.getControlRef=function(y){l.controlRef=y},l.focusedOptionRef=null,l.getFocusedOptionRef=function(y){l.focusedOptionRef=y},l.menuListRef=null,l.getMenuListRef=function(y){l.menuListRef=y},l.inputRef=null,l.getInputRef=function(y){l.inputRef=y},l.focus=l.focusInput,l.blur=l.blurInput,l.onChange=function(y,C){var x=l.props,R=x.onChange,T=x.name;C.name=T,l.ariaOnChange(y,C),R(y,C)},l.setValue=function(y,C,x){var R=l.props,T=R.closeMenuOnSelect,j=R.isMulti,N=R.inputValue;l.onInputChange("",{action:"set-value",prevInputValue:N}),T&&(l.setState({inputIsHiddenAfterUpdate:!j}),l.onMenuClose()),l.setState({clearFocusValueOnUpdate:!0}),l.onChange(y,{action:C,option:x})},l.selectOption=function(y){var C=l.props,x=C.blurInputOnSelect,R=C.isMulti,T=C.name,j=l.state.selectValue,N=R&&l.isOptionSelected(y,j),O=l.isOptionDisabled(y,j);if(N){var _=l.getOptionValue(y);l.setValue(j.filter(function(L){return l.getOptionValue(L)!==_}),"deselect-option",y)}else if(!O)R?l.setValue([].concat(TR(j),[y]),"select-option",y):l.setValue(y,"select-option");else{l.ariaOnChange(y,{action:"select-option",option:y,name:T});return}x&&l.blurInput()},l.removeValue=function(y){var C=l.props.isMulti,x=l.state.selectValue,R=l.getOptionValue(y),T=x.filter(function(N){return l.getOptionValue(N)!==R}),j=Ub(C,T,T[0]||null);l.onChange(j,{action:"remove-value",removedValue:y}),l.focusInput()},l.clearValue=function(){var y=l.state.selectValue;l.onChange(Ub(l.props.isMulti,[],null),{action:"clear",removedValues:y})},l.popValue=function(){var y=l.props.isMulti,C=l.state.selectValue,x=C[C.length-1],R=C.slice(0,C.length-1),T=Ub(y,R,R[0]||null);l.onChange(T,{action:"pop-value",removedValue:x})},l.getFocusedOptionId=function(y){return qE(l.state.focusableOptionsWithIds,y)},l.getFocusableOptionsWithIds=function(){return MO(n0(l.props,l.state.selectValue),l.getElementId("option"))},l.getValue=function(){return l.state.selectValue},l.cx=function(){for(var y=arguments.length,C=new Array(y),x=0;x<y;x++)C[x]=arguments[x];return E5.apply(void 0,[l.props.classNamePrefix].concat(C))},l.getOptionLabel=function(y){return Ok(l.props,y)},l.getOptionValue=function(y){return N0(l.props,y)},l.getStyles=function(y,C){var x=l.props.unstyled,R=OY[y](C,x);R.boxSizing="border-box";var T=l.props.styles[y];return T?T(R,C):R},l.getClassNames=function(y,C){var x,R;return(x=(R=l.props.classNames)[y])===null||x===void 0?void 0:x.call(R,C)},l.getElementId=function(y){return"".concat(l.state.instancePrefix,"-").concat(y)},l.getComponents=function(){return ZX(l.props)},l.buildCategorizedOptions=function(){return n0(l.props,l.state.selectValue)},l.getCategorizedOptions=function(){return l.props.menuIsOpen?l.buildCategorizedOptions():[]},l.buildFocusableOptions=function(){return _k(l.buildCategorizedOptions())},l.getFocusableOptions=function(){return l.props.menuIsOpen?l.buildFocusableOptions():[]},l.ariaOnChange=function(y,C){l.setState({ariaSelection:yt({value:y},C)})},l.onMenuMouseDown=function(y){y.button===0&&(y.stopPropagation(),y.preventDefault(),l.focusInput())},l.onMenuMouseMove=function(y){l.blockOptionHover=!1},l.onControlMouseDown=function(y){if(!y.defaultPrevented){var C=l.props.openMenuOnClick;l.state.isFocused?l.props.menuIsOpen?y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&l.onMenuClose():C&&l.openMenu("first"):(C&&(l.openAfterFocus=!0),l.focusInput()),y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&y.preventDefault()}},l.onDropdownIndicatorMouseDown=function(y){if(!(y&&y.type==="mousedown"&&y.button!==0)&&!l.props.isDisabled){var C=l.props,x=C.isMulti,R=C.menuIsOpen;l.focusInput(),R?(l.setState({inputIsHiddenAfterUpdate:!x}),l.onMenuClose()):l.openMenu("first"),y.preventDefault()}},l.onClearIndicatorMouseDown=function(y){y&&y.type==="mousedown"&&y.button!==0||(l.clearValue(),y.preventDefault(),l.openAfterFocus=!1,y.type==="touchend"?l.focusInput():setTimeout(function(){return l.focusInput()}))},l.onScroll=function(y){typeof l.props.closeMenuOnScroll=="boolean"?y.target instanceof HTMLElement&&X0(y.target)&&l.props.onMenuClose():typeof l.props.closeMenuOnScroll=="function"&&l.props.closeMenuOnScroll(y)&&l.props.onMenuClose()},l.onCompositionStart=function(){l.isComposing=!0},l.onCompositionEnd=function(){l.isComposing=!1},l.onTouchStart=function(y){var C=y.touches,x=C&&C.item(0);x&&(l.initialTouchX=x.clientX,l.initialTouchY=x.clientY,l.userIsDragging=!1)},l.onTouchMove=function(y){var C=y.touches,x=C&&C.item(0);if(x){var R=Math.abs(x.clientX-l.initialTouchX),T=Math.abs(x.clientY-l.initialTouchY),j=5;l.userIsDragging=R>j||T>j}},l.onTouchEnd=function(y){l.userIsDragging||(l.controlRef&&!l.controlRef.contains(y.target)&&l.menuListRef&&!l.menuListRef.contains(y.target)&&l.blurInput(),l.initialTouchX=0,l.initialTouchY=0)},l.onControlTouchEnd=function(y){l.userIsDragging||l.onControlMouseDown(y)},l.onClearIndicatorTouchEnd=function(y){l.userIsDragging||l.onClearIndicatorMouseDown(y)},l.onDropdownIndicatorTouchEnd=function(y){l.userIsDragging||l.onDropdownIndicatorMouseDown(y)},l.handleInputChange=function(y){var C=l.props.inputValue,x=y.currentTarget.value;l.setState({inputIsHiddenAfterUpdate:!1}),l.onInputChange(x,{action:"input-change",prevInputValue:C}),l.props.menuIsOpen||l.onMenuOpen()},l.onInputFocus=function(y){l.props.onFocus&&l.props.onFocus(y),l.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(l.openAfterFocus||l.props.openMenuOnFocus)&&l.openMenu("first"),l.openAfterFocus=!1},l.onInputBlur=function(y){var C=l.props.inputValue;if(l.menuListRef&&l.menuListRef.contains(document.activeElement)){l.inputRef.focus();return}l.props.onBlur&&l.props.onBlur(y),l.onInputChange("",{action:"input-blur",prevInputValue:C}),l.onMenuClose(),l.setState({focusedValue:null,isFocused:!1})},l.onOptionHover=function(y){if(!(l.blockOptionHover||l.state.focusedOption===y)){var C=l.getFocusableOptions(),x=C.indexOf(y);l.setState({focusedOption:y,focusedOptionId:x>-1?l.getFocusedOptionId(y):null})}},l.shouldHideSelectedOptions=function(){return kk(l.props)},l.onValueInputFocus=function(y){y.preventDefault(),y.stopPropagation(),l.focus()},l.onKeyDown=function(y){var C=l.props,x=C.isMulti,R=C.backspaceRemovesValue,T=C.escapeClearsValue,j=C.inputValue,N=C.isClearable,O=C.isDisabled,_=C.menuIsOpen,L=C.onKeyDown,F=C.tabSelectsValue,V=C.openMenuOnFocus,H=l.state,z=H.focusedOption,U=H.focusedValue,J=H.selectValue;if(!O&&!(typeof L=="function"&&(L(y),y.defaultPrevented))){switch(l.blockOptionHover=!0,y.key){case"ArrowLeft":if(!x||j)return;l.focusValue("previous");break;case"ArrowRight":if(!x||j)return;l.focusValue("next");break;case"Delete":case"Backspace":if(j)return;if(U)l.removeValue(U);else{if(!R)return;x?l.popValue():N&&l.clearValue()}break;case"Tab":if(l.isComposing||y.shiftKey||!_||!F||!z||V&&l.isOptionSelected(z,J))return;l.selectOption(z);break;case"Enter":if(y.keyCode===229)break;if(_){if(!z||l.isComposing)return;l.selectOption(z);break}return;case"Escape":_?(l.setState({inputIsHiddenAfterUpdate:!1}),l.onInputChange("",{action:"menu-close",prevInputValue:j}),l.onMenuClose()):N&&T&&l.clearValue();break;case" ":if(j)return;if(!_){l.openMenu("first");break}if(!z)return;l.selectOption(z);break;case"ArrowUp":_?l.focusOption("up"):l.openMenu("last");break;case"ArrowDown":_?l.focusOption("down"):l.openMenu("first");break;case"PageUp":if(!_)return;l.focusOption("pageup");break;case"PageDown":if(!_)return;l.focusOption("pagedown");break;case"Home":if(!_)return;l.focusOption("first");break;case"End":if(!_)return;l.focusOption("last");break;default:return}y.preventDefault()}},l.state.instancePrefix="react-select-"+(l.props.instanceId||++BY),l.state.selectValue=CO(u.value),u.menuIsOpen&&l.state.selectValue.length){var d=l.getFocusableOptionsWithIds(),h=l.buildFocusableOptions(),v=h.indexOf(l.state.selectValue[0]);l.state.focusableOptionsWithIds=d,l.state.focusedOption=h[v],l.state.focusedOptionId=qE(d,h[v])}return l}return $4(i,[{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&&xO(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(l){var d=this.props,h=d.isDisabled,v=d.menuIsOpen,y=this.state.isFocused;(y&&!h&&l.isDisabled||y&&v&&!l.menuIsOpen)&&this.focusInput(),y&&h&&!l.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!y&&!h&&l.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xO(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(l,d){this.props.onInputChange(l,d)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(l){var d=this,h=this.state,v=h.selectValue,y=h.isFocused,C=this.buildFocusableOptions(),x=l==="first"?0:C.length-1;if(!this.props.isMulti){var R=C.indexOf(v[0]);R>-1&&(x=R)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:C[x],focusedOptionId:this.getFocusedOptionId(C[x])},function(){return d.onMenuOpen()})}},{key:"focusValue",value:function(l){var d=this.state,h=d.selectValue,v=d.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var y=h.indexOf(v);v||(y=-1);var C=h.length-1,x=-1;if(h.length){switch(l){case"previous":y===0?x=0:y===-1?x=C:x=y-1;break;case"next":y>-1&&y<C&&(x=y+1);break}this.setState({inputIsHidden:x!==-1,focusedValue:h[x]})}}}},{key:"focusOption",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",d=this.props.pageSize,h=this.state.focusedOption,v=this.getFocusableOptions();if(v.length){var y=0,C=v.indexOf(h);h||(C=-1),l==="up"?y=C>0?C-1:v.length-1:l==="down"?y=(C+1)%v.length:l==="pageup"?(y=C-d,y<0&&(y=0)):l==="pagedown"?(y=C+d,y>v.length-1&&(y=v.length-1)):l==="last"&&(y=v.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:v[y],focusedValue:null,focusedOptionId:this.getFocusedOptionId(v[y])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(JE):yt(yt({},JE),this.props.theme):JE}},{key:"getCommonProps",value:function(){var l=this.clearValue,d=this.cx,h=this.getStyles,v=this.getClassNames,y=this.getValue,C=this.selectOption,x=this.setValue,R=this.props,T=R.isMulti,j=R.isRtl,N=R.options,O=this.hasValue();return{clearValue:l,cx:d,getStyles:h,getClassNames:v,getValue:y,hasValue:O,isMulti:T,isRtl:j,options:N,selectOption:C,selectProps:R,setValue:x,theme:this.getTheme()}}},{key:"hasValue",value:function(){var l=this.state.selectValue;return l.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var l=this.props,d=l.isClearable,h=l.isMulti;return d===void 0?h:d}},{key:"isOptionDisabled",value:function(l,d){return Ak(this.props,l,d)}},{key:"isOptionSelected",value:function(l,d){return jk(this.props,l,d)}},{key:"filterOption",value:function(l,d){return Dk(this.props,l,d)}},{key:"formatOptionLabel",value:function(l,d){if(typeof this.props.formatOptionLabel=="function"){var h=this.props.inputValue,v=this.state.selectValue;return this.props.formatOptionLabel(l,{context:d,inputValue:h,selectValue:v})}else return this.getOptionLabel(l)}},{key:"formatGroupLabel",value:function(l){return this.props.formatGroupLabel(l)}},{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 l=this.props,d=l.isDisabled,h=l.isSearchable,v=l.inputId,y=l.inputValue,C=l.tabIndex,x=l.form,R=l.menuIsOpen,T=l.required,j=this.getComponents(),N=j.Input,O=this.state,_=O.inputIsHidden,L=O.ariaSelection,F=this.commonProps,V=v||this.getElementId("input"),H=yt(yt(yt({"aria-autocomplete":"list","aria-expanded":R,"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":T,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},R&&{"aria-controls":this.getElementId("listbox")}),!h&&{"aria-readonly":!0}),this.hasValue()?(L==null?void 0:L.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return h?M.createElement(N,Rt({},F,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:V,innerRef:this.getInputRef,isDisabled:d,isHidden:_,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:C,form:x,type:"text",value:y},H)):M.createElement(cY,Rt({id:V,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:T0,onFocus:this.onInputFocus,disabled:d,tabIndex:C,inputMode:"none",form:x,value:""},H))}},{key:"renderPlaceholderOrValue",value:function(){var l=this,d=this.getComponents(),h=d.MultiValue,v=d.MultiValueContainer,y=d.MultiValueLabel,C=d.MultiValueRemove,x=d.SingleValue,R=d.Placeholder,T=this.commonProps,j=this.props,N=j.controlShouldRenderValue,O=j.isDisabled,_=j.isMulti,L=j.inputValue,F=j.placeholder,V=this.state,H=V.selectValue,z=V.focusedValue,U=V.isFocused;if(!this.hasValue()||!N)return L?null:M.createElement(R,Rt({},T,{key:"placeholder",isDisabled:O,isFocused:U,innerProps:{id:this.getElementId("placeholder")}}),F);if(_)return H.map(function(q,Re){var he=q===z,ge="".concat(l.getOptionLabel(q),"-").concat(l.getOptionValue(q));return M.createElement(h,Rt({},T,{components:{Container:v,Label:y,Remove:C},isFocused:he,isDisabled:O,key:ge,index:Re,removeProps:{onClick:function(){return l.removeValue(q)},onTouchEnd:function(){return l.removeValue(q)},onMouseDown:function(Oe){Oe.preventDefault()}},data:q}),l.formatOptionLabel(q,"value"))});if(L)return null;var J=H[0];return M.createElement(x,Rt({},T,{data:J,isDisabled:O}),this.formatOptionLabel(J,"value"))}},{key:"renderClearIndicator",value:function(){var l=this.getComponents(),d=l.ClearIndicator,h=this.commonProps,v=this.props,y=v.isDisabled,C=v.isLoading,x=this.state.isFocused;if(!this.isClearable()||!d||y||!this.hasValue()||C)return null;var R={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:R,isFocused:x}))}},{key:"renderLoadingIndicator",value:function(){var l=this.getComponents(),d=l.LoadingIndicator,h=this.commonProps,v=this.props,y=v.isDisabled,C=v.isLoading,x=this.state.isFocused;if(!d||!C)return null;var R={"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:R,isDisabled:y,isFocused:x}))}},{key:"renderIndicatorSeparator",value:function(){var l=this.getComponents(),d=l.DropdownIndicator,h=l.IndicatorSeparator;if(!d||!h)return null;var v=this.commonProps,y=this.props.isDisabled,C=this.state.isFocused;return M.createElement(h,Rt({},v,{isDisabled:y,isFocused:C}))}},{key:"renderDropdownIndicator",value:function(){var l=this.getComponents(),d=l.DropdownIndicator;if(!d)return null;var h=this.commonProps,v=this.props.isDisabled,y=this.state.isFocused,C={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:C,isDisabled:v,isFocused:y}))}},{key:"renderMenu",value:function(){var l=this,d=this.getComponents(),h=d.Group,v=d.GroupHeading,y=d.Menu,C=d.MenuList,x=d.MenuPortal,R=d.LoadingMessage,T=d.NoOptionsMessage,j=d.Option,N=this.commonProps,O=this.state.focusedOption,_=this.props,L=_.captureMenuScroll,F=_.inputValue,V=_.isLoading,H=_.loadingMessage,z=_.minMenuHeight,U=_.maxMenuHeight,J=_.menuIsOpen,q=_.menuPlacement,Re=_.menuPosition,he=_.menuPortalTarget,ge=_.menuShouldBlockScroll,fe=_.menuShouldScrollIntoView,Oe=_.noOptionsMessage,Te=_.onMenuScrollToTop,xe=_.onMenuScrollToBottom;if(!J)return null;var je=function(ye,Se){var Ne=ye.type,le=ye.data,ve=ye.isDisabled,we=ye.isSelected,Ve=ye.label,et=ye.value,tt=O===le,ft=ve?void 0:function(){return l.onOptionHover(le)},Ae=ve?void 0:function(){return l.selectOption(le)},It="".concat(l.getElementId("option"),"-").concat(Se),pt={id:It,onClick:Ae,onMouseMove:ft,onMouseOver:ft,tabIndex:-1,role:"option","aria-selected":l.isAppleDevice?void 0:we};return M.createElement(j,Rt({},N,{innerProps:pt,data:le,isDisabled:ve,isSelected:we,key:It,label:Ve,type:Ne,value:et,isFocused:tt,innerRef:tt?l.getFocusedOptionRef:void 0}),l.formatOptionLabel(ye.data,"menu"))},Le;if(this.hasOptions())Le=this.getCategorizedOptions().map(function(re){if(re.type==="group"){var ye=re.data,Se=re.options,Ne=re.index,le="".concat(l.getElementId("group"),"-").concat(Ne),ve="".concat(le,"-heading");return M.createElement(h,Rt({},N,{key:le,data:ye,options:Se,Heading:v,headingProps:{id:ve,data:re.data},label:l.formatGroupLabel(re.data)}),re.options.map(function(we){return je(we,"".concat(Ne,"-").concat(we.index))}))}else if(re.type==="option")return je(re,"".concat(re.index))});else if(V){var ne=H({inputValue:F});if(ne===null)return null;Le=M.createElement(R,N,ne)}else{var _e=Oe({inputValue:F});if(_e===null)return null;Le=M.createElement(T,N,_e)}var G={minMenuHeight:z,maxMenuHeight:U,menuPlacement:q,menuPosition:Re,menuShouldScrollIntoView:fe},Y=M.createElement(B5,Rt({},N,G),function(re){var ye=re.ref,Se=re.placerProps,Ne=Se.placement,le=Se.maxHeight;return M.createElement(y,Rt({},N,G,{innerRef:ye,innerProps:{onMouseDown:l.onMenuMouseDown,onMouseMove:l.onMenuMouseMove},isLoading:V,placement:Ne}),M.createElement(gY,{captureEnabled:L,onTopArrive:Te,onBottomArrive:xe,lockEnabled:ge},function(ve){return M.createElement(C,Rt({},N,{innerRef:function(Ve){l.getMenuListRef(Ve),ve(Ve)},innerProps:{role:"listbox","aria-multiselectable":N.isMulti,id:l.getElementId("listbox")},isLoading:V,maxHeight:le,focusedOption:O}),Le)}))});return he||Re==="fixed"?M.createElement(x,Rt({},N,{appendTo:he,controlElement:this.controlRef,menuPlacement:q,menuPosition:Re}),Y):Y}},{key:"renderFormField",value:function(){var l=this,d=this.props,h=d.delimiter,v=d.isDisabled,y=d.isMulti,C=d.name,x=d.required,R=this.state.selectValue;if(x&&!this.hasValue()&&!v)return M.createElement(xY,{name:C,onFocus:this.onValueInputFocus});if(!(!C||v))if(y)if(h){var T=R.map(function(O){return l.getOptionValue(O)}).join(h);return M.createElement("input",{name:C,type:"hidden",value:T})}else{var j=R.length>0?R.map(function(O,_){return M.createElement("input",{key:"i-".concat(_),name:C,type:"hidden",value:l.getOptionValue(O)})}):M.createElement("input",{name:C,type:"hidden",value:""});return M.createElement("div",null,j)}else{var N=R[0]?this.getOptionValue(R[0]):"";return M.createElement("input",{name:C,type:"hidden",value:N})}}},{key:"renderLiveRegion",value:function(){var l=this.commonProps,d=this.state,h=d.ariaSelection,v=d.focusedOption,y=d.focusedValue,C=d.isFocused,x=d.selectValue,R=this.getFocusableOptions();return M.createElement(aY,Rt({},l,{id:this.getElementId("live-region"),ariaSelection:h,focusedOption:v,focusedValue:y,isFocused:C,selectValue:x,focusableOptions:R,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var l=this.getComponents(),d=l.Control,h=l.IndicatorsContainer,v=l.SelectContainer,y=l.ValueContainer,C=this.props,x=C.className,R=C.id,T=C.isDisabled,j=C.menuIsOpen,N=this.state.isFocused,O=this.commonProps=this.getCommonProps();return M.createElement(v,Rt({},O,{className:x,innerProps:{id:R,onKeyDown:this.onKeyDown},isDisabled:T,isFocused:N}),this.renderLiveRegion(),M.createElement(d,Rt({},O,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:T,isFocused:N,menuIsOpen:j}),M.createElement(y,Rt({},O,{isDisabled:T}),this.renderPlaceholderOrValue(),this.renderInput()),M.createElement(h,Rt({},O,{isDisabled:T}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(l,d){var h=d.prevProps,v=d.clearFocusValueOnUpdate,y=d.inputIsHiddenAfterUpdate,C=d.ariaSelection,x=d.isFocused,R=d.prevWasFocused,T=d.instancePrefix,j=l.options,N=l.value,O=l.menuIsOpen,_=l.inputValue,L=l.isMulti,F=CO(N),V={};if(h&&(N!==h.value||j!==h.options||O!==h.menuIsOpen||_!==h.inputValue)){var H=O?PY(l,F):[],z=O?MO(n0(l,F),"".concat(T,"-option")):[],U=v?FY(d,F):null,J=VY(d,H),q=qE(z,J);V={selectValue:F,focusedOption:J,focusedOptionId:q,focusableOptionsWithIds:z,focusedValue:U,clearFocusValueOnUpdate:!1}}var Re=y!=null&&l!==h?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{},he=C,ge=x&&R;return x&&!ge&&(he={value:Ub(L,F,F[0]||null),options:F,action:"initial-input-focus"},ge=!R),(C==null?void 0:C.action)==="initial-input-focus"&&(he=null),yt(yt(yt({},V),Re),{},{prevProps:l,ariaSelection:he,prevWasFocused:ge})}}]),i}(M.Component);UR.defaultProps=LY;var zY=M.forwardRef(function(n,r){var i=GD(n);return M.createElement(UR,Rt({ref:r},i))}),$R=zY;function Hp({bg:n="dark",children:r,color:i="light",fontWeight:u="bold",icon:l="info-circle-fill",initial:d=!1,maxWidth:h="200px",padding:v="10px",placement:y,target:C,trigger:x="click",visible:R=!0}){const T=typeof d=="string"||d instanceof String,[j,N]=M.useState(T?localStorage.getItem(d)!="true":d),[O,_]=M.useState(!1);M.useEffect(()=>{setTimeout(()=>_(!0),100)},[]);const L=()=>{T&&localStorage.setItem(d,"true")},F=b.jsxs(RR,{style:{"--bs-tooltip-bg":`var(--bs-${n})`,"--bs-tooltip-color":`var(--bs-${i})`,"--bs-tooltip-max-width":h,"--bs-tooltip-padding-x":v,"--bs-tooltip-padding-y":v,fontWeight:u},children:[b.jsx("button",{"aria-label":"Close",onClick:()=>{L(),N(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:b.jsx("i",{className:"bi bi-x-lg"})}),r]});return C&&C.current?b.jsx(zD,{target:C.current,placement:y,show:j&&R&&O,children:F}):b.jsx(HD,{placement:y,onToggle:V=>{L(),N(V)},overlay:F,show:j&&R&&O,trigger:x,children:b.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:b.jsx("i",{className:`bi bi-${l}`})})})}const HY="_items_c2dbg_1",UY="_item_c2dbg_1",$Y="_details_c2dbg_14",GY="_text_c2dbg_20",WY="_number_c2dbg_35",XY="_outer_c2dbg_50",YY="_inner_c2dbg_61",Yl={items:HY,item:UY,details:$Y,text:GY,number:WY,outer:XY,inner:YY},um=(n,r)=>`${Math.cos(2*Math.PI*n)*r} ${Math.sin(2*Math.PI*n)*r}`;function ZY({requestId:n,grantNumber:r,creditColorClass:i="gray-300",colorClasses:u=pw}){const{request:l}=ri(n,r);if(!l)return;let d=0,h;const v=[];for(let T of l.resources)T.isBoolean||(T.isCredit?h=T:v.push(T),d+=T.requested*T.unitCost);const y=[],C=[];let x=-.25;const R=[...v,h].map((T,j)=>{if(!T)return null;const N=j+1,_=T.requested*T.unitCost/d,L=T.requested-T.used,F=Math.max(0,L),V=T.isCredit?d/T.unitCost:T.requested,H=V==0?0:100*F/V,U=`var(--bs-${T.isCredit?i:u[j%u.length]})`;if(_>0){const J=x,q=x+_/2,Re=x+=_,he=_>.5?1:0,ge=[`M ${um(J,100)}`,`A 100 100 0 ${he} 1 ${um(Re,100)}`,`L ${um(Re,50)}`,`A 50 50 0 ${he} 0 ${um(J,50)}`].join(" "),[fe,Oe]=um(q,75).split(" ").map(Te=>parseFloat(Te));y.push(b.jsx("path",{d:ge,style:{fill:U}},T.resourceId)),C.push(b.jsx("circle",{cx:fe,cy:Oe,r:"8",fill:"black"},`${T.resourceId}-circle`),b.jsx("text",{x:fe-4,y:Oe+4,fill:"white",className:Yl.number,children:N},`${T.resourceId}-text`))}return T.isCredit&&C.push(b.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:b.jsx("div",{className:Yl.text,children:b.jsxs("div",{children:[b.jsx("strong",{children:ni(F,{abbreviate:!0})}),T.unit," available"]})})},"center-text")),b.jsxs("li",{className:Yl.item,children:[b.jsx("span",{className:Yl.number,children:N}),b.jsx("span",{className:`${Yl.outer} ms-2 me-2`,style:{borderColor:U},children:b.jsx("span",{className:Yl.inner,style:{backgroundColor:U,width:`${H}%`}})}),b.jsxs("strong",{className:Yl.name,children:[Hf(T,{userGuide:!1}),": "]}),b.jsxs("span",{className:Yl.details,children:[ni(L,{abbreviate:!0})," ",T.isCredit?null:b.jsxs(b.Fragment,{children:["of ",ni(V,{abbreviate:!0})," "]}),T.unit," ",T.isCredit?"available":"remaining"," (",Math.round(H),"%)"]})]},T.resourceId)});return b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:b.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[y,C]})}),b.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:b.jsx("ul",{className:Yl.items,children:R})})]})}const PO=n=>n;function JY({classes:n,clean:r=PO,format:i=PO,label:u,setValue:l,style:d,value:h}){const v=i(h),[y,C]=M.useState(v);return M.useEffect(()=>{C(v)},[v]),b.jsx("input",{type:"text","aria-label":u,className:`form-control ${n}`,value:y,style:d,onChange:x=>C(x.target.value),onBlur:x=>{const R=r(x.target.value);C(i(R)),l(R)},onKeyDown:x=>{x.code=="Enter"&&(x.preventDefault(),x.target.blur())}})}function qY({requestId:n,grantNumber:r}){const{request:i,addResource:u,openUsageDetailModal:l,resetResources:d,setResourceRequest:h,setResourcesReason:v,statuses:y,toggleActionsModal:C,toggleConfirmModal:x,toggleResourcesModal:R}=ri(n,r),{project:T}=Ji(r||i&&i.grantNumber),j=M.useRef(null),N=M.useRef(null);if(!i||!T)return;const O="Exchange"in i.allowedActions,_="Renewal"in i.allowedActions,L="Supplement"in i.allowedActions,F=i.exchangeStatus==y.pending,V=i.exchangeStatus==y.success,H=i.exchangeStatus==y.error,z=i.exchangeActionId!==null,U=i.resources,J=i.resourcesReason,q={};for(let le of U)q[le.resourceId]=le;const Re=()=>{MA(i)>=.75?C():x()},he=[];for(let le of U){let ve=[];if(le.requested>0){for(let we of le.requires||[]){let Ve=q[we];if(Ve){if(Ve.requested>0){ve=[];break}ve.push(Ve)}}ve.length&&he.push(b.jsxs("span",{children:[Hf(le,{userGuide:!1})," requires"," ",kA(ve.map(we=>Hf(we,{userGuide:!1})),"or"),"."]},le.resourceId))}}const ge=he.length>0;let fe;V?fe=b.jsx(na,{color:"info",children:"Your exchange request has been submitted."}):z?fe=b.jsx(na,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):H?fe=b.jsx(na,{color:"danger",children:"Sorry, your exchange request could not be submitted. Please try again later."}):i.timeStatus=="current"&&!T.isManager?fe=b.jsxs(na,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",tR(T)," to request a change."]}):ge&&(fe=b.jsxs(na,{color:"warning",children:[he," Please adjust your balance values."]}));const Oe=J.length>0;let Te=!1,xe=!1;for(let le of U)if(le.isNew&&(Te=!0),le.allocated!=le.requested&&(xe=!0),Te&&xe)break;const je=U.map(le=>le.resourceId),Le=O&&!V&&!z?i.allowedActions.Exchange.resources.filter(le=>!je.includes(le.resourceId)).map(le=>{const ve=M0(le.name),we=ve.short?`${ve.short} (${ve.full.replace(/ \([^(]+\)/,"")})`:ve.full;return{value:le.resourceId,label:we}}):[],ne=O?i.allowedActions.Exchange.resources.map(le=>le.resourceId):[];let _e;const G=[],Y=[];for(let le of U)le.isCredit?_e=le:(G.push(le),Y.push(!V&&!z&&(le.isNew||le.allocated!=le.requested)?Bp.edited:ne.includes(le.resourceId)?"":Bp.disabled));const re=`Add ${G.length?"another":"a"} resource to your exchange...`,ye=le=>le.requested-le.used,Se=(le,ve)=>{let we=Fp(Number(le.replace(/[^0-9-.]/g,""))+ve.used,ve.decimalPlaces);isNaN(we)&&(we=ve.allocated);const Ve=Math.min(ve.allocated,ve.used);return we<Ve?Ve:ve.unitCost*(we-ve.requested)>_e.requested?Fp(_e.requested/ve.unitCost,ve.decimalPlaces,"floor")+ve.requested:we},Ne=[{key:"name",name:"Resource",format:(le,ve)=>Hf(ve),width:Math.min(350,window.innerWidth*.3)},{key:"isActive",name:"Status",format:(le,ve)=>b.jsx(Zp,{status:le?"Active":ve.isNew?"New":"Inactive"}),width:100},{key:"unit",name:"Unit",width:150,format:(le,ve)=>ve.isBoolean?b.jsx(b.Fragment,{children:"—"}):b.jsx("abbr",{title:`1 ${v_(le,1)} = ${ni(ve.unitCost)} ${v_(_e.name,ve.unitCost)}`,children:le})},{key:"used",name:"Usage",class:"text-end",format:(le,ve)=>ve.isBoolean?b.jsx(b.Fragment,{children:"—"}):b.jsxs(b.Fragment,{children:[ni(le),(T.currentUser.resourceIds.includes(ve.resourceId)||T.currentUser.resourceAccountInactiveIds.includes(ve.resourceId))&&b.jsx(c0,{icon:"table",onClick:()=>l(ve.resourceRepositoryKey),target:"_blank",title:`${ve.name} Usage Details`})]})}];return O&&Ne.push({key:"requested",name:"Balance",class:"text-end",rowClass:le=>!V&&!z&&ne.includes(le.resourceId)?Bp.input:"",format:(le,ve)=>{const we=!V&&!z&&ne.includes(ve.resourceId);return ve.isBoolean?b.jsx("input",{className:"form-check-input",type:"checkbox",checked:le==1,disabled:!we,onChange:Ve=>h(ve.resourceId,Ve.target.checked?1:0)}):we?b.jsx(JY,{classes:"text-end w-100",clean:Ve=>Se(Ve,ve)-ve.used,format:ni,label:`Balance for ${ve.name}`,setValue:Ve=>{h(ve.resourceId,Ve+ve.used)},style:{padding:"0.1rem 0.5rem"},value:ye(ve)}):ni(ye(ve))},formatHeader:le=>b.jsxs(b.Fragment,{children:[le,!V&&!z?b.jsx(Hp,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:T.tab=="resources",children:"You can increase or decrease the balance below to change your allocation on a resource. Enter the total amount you would like to have available once the exchange is complete."}):null]})}),b.jsxs("div",{className:"resources",children:[fe,U.length?b.jsx(ZY,{requestId:n}):null,_e&&(O||_||L)?b.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[b.jsxs("span",{children:[mc(Nn.resourceTypeIcons.credit)," ",ni(_e.requested,_e)," ",_e.unit," available to exchange"]}),_||L?b.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:Re,children:[mc(Nn.resourceTypeIcons.credit)," Request More"," ",i.usesCredits?"Credits":"Units"]}):null]}):null,G.length?b.jsx(Qf,{columns:Ne,rows:G,rowClasses:Y,classes:Le.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):b.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),Le.length?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:j,children:b.jsx($R,{classNames:{control:()=>"react-select mb-1"},options:Le,onChange:le=>u(le.value),placeholder:re,value:null,"aria-label":re})}),G.length?null:b.jsx(Hp,{bg:"secondary",color:"dark",visible:T.tab=="resources",initial:!0,target:j,children:"Ready to get started? Search for a resource to add it to your project."}),b.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",b.jsx("a",{href:Nn.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,O&&!V&&!z?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),b.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:J,onChange:le=>v(le.target.value),style:{minHeight:"3rem"}})]}),b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:F||!xe&&!Oe&&!Te,onClick:d,children:"Reset Form"}),b.jsx("button",{ref:N,type:"button",className:"btn btn-secondary",disabled:F||!xe||!Oe||ge,onClick:R,children:F?"Submitting...":"Submit for Approval"})]}),xe&&!ge?b.jsx(Hp,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:N,visible:T.tab=="resources",children:"When you are finished adding resources, enter a justification for the requested resources above. Then you can submit your exchange for approval."}):null]}):null]})}function QY({question:n,requestId:r,grantNumber:i}){const{request:u,setResourceQuestionValues:l}=ri(r,i),d=M.useId();if(!n||!u||u.error)return;const{attributeSetId:h,attributes:v,fieldType:y,label:C,resourceId:x,values:R}=n,T=v[0],j=T.required?"required":"",N=V=>l(x,h,V.target.value?[V.target.value]:[]),O=V=>{l(x,h,Array.from(V.target.options).filter(({selected:H})=>H).map(({value:H})=>parseInt(H,10)))},_=V=>{const H=parseInt(V.target.value,10),z=V.target.checked?[...R,H]:R.filter(U=>U!=H);l(x,h,z)},L=V=>{const H=parseInt(V.target.value);l(x,h,isNaN(H)?[]:[H])};let F;if(["calendar","integer_only","text"].includes(y)){const V={calendar:"date",integer_only:"number",text:"text"}[y];F=b.jsx("input",{className:"form-control",id:d,type:V,placeholder:T.label,required:T.required,value:R[0]||"",onChange:y=="integer_only"?L:N})}else if(y=="textarea")F=b.jsx("textarea",{className:"form-control",id:d,placeholder:T.label,required:T.required,value:R[0]||"",onChange:N});else if(y=="drop_down"||v.length>=10){const V=y=="multi_sel";F=b.jsxs("select",{id:d,className:"form-select",required:T.required,multiple:V,onChange:V?O:L,value:V?R:R[0]||"",children:[V?null:b.jsx("option",{}),v.map(H=>b.jsx("option",{value:H.resourceAttributeId,children:H.label},H.resourceAttributeId))]})}else F=b.jsx("div",{id:d,children:v.map(V=>{const H=`resource-attribute-${V.resourceAttributeId}`;return b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:y=="single_sel"?"radio":"checkbox",id:H,value:V.resourceAttributeId,checked:R.includes(V.resourceAttributeId),onChange:y=="single_sel"?L:_}),b.jsx("label",{className:"form-check-label",htmlFor:H,children:V.label})]},V.resourceAttributeId)})});return b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{htmlFor:d,className:`form-label ${j}`,children:C}),F]})}function KY({requestId:n,grantNumber:r}){const{request:i,saveResources:u,toggleResourcesModal:l}=ri(n,r),{project:d}=Ji(r||i.grantNumber);if(!i||!d||i.error||d.error)return;const h=[],v=i.resources.filter(C=>C.allocated!=C.requested).map(C=>{const x=C.requested-C.allocated;return C.questions&&h.push(...C.questions),b.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[C.name,b.jsx("span",{className:`badge bg-${x>0?"primary":"danger"} rounded-pill`,children:C.isBoolean?eR(C.requested):b.jsxs(b.Fragment,{children:[x>0?"+":"",ni(x,C)," ",C.unit]})})]},C.resourceId)}),y=h.some(({attributes:C,values:x})=>x.length==0&&C[0].required);return b.jsxs(Ln,{size:"lg",show:i.showResourcesModal,onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Complete Your Exchange"})}),b.jsxs(Ln.Body,{children:[b.jsx("p",{children:"Please review your exchange to make sure it includes all the resources you need. Once you submit it, you will not be able to request another exchange until this one has been processed by the resource providers."}),b.jsx("ul",{className:"list-group mb-3",children:v}),h.length?b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:"Resource Questions"}),b.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),h.map(C=>b.jsx(QY,{question:C,requestId:n,grantNumber:r},C.attributeSetId))]}):null]}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:l,children:"Continue Editing"}),b.jsx("button",{type:"button",className:"btn btn-secondary",onClick:u,disabled:y,children:"Submit"})]})})]})}function Mm(){return b.jsx("div",{className:"spinner-border",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Loading..."})})}function Mk({user:n}){const r=`${n.lastName}, ${n.firstName}`;let i=r,u=[n.organization,n.email].filter(l=>l).join(", ");return u&&(i+=`: ${u}`),b.jsx("abbr",{title:i,children:r})}function eZ({requestId:n,grantNumber:r}){const{project:i}=Ji(r),{request:u,closeUsageDetailModal:l}=ri(n,r);if(!u||u.error||!i||i.error||!u.usageDetailStatus)return;let d,h="Usage";if(u.usageDetailStatus==ea.pending)d=b.jsx(Mm,{});else if(u.usageDetailStatus==ea.error)d=b.jsx(na,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:v,resourceDisplayName:y,resourceRepositoryKey:C,users:x}=u.usageDetail,{full:R,short:T}=M0(y),j=u.resources.find(L=>L.resourceRepositoryKey==C),N=L=>ni(L,{decimalPlaces:j?j.decimalPlaces:void 0}),O={};for(let L of i.users)O[L.username]=L;h=b.jsxs(b.Fragment,{children:["Usage: ",T||R," for ",v]});const _=[{key:"name",name:"Name",format:(L,{lastName:F,firstName:V,portalUsername:H})=>{const z=O[H];return z?b.jsx(Mk,{user:z}):`${F}, ${V}`}},{key:"portalUsername",name:"Resource Username",format:L=>{const F=O[L],V=F?F.resourceUsernames[j.resourceId]:null;return V||b.jsx(b.Fragment,{children:"—"})}},{key:"role",name:"Role",format:L=>LA[L].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:N},{key:"lastMonth",name:"Last Month",class:"text-end",format:N},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:N},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:N},{key:"total",name:"All Time",class:"text-end",format:N}];d=x.length?b.jsx(Qf,{rows:x,columns:_}):b.jsx(na,{color:"info",children:"There is no usage for this resource."})}return b.jsxs(Ln,{show:!0,size:"lg",onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:h})}),b.jsx(Ln.Body,{children:d})]})}var tZ=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function nZ(n){var r=n.defaultOptions,i=r===void 0?!1:r,u=n.cacheOptions,l=u===void 0?!1:u,d=n.loadOptions;n.options;var h=n.isLoading,v=h===void 0?!1:h,y=n.onInputChange,C=n.filterOption,x=C===void 0?null:C,R=nl(n,tZ),T=R.inputValue,j=M.useRef(void 0),N=M.useRef(!1),O=M.useState(Array.isArray(i)?i:void 0),_=ta(O,2),L=_[0],F=_[1],V=M.useState(typeof T<"u"?T:""),H=ta(V,2),z=H[0],U=H[1],J=M.useState(i===!0),q=ta(J,2),Re=q[0],he=q[1],ge=M.useState(void 0),fe=ta(ge,2),Oe=fe[0],Te=fe[1],xe=M.useState([]),je=ta(xe,2),Le=je[0],ne=je[1],_e=M.useState(!1),G=ta(_e,2),Y=G[0],re=G[1],ye=M.useState({}),Se=ta(ye,2),Ne=Se[0],le=Se[1],ve=M.useState(void 0),we=ta(ve,2),Ve=we[0],et=we[1],tt=M.useState(void 0),ft=ta(tt,2),Ae=ft[0],It=ft[1];l!==Ae&&(le({}),It(l)),i!==Ve&&(F(Array.isArray(i)?i:void 0),et(i)),M.useEffect(function(){return N.current=!0,function(){N.current=!1}},[]);var pt=M.useCallback(function(sn,_n){if(!d)return _n();var Vt=d(sn,_n);Vt&&typeof Vt.then=="function"&&Vt.then(_n,function(){return _n()})},[d]);M.useEffect(function(){i===!0&&pt(z,function(sn){N.current&&(F(sn||[]),he(!!j.current))})},[]);var Kt=M.useCallback(function(sn,_n){var Vt=w5(sn,_n,y);if(!Vt){j.current=void 0,U(""),Te(""),ne([]),he(!1),re(!1);return}if(l&&Ne[Vt])U(Vt),Te(Vt),ne(Ne[Vt]),he(!1),re(!1);else{var Cn=j.current={};U(Vt),he(!0),re(!Oe),pt(Vt,function(qn){N&&Cn===j.current&&(j.current=void 0,he(!1),Te(Vt),ne(qn||[]),re(!1),le(qn?yt(yt({},Ne),{},Lp({},Vt,qn)):Ne))})}},[l,pt,Oe,Ne,y]),on=Y?[]:z&&Oe?Le:L||[];return yt(yt({},R),{},{options:on,isLoading:Re||v,onInputChange:Kt,filterOption:x})}var rZ=M.forwardRef(function(n,r){var i=nZ(n),u=GD(i);return M.createElement(UR,Rt({ref:r},u))}),aZ=rZ;const FO=({description:n,disabled:r=!1,onChange:i,selectedLength:u,totalLength:l})=>{const d=M.useRef(),h=M.useId();let v=u==l,y=u>0&&!v;return M.useEffect(()=>{d.current&&(d.current.checked=v,d.current.indeterminate=y)},[v,y]),b.jsxs(b.Fragment,{children:[b.jsx("input",{className:"custom-checkbox form-check-input",disabled:r,id:h,onChange:C=>i(C.target.checked),ref:d,type:"checkbox"}),b.jsx("label",{className:"form-check-label",htmlFor:h,"aria-description":`${v?"Deselect":"Select"} ${n}`})]})};function iZ({grantNumber:n,requestId:r}){const{project:i,addUser:u,resetUsers:l,saveUsers:d,setTab:h,setUserRole:v,statuses:y,toggleUsersResources:C}=Ji(n),{request:x}=i?ri(r||i.currentRequestId,n):{request:null};if(!i||!i.currentRequestId||!x||i.error||x.error)return;const R=i.isManager,T="Exchange"in x.allowedActions,j=i.usersStatus==y.pending,N=i.usersStatus==y.success,O=i.usersStatus==y.error,_=i.users,L=x.resources.filter(hw),F=L.length==0,V=_.find(he=>he.hasChanges)!==void 0,H=_.find(he=>he.role!="pi")!==void 0;let z;N&&!V?z=b.jsx(na,{color:"info",children:"Your changes have been saved. Creation of user accounts can take some time. Users can check the status of their accounts on the Overview tab of the My Projects page."}):O?z=b.jsx(na,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):R?L.length?F&&(z=b.jsx(na,{color:"warning",children:"This project does not have any active resources."})):z=b.jsxs(na,{color:"warning",children:["This project does not have any resources."," ",T?b.jsx("a",{href:Nn.routes.request_action_path(x.requestId,"new?action_type=Exchange"),onClick:he=>{he.preventDefault(),h("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):z=b.jsxs(na,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",tR(i)," to request a change."]});const U=(he,ge)=>{let fe,Oe,Te,xe;if(ge.key=="all"){fe="all resources for all users",Oe=je=>C(je),Te=0;for(let je of _)Te+=je.resourceIds.length;xe=_.length*L.length}else fe=`all users for ${ge.name}`,Oe=je=>C(je,null,ge.key),Te=_.filter(({resourceIds:je})=>je.includes(ge.key)).length,xe=_.length;return b.jsxs(b.Fragment,{children:[ge.key=="all"?he:Hf(ge,{userGuide:!1}),b.jsx("br",{}),b.jsx(FO,{description:fe,disabled:ge.disabled,onChange:Oe,selectedLength:Te,totalLength:xe})]})},J=L0.map(({role:he,name:ge})=>b.jsx("option",{value:he,children:ge},he)),q=[{key:"name",name:"Name",width:200,format:(he,ge)=>b.jsx(Mk,{user:ge})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(he,ge)=>b.jsx("select",{className:"form-select",value:he,onChange:fe=>v(ge.username,fe.target.value),disabled:!R||he=="pi"||he=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:J.filter(fe=>fe.key==he||!["pi","co_pi"].includes(fe.key))})}];L.length&&q.push({key:"all",name:"All Resources",class:`text-center ${Bp.important}`,disabled:!R||F,width:100,format:(he,ge)=>b.jsx(FO,{description:`all users for ${ge.name}`,disabled:!R||F,onChange:fe=>C(fe,ge.username),selectedLength:ge.resourceIds.length,totalLength:L.length}),formatHeader:U});for(let he of L)q.push({key:he.resourceId,name:he.name,class:"text-center",disabled:!R||!he.isActive,icon:he.icon,format:(ge,fe)=>b.jsx(b.Fragment,{children:b.jsx("input",{className:"form-check-input",disabled:!R||!he.isActive,onChange:Oe=>C(Oe.target.checked,fe.username,he.resourceId),type:"checkbox",checked:fe.resourceIds.includes(he.resourceId)})}),formatHeader:U});const Re=_.map(he=>he.hasChanges?Bp.edited:"");return b.jsxs(b.Fragment,{children:[z,b.jsx(Qf,{rows:_,columns:q,frozenColumns:L.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:Re,scrollRowIndex:i.usersNewRowIndex}),R&&L.length&&!F?b.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:b.jsx(aZ,{classNames:{control:()=>"react-select"},loadOptions:async he=>(await YU(he)).map(fe=>({value:fe,label:`${fe.username} (${fe.firstName} ${fe.lastName}, ${fe.organization}${fe.email?`, ${fe.email}`:""})`})),onChange:he=>u(he.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,R&&(L.length&&!F||H)?b.jsxs("div",{className:"d-flex mt-3",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:j||!V,onClick:l,children:"Reset Form"}),b.jsx("button",{type:"button",className:"btn btn-secondary",disabled:j||!V,onClick:d,children:j?"Saving...":"Save Changes"})]}):null]})}function oZ({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u,setRequest:l,setTab:d}=Ji(r||i.grantNumber);if(!i)return;if(i.error)return b.jsx(na,{color:"danger",children:i.error});const h=i.timeStatus||i.actions[0].status.toLowerCase(),v=i.actions.find(({showDeleteModal:C})=>C),y=[];return i.resources.length||y.push("resources"),n!=u.currentRequestId&&y.push("users"),b.jsxs("div",{className:"request",children:[i.returnedForCorrections?b.jsxs(na,{color:"warning",children:[b.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),b.jsx("div",{className:S$.returnedForCorrectionsNotes,children:i.returnedForCorrectionsNotes}),b.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",i.timeStatus!="current"&&!i.returnedForCorrections?b.jsxs(na,{color:"warning",children:["You are viewing ","aeiou".includes(h[0])?"an":"a"," ",h," request."," ",y.length?`You cannot manage ${y.join(" or ")} for this request.`:""," ",u.currentRequestId?b.jsx("a",{href:Nn.routes.request_path(u.currentRequestId),onClick:C=>{C.preventDefault(),l(u.currentRequestId)},children:"Go to the current request."}):null]}):null,b.jsxs(Y3,{activeKey:u.tab,onSelect:d,className:"mt-3 mb-3",children:[b.jsx(kb,{eventKey:"overview",title:"Overview",className:"mb-0",children:b.jsx(P4,{requestId:n,grantNumber:r})}),b.jsx(kb,{eventKey:"resources",title:i.usesCredits?"Credits + Resources":"Resources",disabled:y.includes("resources"),children:b.jsx(qY,{requestId:n})}),b.jsx(kb,{eventKey:"users",title:"Users + Roles",disabled:y.includes("users"),children:b.jsx(iZ,{grantNumber:r})}),b.jsx(kb,{eventKey:"history",title:"History",children:b.jsx(f4,{requestId:n})})]}),b.jsx(e4,{grantNumber:r,requestId:n}),b.jsx(t4,{grantNumber:r,requestId:n}),b.jsx(n4,{grantNumber:r,requestId:n,actionId:v?v.actionId:null}),b.jsx(KY,{grantNumber:r,requestId:n}),b.jsx(eZ,{grantNumber:r,requestId:n})]})}function sZ({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u,toggleDeleteModal:l}=ri(n,r);if(!i)return;const{actions:d,allowedActions:h}=i,v=[];h&&(("Extension"in h||"Renewal"in h)&&v.push(["Extend End Date",C=>{C.preventDefault(),u()},"calendar-plus"]),"Final Report"in h&&v.push(["Submit Final Report",`${Nn.routes.request_action_path(n,"new")}?action_type=Final+Report`,"file-earmark-check"]));const y=d.find(C=>C.isRequest);if(y){const C=y.allowedOperations||[];C.includes("Edit")&&v.push(["Edit",Nn.routes.edit_request_path(i.requestId),"pencil"]),C.includes("Delete")&&v.push(["Delete",x=>{x.preventDefault(),l(y.actionId)},"trash","danger"])}return v.map(([C,x,R,T])=>{const j=b.jsxs(b.Fragment,{children:[" ",R&&b.jsx("i",{className:`bi bi-${R} me-1`}),C]});return typeof x=="function"?b.jsx("button",{className:`btn btn-${T||"primary"} ms-2 text-nowrap`,onClick:x,children:j},C):b.jsx("a",{className:`btn btn-${T||"primary"} ms-2 text-nowrap`,href:x,children:j},C)})}function lZ({open:n=!1,grantNumber:r,title:i,status:u}){const[l,d]=M.useState(n),{project:h,setRequest:v}=Ji(r,!l&&i&&u&&!0),y=`project-${r}`;let C=null;if(l&&h)if(h.error)C=b.jsx(na,{color:"danger",children:h.error});else{let x;const R=h.requestsList.map(T=>(T.requestId==h.selectedRequestId&&(x=T),b.jsx("option",{value:T.requestId,children:Kw(T)},T.requestId)));C=b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"d-flex",children:[b.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:T=>v(parseInt(T.target.value,10)),value:h.selectedRequestId,disabled:R.length<2,children:R}),b.jsx(sZ,{requestId:h.selectedRequestId,grantNumber:r})]}),x?b.jsx(oZ,{...x,grantNumber:r}):null]})}return b.jsxs("div",{className:`${y_.project} card mb-3`,children:[b.jsxs("div",{className:`card-header d-flex justify-content-between ${l?"":"border-bottom-0"}`,children:[b.jsx("button",{"aria-expanded":l,"aria-controls":y,className:y_.expand,onClick:()=>d(!l),children:b.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[b.jsx("i",{className:`bi bi-caret-${l?"down":"right"}-fill`})," ",/^[A-Z]/.test(r)?b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"grant-number",children:[r,":"]})," "]}):null,i||h.title]})}),b.jsx(Zp,{status:u||h.status})]}),b.jsx("div",{className:"card-body",id:y,hidden:!l||!h,children:C})]})}function uZ({username:n,openFirst:r=1}){const{error:i,loading:u,projects:l}=y$(n);return u?b.jsx(Mm,{}):i?b.jsxs(na,{color:"danger",children:[i," ",b.jsx("a",{href:"#",onClick:d=>{d.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]}):l.length?l.map((d,h)=>b.jsx(lZ,{open:h<r,...d},d.grantNumber)):b.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[b.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),b.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[b.jsxs("a",{className:"btn btn-primary w-25",href:Nn.routes.project_types_path(),children:[b.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),b.jsxs("a",{className:"btn btn-secondary w-25",href:Nn.routes.get_your_first_project_path(),children:[b.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",b.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),b.jsxs("a",{className:"btn btn-primary w-25",href:Nn.routes.how_to_path(),children:[b.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]})}const Lk={apiUrl:null,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},cZ=Di("projectsBrowser/initApp",async(n,{getState:r,dispatch:i})=>{await i(Fw()),await i($f()),i(fZ())}),fZ=Di("projectsBrowser/filterCleanup",async(n,{getState:r,dispatch:i})=>{const l=r().projectsBrowser.typeLists;i(Pk({...l,orgs:["-- ALL --"].concat(l.orgs)}))}),Fw=Di("projectsBrowser/getFilters",async(n,{getState:r,dispatch:i})=>{const l=`${r().projectsBrowser.apiUrl}?filters=1`,h=await(await fetch(l)).json();i(Pk(h.filters))}),$f=Di("projectsBrowser/getProjects",async(n,{getState:r})=>{const i=r().projectsBrowser,u=i.filters,l=i.typeLists,d=l.fosTypes.filter(C=>C.checked);let h=`${i.apiUrl}?page=${i.pageData.current_page}`;return d.length!=l.fosTypes.length&&(h+=`&fos=${d.map(C=>C.fosTypeId).join(",")}`),u.org!=""&&u.org!="-- ALL --"&&(h+=`&org=${encodeURIComponent(u.org)}`),u.allocationType!=""&&(h+=`&allocation_type=${u.allocationType}`),u.resource!=""&&(h+=`&resources=${u.resource}`),await(await fetch(h)).json()}),GR=D0({name:"projectsBrowser",initialState:Lk,reducers:{resetFilters:n=>{n.filters={org:"",allocationType:"",allFosToggled:!1,resource:""},GR.caseReducers.toggleAllFos(n)},setApiUrl:(n,{payload:r})=>{n.apiUrl=r},setShowPagination:(n,{payload:r})=>{n.showPagination=r},setTypeLists:(n,{payload:r})=>{n.typeLists=r},toggleAllFos:n=>{n.typeLists.fosTypes.forEach(r=>r.checked=!n.filters.allFosToggled),n.filters.allFosToggled=!n.filters.allFosToggled},toggleFos:(n,{payload:r})=>{n.typeLists.fosTypes.forEach(i=>{i.fosTypeId==r.fosTypeId&&(i.checked=!i.checked)}),n.typeLists.fosTypes.filter(i=>i.checked).length!=n.typeLists.fosTypes.length?n.filters.allFosToggled=!1:n.filters.allFosToggled=!0},updateFilter:(n,{payload:r})=>{n.filters[r.name]=r.value},updatePageData:(n,{payload:r})=>{r.current_page&&(n.pageData.current_page=r.current_page),r.last_page&&(n.pageData.last_page=r.last_page)}},extraReducers:n=>{n.addCase($f.pending,r=>{r.projectsLoaded=!1}).addCase($f.fulfilled,(r,i)=>{const u=i.payload;r.projectsLoaded=!0,r.projects=u.projects,u.pages!=r.pageData.last_page&&(r.pageData.current_page=1),r.showPagination=!0,r.pageData.last_page=u.pages}).addCase($f.rejected,(r,i)=>{console.log(i.error)}).addCase(Fw.pending,r=>{r.filtersLoaded=!1}).addCase(Fw.fulfilled,r=>{r.filtersLoaded=!0})}}),{resetFilters:dZ,setApiUrl:G8,setShowPagination:VO,setTypeLists:Pk,toggleAllFos:pZ,toggleFos:vZ,updateFilter:BO,updatePageData:Vw}=GR.actions,hZ=n=>n.projectsBrowser.filters,mZ=n=>n.projectsBrowser.filtersLoaded,gZ=n=>n.projectsBrowser.projectsLoaded,yZ=n=>n.projectsBrowser.pageData,bZ=n=>n.projectsBrowser.projects,CZ=n=>n.projectsBrowser.filtersLoaded&&n.projectsBrowser.projectsLoaded&&n.projectsBrowser.pageData.last_page>1,xZ=n=>n.projectsBrowser.typeLists,SZ=GR.reducer;const EZ=()=>{const n=To(),r=dr(hZ),i=dr(xZ),u=i.orgs.map(O=>({label:O,value:O})),l=M.useRef(),[d,h]=M.useState(null),[v,y]=M.useState(!1),C={height:"200px",overflowX:"auto",padding:"2px"},x=O=>{n(BO({name:O.target.name,value:O.target.value}))},R=()=>{window.scrollTo(0,0),y(!0),n(VO(!1)),n(Vw({current_page:1})),n($f())},T=()=>{h(null),n(VO(!1)),n(Vw({current_page:1})),n(dZ()),v&&(window.scrollTo(0,0),n($f()),y(!1))},j=O=>{h(O),n(BO({name:"org",value:O.value}))},N=()=>r.org==""&&r.allocationType==""&&r.allFosToggled&&r.resource=="";return b.jsx("div",{className:"row sticky-top mb-2",children:b.jsxs("div",{className:"col",children:[b.jsx("h3",{className:"mb-2",children:"Filters"}),b.jsx("h5",{className:"mb-1",children:"Field of Science"}),b.jsxs("div",{className:"border mb-3",style:C,children:[b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:r.allFosToggled,onChange:()=>{n(pZ())}}),b.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),i.fosTypes.map(O=>b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:"checkbox",value:O.fosTypeId,id:`fos_${O.fosTypeId}`,checked:O.checked,onChange:()=>n(vZ(O))}),b.jsx("label",{className:"form-check-label",htmlFor:`fos_${O.fosTypeId}`,children:O.fosName})]},`fos_${O.fosTypeId}`))]}),b.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),b.jsx("div",{className:"mb-3",children:b.jsx($R,{options:u,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:l,closeMenuOnSelect:!0,onChange:j,value:d,"aria-labelledby":"org_select_label"},"org_select")}),b.jsx("h5",{id:"project_type_label",className:"mb-1",children:b.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),b.jsx("div",{className:"mb-3",children:b.jsxs("select",{name:"allocationType",id:"project_type_select",value:r.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:O=>x(O),children:[b.jsx("option",{value:"",children:"-- All --"}),i.allocationTypes.map((O,_)=>b.jsx("option",{value:O,children:O},`allocation_type_${_}`))]})}),b.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),b.jsx("div",{className:"mb-3",children:b.jsxs("select",{name:"resource",id:"resource_select",value:r.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:O=>x(O),children:[b.jsx("option",{value:"",children:"-- All --"}),i.resources.map((O,_)=>b.jsx("option",{value:O.resourceId,children:O.resourceName},`resource_${_}`))]})}),b.jsxs("div",{className:"mt-2",children:[b.jsx("button",{className:"btn btn-primary me-2",onClick:R,children:"Submit"}),b.jsx("button",{className:"btn btn-secondary",disabled:N(),onClick:T,children:"Reset"})]})]})})};const wZ=({project:n})=>{const r=n.resources,i=l=>{let d=l.units?l.units:l.resourceUnits;const h=l.allocation?l.allocation:l.amount;if(d=="[Yes = 1, No = 0]"||d=="Yes / No")return h=="1.0"?"Yes":"No";{let v="0";return parseInt(h)&&(v=parseInt(h).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),d=="ACCESS Credits"&&(d=b.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),d=="Dollars"?`$${v}`:b.jsxs(b.Fragment,{children:[v," ",d]})}},u=()=>n.requestNumber&&n.requestNumber!=""?`(${n.requestNumber})`:"";return b.jsxs("div",{className:"card mb-4",children:[b.jsxs("div",{className:"card-header bg-primary text-white",children:[b.jsxs("span",{className:"fw-bold",children:[u()," ",n.requestTitle]})," ",b.jsx("br",{}),b.jsxs("span",{className:"fst-italic",children:[n.pi," ",b.jsxs("small",{children:[" (",n.piInstitution,") "]})]})]}),b.jsxs("div",{className:"card-body",children:[b.jsxs("div",{className:"row fw-bold border-bottom",children:[b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col",children:n.fos}),b.jsx("div",{className:"col",children:n.allocationType}),b.jsxs("div",{className:"col",children:[n.beginDate," to ",n.endDate]})]}),b.jsxs(os,{flush:!0,className:"mt-3 mb-1",children:[b.jsxs(os.Item,{eventKey:"0",children:[b.jsx(os.Header,{children:"Resources"}),b.jsx(os.Body,{children:b.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("span",{className:"m-0 p-0",children:"Resource"})}),b.jsx("td",{children:b.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),b.jsx("tbody",{children:r.map((l,d)=>b.jsxs("tr",{children:[b.jsx("td",{children:l.resourceName}),b.jsx("td",{style:{whiteSpace:"nowrap"},children:i(l)})]},`resource_${n.requestId}_${d}`))})]})})]}),b.jsxs(os.Item,{eventKey:"1",children:[b.jsx(os.Header,{children:"Abstract"}),b.jsx(os.Body,{children:b.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:n.abstract})})]})]})]})]})},RZ=()=>{const n=dr(bZ);return n.length==0?b.jsx("div",{children:"No Projects Found"}):b.jsx("div",{children:n.map((r,i)=>b.jsx(wZ,{project:r},`project_${i}`))})};const zO=()=>{const n=To(),r=dr(yZ),[i,u]=M.useState([]),[l,d]=M.useState("0"),h=Array.from({length:r.last_page},(N,O)=>O),v=10,y={width:"50px",textAlign:"center"};M.useEffect(()=>{R()},[r]);const C=N=>{const O=parseInt(N);n(Vw({current_page:N})),n($f(O))},x=N=>(event.preventDefault(),d("0"),C(N),!1),R=()=>{const N=[];if(r.last_page>v)if(r.current_page>4){N.push(1),N.push("spacer");for(var O=1;O>0;O--)r.current_page-O>1&&N.push(r.current_page-O);N.push(["current",r.current_page]);for(var O=1;O<2;O++)r.current_page+O<=r.last_page&&N.push(r.current_page+O);r.last_page-r.current_page>1&&(N.push("spacer"),N.push(r.last_page))}else[1,2,3,4,5].forEach(_=>{_==r.current_page?N.push(["current",_]):N.push(_)}),N.push("spacer"),N.push(r.last_page);else for(var O=1;O<=r.last_page;O++)O==r.current_page?N.push(["current",O]):N.push(O);u(N)},T=N=>{let O="";return typeof N=="object"?[N,O]=N:O=N,N=="spacer"?b.jsx("li",{className:"page-item disabled",children:b.jsx("span",{className:"page-link",style:y,children:". . ."})}):N=="current"?b.jsx("li",{className:"page-item active","aria-current":"page",children:b.jsx("span",{className:"page-link",style:y,children:O})}):b.jsx("li",{className:"page-item",children:b.jsx("button",{className:"page-link",style:y,onClick:()=>C(N),children:O})})},j=()=>b.jsx("li",{className:"page-item",children:b.jsxs("select",{className:"page-link",style:{...y,height:"100%"},value:l,onChange:N=>x(N.target.value),children:[b.jsx("option",{value:"0",children:"Go To"}),h.map(N=>b.jsx("option",{value:N+1,children:N+1},`page_option_${N}`))]})});return b.jsx("div",{children:b.jsx("nav",{"aria-label":"Pages for the table",children:b.jsxs("ul",{className:"pagination",children:[b.jsx("li",{className:`page-item ${r.current_page==1?"disabled":""}`,children:b.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>C(r.current_page-1),disabled:r.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),i.map((N,O)=>b.jsx(kr.Fragment,{children:T(N)},`page_${O}`)),r.last_page>v?j():"",b.jsx("li",{className:`page-item ${r.current_page==r.last_page?"disabled":""}`,children:b.jsx("button",{className:"page-link",style:y,onClick:()=>C(r.current_page+1),disabled:r.current_page==r.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},TZ=({api_url:n})=>{const r=To(),i=dr(gZ),u=dr(mZ),l=dr(CZ),d=b.jsx("div",{className:"loadingDiv",children:"Loading ..."});return M.useEffect(()=>{r(cZ())},[]),b.jsx("div",{className:"container-fluid",children:b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-sm-3",children:b.jsx(EZ,{})}),b.jsxs("div",{className:"col-sm-9",children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:l?b.jsx(zO,{}):""})}),b.jsx("div",{className:"row",id:"projectListRow",children:b.jsx("div",{className:"col",children:i&&u?b.jsx(RZ,{}):d})}),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:l?b.jsx(zO,{scroll:"projects_browser_app"}):""})})]})]})})},IZ=n=>n.publications_store.publication,NZ=n=>n.publications_store.publication.doi,_Z=n=>n.publications_store.publication_types,Fk=n=>n.publications_store.publication.authors,OZ=n=>n.publications_store.tag_categories,AZ=n=>n.publications_store.projects,jZ=n=>n.publications_store.publication.tags,DZ=n=>n.publications_store.errors,Vk=n=>n.publications_store.data_loaded,Bk=n=>n.publications_store.show_saved,WR=n=>n.publications_store.saving,kZ=n=>n.publications_store.modal,zk=n=>n.publications_store.form_valid,Hk=n=>!WR(n)&&Vk(n)&&zk(n)&&Uk(n)&&n.publications_store.projects.filter(r=>r.selected).length>0,Uk=n=>{const r=Fk(n);return r.length==0?!1:r.filter(i=>i.first_name==""||i.last_name=="").length==0},$k=n=>({type:"UPDATE_PUBLICATION",payload:n}),MZ=n=>({type:"UPDATE_FIELD",payload:n}),Bw=n=>({type:"CHANGE_PUB_TYPE",payload:n}),LZ=n=>({type:"SET_PUBLICATION",payload:n}),PZ=()=>({type:"ADD_AUTHOR"}),FZ=n=>({type:"UPDATE_AUTHOR",payload:n}),VZ=n=>({type:"TOGGLE_REQUEST",payload:n}),Im=n=>({type:"UPDATE_ERRORS",payload:n}),Gk=n=>({type:"HIDE_ERROR",payload:n}),BZ=n=>({type:"UPDATE_SELECTED_TAGS",payload:n}),zZ=n=>({type:"DELETE_AUTHOR",payload:n}),HZ=n=>({type:"DATA_LOADED",payload:n}),Wk=n=>({type:"UPDATE_SHOW_SAVED",payload:n}),UZ=()=>({type:"RESET_STATE"}),QE=n=>({type:"UPDATE_SAVING",payload:n}),$Z=n=>({type:"SET_FORM_VALID",payload:n}),Xk=n=>({type:"SET_GRANT_NUMBER",payload:n}),GZ=n=>({type:"ADD_PROJECT",payload:n}),vc={routes:{}},WZ=(n,r,i)=>{let u=!0;const l=[];for(const h of r)n[h]||(u=!1,l.push(h));const d=n.authors||[];for(const h of d)for(const v of i)h[v]||(u=!1,l.includes(v)||l.push(v));return{formValid:u,missingFields:l}},XZ=n=>n.length>0?b.jsxs("div",{role:"alert",children:[b.jsx("p",{children:"Please provide the following information before submitting:"}),b.jsx("ul",{children:n.map(r=>b.jsx("li",{children:YZ(r)},r))})]}):null;function YZ(n){return n.split("_").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}const ZZ=()=>async(n,r)=>{const i=r().publications_store.publication.doi,u=encodeURIComponent(i).replaceAll(".","%2E"),l="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(`/publications/lookup?doi=${u}`).then(d=>d.json()).then(d=>{if(d.title!=""){let h=r().publications_store.publication_types.find(v=>v.citation_style_type==d.type);n(Bw(h?h.publication_type:"Other")),n(LZ(d))}else n(Im(l))},d=>{n(Im(l))})},JZ=()=>async(n,r)=>{const i=r().publications_store.grant_number,u=vc.routes.publications_find_project_path();await fetch(`${u}?grant_number=${i}`).then(l=>l.json()).then(l=>{n(GZ(l)),n(Xk(""))},()=>{n(Im("Unable to find a project with this grant number."))})},Yk=()=>async n=>{const r=/^\/requests/.test(window.location.pathname)?vc.routes.publication_path("new.json"):window.location.href+".json";await fetch(r).then(i=>i.json()).then(i=>{n(HZ(i))})},Zk=()=>async(n,r)=>{const i=r().publications_store,u=i.projects.filter(T=>T.selected),l=Object.keys(i.selected_tags).map(T=>i.selected_tags[T]).flat(),d={...i.publication},h=i.errors,{formValid:v,missingFields:y}=WZ(d,["title","publication_year","publication_month"],["first_name","last_name"]);if(!v){h.length>0&&Array.from(h).forEach(j=>{n(Gk(j.id))});const T=XZ(y);n(Im(T));return}const C={authenticity_token:document.getElementsByName("authenticity_token")[0].value,publication:d,authors:d.authors.map(T=>({...T,order:0})),tags:l,projects:u};let x,R;d.publication_id?(x=vc.routes.publication_path(d.publication_id),R="PATCH"):(x=vc.routes.publications_path(),R="POST"),n(QE(!0)),await fetch(x,{method:R,headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}).then(T=>{i.redirect?window.location.href=vc.routes.publications_path():(d.publication_id||(n(UZ()),n(Yk())),n(Wk(!0)),n(QE(!1)))},()=>{n(QE(!1)),n(Im("There was an error saving this publication."))})},qZ=({doi:n,updatePublication:r,doiLookup:i})=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),b.jsxs("div",{className:"input-group",children:[b.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:n,onChange:u=>r(u.target.value)}),b.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>i(),children:"Lookup Publication"})]})]})}),QZ=n=>({doi:NZ(n)}),KZ=n=>({updatePublication:r=>n($k({key:"doi",value:r})),doiLookup:()=>n(ZZ())}),e6=fs(QZ,KZ)(qZ),t6=({author:n,authorKey:r,updateAuthor:i,deleteAuthor:u})=>{const l=v=>{i({key:v.target.name,value:v.target.value,idx:r})},d=v=>b.jsx("td",{children:b.jsx("input",{type:"text",className:"form-control",name:v,id:v,value:n[v],onChange:y=>l(y)})},`field_${v}`),h=["first_name","last_name","affiliation"];return b.jsxs("tr",{children:[h.map(v=>d(v)),b.jsx("td",{children:r!==0&&b.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>u(r),children:b.jsx("i",{className:"bi bi-trash"})})})]})},n6=n=>({updateAuthor:r=>n(FZ(r)),deleteAuthor:r=>n(zZ(r))}),HO=fs(null,n6)(t6),r6=({authors:n,addAuthor:r,authors_exist:i})=>{const u=n.length===0,l=()=>i?"":b.jsx("div",{className:"alert alert-danger",children:"You must add at least one author and each author must have a first and last name"});return b.jsxs("div",{children:[l(),b.jsxs("table",{className:"table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:"First Name"}),b.jsx("th",{children:"Last Name"}),b.jsx("th",{children:"Affiliation"}),b.jsx("th",{})]})}),b.jsxs("tbody",{children:[n.map((d,h)=>b.jsx(HO,{author:d,authorKey:h},`author_${h}`)),u&&b.jsx(HO,{author:r()})]})]}),b.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>r(),children:"Add Author"})]})},a6=n=>({authors:Fk(n),authors_exist:Uk(n)}),i6=n=>({addAuthor:()=>n(PZ())}),o6=fs(a6,i6)(r6),s6=({category:n,publication_tags:r,updateSelectedTags:i,index:u})=>{const l=M.useRef(null),d=()=>{const v=r.filter(y=>y.label==n.label)[0];return v?v.options:[]},h=v=>{i({category:n.label,tags:v})};return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fw-bold mb-1",children:n.label}),b.jsx("div",{className:"mb-3",children:b.jsx($R,{classNames:{control:v=>v.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:d(),options:n.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${u}`,inputId:`tags_${u}`,ref:l,closeMenuOnSelect:!1,onChange:h})})]})},l6=n=>({updateSelectedTags:r=>n(BZ(r))}),u6=n=>({publication_tags:jZ(n)}),c6=fs(u6,l6)(s6),f6=({projects:n,toggleProject:r})=>{const i=l=>`list-group-item list-group-item-action clickable ${l.selected?"list-group-item-success":""}`,u=()=>n.filter(l=>l.selected).length>0;return b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[u()?"":b.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),b.jsx("div",{className:"list-group",children:n.map((l,d)=>b.jsxs("div",{className:i(l),onClick:()=>r(d),children:[l.grant_number,": ",l.title]},`project_${l.grant_number}`))})]})})},d6=n=>({projects:AZ(n)}),p6=n=>({toggleProject:r=>n(VZ(r))}),v6=fs(d6,p6)(f6),h6=({grant_number:n,setGrantNumber:r,grantSearch:i})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",b.jsxs("div",{className:"input-group mt-1",children:[b.jsx("input",{type:"text",className:"form-control",value:n,onChange:u=>r(u.target.value),placeholder:"Enter a grant number"}),b.jsx("button",{className:"btn btn-primary",onClick:()=>i(),children:"Find Project"})]})]})}),m6=n=>({setGrantNumber:r=>n(Xk(r)),grantSearch:()=>n(JZ())}),g6=n=>({grant_number:n.publications_store.grant_number}),y6=fs(g6,m6)(h6),b6=({publication:n,updateField:r,publication_types:i,changePubType:u,updatePublication:l,tag_categories:d,savePublication:h,modal:v,save_enabled:y,setFormValid:C,form_valid:x})=>{const R=F=>{F.target.value.trim()==""?C(!1):C(!0),l({key:"title",value:F.target.value})},T=()=>n.fields.map((F,V)=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:`field_${F.csl_field_name}`,className:"form-label",children:F.name}),b.jsx("input",{type:"text",className:"form-control",name:`field_${F.csl_field_name}`,id:`field_${F.csl_field_name}`,value:F.field_value,onChange:H=>r({index:V,value:H.target.value})})]})},`field_${F.csl_field_name}`)),j=()=>{const F=new Date().getFullYear()+2;let V=1980;const H=[];for(;V<=F;)H.push(V++);const z=["January","February","March","April","May","June","July","August","September","October","November","December"],U=b.jsx("i",{className:"bi bi-asterisk text-danger"});return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",U]}),b.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${x?"":"is-invalid"}`,value:n.title,onChange:J=>R(J)})]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),b.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:n.publication_year,onChange:J=>{l({key:"publication_year",value:J.target.value})},children:H.map(J=>b.jsx("option",{value:J,children:J},`year_${J}`))})]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),b.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:n.publication_month,onChange:J=>{l({key:"publication_month",value:J.target.value})},children:z.map((J,q)=>b.jsx("option",{value:q+1,children:J},`month_${q}`))})]})})]})},N=b.jsxs("div",{className:"card",children:[b.jsx("div",{className:"card-header",children:b.jsx("h2",{children:"Publication Information"})}),b.jsxs("div",{className:"card-body",children:[b.jsx("p",{className:"mb-2",children:'Enter information about this publication below. If you have a DOI, you may use the "Lookup Publication" button to attempt to find this information automatically.'}),b.jsx(e6,{}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),b.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:n.publication_type,onChange:F=>u(F.target.value),children:i.map(F=>b.jsx("option",{value:F.publication_type,children:F.publication_type},`pub_type_${F.type_id}`))})]})}),j(),T()]})]}),O=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Authors"}),b.jsxs(Hp,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,b.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),b.jsx("div",{className:"card-body",children:b.jsx(o6,{})})]}),_=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Tags"}),b.jsx(Hp,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),b.jsx("div",{className:"card-body",children:d.map((F,V)=>b.jsx(c6,{index:V,category:F},`tc_${V}`))})]}),L=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Associated Projects"}),b.jsx(Hp,{children:"Click/Tap each project that this publication is related to."})]}),b.jsxs("div",{className:"card-body",children:[b.jsx(v6,{}),b.jsx("hr",{}),b.jsx(y6,{})]})]});return b.jsxs(b.Fragment,{children:[N,O,_,L,v?null:b.jsx("p",{className:"mt-3",children:b.jsx("button",{onClick:()=>h(),className:"btn btn-success",disabled:!y,children:"Save Publication"})})]})},C6=n=>({publication:IZ(n),publication_types:_Z(n),tag_categories:OZ(n),saving:WR(n),modal:kZ(n),save_enabled:Hk(n),form_valid:zk(n)}),x6=n=>({updateField:r=>n(MZ(r)),changePubType:r=>n(Bw(r)),updatePublication:r=>n($k(r)),savePublication:()=>n(Zk()),setFormValid:r=>n($Z(r))}),S6=fs(C6,x6)(b6),E6=({errors:n,hideError:r})=>b.jsx(b.Fragment,{children:n.map(i=>b.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[i.message,b.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>r(i.id)})]},`err_${i.id}`))}),w6=n=>({errors:DZ(n)}),R6=n=>({hideError:r=>n(Gk(r))}),T6=fs(w6,R6)(E6),I6=({show_saved:n,updateShowSaved:r})=>{const i=b.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",b.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>r(!1)})]});return n?i:b.jsx(b.Fragment,{})},N6=n=>({show_saved:Bk(n)}),_6=n=>({updateShowSaved:r=>n(Wk(r))}),O6=fs(N6,_6)(I6),A6=({getData:n,data_loaded:r})=>(M.useEffect(()=>{n()},[]),b.jsxs(b.Fragment,{children:[b.jsx(O6,{}),b.jsx(T6,{}),r?b.jsx(S6,{}):b.jsx(Mm,{})]})),j6=n=>({data_loaded:Vk(n)}),D6=n=>({getData:()=>n(Yk())}),Jk=fs(j6,D6)(A6),k6=({saving:n,savePublication:r,showSaved:i,updatePublications:u,save_enabled:l})=>{const[d,h]=M.useState(!1);return M.useEffect(()=>{!n&&i&&u()},[n,i]),b.jsxs(b.Fragment,{children:[b.jsxs(Ln,{size:"xl",show:d,onHide:()=>h(!1),scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Add Publication"})}),b.jsx(Ln.Body,{children:b.jsx(Jk,{})}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>h(!1),children:"Cancel"}),b.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{r(),h(!1)},children:"Save Publication"})]})})]}),b.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(!0),children:"Add a New Publication"})]})},M6=n=>({saving:WR(n),showSaved:Bk(n),save_enabled:Hk(n)}),L6=n=>({savePublication:()=>n(Zk())}),P6=fs(M6,L6)(k6),F6=({usernames:n=[],publication_ids:r=[]})=>{const[i,u]=M.useState(n),[l,d]=M.useState(r),[h,v]=M.useState([]),y=M.useRef(i),C=O=>{y.current=O,u(O)},x=async()=>{const _=await(await fetch(vc.routes.search_publications_path({usernames:i}))).json();v(_)};M.useEffect(()=>{x()},[i]),M.useEffect(()=>{addEventListener("requestAddRole",O=>C([...y.current,O.detail.username])),addEventListener("requestRemoveRole",O=>C(y.current.filter(_=>_!=O.detail.username)))},[]);let R=!1,T=!1;const j=h.map(O=>{const _=l.includes(O.publication_id);R=R||_,T=T||!_;const L=new Date(O.publication_year,O.publication_month-1);return b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("input",{type:"checkbox",name:"publication_ids[]",value:O.publication_id,checked:_,onChange:()=>d(_?l.filter(F=>F!=O.publication_id):[...l,O.publication_id])})}),b.jsx("td",{children:O.title}),b.jsx("td",{children:O.authors.map(F=>`${F.first_name} ${F.last_name}`).join(", ")}),b.jsx("td",{children:O.publication_type}),b.jsxs("td",{children:[L.toLocaleString("default",{month:"short"})," ",O.publication_year]})]},O.publication_id)}),N=`${T?"Select":"Deselect"} all`;return b.jsxs("div",{className:"publications-select",children:[b.jsxs("table",{className:"table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:b.jsx("input",{type:"checkbox",value:"","aria-label":N,title:N,checked:R&&!T,onChange:()=>d(T?h.map(O=>O.publication_id):[]),ref:O=>{O&&(O.indeterminate=R&&T)}})}),b.jsx("th",{children:"Title"}),b.jsx("th",{children:"Authors"}),b.jsx("th",{children:"Type"}),b.jsx("th",{children:"Date"})]})}),b.jsx("tbody",{children:j})]}),b.jsx(P6,{updatePublications:x})]})},V6=()=>`${Math.random().toString(36).slice(2)}`,zw=document.querySelector("#publications-react"),B6=zw?zw.dataset:{},UO={publication_types:[],tag_categories:[],publication:{},projects:[],errors:[],selected_tags:{},data_loaded:!1,saving:!1,show_saved:!1,redirect:B6.redirect||!1,modal:zw==null,form_valid:!1,grant_number:""},z6=(n=UO,r)=>{const{type:i,payload:u}=r;switch(i){case"UPDATE_FIELD":return So(n,d=>(d.publication.fields[u.index].field_value=u.value,d));case"CHANGE_PUB_TYPE":return So(n,d=>{let h=d.publication_types.find(v=>v.publication_type==u).fields;return h.forEach(v=>{const y=d.publication.fields.find(C=>C.csl_field_name==v.csl_field_name);y&&(v.value=y.value)}),d.publication.publication_type=u,d.publication.fields=h,d});case"UPDATE_PUBLICATION":return{...n,publication:{...n.publication,[u.key]:u.value}};case"SET_PUBLICATION":return So(n,d=>(d.publication.fields.forEach(h=>{h.field_value=u[h.csl_field_name]}),Object.keys(d.publication).forEach(h=>{u[h]&&(d.publication[h]=u[h])}),d.form_valid=u.title.trim()!="",d));case"ADD_AUTHOR":{const l={portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}};return So(n,h=>{h.publication.authors.push(l)})}case"UPDATE_AUTHOR":return So(n,d=>{d.publication.authors[u.idx][u.key]=u.value});case"TOGGLE_TAG":return So(n,d=>{let h=d.tag_categories.find(v=>v.publication_tags_category_id==u.publication_tags_category_id);h.tags[u.idx].selected=!h.tags[u.idx].selected});case"TOGGLE_REQUEST":return So(n,d=>(d.projects[u].selected=!d.projects[u].selected,d));case"UPDATE_ERRORS":{const l={id:V6(),message:u};return{...n,errors:[...n.errors,l]}}case"HIDE_ERROR":{const l=n.errors.filter(d=>d.id!=u);return{...n,errors:l}}case"UPDATE_SELECTED_TAGS":return So(n,d=>{const h=u.tags.map(v=>v.value);return d.selected_tags[u.category]=h,d});case"DELETE_AUTHOR":return So(n,d=>(d.publication.authors.splice(u,1),d));case"DATA_LOADED":return So(n,d=>(d.publication=u.publication,d.form_valid=u.publication.title.trim()!="",d.publication.authors.forEach(h=>{h.affiliation||(h.affiliation="")}),d.publication_types=u.publication_types,d.tag_categories=u.tag_categories,d.projects=u.publication.projects,u.publication.tags.forEach(h=>d.selected_tags[h.label]=h.options.map(v=>v.value)),d.data_loaded=!0,d));case"UPDATE_SHOW_SAVED":return{...n,show_saved:u};case"UPDATE_SAVING":return{...n,saving:u};case"RESET_STATE":return UO;case"SET_FORM_VALID":return{...n,form_valid:u};case"SET_GRANT_NUMBER":return{...n,grant_number:u};case"ADD_PROJECT":return{...n,projects:[...n.projects,u]};default:return n}},H6={catalogs:{},filteredResources:[],filters:[],hasErrors:!1,onRamps:!1,resources:[],resourcesLoaded:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},r0=Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{r($O(!1));let i=[];n.catalogSources?i=n.catalogSources:i.push({...n,catalogLabel:"Default"}),n.onRamps&&i.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const u=await Promise.all(i.map(async l=>{const h=await(await fetch(l.apiUrl)).json();return{...l,data:h}}));r(W6({data:u,params:n})),r($O(!0))});Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{r(Y6(n)),r(Qk())});const U6=n=>{const r=[],i=n.filter(u=>u.features.filter(l=>l.selected).length>0);return n.forEach(u=>{u.features.forEach(l=>{l.selected&&r.push(l.featureId)})}),i.map(u=>({...u,features:u.features.filter(l=>l.selected)}))},$6=n=>{const r={},i={};let u={};return n.forEach(d=>{r[d.catalogLabel]={...d,resourceIds:[],selected:!1,catalogId:d.catalogLabel.replace(/[^(A-z)]/,"")},delete r[d.catalogLabel].data,d.data.forEach(h=>{if(Hw(d.allowedResources,d.excludedResources,h.resourceName)){const{categories:v,formattedResource:y}=G6(d,h,u);i[h.resourceId]=y,r[d.catalogLabel].resourceIds.push(h.resourceId),u=v}})}),{resources:Object.keys(i).map(d=>i[d]),catalogs:r,categories:u}},Hw=(n,r,i)=>!n&&!r||n&&n.length==0&&r&&r.length==0?!0:n&&n.length>0?n.find(u=>u==i):r&&r.length>0?!r.find(u=>u==i):!0,G6=(n,r,i)=>{const u=[];let l="";r.featureCategories.filter(v=>v.categoryIsFilter).forEach(v=>{const y=v.categoryId;v.categoryName=="ACCESS Resource Grouping"?l=v.features[0].name:(!i[y]&&Hw(n.allowedCategories,n.excludedCategories,v.categoryName)&&(i[y]={categoryId:y,categoryName:v.categoryName,categoryDescription:v.categoryDescription,features:{}}),v.features.forEach(C=>{const x={featureId:C.featureId,name:C.name,description:C.description,categoryId:y,selected:!1},R=Hw(n.allowedFilters,n.excludedFilters,x.name);R&&u.push(x),i[y]&&R&&!i[y].features[C.featureId]&&(i[y].features[C.featureId]=x)}))});const d=u.map(v=>v.name).sort((v,y)=>v>y);return{formattedResource:{...r,resourceName:r.resourceName.trim(),features:d,featureIds:u.map(v=>v.featureId),sortCategory:l},categories:i}},qk=D0({name:"resourceCatalog",initialState:H6,reducers:{handleResponse:(n,{payload:r})=>{const i=r.data,{resources:u,catalogs:l,categories:d}=$6(i);n.catalogs=l,n.onRamps=r.params.onRamps;for(const h in d){const v=d[h],y=[];for(const C in v.features)y.push(v.features[C]);n.filters.push({...v,features:y.sort((C,x)=>C.name>x.name)})}n.filters=n.filters.sort((h,v)=>h.categoryName.localeCompare(v.categoryName)),n.resources=u.sort((h,v)=>h.resourceName.localeCompare(v.resourceName)).sort((h,v)=>n.resourceSorting[h.sortCategory]>n.resourceSorting[v.sortCategory]),n.filteredResources=[...n.resources],n.resourcesLoaded=!0},resetFilters:n=>{n.filters.forEach(r=>{r.features.forEach(i=>i.selected=!1)}),n.filteredResources=[...n.resources]},setResourcesLoaded:(n,{payload:r})=>{n.resourcesLoaded=r},toggleCatalog:(n,{payload:r})=>{const{catalog:i,selected:u}=r;n.catalogs[i.catalogLabel].selected=u},toggleFilter:(n,{payload:r})=>{if(r){const h=r,y=n.filters.find(C=>C.categoryId==h.categoryId).features.find(C=>C.featureId==h.featureId);y.selected=!y.selected}const i=U6(n.filters);let u=[];if(i.length>0){const h=i.map(v=>v.features.map(y=>y.featureId));n.resources.forEach(v=>{let y=0;h.forEach(C=>{let x=!1;v.featureIds.forEach(R=>{C.indexOf(R)>=0&&(x=!0)}),x&&(y+=1)}),y>=h.length&&u.push(v)})}else u=n.resources;const l=Object.keys(n.catalogs).map(h=>n.catalogs[h]),d=l.filter(h=>h.selected);if(d.length>0&&d.length<l.length){const h=d.map(v=>v.resourceIds).flat();u=u.filter(v=>h.indexOf(v.resourceId)>=0)}n.filteredResources=u}},extraReducers:n=>{n.addCase(r0.pending,r=>{}).addCase(r0.fulfilled,(r,i)=>{}).addCase(r0.rejected,(r,i)=>{r.hasErrors=!0,console.log(i.error)})}}),{handleResponse:W6,processData:W8,resetFilters:X6,setResourcesLoaded:$O,toggleCatalog:Y6,toggleFilter:Qk}=qk.actions,Kk=n=>n.resourceCatalog.catalogs,Z6=n=>n.resourceCatalog.filters,J6=n=>n.resourceCatalog.hasErrors,q6=n=>n.resourceCatalog.resourcesLoaded,Q6=n=>n.resourceCatalog.filteredResources,K6=qk.reducer,e8="_access_ae3ny_2",t8="_resourceName_ae3ny_6",n8="_description_ae3ny_11",r8="_filterBar_ae3ny_15",a8="_cardBg_ae3ny_21",i8="_active_ae3ny_26",o8="_plainButton_ae3ny_31",s8="_btnSecondary_ae3ny_41",Pp={access:e8,resourceName:t8,description:n8,filterBar:r8,cardBg:a8,active:i8,plainButton:o8,btnSecondary:s8},l8=({resource:n})=>{const[r,i]=M.useState(!0),u=C=>{const x={"CPU Compute":"cpu-fill","GPU Compute":"gpu-card",Cloud:"cloud-fill","Commercial Cloud":"cloud-fill",Storage:"database-fill","Service / Other":"journal","Innovative / Novel Compute":"pc"};return x[C]?b.jsx("i",{title:C,className:`bi bi-${x[C]} me-2 `},`${n.resourceId}_${x[C]}`):""},l=()=>b.jsxs("span",{className:"float-end",children:[n.features.map(C=>u(C)),n.resourceType]}),d=C=>C.length==0?"":b.jsx(b.Fragment,{children:C.map((x,R)=>b.jsx("span",{className:"badge text-bg-secondary me-2",children:x},`feature_${n.resourceId}_${R}`))}),h=()=>{let C=n.resourceDescription;return C&&C!=""?(Pp.plainButton,b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col fw-bold",children:["About ",n.resourceName]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col ",children:[b.jsx("div",{className:Pp.description,dangerouslySetInnerHTML:{__html:C}}),""]})})]})):""},v=()=>n.recommendedUse&&n.recommendedUse!=""?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",children:b.jsx("div",{className:Pp.description,dangerouslySetInnerHTML:{__html:n.recommendedUse}})})})]}):"",y=()=>Pp.cardBg;return b.jsx(b.Fragment,{children:b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"card mb-3",children:[b.jsxs("div",{className:`card-header ${y()}`,children:[b.jsx("span",{className:"",children:n.resourceName}),l()]}),b.jsxs("div",{className:"card-body",children:[b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",children:d(n.features)})}),v(),h()]}),b.jsx("div",{className:"card-footer",children:b.jsxs("a",{target:"_blank",href:n.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",b.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},u8=({filter:n})=>{const r=To(),i=()=>{r(Qk(n))};return b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"form-check",children:[b.jsx("label",{className:"form-check-label",htmlFor:`filter_${n.featureId}`,children:n.name}),b.jsx("input",{className:"form-check-input",type:"checkbox",value:n.featureId,id:`filter_${n.featureId}`,checked:n.selected,onChange:i})]})})})},c8=({category:n})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("div",{className:"fw-bold mb-1 mt-1",children:b.jsx("abbr",{title:n.categoryDescription,children:n.categoryName})}),n.features.map(r=>b.jsx(u8,{filter:r},r.featureId))]})}),f8=()=>{const n=To(),r=dr(Kk),i=dr(Z6),u=i.filter(l=>l.features.filter(d=>d.selected).length>0);return Object.keys(r).map(l=>r[l]),b.jsxs("div",{children:[i.map(l=>b.jsx(c8,{category:l},l.categoryId)),b.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>n(X6()),disabled:u.length==0,children:"Reset Filters"})]})},d8=()=>{const[n,r]=M.useState(!1),i=()=>r(!1),u=()=>r(!0);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:`offcanvas offcanvas-start ${n?"show":""}`,tabIndex:"-1",id:"offcanvas","aria-labelledby":"offcanvasLabel",children:[b.jsxs("div",{className:"offcanvas-header",children:[b.jsx("h5",{className:"offcanvas-title",id:"offcanvasLabel",children:"Filters"}),b.jsx("button",{type:"button",className:"btn-close",onClick:i,"aria-label":"Close"})]}),b.jsx("div",{className:"offcanvas-body",children:b.jsx(f8,{})})]}),b.jsx("div",{className:"row mb-2",children:b.jsx("div",{className:"col pt-2 pb-2",children:b.jsx("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:b.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:u,children:[b.jsx("i",{className:"bi bi-filter"})," Filters"]})})})})]})},p8=()=>{const n=dr(Q6);return n.length==0?b.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):b.jsx("div",{className:"card shadow",children:b.jsxs("div",{className:"card-body",children:[b.jsx(d8,{}),n.map(r=>b.jsx(l8,{resource:r},r.resourceId))]})})},v8=({baseUrl:n})=>b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col d-flex",children:b.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${n}/access_logo.png`})})}),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),b.jsx("p",{children:"Need advanced computing and storage options for your research or classroom? The ACCESS program has been established and funded by the U.S. National Science Foundation to help you - the nation's researchers and educators - to use some of the country's most advanced computing systems and services - at no cost to you."}),b.jsx("p",{children:"Thousands of researchers, instructors, and students from institutions large and small use ACCESS-integrated resources every year. With more than 30 resources from more than 15 resource providers, there's bound to be a resource for you, your lab, or your class."}),b.jsx("p",{children:"Explore the resource catalog below - filter the list to discover the resources that have the features or services to accelerate your activities. The System Info button will take you to the resource's documentation for all the details."}),b.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),b.jsx("p",{children:b.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${Pp.btnSecondary}`,children:["Get Your First Project ",b.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),b.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",b.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",b.jsx("br",{}),"If you have questions, please use the",b.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" ACCESS Help Request Form"}),"."]})]})})]}),h8=({catalogSources:n=[],onRamps:r=!1,baseUrl:i})=>{const u=To(),l=dr(q6),d=dr(J6),h=dr(Kk),v=Object.keys(h).map(C=>h[C]);M.useEffect(()=>{u(r0({catalogSources:n,onRamps:r}))},[]);const y=()=>r&&v.length>1?b.jsx(b.Fragment,{children:v.filter(C=>C.catalogLabel!="ACCESS").map((C,x)=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsxs("h4",{className:"border-bottom",children:["About ",C.catalogLabel]}),b.jsx("div",{dangerouslySetInnerHTML:{__html:C.description}})]})},`catalog_${x}`))}):"";return d?b.jsx("div",{className:"row",children:b.jsx("div",{className:"col text-center mt-2",children:b.jsx("h4",{children:"Unable to Load Resources"})})}):l?b.jsxs("div",{className:`container mt-3 ${Pp.access}`,children:[r?b.jsx(v8,{baseUrl:i}):"",y(),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsx(p8,{})})})]}):b.jsx(Mm,{})},m8={filters:[],resources:[],filteredResources:[],resourcesLoaded:!1,hasErrors:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},a0=Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{const u=await(await fetch(n.apiUrl)).json();r(y8({data:u,params:n}))}),g8=n=>{const r=[],i=n.filter(u=>u.features.filter(l=>l.selected).length>0);return n.forEach(u=>{u.features.forEach(l=>{l.selected&&r.push(l.featureId)})}),i.map(u=>({...u,features:u.features.filter(l=>l.selected)}))},GO=(n,r,i)=>{if(n.length==0&&r.length==0)return!0;if(n.length>0)return n.find(u=>u==i);if(r.length>0)return!r.find(u=>u==i)},eM=D0({name:"resourceCatalog",initialState:m8,reducers:{handleResponse:(n,{payload:r})=>{const i=r.data,u=r.params.excludedCategories,l=r.params.excludedFilters,d=r.params.excludedResources,h=r.params.allowedCategories,v=r.params.allowedFilters,y=[],C={};i.filter(x=>!d.includes(x.resourceName)).forEach(x=>{const R=[];let T="";x.featureCategories.filter(N=>N.categoryIsFilter).forEach(N=>{const O=N.categoryId;N.categoryName=="ACCESS Resource Grouping"?T=N.features[0].name:(!C[O]&&GO(h,u,N.categoryName)&&(C[O]={categoryId:O,categoryName:N.categoryName,categoryDescription:N.categoryDescription,features:{}}),N.features.forEach(_=>{const L={featureId:_.featureId,name:_.name,description:_.description,categoryId:O,selected:!1},F=GO(v,l,L.name);F&&R.push(L),C[O]&&F&&!C[O].features[_.featureId]&&(C[O].features[_.featureId]=L)}))});const j={resourceName:x.resourceName,resourceId:x.resourceId,resourceType:x.resourceType,organization:x.organization,units:x.units,userGuideUrl:x.userGuideUrl,resourceDescription:x.resourceDescription,description:x.description,recommendedUse:x.recommendedUse,features:R.map(N=>N.name).sort((N,O)=>N>O),featureIds:R.map(N=>N.featureId),sortCategory:T};y.push(j)});for(const x in C){const R=C[x],T=[];for(const j in R.features)T.push(R.features[j]);n.filters.push({...R,features:T.sort((j,N)=>j.name>N.name)})}n.filters=n.filters.sort((x,R)=>x.categoryName.localeCompare(R.categoryName)),n.resources=y.sort((x,R)=>x.resourceName.localeCompare(R.resourceName)).sort((x,R)=>n.resourceSorting[x.sortCategory]>n.resourceSorting[R.sortCategory]),n.filteredResources=[...n.resources],n.resourcesLoaded=!0},resetFilters:n=>{n.filters.forEach(r=>{r.features.forEach(i=>i.selected=!1)}),n.filteredResources=[...n.resources]},toggleFilter:(n,{payload:r})=>{const i=r,l=n.filters.find(h=>h.categoryId==i.categoryId).features.find(h=>h.featureId==i.featureId);l.selected=!l.selected;const d=g8(n.filters);if(d.length>0){const h=[],v=d.map(y=>y.features.map(C=>C.featureId));n.resources.forEach(y=>{let C=0;v.forEach(x=>{let R=!1;y.featureIds.forEach(T=>{x.indexOf(T)>=0&&(R=!0)}),R&&(C+=1)}),C>=v.length&&h.push(y)}),n.filteredResources=h}else n.filteredResources=[...n.resources]}},extraReducers:n=>{n.addCase(a0.pending,r=>{}).addCase(a0.fulfilled,(r,i)=>{}).addCase(a0.rejected,(r,i)=>{r.hasErrors=!0,console.log(i.error)})}}),{handleResponse:y8,processData:X8,resetFilters:b8,toggleFilter:C8}=eM.actions,x8=n=>n.resourceCatalog.hasErrors,S8=n=>n.resourceCatalog.resourcesLoaded,E8=n=>n.resourceCatalog.filters,w8=n=>n.resourceCatalog.filteredResources,R8=eM.reducer,T8=({resource:n})=>{const r=u=>u.length==0?"":b.jsx("ul",{children:u.map((l,d)=>b.jsx("li",{children:l},`feature_${n.resourceId}_${d}`))}),i=(u,l)=>l&&l!=""?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col fw-bold",children:u})}),b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:l}})})]}):"";return b.jsxs(os.Item,{eventKey:n.resourceId,children:[b.jsx(os.Header,{children:n.resourceName}),b.jsxs(os.Body,{children:[b.jsx("table",{className:"table",children:b.jsxs("tbody",{children:[b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Resource Type:"}),b.jsx("td",{children:n.resourceType})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Organization:"}),b.jsx("td",{children:n.organization})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Units:"}),b.jsx("td",{children:n.units})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"User Guide:"}),b.jsx("td",{children:n.userGuideUrl==""?"":b.jsx("a",{href:n.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Features Available:"}),b.jsx("td",{children:r(n.features)})]})]})}),i("Resource Description",n.resourceDescription),i("Allocations Description",n.description),i("Recommended Use",n.recommendedUse)]})]})},I8=()=>{const n=dr(w8);return n.length==0?b.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):b.jsxs("div",{children:[b.jsx("h4",{className:"mb-0",children:"Resources"}),b.jsx(os,{children:n.map(r=>b.jsx(T8,{resource:r},r.resourceId))})]})},N8=({filter:n})=>{const r=To(),i=()=>{r(C8(n))};return b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"form-check",children:[b.jsx("label",{className:"form-check-label",htmlFor:`filter_${n.featureId}`,children:n.name}),b.jsx("input",{className:"form-check-input",type:"checkbox",value:n.featureId,id:`filter_${n.featureId}`,checked:n.selected,onChange:i})]})})})},_8=({category:n})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("div",{className:"fw-bold mb-1 mt-1",children:b.jsx("abbr",{title:n.categoryDescription,children:n.categoryName})}),n.features.map(r=>b.jsx(N8,{filter:r},r.featureId))]})}),O8=()=>{const n=To(),r=dr(E8),i=r.filter(u=>u.features.filter(l=>l.selected).length>0);return b.jsxs("div",{children:[b.jsx("h4",{className:"mb-0",children:"Filters"}),r.map(u=>b.jsx(_8,{category:u},u.categoryId)),b.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>n(b8()),disabled:i.length==0,children:"Reset Filters"})]})},A8=({apiUrl:n,excludedCategories:r=[],excludedFilters:i=[],excludedResources:u=[],allowedCategories:l=[],allowedFilters:d=[]})=>{const h=To(),v=dr(S8),y=dr(x8);return M.useEffect(()=>{h(a0({apiUrl:n,excludedCategories:r,excludedFilters:i,excludedResources:u,allowedCategories:l,allowedFilters:d}))},[]),y?b.jsx("div",{className:"row",children:b.jsx("div",{className:"col text-center mt-2",children:b.jsx("h4",{children:"Unable to Load Resources"})})}):v?b.jsx(b.Fragment,{children:b.jsxs("div",{className:"row mt-3",children:[b.jsx("div",{className:"col-sm-4",children:b.jsx(O8,{})}),b.jsx("div",{className:"col-sm-8",children:b.jsx(I8,{})})]})}):b.jsx(Mm,{})};function j8(n,{bootstrapFonts:r=!0,bootstrapVariables:i=!0,access:u=!1,baseUrl:l=null}={}){const d=n.attachShadow({mode:"open"}),h=document.createElement("div"),v=document.createElement("div"),y=document.createElement("div"),C=document.createElement("div"),x=document.createElement("link"),R=document.createElement("link"),T=document.createElement("link");return l=l??(typeof document>"u"?require("url").pathToFileURL(__filename).href:IN&&IN.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),x.rel="stylesheet",x.href=`${l}/bootstrap.css`,R.rel="stylesheet",R.href=`${l}/xras-ui.css`,T.rel="stylesheet",T.href=`${l}/access.css`,y.appendChild(C),v.appendChild(y),h.appendChild(v),d.appendChild(x),d.appendChild(R),d.appendChild(T),d.appendChild(h),h.classList.add("bootstrap"),i&&v.classList.add("bootstrap-variables"),r&&(y.classList.add("bootstrap-fonts"),y.setAttribute("data-bs-theme","light")),C}function D8({target:n}){ls.createRoot(n).render(b.jsx(zU,{}))}function k8({target:n,username:r,routes:i}){i&&(Nn.routes=i);const u=Om({reducer:{api:g$}});ls.createRoot(n).render(b.jsx(Qp,{store:u,children:b.jsx(uZ,{username:r})}))}function M8({target:n,apiUrl:r}){const i=Om({reducer:{projectsBrowser:SZ},preloadedState:{projectsBrowser:{...Lk,apiUrl:r}}});ls.createRoot(n).render(b.jsx(Qp,{store:i,children:b.jsx(TZ,{})}))}function tM(){return Om({reducer:{publications_store:z6}})}function L8({target:n,routes:r}){r&&(vc.routes=r),ls.createRoot(n).render(b.jsx(Qp,{store:tM(),children:b.jsx(Jk,{})}))}function P8({target:n,routes:r}){r&&(vc.routes=r),ls.createRoot(n).render(b.jsx(Qp,{store:tM(),children:b.jsx(F6,{...JSON.parse(n.dataset.publicationsSelectProps)})}))}function F8({target:n,catalogSources:r,onRamps:i,baseUrl:u}){const l=Om({reducer:{resourceCatalog:K6}});ls.createRoot(n).render(b.jsx(Qp,{store:l,children:b.jsx(h8,{catalogSources:r,onRamps:i,baseUrl:u})}))}function V8({target:n,apiUrl:r,excludedCategories:i,excludedFilters:u,excludedResources:l,allowedCategories:d,allowedFilters:h}){const v=Om({reducer:{resourceCatalog:R8}});ls.createRoot(n).render(b.jsx(Qp,{store:v,children:b.jsx(A8,{apiUrl:r,excludedCategories:i,excludedFilters:u,excludedResources:l,allowedCategories:d,allowedFilters:h})}))}exports.allocationsMap=D8;exports.onRampsResourceCatalog=F8;exports.projects=k8;exports.projectsBrowser=M8;exports.publications=L8;exports.publicationsSelect=P8;exports.resourceCatalog=V8;exports.shadowTarget=j8;
309
+ `]))),vX=function(r,i){var u=r.isFocused,l=r.size,d=r.theme,h=d.colors,v=d.spacing.baseUnit;return yt({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:l,lineHeight:1,marginRight:l,textAlign:"center",verticalAlign:"middle"},i?{}:{color:u?h.neutral60:h.neutral20,padding:v*2})},WE=function(r){var i=r.delay,u=r.offset;return Et("span",{css:PR({animation:"".concat(pX," 1s ease-in-out ").concat(i,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:u?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},Lw.NODE_ENV==="production"?"":";label:LoadingDot;",Lw.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJ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IEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},hX=function(r){var i=r.innerProps,u=r.isRtl,l=r.size,d=l===void 0?4:l,h=nl(r,aX);return Et("div",Rt({},yr(yt(yt({},h),{},{innerProps:i,isRtl:u,size:d}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),i),Et(WE,{delay:0,offset:u}),Et(WE,{delay:160,offset:!0}),Et(WE,{delay:320,offset:!u}))},mX=function(r,i){var u=r.isDisabled,l=r.isFocused,d=r.theme,h=d.colors,v=d.borderRadius,y=d.spacing;return yt({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:y.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},i?{}:{backgroundColor:u?h.neutral5:h.neutral0,borderColor:u?h.neutral10:l?h.primary:h.neutral20,borderRadius:v,borderStyle:"solid",borderWidth:1,boxShadow:l?"0 0 0 1px ".concat(h.primary):void 0,"&:hover":{borderColor:l?h.primary:h.neutral30}})},gX=function(r){var i=r.children,u=r.isDisabled,l=r.isFocused,d=r.innerRef,h=r.innerProps,v=r.menuIsOpen;return Et("div",Rt({ref:d},yr(r,"control",{control:!0,"control--is-disabled":u,"control--is-focused":l,"control--menu-is-open":v}),h,{"aria-disabled":u||void 0}),i)},yX=gX,bX=["data"],CX=function(r,i){var u=r.theme.spacing;return i?{}:{paddingBottom:u.baseUnit*2,paddingTop:u.baseUnit*2}},xX=function(r){var i=r.children,u=r.cx,l=r.getStyles,d=r.getClassNames,h=r.Heading,v=r.headingProps,y=r.innerProps,C=r.label,x=r.theme,R=r.selectProps;return Et("div",Rt({},yr(r,"group",{group:!0}),y),Et(h,Rt({},v,{selectProps:R,theme:x,getStyles:l,getClassNames:d,cx:u}),C),Et("div",null,i))},SX=function(r,i){var u=r.theme,l=u.colors,d=u.spacing;return yt({label:"group",cursor:"default",display:"block"},i?{}:{color:l.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:d.baseUnit*3,paddingRight:d.baseUnit*3,textTransform:"uppercase"})},EX=function(r){var i=vk(r);i.data;var u=nl(i,bX);return Et("div",Rt({},yr(r,"groupHeading",{"group-heading":!0}),u))},wX=xX,RX=["innerRef","isDisabled","isHidden","inputClassName"],TX=function(r,i){var u=r.isDisabled,l=r.value,d=r.theme,h=d.spacing,v=d.colors;return yt(yt({visibility:u?"hidden":"visible",transform:l?"translateZ(0)":""},IX),i?{}:{margin:h.baseUnit/2,paddingBottom:h.baseUnit/2,paddingTop:h.baseUnit/2,color:v.neutral80})},Ek={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IX={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":yt({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ek)},NX=function(r){return yt({label:"input",color:"inherit",background:0,opacity:r?0:1,width:"100%"},Ek)},_X=function(r){var i=r.cx,u=r.value,l=vk(r),d=l.innerRef,h=l.isDisabled,v=l.isHidden,y=l.inputClassName,C=nl(l,RX);return Et("div",Rt({},yr(r,"input",{"input-container":!0}),{"data-value":u||""}),Et("input",Rt({className:i({input:!0},y),ref:d,style:NX(v),disabled:h},C)))},OX=_X,AX=function(r,i){var u=r.theme,l=u.spacing,d=u.borderRadius,h=u.colors;return yt({label:"multiValue",display:"flex",minWidth:0},i?{}:{backgroundColor:h.neutral10,borderRadius:d/2,margin:l.baseUnit/2})},jX=function(r,i){var u=r.theme,l=u.borderRadius,d=u.colors,h=r.cropWithEllipsis;return yt({overflow:"hidden",textOverflow:h||h===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},i?{}:{borderRadius:l/2,color:d.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},DX=function(r,i){var u=r.theme,l=u.spacing,d=u.borderRadius,h=u.colors,v=r.isFocused;return yt({alignItems:"center",display:"flex"},i?{}:{borderRadius:d/2,backgroundColor:v?h.dangerLight:void 0,paddingLeft:l.baseUnit,paddingRight:l.baseUnit,":hover":{backgroundColor:h.dangerLight,color:h.danger}})},wk=function(r){var i=r.children,u=r.innerProps;return Et("div",u,i)},kX=wk,MX=wk;function LX(n){var r=n.children,i=n.innerProps;return Et("div",Rt({role:"button"},i),r||Et(zR,{size:14}))}var PX=function(r){var i=r.children,u=r.components,l=r.data,d=r.innerProps,h=r.isDisabled,v=r.removeProps,y=r.selectProps,C=u.Container,x=u.Label,R=u.Remove;return Et(C,{data:l,innerProps:yt(yt({},yr(r,"multiValue",{"multi-value":!0,"multi-value--is-disabled":h})),d),selectProps:y},Et(x,{data:l,innerProps:yt({},yr(r,"multiValueLabel",{"multi-value__label":!0})),selectProps:y},i),Et(R,{data:l,innerProps:yt(yt({},yr(r,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(i||"option")},v),selectProps:y}))},FX=PX,VX=function(r,i){var u=r.isDisabled,l=r.isFocused,d=r.isSelected,h=r.theme,v=h.spacing,y=h.colors;return yt({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},i?{}:{backgroundColor:d?y.primary:l?y.primary25:"transparent",color:u?y.neutral20:d?y.neutral0:"inherit",padding:"".concat(v.baseUnit*2,"px ").concat(v.baseUnit*3,"px"),":active":{backgroundColor:u?void 0:d?y.primary:y.primary50}})},BX=function(r){var i=r.children,u=r.isDisabled,l=r.isFocused,d=r.isSelected,h=r.innerRef,v=r.innerProps;return Et("div",Rt({},yr(r,"option",{option:!0,"option--is-disabled":u,"option--is-focused":l,"option--is-selected":d}),{ref:h,"aria-disabled":u},v),i)},zX=BX,HX=function(r,i){var u=r.theme,l=u.spacing,d=u.colors;return yt({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},i?{}:{color:d.neutral50,marginLeft:l.baseUnit/2,marginRight:l.baseUnit/2})},UX=function(r){var i=r.children,u=r.innerProps;return Et("div",Rt({},yr(r,"placeholder",{placeholder:!0}),u),i)},$X=UX,GX=function(r,i){var u=r.isDisabled,l=r.theme,d=l.spacing,h=l.colors;return yt({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},i?{}:{color:u?h.neutral40:h.neutral80,marginLeft:d.baseUnit/2,marginRight:d.baseUnit/2})},WX=function(r){var i=r.children,u=r.isDisabled,l=r.innerProps;return Et("div",Rt({},yr(r,"singleValue",{"single-value":!0,"single-value--is-disabled":u}),l),i)},XX=WX,YX={ClearIndicator:cX,Control:yX,DropdownIndicator:lX,DownChevron:xk,CrossIcon:zR,Group:wX,GroupHeading:EX,IndicatorsContainer:nX,IndicatorSeparator:dX,Input:OX,LoadingIndicator:hX,Menu:H5,MenuList:$5,MenuPortal:J5,LoadingMessage:Y5,NoOptionsMessage:X5,MultiValue:FX,MultiValueContainer:kX,MultiValueLabel:MX,MultiValueRemove:LX,Option:zX,Placeholder:$X,SelectContainer:Q5,SingleValue:XX,ValueContainer:eX},ZX=function(r){return yt(yt({},YX),r.components)},wO=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function JX(n,r){return!!(n===r||wO(n)&&wO(r))}function qX(n,r){if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!JX(n[i],r[i]))return!1;return!0}function QX(n,r){r===void 0&&(r=qX);var i=null;function u(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];if(i&&i.lastThis===this&&r(l,i.lastArgs))return i.lastResult;var h=n.apply(this,l);return i={lastResult:h,lastArgs:l,lastThis:this},h}return u.clear=function(){i=null},u}var Tm={};function KX(){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)."}var eY=Tm.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:KX},tY=function(r){return Et("span",Rt({css:eY},r))},RO=tY,nY={guidance:function(r){var i=r.isSearchable,u=r.isMulti,l=r.tabSelectsValue,d=r.context,h=r.isInitialFocus;switch(d){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(l?", press Tab to select the option and exit the menu":"",".");case"input":return h?"".concat(r["aria-label"]||"Select"," is focused ").concat(i?",type to refine list":"",", press Down to open the menu, ").concat(u?" 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(r){var i=r.action,u=r.label,l=u===void 0?"":u,d=r.labels,h=r.isDisabled;switch(i){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(l,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(d.length>1?"s":""," ").concat(d.join(","),", selected.");case"select-option":return h?"option ".concat(l," is disabled. Select another option."):"option ".concat(l,", selected.");default:return""}},onFocus:function(r){var i=r.context,u=r.focused,l=r.options,d=r.label,h=d===void 0?"":d,v=r.selectValue,y=r.isDisabled,C=r.isSelected,x=r.isAppleDevice,R=function(O,_){return O&&O.length?"".concat(O.indexOf(_)+1," of ").concat(O.length):""};if(i==="value"&&v)return"value ".concat(h," focused, ").concat(R(v,u),".");if(i==="menu"&&x){var T=y?" disabled":"",j="".concat(C?" selected":"").concat(T);return"".concat(h).concat(j,", ").concat(R(l,u),".")}return""},onFilter:function(r){var i=r.inputValue,u=r.resultsMessage;return"".concat(u).concat(i?" for search term "+i:"",".")}},rY=function(r){var i=r.ariaSelection,u=r.focusedOption,l=r.focusedValue,d=r.focusableOptions,h=r.isFocused,v=r.selectValue,y=r.selectProps,C=r.id,x=r.isAppleDevice,R=y.ariaLiveMessages,T=y.getOptionLabel,j=y.inputValue,N=y.isMulti,O=y.isOptionDisabled,_=y.isSearchable,L=y.menuIsOpen,F=y.options,V=y.screenReaderStatus,H=y.tabSelectsValue,z=y.isLoading,U=y["aria-label"],J=y["aria-live"],q=M.useMemo(function(){return yt(yt({},nY),R||{})},[R]),Re=M.useMemo(function(){var xe="";if(i&&q.onChange){var je=i.option,Le=i.options,ne=i.removedValue,_e=i.removedValues,G=i.value,Y=function(we){return Array.isArray(we)?null:we},re=ne||je||Y(G),ye=re?T(re):"",Se=Le||_e||void 0,Ne=Se?Se.map(T):[],le=yt({isDisabled:re&&O(re,v),label:ye,labels:Ne},i);xe=q.onChange(le)}return xe},[i,q,O,v,T]),he=M.useMemo(function(){var xe="",je=u||l,Le=!!(u&&v&&v.includes(u));if(je&&q.onFocus){var ne={focused:je,label:T(je),isDisabled:O(je,v),isSelected:Le,options:d,context:je===u?"menu":"value",selectValue:v,isAppleDevice:x};xe=q.onFocus(ne)}return xe},[u,l,T,O,q,d,v,x]),ge=M.useMemo(function(){var xe="";if(L&&F.length&&!z&&q.onFilter){var je=V({count:d.length});xe=q.onFilter({inputValue:j,resultsMessage:je})}return xe},[d,j,L,q,F,V,z]),fe=(i==null?void 0:i.action)==="initial-input-focus",Oe=M.useMemo(function(){var xe="";if(q.guidance){var je=l?"value":L?"menu":"input";xe=q.guidance({"aria-label":U,context:je,isDisabled:u&&O(u,v),isMulti:N,isSearchable:_,tabSelectsValue:H,isInitialFocus:fe})}return xe},[U,u,l,N,O,_,L,q,v,H,fe]),Te=Et(M.Fragment,null,Et("span",{id:"aria-selection"},Re),Et("span",{id:"aria-focused"},he),Et("span",{id:"aria-results"},ge),Et("span",{id:"aria-guidance"},Oe));return Et(M.Fragment,null,Et(RO,{id:C},fe&&Te),Et(RO,{"aria-live":J,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},h&&!fe&&Te))},aY=rY,Pw=[{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źẑżžẓẕƶȥɀⱬꝣ"}],iY=new RegExp("["+Pw.map(function(n){return n.letters}).join("")+"]","g"),Rk={};for(var XE=0;XE<Pw.length;XE++)for(var YE=Pw[XE],ZE=0;ZE<YE.letters.length;ZE++)Rk[YE.letters[ZE]]=YE.base;var Tk=function(r){return r.replace(iY,function(i){return Rk[i]})},oY=QX(Tk),TO=function(r){return r.replace(/^\s+|\s+$/g,"")},sY=function(r){return"".concat(r.label," ").concat(r.value)},lY=function(r){return function(i,u){if(i.data.__isNew__)return!0;var l=yt({ignoreCase:!0,ignoreAccents:!0,stringify:sY,trim:!0,matchFrom:"any"},r),d=l.ignoreCase,h=l.ignoreAccents,v=l.stringify,y=l.trim,C=l.matchFrom,x=y?TO(u):u,R=y?TO(v(i)):v(i);return d&&(x=x.toLowerCase(),R=R.toLowerCase()),h&&(x=oY(x),R=Tk(R)),C==="start"?R.substr(0,x.length)===x:R.indexOf(x)>-1}},uY=["innerRef"];function cY(n){var r=n.innerRef,i=nl(n,uY),u=k5(i,"onExited","in","enter","exit","appear");return Et("input",Rt({ref:r},u,{css:PR({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)"},Tm.NODE_ENV==="production"?"":";label:DummyInput;",Tm.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHs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dyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var fY=function(r){r.cancelable&&r.preventDefault(),r.stopPropagation()};function dY(n){var r=n.isEnabled,i=n.onBottomArrive,u=n.onBottomLeave,l=n.onTopArrive,d=n.onTopLeave,h=M.useRef(!1),v=M.useRef(!1),y=M.useRef(0),C=M.useRef(null),x=M.useCallback(function(_,L){if(C.current!==null){var F=C.current,V=F.scrollTop,H=F.scrollHeight,z=F.clientHeight,U=C.current,J=L>0,q=H-z-V,Re=!1;q>L&&h.current&&(u&&u(_),h.current=!1),J&&v.current&&(d&&d(_),v.current=!1),J&&L>q?(i&&!h.current&&i(_),U.scrollTop=H,Re=!0,h.current=!0):!J&&-L>V&&(l&&!v.current&&l(_),U.scrollTop=0,Re=!0,v.current=!0),Re&&fY(_)}},[i,u,l,d]),R=M.useCallback(function(_){x(_,_.deltaY)},[x]),T=M.useCallback(function(_){y.current=_.changedTouches[0].clientY},[]),j=M.useCallback(function(_){var L=y.current-_.changedTouches[0].clientY;x(_,L)},[x]),N=M.useCallback(function(_){if(_){var L=A5?{passive:!1}:!1;_.addEventListener("wheel",R,L),_.addEventListener("touchstart",T,L),_.addEventListener("touchmove",j,L)}},[j,T,R]),O=M.useCallback(function(_){_&&(_.removeEventListener("wheel",R,!1),_.removeEventListener("touchstart",T,!1),_.removeEventListener("touchmove",j,!1))},[j,T,R]);return M.useEffect(function(){if(r){var _=C.current;return N(_),function(){O(_)}}},[r,N,O]),function(_){C.current=_}}var IO=["boxSizing","height","overflow","paddingRight","position"],NO={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function _O(n){n.preventDefault()}function OO(n){n.stopPropagation()}function AO(){var n=this.scrollTop,r=this.scrollHeight,i=n+this.offsetHeight;n===0?this.scrollTop=1:i===r&&(this.scrollTop=n-1)}function jO(){return"ontouchstart"in window||navigator.maxTouchPoints}var DO=!!(typeof window<"u"&&window.document&&window.document.createElement),lm=0,Mp={capture:!1,passive:!1};function pY(n){var r=n.isEnabled,i=n.accountForScrollbars,u=i===void 0?!0:i,l=M.useRef({}),d=M.useRef(null),h=M.useCallback(function(y){if(DO){var C=document.body,x=C&&C.style;if(u&&IO.forEach(function(N){var O=x&&x[N];l.current[N]=O}),u&&lm<1){var R=parseInt(l.current.paddingRight,10)||0,T=document.body?document.body.clientWidth:0,j=window.innerWidth-T+R||0;Object.keys(NO).forEach(function(N){var O=NO[N];x&&(x[N]=O)}),x&&(x.paddingRight="".concat(j,"px"))}C&&jO()&&(C.addEventListener("touchmove",_O,Mp),y&&(y.addEventListener("touchstart",AO,Mp),y.addEventListener("touchmove",OO,Mp))),lm+=1}},[u]),v=M.useCallback(function(y){if(DO){var C=document.body,x=C&&C.style;lm=Math.max(lm-1,0),u&&lm<1&&IO.forEach(function(R){var T=l.current[R];x&&(x[R]=T)}),C&&jO()&&(C.removeEventListener("touchmove",_O,Mp),y&&(y.removeEventListener("touchstart",AO,Mp),y.removeEventListener("touchmove",OO,Mp)))}},[u]);return M.useEffect(function(){if(r){var y=d.current;return h(y),function(){v(y)}}},[r,h,v]),function(y){d.current=y}}function vY(){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)."}var hY=function(r){var i=r.target;return i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()},mY=Tm.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+IHZvaWQ7XG4gIHJlYW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b25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:vY};function gY(n){var r=n.children,i=n.lockEnabled,u=n.captureEnabled,l=u===void 0?!0:u,d=n.onBottomArrive,h=n.onBottomLeave,v=n.onTopArrive,y=n.onTopLeave,C=dY({isEnabled:l,onBottomArrive:d,onBottomLeave:h,onTopArrive:v,onTopLeave:y}),x=pY({isEnabled:i}),R=function(j){C(j),x(j)};return Et(M.Fragment,null,i&&Et("div",{onClick:hY,css:mY}),r(R))}function yY(){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)."}var bY=Tm.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,eyJ2ZXJz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XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:yY},CY=function(r){var i=r.name,u=r.onFocus;return Et("input",{required:!0,name:i,tabIndex:-1,"aria-hidden":"true",onFocus:u,css:bY,value:"",onChange:function(){}})},xY=CY;function HR(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function SY(){return HR(/^iPhone/i)}function Ik(){return HR(/^Mac/i)}function EY(){return HR(/^iPad/i)||Ik()&&navigator.maxTouchPoints>1}function wY(){return SY()||EY()}function RY(){return Ik()||wY()}var TY=function(r){return r.label},IY=function(r){return r.label},NY=function(r){return r.value},_Y=function(r){return!!r.isDisabled},OY={clearIndicator:uX,container:q5,control:mX,dropdownIndicator:sX,group:CX,groupHeading:SX,indicatorsContainer:tX,indicatorSeparator:fX,input:TX,loadingIndicator:vX,loadingMessage:W5,menu:V5,menuList:U5,menuPortal:Z5,multiValue:AX,multiValueLabel:jX,multiValueRemove:DX,noOptionsMessage:G5,option:VX,placeholder:HX,singleValue:GX,valueContainer:K5},AY={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%)"},jY=4,Nk=4,DY=38,kY=Nk*2,MY={baseUnit:Nk,controlHeight:DY,menuGutter:kY},JE={borderRadius:jY,colors:AY,spacing:MY},LY={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:SO(),captureMenuScroll:!SO(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:lY(),formatGroupLabel:TY,getOptionLabel:IY,getOptionValue:NY,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:_Y,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!_5(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(r){var i=r.count;return"".concat(i," result").concat(i!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function kO(n,r,i,u){var l=Ak(n,r,i),d=jk(n,r,i),h=Ok(n,r),v=N0(n,r);return{type:"option",data:r,isDisabled:l,isSelected:d,label:h,value:v,index:u}}function n0(n,r){return n.options.map(function(i,u){if("options"in i){var l=i.options.map(function(h,v){return kO(n,h,r,v)}).filter(function(h){return LO(n,h)});return l.length>0?{type:"group",data:i,options:l,index:u}:void 0}var d=kO(n,i,r,u);return LO(n,d)?d:void 0}).filter(j5)}function _k(n){return n.reduce(function(r,i){return i.type==="group"?r.push.apply(r,TR(i.options.map(function(u){return u.data}))):r.push(i.data),r},[])}function MO(n,r){return n.reduce(function(i,u){return u.type==="group"?i.push.apply(i,TR(u.options.map(function(l){return{data:l.data,id:"".concat(r,"-").concat(u.index,"-").concat(l.index)}}))):i.push({data:u.data,id:"".concat(r,"-").concat(u.index)}),i},[])}function PY(n,r){return _k(n0(n,r))}function LO(n,r){var i=n.inputValue,u=i===void 0?"":i,l=r.data,d=r.isSelected,h=r.label,v=r.value;return(!kk(n)||!d)&&Dk(n,{label:h,value:v,data:l},u)}function FY(n,r){var i=n.focusedValue,u=n.selectValue,l=u.indexOf(i);if(l>-1){var d=r.indexOf(i);if(d>-1)return i;if(l<r.length)return r[l]}return null}function VY(n,r){var i=n.focusedOption;return i&&r.indexOf(i)>-1?i:r[0]}var qE=function(r,i){var u,l=(u=r.find(function(d){return d.data===i}))===null||u===void 0?void 0:u.id;return l||null},Ok=function(r,i){return r.getOptionLabel(i)},N0=function(r,i){return r.getOptionValue(i)};function Ak(n,r,i){return typeof n.isOptionDisabled=="function"?n.isOptionDisabled(r,i):!1}function jk(n,r,i){if(i.indexOf(r)>-1)return!0;if(typeof n.isOptionSelected=="function")return n.isOptionSelected(r,i);var u=N0(n,r);return i.some(function(l){return N0(n,l)===u})}function Dk(n,r,i){return n.filterOption?n.filterOption(r,i):!0}var kk=function(r){var i=r.hideSelectedOptions,u=r.isMulti;return i===void 0?u:i},BY=1,UR=function(n){G4(i,n);var r=Y4(i);function i(u){var l;if(U4(this,i),l=r.call(this,u),l.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:""},l.blockOptionHover=!1,l.isComposing=!1,l.commonProps=void 0,l.initialTouchX=0,l.initialTouchY=0,l.openAfterFocus=!1,l.scrollToFocusedOptionOnUpdate=!1,l.userIsDragging=void 0,l.isAppleDevice=RY(),l.controlRef=null,l.getControlRef=function(y){l.controlRef=y},l.focusedOptionRef=null,l.getFocusedOptionRef=function(y){l.focusedOptionRef=y},l.menuListRef=null,l.getMenuListRef=function(y){l.menuListRef=y},l.inputRef=null,l.getInputRef=function(y){l.inputRef=y},l.focus=l.focusInput,l.blur=l.blurInput,l.onChange=function(y,C){var x=l.props,R=x.onChange,T=x.name;C.name=T,l.ariaOnChange(y,C),R(y,C)},l.setValue=function(y,C,x){var R=l.props,T=R.closeMenuOnSelect,j=R.isMulti,N=R.inputValue;l.onInputChange("",{action:"set-value",prevInputValue:N}),T&&(l.setState({inputIsHiddenAfterUpdate:!j}),l.onMenuClose()),l.setState({clearFocusValueOnUpdate:!0}),l.onChange(y,{action:C,option:x})},l.selectOption=function(y){var C=l.props,x=C.blurInputOnSelect,R=C.isMulti,T=C.name,j=l.state.selectValue,N=R&&l.isOptionSelected(y,j),O=l.isOptionDisabled(y,j);if(N){var _=l.getOptionValue(y);l.setValue(j.filter(function(L){return l.getOptionValue(L)!==_}),"deselect-option",y)}else if(!O)R?l.setValue([].concat(TR(j),[y]),"select-option",y):l.setValue(y,"select-option");else{l.ariaOnChange(y,{action:"select-option",option:y,name:T});return}x&&l.blurInput()},l.removeValue=function(y){var C=l.props.isMulti,x=l.state.selectValue,R=l.getOptionValue(y),T=x.filter(function(N){return l.getOptionValue(N)!==R}),j=Ub(C,T,T[0]||null);l.onChange(j,{action:"remove-value",removedValue:y}),l.focusInput()},l.clearValue=function(){var y=l.state.selectValue;l.onChange(Ub(l.props.isMulti,[],null),{action:"clear",removedValues:y})},l.popValue=function(){var y=l.props.isMulti,C=l.state.selectValue,x=C[C.length-1],R=C.slice(0,C.length-1),T=Ub(y,R,R[0]||null);l.onChange(T,{action:"pop-value",removedValue:x})},l.getFocusedOptionId=function(y){return qE(l.state.focusableOptionsWithIds,y)},l.getFocusableOptionsWithIds=function(){return MO(n0(l.props,l.state.selectValue),l.getElementId("option"))},l.getValue=function(){return l.state.selectValue},l.cx=function(){for(var y=arguments.length,C=new Array(y),x=0;x<y;x++)C[x]=arguments[x];return E5.apply(void 0,[l.props.classNamePrefix].concat(C))},l.getOptionLabel=function(y){return Ok(l.props,y)},l.getOptionValue=function(y){return N0(l.props,y)},l.getStyles=function(y,C){var x=l.props.unstyled,R=OY[y](C,x);R.boxSizing="border-box";var T=l.props.styles[y];return T?T(R,C):R},l.getClassNames=function(y,C){var x,R;return(x=(R=l.props.classNames)[y])===null||x===void 0?void 0:x.call(R,C)},l.getElementId=function(y){return"".concat(l.state.instancePrefix,"-").concat(y)},l.getComponents=function(){return ZX(l.props)},l.buildCategorizedOptions=function(){return n0(l.props,l.state.selectValue)},l.getCategorizedOptions=function(){return l.props.menuIsOpen?l.buildCategorizedOptions():[]},l.buildFocusableOptions=function(){return _k(l.buildCategorizedOptions())},l.getFocusableOptions=function(){return l.props.menuIsOpen?l.buildFocusableOptions():[]},l.ariaOnChange=function(y,C){l.setState({ariaSelection:yt({value:y},C)})},l.onMenuMouseDown=function(y){y.button===0&&(y.stopPropagation(),y.preventDefault(),l.focusInput())},l.onMenuMouseMove=function(y){l.blockOptionHover=!1},l.onControlMouseDown=function(y){if(!y.defaultPrevented){var C=l.props.openMenuOnClick;l.state.isFocused?l.props.menuIsOpen?y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&l.onMenuClose():C&&l.openMenu("first"):(C&&(l.openAfterFocus=!0),l.focusInput()),y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&y.preventDefault()}},l.onDropdownIndicatorMouseDown=function(y){if(!(y&&y.type==="mousedown"&&y.button!==0)&&!l.props.isDisabled){var C=l.props,x=C.isMulti,R=C.menuIsOpen;l.focusInput(),R?(l.setState({inputIsHiddenAfterUpdate:!x}),l.onMenuClose()):l.openMenu("first"),y.preventDefault()}},l.onClearIndicatorMouseDown=function(y){y&&y.type==="mousedown"&&y.button!==0||(l.clearValue(),y.preventDefault(),l.openAfterFocus=!1,y.type==="touchend"?l.focusInput():setTimeout(function(){return l.focusInput()}))},l.onScroll=function(y){typeof l.props.closeMenuOnScroll=="boolean"?y.target instanceof HTMLElement&&X0(y.target)&&l.props.onMenuClose():typeof l.props.closeMenuOnScroll=="function"&&l.props.closeMenuOnScroll(y)&&l.props.onMenuClose()},l.onCompositionStart=function(){l.isComposing=!0},l.onCompositionEnd=function(){l.isComposing=!1},l.onTouchStart=function(y){var C=y.touches,x=C&&C.item(0);x&&(l.initialTouchX=x.clientX,l.initialTouchY=x.clientY,l.userIsDragging=!1)},l.onTouchMove=function(y){var C=y.touches,x=C&&C.item(0);if(x){var R=Math.abs(x.clientX-l.initialTouchX),T=Math.abs(x.clientY-l.initialTouchY),j=5;l.userIsDragging=R>j||T>j}},l.onTouchEnd=function(y){l.userIsDragging||(l.controlRef&&!l.controlRef.contains(y.target)&&l.menuListRef&&!l.menuListRef.contains(y.target)&&l.blurInput(),l.initialTouchX=0,l.initialTouchY=0)},l.onControlTouchEnd=function(y){l.userIsDragging||l.onControlMouseDown(y)},l.onClearIndicatorTouchEnd=function(y){l.userIsDragging||l.onClearIndicatorMouseDown(y)},l.onDropdownIndicatorTouchEnd=function(y){l.userIsDragging||l.onDropdownIndicatorMouseDown(y)},l.handleInputChange=function(y){var C=l.props.inputValue,x=y.currentTarget.value;l.setState({inputIsHiddenAfterUpdate:!1}),l.onInputChange(x,{action:"input-change",prevInputValue:C}),l.props.menuIsOpen||l.onMenuOpen()},l.onInputFocus=function(y){l.props.onFocus&&l.props.onFocus(y),l.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(l.openAfterFocus||l.props.openMenuOnFocus)&&l.openMenu("first"),l.openAfterFocus=!1},l.onInputBlur=function(y){var C=l.props.inputValue;if(l.menuListRef&&l.menuListRef.contains(document.activeElement)){l.inputRef.focus();return}l.props.onBlur&&l.props.onBlur(y),l.onInputChange("",{action:"input-blur",prevInputValue:C}),l.onMenuClose(),l.setState({focusedValue:null,isFocused:!1})},l.onOptionHover=function(y){if(!(l.blockOptionHover||l.state.focusedOption===y)){var C=l.getFocusableOptions(),x=C.indexOf(y);l.setState({focusedOption:y,focusedOptionId:x>-1?l.getFocusedOptionId(y):null})}},l.shouldHideSelectedOptions=function(){return kk(l.props)},l.onValueInputFocus=function(y){y.preventDefault(),y.stopPropagation(),l.focus()},l.onKeyDown=function(y){var C=l.props,x=C.isMulti,R=C.backspaceRemovesValue,T=C.escapeClearsValue,j=C.inputValue,N=C.isClearable,O=C.isDisabled,_=C.menuIsOpen,L=C.onKeyDown,F=C.tabSelectsValue,V=C.openMenuOnFocus,H=l.state,z=H.focusedOption,U=H.focusedValue,J=H.selectValue;if(!O&&!(typeof L=="function"&&(L(y),y.defaultPrevented))){switch(l.blockOptionHover=!0,y.key){case"ArrowLeft":if(!x||j)return;l.focusValue("previous");break;case"ArrowRight":if(!x||j)return;l.focusValue("next");break;case"Delete":case"Backspace":if(j)return;if(U)l.removeValue(U);else{if(!R)return;x?l.popValue():N&&l.clearValue()}break;case"Tab":if(l.isComposing||y.shiftKey||!_||!F||!z||V&&l.isOptionSelected(z,J))return;l.selectOption(z);break;case"Enter":if(y.keyCode===229)break;if(_){if(!z||l.isComposing)return;l.selectOption(z);break}return;case"Escape":_?(l.setState({inputIsHiddenAfterUpdate:!1}),l.onInputChange("",{action:"menu-close",prevInputValue:j}),l.onMenuClose()):N&&T&&l.clearValue();break;case" ":if(j)return;if(!_){l.openMenu("first");break}if(!z)return;l.selectOption(z);break;case"ArrowUp":_?l.focusOption("up"):l.openMenu("last");break;case"ArrowDown":_?l.focusOption("down"):l.openMenu("first");break;case"PageUp":if(!_)return;l.focusOption("pageup");break;case"PageDown":if(!_)return;l.focusOption("pagedown");break;case"Home":if(!_)return;l.focusOption("first");break;case"End":if(!_)return;l.focusOption("last");break;default:return}y.preventDefault()}},l.state.instancePrefix="react-select-"+(l.props.instanceId||++BY),l.state.selectValue=CO(u.value),u.menuIsOpen&&l.state.selectValue.length){var d=l.getFocusableOptionsWithIds(),h=l.buildFocusableOptions(),v=h.indexOf(l.state.selectValue[0]);l.state.focusableOptionsWithIds=d,l.state.focusedOption=h[v],l.state.focusedOptionId=qE(d,h[v])}return l}return $4(i,[{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&&xO(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(l){var d=this.props,h=d.isDisabled,v=d.menuIsOpen,y=this.state.isFocused;(y&&!h&&l.isDisabled||y&&v&&!l.menuIsOpen)&&this.focusInput(),y&&h&&!l.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!y&&!h&&l.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xO(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(l,d){this.props.onInputChange(l,d)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(l){var d=this,h=this.state,v=h.selectValue,y=h.isFocused,C=this.buildFocusableOptions(),x=l==="first"?0:C.length-1;if(!this.props.isMulti){var R=C.indexOf(v[0]);R>-1&&(x=R)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:C[x],focusedOptionId:this.getFocusedOptionId(C[x])},function(){return d.onMenuOpen()})}},{key:"focusValue",value:function(l){var d=this.state,h=d.selectValue,v=d.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var y=h.indexOf(v);v||(y=-1);var C=h.length-1,x=-1;if(h.length){switch(l){case"previous":y===0?x=0:y===-1?x=C:x=y-1;break;case"next":y>-1&&y<C&&(x=y+1);break}this.setState({inputIsHidden:x!==-1,focusedValue:h[x]})}}}},{key:"focusOption",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",d=this.props.pageSize,h=this.state.focusedOption,v=this.getFocusableOptions();if(v.length){var y=0,C=v.indexOf(h);h||(C=-1),l==="up"?y=C>0?C-1:v.length-1:l==="down"?y=(C+1)%v.length:l==="pageup"?(y=C-d,y<0&&(y=0)):l==="pagedown"?(y=C+d,y>v.length-1&&(y=v.length-1)):l==="last"&&(y=v.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:v[y],focusedValue:null,focusedOptionId:this.getFocusedOptionId(v[y])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(JE):yt(yt({},JE),this.props.theme):JE}},{key:"getCommonProps",value:function(){var l=this.clearValue,d=this.cx,h=this.getStyles,v=this.getClassNames,y=this.getValue,C=this.selectOption,x=this.setValue,R=this.props,T=R.isMulti,j=R.isRtl,N=R.options,O=this.hasValue();return{clearValue:l,cx:d,getStyles:h,getClassNames:v,getValue:y,hasValue:O,isMulti:T,isRtl:j,options:N,selectOption:C,selectProps:R,setValue:x,theme:this.getTheme()}}},{key:"hasValue",value:function(){var l=this.state.selectValue;return l.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var l=this.props,d=l.isClearable,h=l.isMulti;return d===void 0?h:d}},{key:"isOptionDisabled",value:function(l,d){return Ak(this.props,l,d)}},{key:"isOptionSelected",value:function(l,d){return jk(this.props,l,d)}},{key:"filterOption",value:function(l,d){return Dk(this.props,l,d)}},{key:"formatOptionLabel",value:function(l,d){if(typeof this.props.formatOptionLabel=="function"){var h=this.props.inputValue,v=this.state.selectValue;return this.props.formatOptionLabel(l,{context:d,inputValue:h,selectValue:v})}else return this.getOptionLabel(l)}},{key:"formatGroupLabel",value:function(l){return this.props.formatGroupLabel(l)}},{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 l=this.props,d=l.isDisabled,h=l.isSearchable,v=l.inputId,y=l.inputValue,C=l.tabIndex,x=l.form,R=l.menuIsOpen,T=l.required,j=this.getComponents(),N=j.Input,O=this.state,_=O.inputIsHidden,L=O.ariaSelection,F=this.commonProps,V=v||this.getElementId("input"),H=yt(yt(yt({"aria-autocomplete":"list","aria-expanded":R,"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":T,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},R&&{"aria-controls":this.getElementId("listbox")}),!h&&{"aria-readonly":!0}),this.hasValue()?(L==null?void 0:L.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return h?M.createElement(N,Rt({},F,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:V,innerRef:this.getInputRef,isDisabled:d,isHidden:_,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:C,form:x,type:"text",value:y},H)):M.createElement(cY,Rt({id:V,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:T0,onFocus:this.onInputFocus,disabled:d,tabIndex:C,inputMode:"none",form:x,value:""},H))}},{key:"renderPlaceholderOrValue",value:function(){var l=this,d=this.getComponents(),h=d.MultiValue,v=d.MultiValueContainer,y=d.MultiValueLabel,C=d.MultiValueRemove,x=d.SingleValue,R=d.Placeholder,T=this.commonProps,j=this.props,N=j.controlShouldRenderValue,O=j.isDisabled,_=j.isMulti,L=j.inputValue,F=j.placeholder,V=this.state,H=V.selectValue,z=V.focusedValue,U=V.isFocused;if(!this.hasValue()||!N)return L?null:M.createElement(R,Rt({},T,{key:"placeholder",isDisabled:O,isFocused:U,innerProps:{id:this.getElementId("placeholder")}}),F);if(_)return H.map(function(q,Re){var he=q===z,ge="".concat(l.getOptionLabel(q),"-").concat(l.getOptionValue(q));return M.createElement(h,Rt({},T,{components:{Container:v,Label:y,Remove:C},isFocused:he,isDisabled:O,key:ge,index:Re,removeProps:{onClick:function(){return l.removeValue(q)},onTouchEnd:function(){return l.removeValue(q)},onMouseDown:function(Oe){Oe.preventDefault()}},data:q}),l.formatOptionLabel(q,"value"))});if(L)return null;var J=H[0];return M.createElement(x,Rt({},T,{data:J,isDisabled:O}),this.formatOptionLabel(J,"value"))}},{key:"renderClearIndicator",value:function(){var l=this.getComponents(),d=l.ClearIndicator,h=this.commonProps,v=this.props,y=v.isDisabled,C=v.isLoading,x=this.state.isFocused;if(!this.isClearable()||!d||y||!this.hasValue()||C)return null;var R={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:R,isFocused:x}))}},{key:"renderLoadingIndicator",value:function(){var l=this.getComponents(),d=l.LoadingIndicator,h=this.commonProps,v=this.props,y=v.isDisabled,C=v.isLoading,x=this.state.isFocused;if(!d||!C)return null;var R={"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:R,isDisabled:y,isFocused:x}))}},{key:"renderIndicatorSeparator",value:function(){var l=this.getComponents(),d=l.DropdownIndicator,h=l.IndicatorSeparator;if(!d||!h)return null;var v=this.commonProps,y=this.props.isDisabled,C=this.state.isFocused;return M.createElement(h,Rt({},v,{isDisabled:y,isFocused:C}))}},{key:"renderDropdownIndicator",value:function(){var l=this.getComponents(),d=l.DropdownIndicator;if(!d)return null;var h=this.commonProps,v=this.props.isDisabled,y=this.state.isFocused,C={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(d,Rt({},h,{innerProps:C,isDisabled:v,isFocused:y}))}},{key:"renderMenu",value:function(){var l=this,d=this.getComponents(),h=d.Group,v=d.GroupHeading,y=d.Menu,C=d.MenuList,x=d.MenuPortal,R=d.LoadingMessage,T=d.NoOptionsMessage,j=d.Option,N=this.commonProps,O=this.state.focusedOption,_=this.props,L=_.captureMenuScroll,F=_.inputValue,V=_.isLoading,H=_.loadingMessage,z=_.minMenuHeight,U=_.maxMenuHeight,J=_.menuIsOpen,q=_.menuPlacement,Re=_.menuPosition,he=_.menuPortalTarget,ge=_.menuShouldBlockScroll,fe=_.menuShouldScrollIntoView,Oe=_.noOptionsMessage,Te=_.onMenuScrollToTop,xe=_.onMenuScrollToBottom;if(!J)return null;var je=function(ye,Se){var Ne=ye.type,le=ye.data,ve=ye.isDisabled,we=ye.isSelected,Ve=ye.label,et=ye.value,tt=O===le,ft=ve?void 0:function(){return l.onOptionHover(le)},Ae=ve?void 0:function(){return l.selectOption(le)},It="".concat(l.getElementId("option"),"-").concat(Se),pt={id:It,onClick:Ae,onMouseMove:ft,onMouseOver:ft,tabIndex:-1,role:"option","aria-selected":l.isAppleDevice?void 0:we};return M.createElement(j,Rt({},N,{innerProps:pt,data:le,isDisabled:ve,isSelected:we,key:It,label:Ve,type:Ne,value:et,isFocused:tt,innerRef:tt?l.getFocusedOptionRef:void 0}),l.formatOptionLabel(ye.data,"menu"))},Le;if(this.hasOptions())Le=this.getCategorizedOptions().map(function(re){if(re.type==="group"){var ye=re.data,Se=re.options,Ne=re.index,le="".concat(l.getElementId("group"),"-").concat(Ne),ve="".concat(le,"-heading");return M.createElement(h,Rt({},N,{key:le,data:ye,options:Se,Heading:v,headingProps:{id:ve,data:re.data},label:l.formatGroupLabel(re.data)}),re.options.map(function(we){return je(we,"".concat(Ne,"-").concat(we.index))}))}else if(re.type==="option")return je(re,"".concat(re.index))});else if(V){var ne=H({inputValue:F});if(ne===null)return null;Le=M.createElement(R,N,ne)}else{var _e=Oe({inputValue:F});if(_e===null)return null;Le=M.createElement(T,N,_e)}var G={minMenuHeight:z,maxMenuHeight:U,menuPlacement:q,menuPosition:Re,menuShouldScrollIntoView:fe},Y=M.createElement(B5,Rt({},N,G),function(re){var ye=re.ref,Se=re.placerProps,Ne=Se.placement,le=Se.maxHeight;return M.createElement(y,Rt({},N,G,{innerRef:ye,innerProps:{onMouseDown:l.onMenuMouseDown,onMouseMove:l.onMenuMouseMove},isLoading:V,placement:Ne}),M.createElement(gY,{captureEnabled:L,onTopArrive:Te,onBottomArrive:xe,lockEnabled:ge},function(ve){return M.createElement(C,Rt({},N,{innerRef:function(Ve){l.getMenuListRef(Ve),ve(Ve)},innerProps:{role:"listbox","aria-multiselectable":N.isMulti,id:l.getElementId("listbox")},isLoading:V,maxHeight:le,focusedOption:O}),Le)}))});return he||Re==="fixed"?M.createElement(x,Rt({},N,{appendTo:he,controlElement:this.controlRef,menuPlacement:q,menuPosition:Re}),Y):Y}},{key:"renderFormField",value:function(){var l=this,d=this.props,h=d.delimiter,v=d.isDisabled,y=d.isMulti,C=d.name,x=d.required,R=this.state.selectValue;if(x&&!this.hasValue()&&!v)return M.createElement(xY,{name:C,onFocus:this.onValueInputFocus});if(!(!C||v))if(y)if(h){var T=R.map(function(O){return l.getOptionValue(O)}).join(h);return M.createElement("input",{name:C,type:"hidden",value:T})}else{var j=R.length>0?R.map(function(O,_){return M.createElement("input",{key:"i-".concat(_),name:C,type:"hidden",value:l.getOptionValue(O)})}):M.createElement("input",{name:C,type:"hidden",value:""});return M.createElement("div",null,j)}else{var N=R[0]?this.getOptionValue(R[0]):"";return M.createElement("input",{name:C,type:"hidden",value:N})}}},{key:"renderLiveRegion",value:function(){var l=this.commonProps,d=this.state,h=d.ariaSelection,v=d.focusedOption,y=d.focusedValue,C=d.isFocused,x=d.selectValue,R=this.getFocusableOptions();return M.createElement(aY,Rt({},l,{id:this.getElementId("live-region"),ariaSelection:h,focusedOption:v,focusedValue:y,isFocused:C,selectValue:x,focusableOptions:R,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var l=this.getComponents(),d=l.Control,h=l.IndicatorsContainer,v=l.SelectContainer,y=l.ValueContainer,C=this.props,x=C.className,R=C.id,T=C.isDisabled,j=C.menuIsOpen,N=this.state.isFocused,O=this.commonProps=this.getCommonProps();return M.createElement(v,Rt({},O,{className:x,innerProps:{id:R,onKeyDown:this.onKeyDown},isDisabled:T,isFocused:N}),this.renderLiveRegion(),M.createElement(d,Rt({},O,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:T,isFocused:N,menuIsOpen:j}),M.createElement(y,Rt({},O,{isDisabled:T}),this.renderPlaceholderOrValue(),this.renderInput()),M.createElement(h,Rt({},O,{isDisabled:T}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(l,d){var h=d.prevProps,v=d.clearFocusValueOnUpdate,y=d.inputIsHiddenAfterUpdate,C=d.ariaSelection,x=d.isFocused,R=d.prevWasFocused,T=d.instancePrefix,j=l.options,N=l.value,O=l.menuIsOpen,_=l.inputValue,L=l.isMulti,F=CO(N),V={};if(h&&(N!==h.value||j!==h.options||O!==h.menuIsOpen||_!==h.inputValue)){var H=O?PY(l,F):[],z=O?MO(n0(l,F),"".concat(T,"-option")):[],U=v?FY(d,F):null,J=VY(d,H),q=qE(z,J);V={selectValue:F,focusedOption:J,focusedOptionId:q,focusableOptionsWithIds:z,focusedValue:U,clearFocusValueOnUpdate:!1}}var Re=y!=null&&l!==h?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{},he=C,ge=x&&R;return x&&!ge&&(he={value:Ub(L,F,F[0]||null),options:F,action:"initial-input-focus"},ge=!R),(C==null?void 0:C.action)==="initial-input-focus"&&(he=null),yt(yt(yt({},V),Re),{},{prevProps:l,ariaSelection:he,prevWasFocused:ge})}}]),i}(M.Component);UR.defaultProps=LY;var zY=M.forwardRef(function(n,r){var i=GD(n);return M.createElement(UR,Rt({ref:r},i))}),$R=zY;function Hp({bg:n="dark",children:r,color:i="light",fontWeight:u="bold",icon:l="info-circle-fill",initial:d=!1,maxWidth:h="200px",padding:v="10px",placement:y,target:C,trigger:x="click",visible:R=!0}){const T=typeof d=="string"||d instanceof String,[j,N]=M.useState(T?localStorage.getItem(d)!="true":d),[O,_]=M.useState(!1);M.useEffect(()=>{setTimeout(()=>_(!0),100)},[]);const L=()=>{T&&localStorage.setItem(d,"true")},F=b.jsxs(RR,{style:{"--bs-tooltip-bg":`var(--bs-${n})`,"--bs-tooltip-color":`var(--bs-${i})`,"--bs-tooltip-max-width":h,"--bs-tooltip-padding-x":v,"--bs-tooltip-padding-y":v,fontWeight:u},children:[b.jsx("button",{"aria-label":"Close",onClick:()=>{L(),N(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:b.jsx("i",{className:"bi bi-x-lg"})}),r]});return C&&C.current?b.jsx(zD,{target:C.current,placement:y,show:j&&R&&O,children:F}):b.jsx(HD,{placement:y,onToggle:V=>{L(),N(V)},overlay:F,show:j&&R&&O,trigger:x,children:b.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:b.jsx("i",{className:`bi bi-${l}`})})})}const HY="_items_c2dbg_1",UY="_item_c2dbg_1",$Y="_details_c2dbg_14",GY="_text_c2dbg_20",WY="_number_c2dbg_35",XY="_outer_c2dbg_50",YY="_inner_c2dbg_61",Yl={items:HY,item:UY,details:$Y,text:GY,number:WY,outer:XY,inner:YY},um=(n,r)=>`${Math.cos(2*Math.PI*n)*r} ${Math.sin(2*Math.PI*n)*r}`;function ZY({requestId:n,grantNumber:r,creditColorClass:i="gray-300",colorClasses:u=pw}){const{request:l}=ri(n,r);if(!l)return;let d=0,h;const v=[];for(let T of l.resources)T.isBoolean||(T.isCredit?h=T:v.push(T),d+=T.requested*T.unitCost);const y=[],C=[];let x=-.25;const R=[...v,h].map((T,j)=>{if(!T)return null;const N=j+1,_=T.requested*T.unitCost/d,L=T.requested-T.used,F=Math.max(0,L),V=T.isCredit?d/T.unitCost:T.requested,H=V==0?0:100*F/V,U=`var(--bs-${T.isCredit?i:u[j%u.length]})`;if(_>0){const J=x,q=x+_/2,Re=x+=_,he=_>.5?1:0,ge=[`M ${um(J,100)}`,`A 100 100 0 ${he} 1 ${um(Re,100)}`,`L ${um(Re,50)}`,`A 50 50 0 ${he} 0 ${um(J,50)}`].join(" "),[fe,Oe]=um(q,75).split(" ").map(Te=>parseFloat(Te));y.push(b.jsx("path",{d:ge,style:{fill:U}},T.resourceId)),C.push(b.jsx("circle",{cx:fe,cy:Oe,r:"8",fill:"black"},`${T.resourceId}-circle`),b.jsx("text",{x:fe-4,y:Oe+4,fill:"white",className:Yl.number,children:N},`${T.resourceId}-text`))}return T.isCredit&&C.push(b.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:b.jsx("div",{className:Yl.text,children:b.jsxs("div",{children:[b.jsx("strong",{children:ni(F,{abbreviate:!0})}),T.unit," available"]})})},"center-text")),b.jsxs("li",{className:Yl.item,children:[b.jsx("span",{className:Yl.number,children:N}),b.jsx("span",{className:`${Yl.outer} ms-2 me-2`,style:{borderColor:U},children:b.jsx("span",{className:Yl.inner,style:{backgroundColor:U,width:`${H}%`}})}),b.jsxs("strong",{className:Yl.name,children:[Hf(T,{userGuide:!1}),": "]}),b.jsxs("span",{className:Yl.details,children:[ni(L,{abbreviate:!0})," ",T.isCredit?null:b.jsxs(b.Fragment,{children:["of ",ni(V,{abbreviate:!0})," "]}),T.unit," ",T.isCredit?"available":"remaining"," (",Math.round(H),"%)"]})]},T.resourceId)});return b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:b.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[y,C]})}),b.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:b.jsx("ul",{className:Yl.items,children:R})})]})}const PO=n=>n;function JY({classes:n,clean:r=PO,format:i=PO,label:u,setValue:l,style:d,value:h}){const v=i(h),[y,C]=M.useState(v);return M.useEffect(()=>{C(v)},[v]),b.jsx("input",{type:"text","aria-label":u,className:`form-control ${n}`,value:y,style:d,onChange:x=>C(x.target.value),onBlur:x=>{const R=r(x.target.value);C(i(R)),l(R)},onKeyDown:x=>{x.code=="Enter"&&(x.preventDefault(),x.target.blur())}})}function qY({requestId:n,grantNumber:r}){const{request:i,addResource:u,openUsageDetailModal:l,resetResources:d,setResourceRequest:h,setResourcesReason:v,statuses:y,toggleActionsModal:C,toggleConfirmModal:x,toggleResourcesModal:R}=ri(n,r),{project:T}=Ji(r||i&&i.grantNumber),j=M.useRef(null),N=M.useRef(null);if(!i||!T)return;const O="Exchange"in i.allowedActions,_="Renewal"in i.allowedActions,L="Supplement"in i.allowedActions,F=i.exchangeStatus==y.pending,V=i.exchangeStatus==y.success,H=i.exchangeStatus==y.error,z=i.exchangeActionId!==null,U=i.resources,J=i.resourcesReason,q={};for(let le of U)q[le.resourceId]=le;const Re=()=>{MA(i)>=.75?C():x()},he=[];for(let le of U){let ve=[];if(le.requested>0){for(let we of le.requires||[]){let Ve=q[we];if(Ve){if(Ve.requested>0){ve=[];break}ve.push(Ve)}}ve.length&&he.push(b.jsxs("span",{children:[Hf(le,{userGuide:!1})," requires"," ",kA(ve.map(we=>Hf(we,{userGuide:!1})),"or"),"."]},le.resourceId))}}const ge=he.length>0;let fe;V?fe=b.jsx(na,{color:"info",children:"Your exchange request has been submitted."}):z?fe=b.jsx(na,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):H?fe=b.jsx(na,{color:"danger",children:"Sorry, your exchange request could not be submitted. Please try again later."}):i.timeStatus=="current"&&!T.isManager?fe=b.jsxs(na,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",tR(T)," to request a change."]}):ge&&(fe=b.jsxs(na,{color:"warning",children:[he," Please adjust your balance values."]}));const Oe=J.length>0;let Te=!1,xe=!1;for(let le of U)if(le.isNew&&(Te=!0),le.allocated!=le.requested&&(xe=!0),Te&&xe)break;const je=U.map(le=>le.resourceId),Le=O&&!V&&!z?i.allowedActions.Exchange.resources.filter(le=>!je.includes(le.resourceId)).map(le=>{const ve=M0(le.name),we=ve.short?`${ve.short} (${ve.full.replace(/ \([^(]+\)/,"")})`:ve.full;return{value:le.resourceId,label:we}}):[],ne=O?i.allowedActions.Exchange.resources.map(le=>le.resourceId):[];let _e;const G=[],Y=[];for(let le of U)le.isCredit?_e=le:(G.push(le),Y.push(!V&&!z&&(le.isNew||le.allocated!=le.requested)?Bp.edited:ne.includes(le.resourceId)?"":Bp.disabled));const re=`Add ${G.length?"another":"a"} resource to your exchange...`,ye=le=>le.requested-le.used,Se=(le,ve)=>{let we=Fp(Number(le.replace(/[^0-9-.]/g,""))+ve.used,ve.decimalPlaces);isNaN(we)&&(we=ve.allocated);const Ve=Math.min(ve.allocated,ve.used);return we<Ve?Ve:ve.unitCost*(we-ve.requested)>_e.requested?Fp(_e.requested/ve.unitCost,ve.decimalPlaces,"floor")+ve.requested:we},Ne=[{key:"name",name:"Resource",format:(le,ve)=>Hf(ve),width:Math.min(350,window.innerWidth*.3)},{key:"isActive",name:"Status",format:(le,ve)=>b.jsx(Zp,{status:le?"Active":ve.isNew?"New":"Inactive"}),width:100},{key:"unit",name:"Unit",width:150,format:(le,ve)=>ve.isBoolean?b.jsx(b.Fragment,{children:"—"}):b.jsx("abbr",{title:`1 ${v_(le,1)} = ${ni(ve.unitCost)} ${v_(_e.name,ve.unitCost)}`,children:le})},{key:"used",name:"Usage",class:"text-end",format:(le,ve)=>ve.isBoolean?b.jsx(b.Fragment,{children:"—"}):b.jsxs(b.Fragment,{children:[ni(le),(T.currentUser.resourceIds.includes(ve.resourceId)||T.currentUser.resourceAccountInactiveIds.includes(ve.resourceId))&&b.jsx(c0,{icon:"table",onClick:()=>l(ve.resourceRepositoryKey),target:"_blank",title:`${ve.name} Usage Details`})]})}];return O&&Ne.push({key:"requested",name:"Balance",class:"text-end",rowClass:le=>!V&&!z&&ne.includes(le.resourceId)?Bp.input:"",format:(le,ve)=>{const we=!V&&!z&&ne.includes(ve.resourceId);return ve.isBoolean?b.jsx("input",{className:"form-check-input",type:"checkbox",checked:le==1,disabled:!we,onChange:Ve=>h(ve.resourceId,Ve.target.checked?1:0)}):we?b.jsx(JY,{classes:"text-end w-100",clean:Ve=>Se(Ve,ve)-ve.used,format:ni,label:`Balance for ${ve.name}`,setValue:Ve=>{h(ve.resourceId,Ve+ve.used)},style:{padding:"0.1rem 0.5rem"},value:ye(ve)}):ni(ye(ve))},formatHeader:le=>b.jsxs(b.Fragment,{children:[le,!V&&!z?b.jsx(Hp,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:T.tab=="resources",children:"You can increase or decrease the balance below to change your allocation on a resource. Enter the total amount you would like to have available once the exchange is complete."}):null]})}),b.jsxs("div",{className:"resources",children:[fe,U.length?b.jsx(ZY,{requestId:n}):null,_e&&(O||_||L)?b.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[b.jsxs("span",{children:[mc(Nn.resourceTypeIcons.credit)," ",ni(_e.requested,_e)," ",_e.unit," available to exchange"]}),_||L?b.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:Re,children:[mc(Nn.resourceTypeIcons.credit)," Request More"," ",i.usesCredits?"Credits":"Units"]}):null]}):null,G.length?b.jsx(Qf,{columns:Ne,rows:G,rowClasses:Y,classes:Le.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):b.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),Le.length?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:j,children:b.jsx($R,{classNames:{control:()=>"react-select mb-1"},options:Le,onChange:le=>u(le.value),placeholder:re,value:null,"aria-label":re})}),G.length?null:b.jsx(Hp,{bg:"secondary",color:"dark",visible:T.tab=="resources",initial:!0,target:j,children:"Ready to get started? Search for a resource to add it to your project."}),b.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",b.jsx("a",{href:Nn.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,O&&!V&&!z?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),b.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:J,onChange:le=>v(le.target.value),style:{minHeight:"3rem"}})]}),b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:F||!xe&&!Oe&&!Te,onClick:d,children:"Reset Form"}),b.jsx("button",{ref:N,type:"button",className:"btn btn-secondary",disabled:F||!xe||!Oe||ge,onClick:R,children:F?"Submitting...":"Submit for Approval"})]}),xe&&!ge?b.jsx(Hp,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:N,visible:T.tab=="resources",children:"When you are finished adding resources, enter a justification for the requested resources above. Then you can submit your exchange for approval."}):null]}):null]})}function QY({question:n,requestId:r,grantNumber:i}){const{request:u,setResourceQuestionValues:l}=ri(r,i),d=M.useId();if(!n||!u||u.error)return;const{attributeSetId:h,attributes:v,fieldType:y,label:C,resourceId:x,values:R}=n,T=v[0],j=T.required?"required":"",N=V=>l(x,h,V.target.value?[V.target.value]:[]),O=V=>{l(x,h,Array.from(V.target.options).filter(({selected:H})=>H).map(({value:H})=>parseInt(H,10)))},_=V=>{const H=parseInt(V.target.value,10),z=V.target.checked?[...R,H]:R.filter(U=>U!=H);l(x,h,z)},L=V=>{const H=parseInt(V.target.value);l(x,h,isNaN(H)?[]:[H])};let F;if(["calendar","integer_only","text"].includes(y)){const V={calendar:"date",integer_only:"number",text:"text"}[y];F=b.jsx("input",{className:"form-control",id:d,type:V,placeholder:T.label,required:T.required,value:R[0]||"",onChange:y=="integer_only"?L:N})}else if(y=="textarea")F=b.jsx("textarea",{className:"form-control",id:d,placeholder:T.label,required:T.required,value:R[0]||"",onChange:N});else if(y=="drop_down"||v.length>=10){const V=y=="multi_sel";F=b.jsxs("select",{id:d,className:"form-select",required:T.required,multiple:V,onChange:V?O:L,value:V?R:R[0]||"",children:[V?null:b.jsx("option",{}),v.map(H=>b.jsx("option",{value:H.resourceAttributeId,children:H.label},H.resourceAttributeId))]})}else F=b.jsx("div",{id:d,children:v.map(V=>{const H=`resource-attribute-${V.resourceAttributeId}`;return b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:y=="single_sel"?"radio":"checkbox",id:H,value:V.resourceAttributeId,checked:R.includes(V.resourceAttributeId),onChange:y=="single_sel"?L:_}),b.jsx("label",{className:"form-check-label",htmlFor:H,children:V.label})]},V.resourceAttributeId)})});return b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{htmlFor:d,className:`form-label ${j}`,children:C}),F]})}function KY({requestId:n,grantNumber:r}){const{request:i,saveResources:u,toggleResourcesModal:l}=ri(n,r),{project:d}=Ji(r||i.grantNumber);if(!i||!d||i.error||d.error)return;const h=[],v=i.resources.filter(C=>C.allocated!=C.requested).map(C=>{const x=C.requested-C.allocated;return C.questions&&h.push(...C.questions),b.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[C.name,b.jsx("span",{className:`badge bg-${x>0?"primary":"danger"} rounded-pill`,children:C.isBoolean?eR(C.requested):b.jsxs(b.Fragment,{children:[x>0?"+":"",ni(x,C)," ",C.unit]})})]},C.resourceId)}),y=h.some(({attributes:C,values:x})=>x.length==0&&C[0].required);return b.jsxs(Ln,{size:"lg",show:i.showResourcesModal,onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Complete Your Exchange"})}),b.jsxs(Ln.Body,{children:[b.jsx("p",{children:"Please review your exchange to make sure it includes all the resources you need. Once you submit it, you will not be able to request another exchange until this one has been processed by the resource providers."}),b.jsx("ul",{className:"list-group mb-3",children:v}),h.length?b.jsxs(b.Fragment,{children:[b.jsx("h2",{children:"Resource Questions"}),b.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),h.map(C=>b.jsx(QY,{question:C,requestId:n,grantNumber:r},C.attributeSetId))]}):null]}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:l,children:"Continue Editing"}),b.jsx("button",{type:"button",className:"btn btn-secondary",onClick:u,disabled:y,children:"Submit"})]})})]})}function Mm(){return b.jsx("div",{className:"spinner-border",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Loading..."})})}function Mk({user:n}){const r=`${n.lastName}, ${n.firstName}`;let i=r,u=[n.organization,n.email].filter(l=>l).join(", ");return u&&(i+=`: ${u}`),b.jsx("abbr",{title:i,children:r})}function eZ({requestId:n,grantNumber:r}){const{project:i}=Ji(r),{request:u,closeUsageDetailModal:l}=ri(n,r);if(!u||u.error||!i||i.error||!u.usageDetailStatus)return;let d,h="Usage";if(u.usageDetailStatus==ea.pending)d=b.jsx(Mm,{});else if(u.usageDetailStatus==ea.error)d=b.jsx(na,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:v,resourceDisplayName:y,resourceRepositoryKey:C,users:x}=u.usageDetail,{full:R,short:T}=M0(y),j=u.resources.find(L=>L.resourceRepositoryKey==C),N=L=>ni(L,{decimalPlaces:j?j.decimalPlaces:void 0}),O={};for(let L of i.users)O[L.username]=L;h=b.jsxs(b.Fragment,{children:["Usage: ",T||R," for ",v]});const _=[{key:"name",name:"Name",format:(L,{lastName:F,firstName:V,portalUsername:H})=>{const z=O[H];return z?b.jsx(Mk,{user:z}):`${F}, ${V}`}},{key:"portalUsername",name:"Resource Username",format:L=>{const F=O[L],V=F?F.resourceUsernames[j.resourceId]:null;return V||b.jsx(b.Fragment,{children:"—"})}},{key:"role",name:"Role",format:L=>LA[L].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:N},{key:"lastMonth",name:"Last Month",class:"text-end",format:N},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:N},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:N},{key:"total",name:"All Time",class:"text-end",format:N}];d=x.length?b.jsx(Qf,{rows:x,columns:_}):b.jsx(na,{color:"info",children:"There is no usage for this resource."})}return b.jsxs(Ln,{show:!0,size:"lg",onHide:l,scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:h})}),b.jsx(Ln.Body,{children:d})]})}var tZ=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function nZ(n){var r=n.defaultOptions,i=r===void 0?!1:r,u=n.cacheOptions,l=u===void 0?!1:u,d=n.loadOptions;n.options;var h=n.isLoading,v=h===void 0?!1:h,y=n.onInputChange,C=n.filterOption,x=C===void 0?null:C,R=nl(n,tZ),T=R.inputValue,j=M.useRef(void 0),N=M.useRef(!1),O=M.useState(Array.isArray(i)?i:void 0),_=ta(O,2),L=_[0],F=_[1],V=M.useState(typeof T<"u"?T:""),H=ta(V,2),z=H[0],U=H[1],J=M.useState(i===!0),q=ta(J,2),Re=q[0],he=q[1],ge=M.useState(void 0),fe=ta(ge,2),Oe=fe[0],Te=fe[1],xe=M.useState([]),je=ta(xe,2),Le=je[0],ne=je[1],_e=M.useState(!1),G=ta(_e,2),Y=G[0],re=G[1],ye=M.useState({}),Se=ta(ye,2),Ne=Se[0],le=Se[1],ve=M.useState(void 0),we=ta(ve,2),Ve=we[0],et=we[1],tt=M.useState(void 0),ft=ta(tt,2),Ae=ft[0],It=ft[1];l!==Ae&&(le({}),It(l)),i!==Ve&&(F(Array.isArray(i)?i:void 0),et(i)),M.useEffect(function(){return N.current=!0,function(){N.current=!1}},[]);var pt=M.useCallback(function(sn,_n){if(!d)return _n();var Vt=d(sn,_n);Vt&&typeof Vt.then=="function"&&Vt.then(_n,function(){return _n()})},[d]);M.useEffect(function(){i===!0&&pt(z,function(sn){N.current&&(F(sn||[]),he(!!j.current))})},[]);var Kt=M.useCallback(function(sn,_n){var Vt=w5(sn,_n,y);if(!Vt){j.current=void 0,U(""),Te(""),ne([]),he(!1),re(!1);return}if(l&&Ne[Vt])U(Vt),Te(Vt),ne(Ne[Vt]),he(!1),re(!1);else{var Cn=j.current={};U(Vt),he(!0),re(!Oe),pt(Vt,function(qn){N&&Cn===j.current&&(j.current=void 0,he(!1),Te(Vt),ne(qn||[]),re(!1),le(qn?yt(yt({},Ne),{},Lp({},Vt,qn)):Ne))})}},[l,pt,Oe,Ne,y]),on=Y?[]:z&&Oe?Le:L||[];return yt(yt({},R),{},{options:on,isLoading:Re||v,onInputChange:Kt,filterOption:x})}var rZ=M.forwardRef(function(n,r){var i=nZ(n),u=GD(i);return M.createElement(UR,Rt({ref:r},u))}),aZ=rZ;const FO=({description:n,disabled:r=!1,onChange:i,selectedLength:u,totalLength:l})=>{const d=M.useRef(),h=M.useId();let v=u==l,y=u>0&&!v;return M.useEffect(()=>{d.current&&(d.current.checked=v,d.current.indeterminate=y)},[v,y]),b.jsxs(b.Fragment,{children:[b.jsx("input",{className:"custom-checkbox form-check-input",disabled:r,id:h,onChange:C=>i(C.target.checked),ref:d,type:"checkbox"}),b.jsx("label",{className:"form-check-label",htmlFor:h,"aria-description":`${v?"Deselect":"Select"} ${n}`})]})};function iZ({grantNumber:n,requestId:r}){const{project:i,addUser:u,resetUsers:l,saveUsers:d,setTab:h,setUserRole:v,statuses:y,toggleUsersResources:C}=Ji(n),{request:x}=i?ri(r||i.currentRequestId,n):{request:null};if(!i||!i.currentRequestId||!x||i.error||x.error)return;const R=i.isManager,T="Exchange"in x.allowedActions,j=i.usersStatus==y.pending,N=i.usersStatus==y.success,O=i.usersStatus==y.error,_=i.users,L=x.resources.filter(hw),F=L.length==0,V=_.find(he=>he.hasChanges)!==void 0,H=_.find(he=>he.role!="pi")!==void 0;let z;N&&!V?z=b.jsx(na,{color:"info",children:"Your changes have been saved. Creation of user accounts can take some time. Users can check the status of their accounts on the Overview tab of the My Projects page."}):O?z=b.jsx(na,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):R?L.length?F&&(z=b.jsx(na,{color:"warning",children:"This project does not have any active resources."})):z=b.jsxs(na,{color:"warning",children:["This project does not have any resources."," ",T?b.jsx("a",{href:Nn.routes.request_action_path(x.requestId,"new?action_type=Exchange"),onClick:he=>{he.preventDefault(),h("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):z=b.jsxs(na,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",tR(i)," to request a change."]});const U=(he,ge)=>{let fe,Oe,Te,xe;if(ge.key=="all"){fe="all resources for all users",Oe=je=>C(je),Te=0;for(let je of _)Te+=je.resourceIds.length;xe=_.length*L.length}else fe=`all users for ${ge.name}`,Oe=je=>C(je,null,ge.key),Te=_.filter(({resourceIds:je})=>je.includes(ge.key)).length,xe=_.length;return b.jsxs(b.Fragment,{children:[ge.key=="all"?he:Hf(ge,{userGuide:!1}),b.jsx("br",{}),b.jsx(FO,{description:fe,disabled:ge.disabled,onChange:Oe,selectedLength:Te,totalLength:xe})]})},J=L0.map(({role:he,name:ge})=>b.jsx("option",{value:he,children:ge},he)),q=[{key:"name",name:"Name",width:200,format:(he,ge)=>b.jsx(Mk,{user:ge})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(he,ge)=>b.jsx("select",{className:"form-select",value:he,onChange:fe=>v(ge.username,fe.target.value),disabled:!R||he=="pi"||he=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:J.filter(fe=>fe.key==he||!["pi","co_pi"].includes(fe.key))})}];L.length&&q.push({key:"all",name:"All Resources",class:`text-center ${Bp.important}`,disabled:!R||F,width:100,format:(he,ge)=>b.jsx(FO,{description:`all users for ${ge.name}`,disabled:!R||F,onChange:fe=>C(fe,ge.username),selectedLength:ge.resourceIds.length,totalLength:L.length}),formatHeader:U});for(let he of L)q.push({key:he.resourceId,name:he.name,class:"text-center",disabled:!R||!he.isActive,icon:he.icon,format:(ge,fe)=>b.jsx(b.Fragment,{children:b.jsx("input",{className:"form-check-input",disabled:!R||!he.isActive,onChange:Oe=>C(Oe.target.checked,fe.username,he.resourceId),type:"checkbox",checked:fe.resourceIds.includes(he.resourceId)})}),formatHeader:U});const Re=_.map(he=>he.hasChanges?Bp.edited:"");return b.jsxs(b.Fragment,{children:[z,b.jsx(Qf,{rows:_,columns:q,frozenColumns:L.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:Re,scrollRowIndex:i.usersNewRowIndex}),R&&L.length&&!F?b.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:b.jsx(aZ,{classNames:{control:()=>"react-select"},loadOptions:async he=>(await YU(he)).map(fe=>({value:fe,label:`${fe.username} (${fe.firstName} ${fe.lastName}, ${fe.organization}${fe.email?`, ${fe.email}`:""})`})),onChange:he=>u(he.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,R&&(L.length&&!F||H)?b.jsxs("div",{className:"d-flex mt-3",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:j||!V,onClick:l,children:"Reset Form"}),b.jsx("button",{type:"button",className:"btn btn-secondary",disabled:j||!V,onClick:d,children:j?"Saving...":"Save Changes"})]}):null]})}function oZ({requestId:n,grantNumber:r}){const{request:i}=ri(n,r),{project:u,setRequest:l,setTab:d}=Ji(r||i.grantNumber);if(!i)return;if(i.error)return b.jsx(na,{color:"danger",children:i.error});const h=i.timeStatus||i.actions[0].status.toLowerCase(),v=i.actions.find(({showDeleteModal:C})=>C),y=[];return i.resources.length||y.push("resources"),n!=u.currentRequestId&&y.push("users"),b.jsxs("div",{className:"request",children:[i.returnedForCorrections?b.jsxs(na,{color:"warning",children:[b.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),b.jsx("div",{className:S$.returnedForCorrectionsNotes,children:i.returnedForCorrectionsNotes}),b.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",i.timeStatus!="current"&&!i.returnedForCorrections?b.jsxs(na,{color:"warning",children:["You are viewing ","aeiou".includes(h[0])?"an":"a"," ",h," request."," ",y.length?`You cannot manage ${y.join(" or ")} for this request.`:""," ",u.currentRequestId?b.jsx("a",{href:Nn.routes.request_path(u.currentRequestId),onClick:C=>{C.preventDefault(),l(u.currentRequestId)},children:"Go to the current request."}):null]}):null,b.jsxs(Y3,{activeKey:u.tab,onSelect:d,className:"mt-3 mb-3",children:[b.jsx(kb,{eventKey:"overview",title:"Overview",className:"mb-0",children:b.jsx(P4,{requestId:n,grantNumber:r})}),b.jsx(kb,{eventKey:"resources",title:i.usesCredits?"Credits + Resources":"Resources",disabled:y.includes("resources"),children:b.jsx(qY,{requestId:n})}),b.jsx(kb,{eventKey:"users",title:"Users + Roles",disabled:y.includes("users"),children:b.jsx(iZ,{grantNumber:r})}),b.jsx(kb,{eventKey:"history",title:"History",children:b.jsx(f4,{requestId:n})})]}),b.jsx(e4,{grantNumber:r,requestId:n}),b.jsx(t4,{grantNumber:r,requestId:n}),b.jsx(n4,{grantNumber:r,requestId:n,actionId:v?v.actionId:null}),b.jsx(KY,{grantNumber:r,requestId:n}),b.jsx(eZ,{grantNumber:r,requestId:n})]})}function sZ({requestId:n,grantNumber:r}){const{request:i,toggleActionsModal:u,toggleDeleteModal:l}=ri(n,r);if(!i)return;const{actions:d,allowedActions:h}=i,v=[];h&&(("Extension"in h||"Renewal"in h)&&v.push(["Extend End Date",C=>{C.preventDefault(),u()},"calendar-plus"]),"Final Report"in h&&v.push(["Submit Final Report",`${Nn.routes.request_action_path(n,"new")}?action_type=Final+Report`,"file-earmark-check"]));const y=d.find(C=>C.isRequest);if(y){const C=y.allowedOperations||[];C.includes("Edit")&&v.push(["Edit",Nn.routes.edit_request_path(i.requestId),"pencil"]),C.includes("Delete")&&v.push(["Delete",x=>{x.preventDefault(),l(y.actionId)},"trash","danger"])}return v.map(([C,x,R,T])=>{const j=b.jsxs(b.Fragment,{children:[" ",R&&b.jsx("i",{className:`bi bi-${R} me-1`}),C]});return typeof x=="function"?b.jsx("button",{className:`btn btn-${T||"primary"} ms-2 text-nowrap`,onClick:x,children:j},C):b.jsx("a",{className:`btn btn-${T||"primary"} ms-2 text-nowrap`,href:x,children:j},C)})}function lZ({open:n=!1,grantNumber:r,title:i,status:u}){const[l,d]=M.useState(n),{project:h,setRequest:v}=Ji(r,!l&&i&&u&&!0),y=`project-${r}`;let C=null;if(l&&h)if(h.error)C=b.jsx(na,{color:"danger",children:h.error});else{let x;const R=h.requestsList.map(T=>(T.requestId==h.selectedRequestId&&(x=T),b.jsx("option",{value:T.requestId,children:Kw(T)},T.requestId)));C=b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"d-flex",children:[b.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:T=>v(parseInt(T.target.value,10)),value:h.selectedRequestId,disabled:R.length<2,children:R}),b.jsx(sZ,{requestId:h.selectedRequestId,grantNumber:r})]}),x?b.jsx(oZ,{...x,grantNumber:r}):null]})}return b.jsxs("div",{className:`${y_.project} card mb-3`,children:[b.jsxs("div",{className:`card-header d-flex justify-content-between ${l?"":"border-bottom-0"}`,children:[b.jsx("button",{"aria-expanded":l,"aria-controls":y,className:y_.expand,onClick:()=>d(!l),children:b.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[b.jsx("i",{className:`bi bi-caret-${l?"down":"right"}-fill`})," ",/^[A-Z]/.test(r)?b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"grant-number",children:[r,":"]})," "]}):null,i||h.title]})}),b.jsx(Zp,{status:u||h.status})]}),b.jsx("div",{className:"card-body",id:y,hidden:!l||!h,children:C})]})}function uZ({username:n,openFirst:r=1}){const{error:i,loading:u,projects:l}=y$(n);return u?b.jsx(Mm,{}):i?b.jsxs(na,{color:"danger",children:[i," ",b.jsx("a",{href:"#",onClick:d=>{d.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]}):l.length?l.map((d,h)=>b.jsx(lZ,{open:h<r,...d},d.grantNumber)):b.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[b.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),b.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[b.jsxs("a",{className:"btn btn-primary w-25",href:Nn.routes.project_types_path(),children:[b.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),b.jsxs("a",{className:"btn btn-secondary w-25",href:Nn.routes.get_your_first_project_path(),children:[b.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",b.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),b.jsxs("a",{className:"btn btn-primary w-25",href:Nn.routes.how_to_path(),children:[b.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]})}const Lk={apiUrl:null,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},cZ=Di("projectsBrowser/initApp",async(n,{getState:r,dispatch:i})=>{await i(Fw()),await i($f()),i(fZ())}),fZ=Di("projectsBrowser/filterCleanup",async(n,{getState:r,dispatch:i})=>{const l=r().projectsBrowser.typeLists;i(Pk({...l,orgs:["-- ALL --"].concat(l.orgs)}))}),Fw=Di("projectsBrowser/getFilters",async(n,{getState:r,dispatch:i})=>{const l=`${r().projectsBrowser.apiUrl}?filters=1`,h=await(await fetch(l)).json();i(Pk(h.filters))}),$f=Di("projectsBrowser/getProjects",async(n,{getState:r})=>{const i=r().projectsBrowser,u=i.filters,l=i.typeLists,d=l.fosTypes.filter(C=>C.checked);let h=`${i.apiUrl}?page=${i.pageData.current_page}`;return d.length!=l.fosTypes.length&&(h+=`&fos=${d.map(C=>C.fosTypeId).join(",")}`),u.org!=""&&u.org!="-- ALL --"&&(h+=`&org=${encodeURIComponent(u.org)}`),u.allocationType!=""&&(h+=`&allocation_type=${u.allocationType}`),u.resource!=""&&(h+=`&resources=${u.resource}`),await(await fetch(h)).json()}),GR=D0({name:"projectsBrowser",initialState:Lk,reducers:{resetFilters:n=>{n.filters={org:"",allocationType:"",allFosToggled:!1,resource:""},GR.caseReducers.toggleAllFos(n)},setApiUrl:(n,{payload:r})=>{n.apiUrl=r},setShowPagination:(n,{payload:r})=>{n.showPagination=r},setTypeLists:(n,{payload:r})=>{n.typeLists=r},toggleAllFos:n=>{n.typeLists.fosTypes.forEach(r=>r.checked=!n.filters.allFosToggled),n.filters.allFosToggled=!n.filters.allFosToggled},toggleFos:(n,{payload:r})=>{n.typeLists.fosTypes.forEach(i=>{i.fosTypeId==r.fosTypeId&&(i.checked=!i.checked)}),n.typeLists.fosTypes.filter(i=>i.checked).length!=n.typeLists.fosTypes.length?n.filters.allFosToggled=!1:n.filters.allFosToggled=!0},updateFilter:(n,{payload:r})=>{n.filters[r.name]=r.value},updatePageData:(n,{payload:r})=>{r.current_page&&(n.pageData.current_page=r.current_page),r.last_page&&(n.pageData.last_page=r.last_page)}},extraReducers:n=>{n.addCase($f.pending,r=>{r.projectsLoaded=!1}).addCase($f.fulfilled,(r,i)=>{const u=i.payload;r.projectsLoaded=!0,r.projects=u.projects,u.pages!=r.pageData.last_page&&(r.pageData.current_page=1),r.showPagination=!0,r.pageData.last_page=u.pages}).addCase($f.rejected,(r,i)=>{console.log(i.error)}).addCase(Fw.pending,r=>{r.filtersLoaded=!1}).addCase(Fw.fulfilled,r=>{r.filtersLoaded=!0})}}),{resetFilters:dZ,setApiUrl:G8,setShowPagination:VO,setTypeLists:Pk,toggleAllFos:pZ,toggleFos:vZ,updateFilter:BO,updatePageData:Vw}=GR.actions,hZ=n=>n.projectsBrowser.filters,mZ=n=>n.projectsBrowser.filtersLoaded,gZ=n=>n.projectsBrowser.projectsLoaded,yZ=n=>n.projectsBrowser.pageData,bZ=n=>n.projectsBrowser.projects,CZ=n=>n.projectsBrowser.filtersLoaded&&n.projectsBrowser.projectsLoaded&&n.projectsBrowser.pageData.last_page>1,xZ=n=>n.projectsBrowser.typeLists,SZ=GR.reducer;const EZ=()=>{const n=To(),r=dr(hZ),i=dr(xZ),u=i.orgs.map(O=>({label:O,value:O})),l=M.useRef(),[d,h]=M.useState(null),[v,y]=M.useState(!1),C={height:"200px",overflowX:"auto",padding:"2px"},x=O=>{n(BO({name:O.target.name,value:O.target.value}))},R=()=>{window.scrollTo(0,0),y(!0),n(VO(!1)),n(Vw({current_page:1})),n($f())},T=()=>{h(null),n(VO(!1)),n(Vw({current_page:1})),n(dZ()),v&&(window.scrollTo(0,0),n($f()),y(!1))},j=O=>{h(O),n(BO({name:"org",value:O.value}))},N=()=>r.org==""&&r.allocationType==""&&r.allFosToggled&&r.resource=="";return b.jsx("div",{className:"row sticky-top mb-2",children:b.jsxs("div",{className:"col",children:[b.jsx("h3",{className:"mb-2",children:"Filters"}),b.jsx("h5",{className:"mb-1",children:"Field of Science"}),b.jsxs("div",{className:"border mb-3",style:C,children:[b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:r.allFosToggled,onChange:()=>{n(pZ())}}),b.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),i.fosTypes.map(O=>b.jsxs("div",{className:"form-check",children:[b.jsx("input",{className:"form-check-input",type:"checkbox",value:O.fosTypeId,id:`fos_${O.fosTypeId}`,checked:O.checked,onChange:()=>n(vZ(O))}),b.jsx("label",{className:"form-check-label",htmlFor:`fos_${O.fosTypeId}`,children:O.fosName})]},`fos_${O.fosTypeId}`))]}),b.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),b.jsx("div",{className:"mb-3",children:b.jsx($R,{options:u,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:l,closeMenuOnSelect:!0,onChange:j,value:d,"aria-labelledby":"org_select_label"},"org_select")}),b.jsx("h5",{id:"project_type_label",className:"mb-1",children:b.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),b.jsx("div",{className:"mb-3",children:b.jsxs("select",{name:"allocationType",id:"project_type_select",value:r.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:O=>x(O),children:[b.jsx("option",{value:"",children:"-- All --"}),i.allocationTypes.map((O,_)=>b.jsx("option",{value:O,children:O},`allocation_type_${_}`))]})}),b.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),b.jsx("div",{className:"mb-3",children:b.jsxs("select",{name:"resource",id:"resource_select",value:r.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:O=>x(O),children:[b.jsx("option",{value:"",children:"-- All --"}),i.resources.map((O,_)=>b.jsx("option",{value:O.resourceId,children:O.resourceName},`resource_${_}`))]})}),b.jsxs("div",{className:"mt-2",children:[b.jsx("button",{className:"btn btn-primary me-2",onClick:R,children:"Submit"}),b.jsx("button",{className:"btn btn-secondary",disabled:N(),onClick:T,children:"Reset"})]})]})})};const wZ=({project:n})=>{const r=n.resources,i=l=>{let d=l.units?l.units:l.resourceUnits;const h=l.allocation?l.allocation:l.amount;if(d=="[Yes = 1, No = 0]"||d=="Yes / No")return h=="1.0"?"Yes":"No";{let v="0";return parseInt(h)&&(v=parseInt(h).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),d=="ACCESS Credits"&&(d=b.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),d=="Dollars"?`$${v}`:b.jsxs(b.Fragment,{children:[v," ",d]})}},u=()=>n.requestNumber&&n.requestNumber!=""?`(${n.requestNumber})`:"";return b.jsxs("div",{className:"card mb-4",children:[b.jsxs("div",{className:"card-header bg-primary text-white",children:[b.jsxs("span",{className:"fw-bold",children:[u()," ",n.requestTitle]})," ",b.jsx("br",{}),b.jsxs("span",{className:"fst-italic",children:[n.pi," ",b.jsxs("small",{children:[" (",n.piInstitution,") "]})]})]}),b.jsxs("div",{className:"card-body",children:[b.jsxs("div",{className:"row fw-bold border-bottom",children:[b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),b.jsx("div",{className:"col",children:b.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col",children:n.fos}),b.jsx("div",{className:"col",children:n.allocationType}),b.jsxs("div",{className:"col",children:[n.beginDate," to ",n.endDate]})]}),b.jsxs(os,{flush:!0,className:"mt-3 mb-1",children:[b.jsxs(os.Item,{eventKey:"0",children:[b.jsx(os.Header,{children:"Resources"}),b.jsx(os.Body,{children:b.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("span",{className:"m-0 p-0",children:"Resource"})}),b.jsx("td",{children:b.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),b.jsx("tbody",{children:r.map((l,d)=>b.jsxs("tr",{children:[b.jsx("td",{children:l.resourceName}),b.jsx("td",{style:{whiteSpace:"nowrap"},children:i(l)})]},`resource_${n.requestId}_${d}`))})]})})]}),b.jsxs(os.Item,{eventKey:"1",children:[b.jsx(os.Header,{children:"Abstract"}),b.jsx(os.Body,{children:b.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:n.abstract})})]})]})]})]})},RZ=()=>{const n=dr(bZ);return n.length==0?b.jsx("div",{children:"No Projects Found"}):b.jsx("div",{children:n.map((r,i)=>b.jsx(wZ,{project:r},`project_${i}`))})};const zO=()=>{const n=To(),r=dr(yZ),[i,u]=M.useState([]),[l,d]=M.useState("0"),h=Array.from({length:r.last_page},(N,O)=>O),v=10,y={width:"50px",textAlign:"center"};M.useEffect(()=>{R()},[r]);const C=N=>{const O=parseInt(N);n(Vw({current_page:N})),n($f(O))},x=N=>(event.preventDefault(),d("0"),C(N),!1),R=()=>{const N=[];if(r.last_page>v)if(r.current_page>4){N.push(1),N.push("spacer");for(var O=1;O>0;O--)r.current_page-O>1&&N.push(r.current_page-O);N.push(["current",r.current_page]);for(var O=1;O<2;O++)r.current_page+O<=r.last_page&&N.push(r.current_page+O);r.last_page-r.current_page>1&&(N.push("spacer"),N.push(r.last_page))}else[1,2,3,4,5].forEach(_=>{_==r.current_page?N.push(["current",_]):N.push(_)}),N.push("spacer"),N.push(r.last_page);else for(var O=1;O<=r.last_page;O++)O==r.current_page?N.push(["current",O]):N.push(O);u(N)},T=N=>{let O="";return typeof N=="object"?[N,O]=N:O=N,N=="spacer"?b.jsx("li",{className:"page-item disabled",children:b.jsx("span",{className:"page-link",style:y,children:". . ."})}):N=="current"?b.jsx("li",{className:"page-item active","aria-current":"page",children:b.jsx("span",{className:"page-link",style:y,children:O})}):b.jsx("li",{className:"page-item",children:b.jsx("button",{className:"page-link",style:y,onClick:()=>C(N),children:O})})},j=()=>b.jsx("li",{className:"page-item",children:b.jsxs("select",{className:"page-link",style:{...y,height:"100%"},value:l,onChange:N=>x(N.target.value),children:[b.jsx("option",{value:"0",children:"Go To"}),h.map(N=>b.jsx("option",{value:N+1,children:N+1},`page_option_${N}`))]})});return b.jsx("div",{children:b.jsx("nav",{"aria-label":"Pages for the table",children:b.jsxs("ul",{className:"pagination",children:[b.jsx("li",{className:`page-item ${r.current_page==1?"disabled":""}`,children:b.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>C(r.current_page-1),disabled:r.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),i.map((N,O)=>b.jsx(kr.Fragment,{children:T(N)},`page_${O}`)),r.last_page>v?j():"",b.jsx("li",{className:`page-item ${r.current_page==r.last_page?"disabled":""}`,children:b.jsx("button",{className:"page-link",style:y,onClick:()=>C(r.current_page+1),disabled:r.current_page==r.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},TZ=({api_url:n})=>{const r=To(),i=dr(gZ),u=dr(mZ),l=dr(CZ),d=b.jsx("div",{className:"loadingDiv",children:"Loading ..."});return M.useEffect(()=>{r(cZ())},[]),b.jsx("div",{className:"container-fluid",children:b.jsxs("div",{className:"row",children:[b.jsx("div",{className:"col-sm-3",children:b.jsx(EZ,{})}),b.jsxs("div",{className:"col-sm-9",children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:l?b.jsx(zO,{}):""})}),b.jsx("div",{className:"row",id:"projectListRow",children:b.jsx("div",{className:"col",children:i&&u?b.jsx(RZ,{}):d})}),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:l?b.jsx(zO,{scroll:"projects_browser_app"}):""})})]})]})})},IZ=n=>n.publications_store.publication,NZ=n=>n.publications_store.publication.doi,_Z=n=>n.publications_store.publication_types,Fk=n=>n.publications_store.publication.authors,OZ=n=>n.publications_store.tag_categories,AZ=n=>n.publications_store.projects,jZ=n=>n.publications_store.publication.tags,DZ=n=>n.publications_store.errors,Vk=n=>n.publications_store.data_loaded,Bk=n=>n.publications_store.show_saved,WR=n=>n.publications_store.saving,kZ=n=>n.publications_store.modal,zk=n=>n.publications_store.form_valid,Hk=n=>!WR(n)&&Vk(n)&&zk(n)&&Uk(n)&&n.publications_store.projects.filter(r=>r.selected).length>0,Uk=n=>{const r=Fk(n);return r.length==0?!1:r.filter(i=>i.first_name==""||i.last_name=="").length==0},$k=n=>({type:"UPDATE_PUBLICATION",payload:n}),MZ=n=>({type:"UPDATE_FIELD",payload:n}),Bw=n=>({type:"CHANGE_PUB_TYPE",payload:n}),LZ=n=>({type:"SET_PUBLICATION",payload:n}),PZ=()=>({type:"ADD_AUTHOR"}),FZ=n=>({type:"UPDATE_AUTHOR",payload:n}),VZ=n=>({type:"TOGGLE_REQUEST",payload:n}),Im=n=>({type:"UPDATE_ERRORS",payload:n}),Gk=n=>({type:"HIDE_ERROR",payload:n}),BZ=n=>({type:"UPDATE_SELECTED_TAGS",payload:n}),zZ=n=>({type:"DELETE_AUTHOR",payload:n}),HZ=n=>({type:"DATA_LOADED",payload:n}),Wk=n=>({type:"UPDATE_SHOW_SAVED",payload:n}),UZ=()=>({type:"RESET_STATE"}),QE=n=>({type:"UPDATE_SAVING",payload:n}),$Z=n=>({type:"SET_FORM_VALID",payload:n}),Xk=n=>({type:"SET_GRANT_NUMBER",payload:n}),GZ=n=>({type:"ADD_PROJECT",payload:n}),vc={routes:{}},WZ=(n,r,i)=>{let u=!0;const l=[];for(const h of r)n[h]||(u=!1,l.push(h));const d=n.authors||[];for(const h of d)for(const v of i)h[v]||(u=!1,l.includes(v)||l.push(v));return{formValid:u,missingFields:l}},XZ=n=>n.length>0?b.jsxs("div",{role:"alert",children:[b.jsx("p",{children:"Please provide the following information before submitting:"}),b.jsx("ul",{children:n.map(r=>b.jsx("li",{children:YZ(r)},r))})]}):null;function YZ(n){return n.split("_").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}const ZZ=()=>async(n,r)=>{const i=r().publications_store.publication.doi,u=encodeURIComponent(i).replaceAll(".","%2E"),l="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(`/publications/lookup?doi=${u}`).then(d=>d.json()).then(d=>{if(d.title!=""){let h=r().publications_store.publication_types.find(v=>v.citation_style_type==d.type);n(Bw(h?h.publication_type:"Other")),n(LZ(d))}else n(Im(l))},d=>{n(Im(l))})},JZ=()=>async(n,r)=>{const i=r().publications_store.grant_number,u=vc.routes.publications_find_project_path();await fetch(`${u}?grant_number=${i}`).then(l=>l.json()).then(l=>{n(GZ(l)),n(Xk(""))},()=>{n(Im("Unable to find a project with this grant number."))})},Yk=()=>async n=>{const r=/^\/requests/.test(window.location.pathname)?vc.routes.publication_path("new.json"):window.location.href+".json";await fetch(r).then(i=>i.json()).then(i=>{n(HZ(i))})},Zk=()=>async(n,r)=>{const i=r().publications_store,u=i.projects.filter(T=>T.selected),l=Object.keys(i.selected_tags).map(T=>i.selected_tags[T]).flat(),d={...i.publication},h=i.errors,{formValid:v,missingFields:y}=WZ(d,["title","publication_year","publication_month"],["first_name","last_name"]);if(!v){h.length>0&&Array.from(h).forEach(j=>{n(Gk(j.id))});const T=XZ(y);n(Im(T));return}const C={authenticity_token:document.getElementsByName("authenticity_token")[0].value,publication:d,authors:d.authors.map(T=>({...T,order:0})),tags:l,projects:u};let x,R;d.publication_id?(x=vc.routes.publication_path(d.publication_id),R="PATCH"):(x=vc.routes.publications_path(),R="POST"),n(QE(!0)),await fetch(x,{method:R,headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}).then(T=>{i.redirect?window.location.href=vc.routes.publications_path():(d.publication_id||(n(UZ()),n(Yk())),n(Wk(!0)),n(QE(!1)))},()=>{n(QE(!1)),n(Im("There was an error saving this publication."))})},qZ=({doi:n,updatePublication:r,doiLookup:i})=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),b.jsxs("div",{className:"input-group",children:[b.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:n,onChange:u=>r(u.target.value)}),b.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>i(),children:"Lookup Publication"})]})]})}),QZ=n=>({doi:NZ(n)}),KZ=n=>({updatePublication:r=>n($k({key:"doi",value:r})),doiLookup:()=>n(ZZ())}),e6=fs(QZ,KZ)(qZ),t6=({author:n,authorKey:r,updateAuthor:i,deleteAuthor:u})=>{const l=v=>{i({key:v.target.name,value:v.target.value,idx:r})},d=v=>b.jsx("td",{children:b.jsx("input",{type:"text",className:"form-control",name:v,id:v,value:n[v],onChange:y=>l(y)})},`field_${v}`),h=["first_name","last_name","affiliation"];return b.jsxs("tr",{children:[h.map(v=>d(v)),b.jsx("td",{children:r!==0&&b.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>u(r),children:b.jsx("i",{className:"bi bi-trash"})})})]})},n6=n=>({updateAuthor:r=>n(FZ(r)),deleteAuthor:r=>n(zZ(r))}),HO=fs(null,n6)(t6),r6=({authors:n,addAuthor:r,authors_exist:i})=>{const u=n.length===0,l=()=>i?"":b.jsx("div",{className:"alert alert-danger",children:"You must add at least one author and each author must have a first and last name"});return b.jsxs("div",{children:[l(),b.jsxs("table",{className:"table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:"First Name"}),b.jsx("th",{children:"Last Name"}),b.jsx("th",{children:"Affiliation"}),b.jsx("th",{})]})}),b.jsxs("tbody",{children:[n.map((d,h)=>b.jsx(HO,{author:d,authorKey:h},`author_${h}`)),u&&b.jsx(HO,{author:r()})]})]}),b.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>r(),children:"Add Author"})]})},a6=n=>({authors:Fk(n),authors_exist:Uk(n)}),i6=n=>({addAuthor:()=>n(PZ())}),o6=fs(a6,i6)(r6),s6=({category:n,publication_tags:r,updateSelectedTags:i,index:u})=>{const l=M.useRef(null),d=()=>{const v=r.filter(y=>y.label==n.label)[0];return v?v.options:[]},h=v=>{i({category:n.label,tags:v})};return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fw-bold mb-1",children:n.label}),b.jsx("div",{className:"mb-3",children:b.jsx($R,{classNames:{control:v=>v.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:d(),options:n.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${u}`,inputId:`tags_${u}`,ref:l,closeMenuOnSelect:!1,onChange:h})})]})},l6=n=>({updateSelectedTags:r=>n(BZ(r))}),u6=n=>({publication_tags:jZ(n)}),c6=fs(u6,l6)(s6),f6=({projects:n,toggleProject:r})=>{const i=l=>`list-group-item list-group-item-action clickable ${l.selected?"list-group-item-success":""}`,u=()=>n.filter(l=>l.selected).length>0;return b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[u()?"":b.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),b.jsx("div",{className:"list-group",children:n.map((l,d)=>b.jsxs("div",{className:i(l),onClick:()=>r(d),children:[l.grant_number,": ",l.title]},`project_${l.grant_number}`))})]})})},d6=n=>({projects:AZ(n)}),p6=n=>({toggleProject:r=>n(VZ(r))}),v6=fs(d6,p6)(f6),h6=({grant_number:n,setGrantNumber:r,grantSearch:i})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",b.jsxs("div",{className:"input-group mt-1",children:[b.jsx("input",{type:"text",className:"form-control",value:n,onChange:u=>r(u.target.value),placeholder:"Enter a grant number"}),b.jsx("button",{className:"btn btn-primary",onClick:()=>i(),children:"Find Project"})]})]})}),m6=n=>({setGrantNumber:r=>n(Xk(r)),grantSearch:()=>n(JZ())}),g6=n=>({grant_number:n.publications_store.grant_number}),y6=fs(g6,m6)(h6),b6=({publication:n,updateField:r,publication_types:i,changePubType:u,updatePublication:l,tag_categories:d,savePublication:h,modal:v,save_enabled:y,setFormValid:C,form_valid:x})=>{const R=F=>{F.target.value.trim()==""?C(!1):C(!0),l({key:"title",value:F.target.value})},T=()=>n.fields.map((F,V)=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:`field_${F.csl_field_name}`,className:"form-label",children:F.name}),b.jsx("input",{type:"text",className:"form-control",name:`field_${F.csl_field_name}`,id:`field_${F.csl_field_name}`,value:F.field_value,onChange:H=>r({index:V,value:H.target.value})})]})},`field_${F.csl_field_name}`)),j=()=>{const F=new Date().getFullYear()+2;let V=1980;const H=[];for(;V<=F;)H.push(V++);const z=["January","February","March","April","May","June","July","August","September","October","November","December"],U=b.jsx("i",{className:"bi bi-asterisk text-danger"});return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",U]}),b.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${x?"":"is-invalid"}`,value:n.title,onChange:J=>R(J)})]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),b.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:n.publication_year,onChange:J=>{l({key:"publication_year",value:J.target.value})},children:H.map(J=>b.jsx("option",{value:J,children:J},`year_${J}`))})]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),b.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:n.publication_month,onChange:J=>{l({key:"publication_month",value:J.target.value})},children:z.map((J,q)=>b.jsx("option",{value:q+1,children:J},`month_${q}`))})]})})]})},N=b.jsxs("div",{className:"card",children:[b.jsx("div",{className:"card-header",children:b.jsx("h2",{children:"Publication Information"})}),b.jsxs("div",{className:"card-body",children:[b.jsx("p",{className:"mb-2",children:'Enter information about this publication below. If you have a DOI, you may use the "Lookup Publication" button to attempt to find this information automatically.'}),b.jsx(e6,{}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),b.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:n.publication_type,onChange:F=>u(F.target.value),children:i.map(F=>b.jsx("option",{value:F.publication_type,children:F.publication_type},`pub_type_${F.type_id}`))})]})}),j(),T()]})]}),O=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Authors"}),b.jsxs(Hp,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,b.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),b.jsx("div",{className:"card-body",children:b.jsx(o6,{})})]}),_=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Tags"}),b.jsx(Hp,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),b.jsx("div",{className:"card-body",children:d.map((F,V)=>b.jsx(c6,{index:V,category:F},`tc_${V}`))})]}),L=b.jsxs("div",{className:"card mt-3",children:[b.jsxs("div",{className:"card-header d-flex",children:[b.jsx("h2",{children:"Associated Projects"}),b.jsx(Hp,{children:"Click/Tap each project that this publication is related to."})]}),b.jsxs("div",{className:"card-body",children:[b.jsx(v6,{}),b.jsx("hr",{}),b.jsx(y6,{})]})]});return b.jsxs(b.Fragment,{children:[N,O,_,L,v?null:b.jsx("p",{className:"mt-3",children:b.jsx("button",{onClick:()=>h(),className:"btn btn-success",disabled:!y,children:"Save Publication"})})]})},C6=n=>({publication:IZ(n),publication_types:_Z(n),tag_categories:OZ(n),saving:WR(n),modal:kZ(n),save_enabled:Hk(n),form_valid:zk(n)}),x6=n=>({updateField:r=>n(MZ(r)),changePubType:r=>n(Bw(r)),updatePublication:r=>n($k(r)),savePublication:()=>n(Zk()),setFormValid:r=>n($Z(r))}),S6=fs(C6,x6)(b6),E6=({errors:n,hideError:r})=>b.jsx(b.Fragment,{children:n.map(i=>b.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[i.message,b.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>r(i.id)})]},`err_${i.id}`))}),w6=n=>({errors:DZ(n)}),R6=n=>({hideError:r=>n(Gk(r))}),T6=fs(w6,R6)(E6),I6=({show_saved:n,updateShowSaved:r})=>{const i=b.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",b.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>r(!1)})]});return n?i:b.jsx(b.Fragment,{})},N6=n=>({show_saved:Bk(n)}),_6=n=>({updateShowSaved:r=>n(Wk(r))}),O6=fs(N6,_6)(I6),A6=({getData:n,data_loaded:r})=>(M.useEffect(()=>{n()},[]),b.jsxs(b.Fragment,{children:[b.jsx(O6,{}),b.jsx(T6,{}),r?b.jsx(S6,{}):b.jsx(Mm,{})]})),j6=n=>({data_loaded:Vk(n)}),D6=n=>({getData:()=>n(Yk())}),Jk=fs(j6,D6)(A6),k6=({saving:n,savePublication:r,showSaved:i,updatePublications:u,save_enabled:l})=>{const[d,h]=M.useState(!1);return M.useEffect(()=>{!n&&i&&u()},[n,i]),b.jsxs(b.Fragment,{children:[b.jsxs(Ln,{size:"xl",show:d,onHide:()=>h(!1),scrollable:!0,children:[b.jsx(Ln.Header,{closeButton:!0,children:b.jsx(Ln.Title,{children:"Add Publication"})}),b.jsx(Ln.Body,{children:b.jsx(Jk,{})}),b.jsx(Ln.Footer,{children:b.jsxs("div",{className:"d-flex",children:[b.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>h(!1),children:"Cancel"}),b.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{r(),h(!1)},children:"Save Publication"})]})})]}),b.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(!0),children:"Add a New Publication"})]})},M6=n=>({saving:WR(n),showSaved:Bk(n),save_enabled:Hk(n)}),L6=n=>({savePublication:()=>n(Zk())}),P6=fs(M6,L6)(k6),F6=({usernames:n=[],publication_ids:r=[]})=>{const[i,u]=M.useState(n),[l,d]=M.useState(r),[h,v]=M.useState([]),y=M.useRef(i),C=O=>{y.current=O,u(O)},x=async()=>{const _=await(await fetch(vc.routes.search_publications_path({usernames:i}))).json();v(_)};M.useEffect(()=>{x()},[i]),M.useEffect(()=>{addEventListener("requestAddRole",O=>C([...y.current,O.detail.username])),addEventListener("requestRemoveRole",O=>C(y.current.filter(_=>_!=O.detail.username)))},[]);let R=!1,T=!1;const j=h.map(O=>{const _=l.includes(O.publication_id);R=R||_,T=T||!_;const L=new Date(O.publication_year,O.publication_month-1);return b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("input",{type:"checkbox",name:"publication_ids[]",value:O.publication_id,checked:_,onChange:()=>d(_?l.filter(F=>F!=O.publication_id):[...l,O.publication_id])})}),b.jsx("td",{children:O.title}),b.jsx("td",{children:O.authors.map(F=>`${F.first_name} ${F.last_name}`).join(", ")}),b.jsx("td",{children:O.publication_type}),b.jsxs("td",{children:[L.toLocaleString("default",{month:"short"})," ",O.publication_year]})]},O.publication_id)}),N=`${T?"Select":"Deselect"} all`;return b.jsxs("div",{className:"publications-select",children:[b.jsxs("table",{className:"table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:b.jsx("input",{type:"checkbox",value:"","aria-label":N,title:N,checked:R&&!T,onChange:()=>d(T?h.map(O=>O.publication_id):[]),ref:O=>{O&&(O.indeterminate=R&&T)}})}),b.jsx("th",{children:"Title"}),b.jsx("th",{children:"Authors"}),b.jsx("th",{children:"Type"}),b.jsx("th",{children:"Date"})]})}),b.jsx("tbody",{children:j})]}),b.jsx(P6,{updatePublications:x})]})},V6=()=>`${Math.random().toString(36).slice(2)}`,zw=document.querySelector("#publications-react"),B6=zw?zw.dataset:{},UO={publication_types:[],tag_categories:[],publication:{},projects:[],errors:[],selected_tags:{},data_loaded:!1,saving:!1,show_saved:!1,redirect:B6.redirect||!1,modal:zw==null,form_valid:!1,grant_number:""},z6=(n=UO,r)=>{const{type:i,payload:u}=r;switch(i){case"UPDATE_FIELD":return So(n,d=>(d.publication.fields[u.index].field_value=u.value,d));case"CHANGE_PUB_TYPE":return So(n,d=>{let h=d.publication_types.find(v=>v.publication_type==u).fields;return h.forEach(v=>{const y=d.publication.fields.find(C=>C.csl_field_name==v.csl_field_name);y&&(v.value=y.value)}),d.publication.publication_type=u,d.publication.fields=h,d});case"UPDATE_PUBLICATION":return{...n,publication:{...n.publication,[u.key]:u.value}};case"SET_PUBLICATION":return So(n,d=>(d.publication.fields.forEach(h=>{h.field_value=u[h.csl_field_name]}),Object.keys(d.publication).forEach(h=>{u[h]&&(d.publication[h]=u[h])}),d.form_valid=u.title.trim()!="",d));case"ADD_AUTHOR":{const l={portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}};return So(n,h=>{h.publication.authors.push(l)})}case"UPDATE_AUTHOR":return So(n,d=>{d.publication.authors[u.idx][u.key]=u.value});case"TOGGLE_TAG":return So(n,d=>{let h=d.tag_categories.find(v=>v.publication_tags_category_id==u.publication_tags_category_id);h.tags[u.idx].selected=!h.tags[u.idx].selected});case"TOGGLE_REQUEST":return So(n,d=>(d.projects[u].selected=!d.projects[u].selected,d));case"UPDATE_ERRORS":{const l={id:V6(),message:u};return{...n,errors:[...n.errors,l]}}case"HIDE_ERROR":{const l=n.errors.filter(d=>d.id!=u);return{...n,errors:l}}case"UPDATE_SELECTED_TAGS":return So(n,d=>{const h=u.tags.map(v=>v.value);return d.selected_tags[u.category]=h,d});case"DELETE_AUTHOR":return So(n,d=>(d.publication.authors.splice(u,1),d));case"DATA_LOADED":return So(n,d=>(d.publication=u.publication,d.form_valid=u.publication.title.trim()!="",d.publication.authors.forEach(h=>{h.affiliation||(h.affiliation="")}),d.publication_types=u.publication_types,d.tag_categories=u.tag_categories,d.projects=u.publication.projects,u.publication.tags.forEach(h=>d.selected_tags[h.label]=h.options.map(v=>v.value)),d.data_loaded=!0,d));case"UPDATE_SHOW_SAVED":return{...n,show_saved:u};case"UPDATE_SAVING":return{...n,saving:u};case"RESET_STATE":return UO;case"SET_FORM_VALID":return{...n,form_valid:u};case"SET_GRANT_NUMBER":return{...n,grant_number:u};case"ADD_PROJECT":return{...n,projects:[...n.projects,u]};default:return n}},H6={catalogs:{},filteredResources:[],filters:[],hasErrors:!1,onRamps:!1,resources:[],resourcesLoaded:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},r0=Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{r($O(!1));let i=[];n.catalogSources?i=n.catalogSources:i.push({...n,catalogLabel:"Default"}),n.onRamps&&i.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const u=await Promise.all(i.map(async l=>{const h=await(await fetch(l.apiUrl)).json();return{...l,data:h}}));r(W6({data:u,params:n})),r($O(!0))});Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{r(Y6(n)),r(Qk())});const U6=n=>{const r=[],i=n.filter(u=>u.features.filter(l=>l.selected).length>0);return n.forEach(u=>{u.features.forEach(l=>{l.selected&&r.push(l.featureId)})}),i.map(u=>({...u,features:u.features.filter(l=>l.selected)}))},$6=n=>{const r={},i={};let u={};return n.forEach(d=>{r[d.catalogLabel]={...d,resourceIds:[],selected:!1,catalogId:d.catalogLabel.replace(/[^(A-z)]/,"")},delete r[d.catalogLabel].data,d.data.forEach(h=>{if(Hw(d.allowedResources,d.excludedResources,h.resourceName)){const{categories:v,formattedResource:y}=G6(d,h,u);i[h.resourceId]=y,r[d.catalogLabel].resourceIds.push(h.resourceId),u=v}})}),{resources:Object.keys(i).map(d=>i[d]),catalogs:r,categories:u}},Hw=(n,r,i)=>!n&&!r||n&&n.length==0&&r&&r.length==0?!0:n&&n.length>0?n.find(u=>u==i):r&&r.length>0?!r.find(u=>u==i):!0,G6=(n,r,i)=>{const u=[];let l="";r.featureCategories.filter(v=>v.categoryIsFilter).forEach(v=>{const y=v.categoryId;v.categoryName=="ACCESS Resource Grouping"?l=v.features[0].name:(!i[y]&&Hw(n.allowedCategories,n.excludedCategories,v.categoryName)&&(i[y]={categoryId:y,categoryName:v.categoryName,categoryDescription:v.categoryDescription,features:{}}),v.features.forEach(C=>{const x={featureId:C.featureId,name:C.name,description:C.description,categoryId:y,selected:!1},R=Hw(n.allowedFilters,n.excludedFilters,x.name);R&&u.push(x),i[y]&&R&&!i[y].features[C.featureId]&&(i[y].features[C.featureId]=x)}))});const d=u.map(v=>v.name).sort((v,y)=>v>y);return{formattedResource:{...r,resourceName:r.resourceName.trim(),features:d,featureIds:u.map(v=>v.featureId),sortCategory:l},categories:i}},qk=D0({name:"resourceCatalog",initialState:H6,reducers:{handleResponse:(n,{payload:r})=>{const i=r.data,{resources:u,catalogs:l,categories:d}=$6(i);n.catalogs=l,n.onRamps=r.params.onRamps;for(const h in d){const v=d[h],y=[];for(const C in v.features)y.push(v.features[C]);n.filters.push({...v,features:y.sort((C,x)=>C.name>x.name)})}n.filters=n.filters.sort((h,v)=>h.categoryName.localeCompare(v.categoryName)),n.resources=u.sort((h,v)=>h.resourceName.localeCompare(v.resourceName)).sort((h,v)=>n.resourceSorting[h.sortCategory]>n.resourceSorting[v.sortCategory]),n.filteredResources=[...n.resources],n.resourcesLoaded=!0},resetFilters:n=>{n.filters.forEach(r=>{r.features.forEach(i=>i.selected=!1)}),n.filteredResources=[...n.resources]},setResourcesLoaded:(n,{payload:r})=>{n.resourcesLoaded=r},toggleCatalog:(n,{payload:r})=>{const{catalog:i,selected:u}=r;n.catalogs[i.catalogLabel].selected=u},toggleFilter:(n,{payload:r})=>{if(r){const h=r,y=n.filters.find(C=>C.categoryId==h.categoryId).features.find(C=>C.featureId==h.featureId);y.selected=!y.selected}const i=U6(n.filters);let u=[];if(i.length>0){const h=i.map(v=>v.features.map(y=>y.featureId));n.resources.forEach(v=>{let y=0;h.forEach(C=>{let x=!1;v.featureIds.forEach(R=>{C.indexOf(R)>=0&&(x=!0)}),x&&(y+=1)}),y>=h.length&&u.push(v)})}else u=n.resources;const l=Object.keys(n.catalogs).map(h=>n.catalogs[h]),d=l.filter(h=>h.selected);if(d.length>0&&d.length<l.length){const h=d.map(v=>v.resourceIds).flat();u=u.filter(v=>h.indexOf(v.resourceId)>=0)}n.filteredResources=u}},extraReducers:n=>{n.addCase(r0.pending,r=>{}).addCase(r0.fulfilled,(r,i)=>{}).addCase(r0.rejected,(r,i)=>{r.hasErrors=!0,console.log(i.error)})}}),{handleResponse:W6,processData:W8,resetFilters:X6,setResourcesLoaded:$O,toggleCatalog:Y6,toggleFilter:Qk}=qk.actions,Kk=n=>n.resourceCatalog.catalogs,Z6=n=>n.resourceCatalog.filters,J6=n=>n.resourceCatalog.hasErrors,q6=n=>n.resourceCatalog.resourcesLoaded,Q6=n=>n.resourceCatalog.filteredResources,K6=qk.reducer,e8="_access_ae3ny_2",t8="_resourceName_ae3ny_6",n8="_description_ae3ny_11",r8="_filterBar_ae3ny_15",a8="_cardBg_ae3ny_21",i8="_active_ae3ny_26",o8="_plainButton_ae3ny_31",s8="_btnSecondary_ae3ny_41",Pp={access:e8,resourceName:t8,description:n8,filterBar:r8,cardBg:a8,active:i8,plainButton:o8,btnSecondary:s8},l8=({resource:n})=>{const[r,i]=M.useState(!0),u=C=>{const x={"CPU Compute":"cpu-fill","GPU Compute":"gpu-card",Cloud:"cloud-fill","Commercial Cloud":"cloud-fill",Storage:"database-fill","Service / Other":"journal","Innovative / Novel Compute":"pc"};return x[C]?b.jsx("i",{title:C,className:`bi bi-${x[C]} me-2 `},`${n.resourceId}_${x[C]}`):""},l=()=>b.jsxs("span",{className:"float-end",children:[n.features.map(C=>u(C)),n.resourceType]}),d=C=>C.length==0?"":b.jsx(b.Fragment,{children:C.map((x,R)=>b.jsx("span",{className:"badge text-bg-secondary me-2",children:x},`feature_${n.resourceId}_${R}`))}),h=()=>{let C=n.resourceDescription;return C&&C!=""?(Pp.plainButton,b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col fw-bold",children:["About ",n.resourceName]})}),b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col ",children:[b.jsx("div",{className:Pp.description,dangerouslySetInnerHTML:{__html:C}}),""]})})]})):""},v=()=>n.recommendedUse&&n.recommendedUse!=""?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",children:b.jsx("div",{className:Pp.description,dangerouslySetInnerHTML:{__html:n.recommendedUse}})})})]}):"",y=()=>Pp.cardBg;return b.jsx(b.Fragment,{children:b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"card mb-3",children:[b.jsxs("div",{className:`card-header ${y()}`,children:[b.jsx("span",{className:"",children:n.resourceName}),l()]}),b.jsxs("div",{className:"card-body",children:[b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",children:d(n.features)})}),v(),h()]}),b.jsx("div",{className:"card-footer",children:b.jsxs("a",{target:"_blank",href:n.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",b.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},u8=({filter:n})=>{const r=To(),i=()=>{r(Qk(n))};return b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"form-check",children:[b.jsx("label",{className:"form-check-label",htmlFor:`filter_${n.featureId}`,children:n.name}),b.jsx("input",{className:"form-check-input",type:"checkbox",value:n.featureId,id:`filter_${n.featureId}`,checked:n.selected,onChange:i})]})})})},c8=({category:n})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("div",{className:"fw-bold mb-1 mt-1",children:b.jsx("abbr",{title:n.categoryDescription,children:n.categoryName})}),n.features.map(r=>b.jsx(u8,{filter:r},r.featureId))]})}),f8=()=>{const n=To(),r=dr(Kk),i=dr(Z6),u=i.filter(l=>l.features.filter(d=>d.selected).length>0);return Object.keys(r).map(l=>r[l]),b.jsxs("div",{children:[i.map(l=>b.jsx(c8,{category:l},l.categoryId)),b.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>n(X6()),disabled:u.length==0,children:"Reset Filters"})]})},d8=()=>{const[n,r]=M.useState(!1),i=()=>r(!1),u=()=>r(!0);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:`offcanvas offcanvas-start ${n?"show":""}`,tabIndex:"-1",id:"offcanvas","aria-labelledby":"offcanvasLabel",children:[b.jsxs("div",{className:"offcanvas-header",children:[b.jsx("h5",{className:"offcanvas-title",id:"offcanvasLabel",children:"Filters"}),b.jsx("button",{type:"button",className:"btn-close",onClick:i,"aria-label":"Close"})]}),b.jsx("div",{className:"offcanvas-body",children:b.jsx(f8,{})})]}),b.jsx("div",{className:"row mb-2",children:b.jsx("div",{className:"col pt-2 pb-2",children:b.jsx("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:b.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:u,children:[b.jsx("i",{className:"bi bi-filter"})," Filters"]})})})})]})},p8=()=>{const n=dr(Q6);return n.length==0?b.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):b.jsx("div",{className:"card shadow",children:b.jsxs("div",{className:"card-body",children:[b.jsx(d8,{}),n.map(r=>b.jsx(l8,{resource:r},r.resourceId))]})})},v8=({baseUrl:n})=>b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col d-flex",children:b.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${n}/access_logo.png`})})}),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),b.jsx("p",{children:"Need advanced computing and storage options for your research or classroom? The ACCESS program has been established and funded by the U.S. National Science Foundation to help you - the nation's researchers and educators - to use some of the country's most advanced computing systems and services - at no cost to you."}),b.jsx("p",{children:"Thousands of researchers, instructors, and students from institutions large and small use ACCESS-integrated resources every year. With more than 30 resources from more than 15 resource providers, there's bound to be a resource for you, your lab, or your class."}),b.jsx("p",{children:"Explore the resource catalog below - filter the list to discover the resources that have the features or services to accelerate your activities. The System Info button will take you to the resource's documentation for all the details."}),b.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),b.jsx("p",{children:b.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${Pp.btnSecondary}`,children:["Get Your First Project ",b.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),b.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",b.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",b.jsx("br",{}),"If you have questions, please",b.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),h8=({catalogSources:n=[],onRamps:r=!1,baseUrl:i})=>{const u=To(),l=dr(q6),d=dr(J6),h=dr(Kk),v=Object.keys(h).map(C=>h[C]);M.useEffect(()=>{u(r0({catalogSources:n,onRamps:r}))},[]);const y=()=>r&&v.length>1?b.jsx(b.Fragment,{children:v.filter(C=>C.catalogLabel!="ACCESS").map((C,x)=>b.jsx("div",{className:"row mb-3",children:b.jsxs("div",{className:"col",children:[b.jsxs("h4",{className:"border-bottom",children:["About ",C.catalogLabel]}),b.jsx("div",{dangerouslySetInnerHTML:{__html:C.description}})]})},`catalog_${x}`))}):"";return d?b.jsx("div",{className:"row",children:b.jsx("div",{className:"col text-center mt-2",children:b.jsx("h4",{children:"Unable to Load Resources"})})}):l?b.jsxs("div",{className:`container mt-3 ${Pp.access}`,children:[r?b.jsx(v8,{baseUrl:i}):"",y(),b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsx(p8,{})})})]}):b.jsx(Mm,{})},m8={filters:[],resources:[],filteredResources:[],resourcesLoaded:!1,hasErrors:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},a0=Di("resourceCatalog/getResources",async(n,{dispatch:r})=>{const u=await(await fetch(n.apiUrl)).json();r(y8({data:u,params:n}))}),g8=n=>{const r=[],i=n.filter(u=>u.features.filter(l=>l.selected).length>0);return n.forEach(u=>{u.features.forEach(l=>{l.selected&&r.push(l.featureId)})}),i.map(u=>({...u,features:u.features.filter(l=>l.selected)}))},GO=(n,r,i)=>{if(n.length==0&&r.length==0)return!0;if(n.length>0)return n.find(u=>u==i);if(r.length>0)return!r.find(u=>u==i)},eM=D0({name:"resourceCatalog",initialState:m8,reducers:{handleResponse:(n,{payload:r})=>{const i=r.data,u=r.params.excludedCategories,l=r.params.excludedFilters,d=r.params.excludedResources,h=r.params.allowedCategories,v=r.params.allowedFilters,y=[],C={};i.filter(x=>!d.includes(x.resourceName)).forEach(x=>{const R=[];let T="";x.featureCategories.filter(N=>N.categoryIsFilter).forEach(N=>{const O=N.categoryId;N.categoryName=="ACCESS Resource Grouping"?T=N.features[0].name:(!C[O]&&GO(h,u,N.categoryName)&&(C[O]={categoryId:O,categoryName:N.categoryName,categoryDescription:N.categoryDescription,features:{}}),N.features.forEach(_=>{const L={featureId:_.featureId,name:_.name,description:_.description,categoryId:O,selected:!1},F=GO(v,l,L.name);F&&R.push(L),C[O]&&F&&!C[O].features[_.featureId]&&(C[O].features[_.featureId]=L)}))});const j={resourceName:x.resourceName,resourceId:x.resourceId,resourceType:x.resourceType,organization:x.organization,units:x.units,userGuideUrl:x.userGuideUrl,resourceDescription:x.resourceDescription,description:x.description,recommendedUse:x.recommendedUse,features:R.map(N=>N.name).sort((N,O)=>N>O),featureIds:R.map(N=>N.featureId),sortCategory:T};y.push(j)});for(const x in C){const R=C[x],T=[];for(const j in R.features)T.push(R.features[j]);n.filters.push({...R,features:T.sort((j,N)=>j.name>N.name)})}n.filters=n.filters.sort((x,R)=>x.categoryName.localeCompare(R.categoryName)),n.resources=y.sort((x,R)=>x.resourceName.localeCompare(R.resourceName)).sort((x,R)=>n.resourceSorting[x.sortCategory]>n.resourceSorting[R.sortCategory]),n.filteredResources=[...n.resources],n.resourcesLoaded=!0},resetFilters:n=>{n.filters.forEach(r=>{r.features.forEach(i=>i.selected=!1)}),n.filteredResources=[...n.resources]},toggleFilter:(n,{payload:r})=>{const i=r,l=n.filters.find(h=>h.categoryId==i.categoryId).features.find(h=>h.featureId==i.featureId);l.selected=!l.selected;const d=g8(n.filters);if(d.length>0){const h=[],v=d.map(y=>y.features.map(C=>C.featureId));n.resources.forEach(y=>{let C=0;v.forEach(x=>{let R=!1;y.featureIds.forEach(T=>{x.indexOf(T)>=0&&(R=!0)}),R&&(C+=1)}),C>=v.length&&h.push(y)}),n.filteredResources=h}else n.filteredResources=[...n.resources]}},extraReducers:n=>{n.addCase(a0.pending,r=>{}).addCase(a0.fulfilled,(r,i)=>{}).addCase(a0.rejected,(r,i)=>{r.hasErrors=!0,console.log(i.error)})}}),{handleResponse:y8,processData:X8,resetFilters:b8,toggleFilter:C8}=eM.actions,x8=n=>n.resourceCatalog.hasErrors,S8=n=>n.resourceCatalog.resourcesLoaded,E8=n=>n.resourceCatalog.filters,w8=n=>n.resourceCatalog.filteredResources,R8=eM.reducer,T8=({resource:n})=>{const r=u=>u.length==0?"":b.jsx("ul",{children:u.map((l,d)=>b.jsx("li",{children:l},`feature_${n.resourceId}_${d}`))}),i=(u,l)=>l&&l!=""?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"row",children:b.jsx("div",{className:"col fw-bold",children:u})}),b.jsx("div",{className:"row mb-3",children:b.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:l}})})]}):"";return b.jsxs(os.Item,{eventKey:n.resourceId,children:[b.jsx(os.Header,{children:n.resourceName}),b.jsxs(os.Body,{children:[b.jsx("table",{className:"table",children:b.jsxs("tbody",{children:[b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Resource Type:"}),b.jsx("td",{children:n.resourceType})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Organization:"}),b.jsx("td",{children:n.organization})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Units:"}),b.jsx("td",{children:n.units})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"User Guide:"}),b.jsx("td",{children:n.userGuideUrl==""?"":b.jsx("a",{href:n.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),b.jsxs("tr",{children:[b.jsx("td",{className:"fw-bold",children:"Features Available:"}),b.jsx("td",{children:r(n.features)})]})]})}),i("Resource Description",n.resourceDescription),i("Allocations Description",n.description),i("Recommended Use",n.recommendedUse)]})]})},I8=()=>{const n=dr(w8);return n.length==0?b.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):b.jsxs("div",{children:[b.jsx("h4",{className:"mb-0",children:"Resources"}),b.jsx(os,{children:n.map(r=>b.jsx(T8,{resource:r},r.resourceId))})]})},N8=({filter:n})=>{const r=To(),i=()=>{r(C8(n))};return b.jsx("div",{className:"row",children:b.jsx("div",{className:"col",children:b.jsxs("div",{className:"form-check",children:[b.jsx("label",{className:"form-check-label",htmlFor:`filter_${n.featureId}`,children:n.name}),b.jsx("input",{className:"form-check-input",type:"checkbox",value:n.featureId,id:`filter_${n.featureId}`,checked:n.selected,onChange:i})]})})})},_8=({category:n})=>b.jsx("div",{className:"row",children:b.jsxs("div",{className:"col",children:[b.jsx("div",{className:"fw-bold mb-1 mt-1",children:b.jsx("abbr",{title:n.categoryDescription,children:n.categoryName})}),n.features.map(r=>b.jsx(N8,{filter:r},r.featureId))]})}),O8=()=>{const n=To(),r=dr(E8),i=r.filter(u=>u.features.filter(l=>l.selected).length>0);return b.jsxs("div",{children:[b.jsx("h4",{className:"mb-0",children:"Filters"}),r.map(u=>b.jsx(_8,{category:u},u.categoryId)),b.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>n(b8()),disabled:i.length==0,children:"Reset Filters"})]})},A8=({apiUrl:n,excludedCategories:r=[],excludedFilters:i=[],excludedResources:u=[],allowedCategories:l=[],allowedFilters:d=[]})=>{const h=To(),v=dr(S8),y=dr(x8);return M.useEffect(()=>{h(a0({apiUrl:n,excludedCategories:r,excludedFilters:i,excludedResources:u,allowedCategories:l,allowedFilters:d}))},[]),y?b.jsx("div",{className:"row",children:b.jsx("div",{className:"col text-center mt-2",children:b.jsx("h4",{children:"Unable to Load Resources"})})}):v?b.jsx(b.Fragment,{children:b.jsxs("div",{className:"row mt-3",children:[b.jsx("div",{className:"col-sm-4",children:b.jsx(O8,{})}),b.jsx("div",{className:"col-sm-8",children:b.jsx(I8,{})})]})}):b.jsx(Mm,{})};function j8(n,{bootstrapFonts:r=!0,bootstrapVariables:i=!0,access:u=!1,baseUrl:l=null}={}){const d=n.attachShadow({mode:"open"}),h=document.createElement("div"),v=document.createElement("div"),y=document.createElement("div"),C=document.createElement("div"),x=document.createElement("link"),R=document.createElement("link"),T=document.createElement("link");return l=l??(typeof document>"u"?require("url").pathToFileURL(__filename).href:IN&&IN.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),x.rel="stylesheet",x.href=`${l}/bootstrap.css`,R.rel="stylesheet",R.href=`${l}/xras-ui.css`,T.rel="stylesheet",T.href=`${l}/access.css`,y.appendChild(C),v.appendChild(y),h.appendChild(v),d.appendChild(x),d.appendChild(R),d.appendChild(T),d.appendChild(h),h.classList.add("bootstrap"),i&&v.classList.add("bootstrap-variables"),r&&(y.classList.add("bootstrap-fonts"),y.setAttribute("data-bs-theme","light")),C}function D8({target:n}){ls.createRoot(n).render(b.jsx(zU,{}))}function k8({target:n,username:r,routes:i}){i&&(Nn.routes=i);const u=Om({reducer:{api:g$}});ls.createRoot(n).render(b.jsx(Qp,{store:u,children:b.jsx(uZ,{username:r})}))}function M8({target:n,apiUrl:r}){const i=Om({reducer:{projectsBrowser:SZ},preloadedState:{projectsBrowser:{...Lk,apiUrl:r}}});ls.createRoot(n).render(b.jsx(Qp,{store:i,children:b.jsx(TZ,{})}))}function tM(){return Om({reducer:{publications_store:z6}})}function L8({target:n,routes:r}){r&&(vc.routes=r),ls.createRoot(n).render(b.jsx(Qp,{store:tM(),children:b.jsx(Jk,{})}))}function P8({target:n,routes:r}){r&&(vc.routes=r),ls.createRoot(n).render(b.jsx(Qp,{store:tM(),children:b.jsx(F6,{...JSON.parse(n.dataset.publicationsSelectProps)})}))}function F8({target:n,catalogSources:r,onRamps:i,baseUrl:u}){const l=Om({reducer:{resourceCatalog:K6}});ls.createRoot(n).render(b.jsx(Qp,{store:l,children:b.jsx(h8,{catalogSources:r,onRamps:i,baseUrl:u})}))}function V8({target:n,apiUrl:r,excludedCategories:i,excludedFilters:u,excludedResources:l,allowedCategories:d,allowedFilters:h}){const v=Om({reducer:{resourceCatalog:R8}});ls.createRoot(n).render(b.jsx(Qp,{store:v,children:b.jsx(A8,{apiUrl:r,excludedCategories:i,excludedFilters:u,excludedResources:l,allowedCategories:d,allowedFilters:h})}))}exports.allocationsMap=D8;exports.onRampsResourceCatalog=F8;exports.projects=k8;exports.projectsBrowser=M8;exports.publications=L8;exports.publicationsSelect=P8;exports.resourceCatalog=V8;exports.shadowTarget=j8;