@xras/ui 0.21.0-beta2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xras-ui.cjs +18 -18
- package/dist/xras-ui.css +1 -1
- package/dist/xras-ui.js +9052 -9218
- package/package.json +1 -1
package/dist/xras-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Xw=Object.defineProperty;var Zw=(e,t,n)=>t in e?Xw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oc=(e,t,n)=>(Zw(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $p=typeof document<"u"?document.currentScript:null;function Jw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $g={exports:{}},hl={},Mg={exports:{}},ie={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ti=Symbol.for("react.element"),e1=Symbol.for("react.portal"),t1=Symbol.for("react.fragment"),n1=Symbol.for("react.strict_mode"),r1=Symbol.for("react.profiler"),o1=Symbol.for("react.provider"),s1=Symbol.for("react.context"),i1=Symbol.for("react.forward_ref"),a1=Symbol.for("react.suspense"),l1=Symbol.for("react.memo"),c1=Symbol.for("react.lazy"),Mp=Symbol.iterator;function u1(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Ag={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dg=Object.assign,Fg={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=Fg,this.updater=n||Ag}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lg(){}Lg.prototype=Ao.prototype;function $d(e,t,n){this.props=e,this.context=t,this.refs=Fg,this.updater=n||Ag}var Md=$d.prototype=new Lg;Md.constructor=$d;Dg(Md,Ao.prototype);Md.isPureReactComponent=!0;var Ap=Array.isArray,Ug=Object.prototype.hasOwnProperty,Ad={current:null},Vg={key:!0,ref:!0,__self:!0,__source:!0};function zg(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Ug.call(t,r)&&!Vg.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:ti,type:e,key:s,ref:i,props:o,_owner:Ad.current}}function d1(e,t){return{$$typeof:ti,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Dd(e){return typeof e=="object"&&e!==null&&e.$$typeof===ti}function f1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dp=/\/+/g;function sc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?f1(""+e.key):t.toString(36)}function Wi(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ti:case e1:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+sc(i,0):r,Ap(o)?(n="",e!=null&&(n=e.replace(Dp,"$&/")+"/"),Wi(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=d1(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Dp,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Ap(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+sc(s,l);i+=Wi(s,t,n,c,o)}else if(c=u1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+sc(s,l++),i+=Wi(s,t,n,c,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function gi(e,t,n){if(e==null)return e;var r=[],o=0;return Wi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function p1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Ki={transition:null},h1={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Ki,ReactCurrentOwner:Ad};ie.Children={map:gi,forEach:function(e,t,n){gi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gi(e,function(){t++}),t},toArray:function(e){return gi(e,function(t){return t})||[]},only:function(e){if(!Dd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ie.Component=Ao;ie.Fragment=t1;ie.Profiler=r1;ie.PureComponent=$d;ie.StrictMode=n1;ie.Suspense=a1;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h1;ie.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dg({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Ad.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Ug.call(t,c)&&!Vg.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ti,type:e.type,key:o,ref:s,props:r,_owner:i}};ie.createContext=function(e){return e={$$typeof:s1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o1,_context:e},e.Consumer=e};ie.createElement=zg;ie.createFactory=function(e){var t=zg.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:i1,render:e}};ie.isValidElement=Dd;ie.lazy=function(e){return{$$typeof:c1,_payload:{_status:-1,_result:e},_init:p1}};ie.memo=function(e,t){return{$$typeof:l1,type:e,compare:t===void 0?null:t}};ie.startTransition=function(e){var t=Ki.transition;Ki.transition={};try{e()}finally{Ki.transition=t}};ie.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ie.useCallback=function(e,t){return st.current.useCallback(e,t)};ie.useContext=function(e){return st.current.useContext(e)};ie.useDebugValue=function(){};ie.useDeferredValue=function(e){return st.current.useDeferredValue(e)};ie.useEffect=function(e,t){return st.current.useEffect(e,t)};ie.useId=function(){return st.current.useId()};ie.useImperativeHandle=function(e,t,n){return st.current.useImperativeHandle(e,t,n)};ie.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)};ie.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)};ie.useMemo=function(e,t){return st.current.useMemo(e,t)};ie.useReducer=function(e,t,n){return st.current.useReducer(e,t,n)};ie.useRef=function(e){return st.current.useRef(e)};ie.useState=function(e){return st.current.useState(e)};ie.useSyncExternalStore=function(e,t,n){return st.current.useSyncExternalStore(e,t,n)};ie.useTransition=function(){return st.current.useTransition()};ie.version="18.2.0";Mg.exports=ie;var w=Mg.exports;const Re=ei(w),ba=Jw({__proto__:null,default:Re},[w]);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var m1=w,g1=Symbol.for("react.element"),v1=Symbol.for("react.fragment"),y1=Object.prototype.hasOwnProperty,x1=m1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b1={key:!0,ref:!0,__self:!0,__source:!0};function Bg(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)y1.call(t,r)&&!b1.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:g1,type:e,key:s,ref:i,props:o,_owner:x1.current}}hl.Fragment=v1;hl.jsx=Bg;hl.jsxs=Bg;$g.exports=hl;var a=$g.exports,yt={},qg={exports:{}},Nt={},Hg={exports:{}},Wg={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(
|
|
25
|
+
*/(function(e){function t(T,U){var M=T.length;T.push(U);e:for(;0<M;){var H=M-1>>>1,z=T[H];if(0<o(z,U))T[H]=U,T[M]=z,M=H;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var U=T[0],M=T.pop();if(M!==U){T[0]=M;e:for(var H=0,z=T.length,W=z>>>1;H<W;){var J=2*(H+1)-1,te=T[J],Z=J+1,ae=T[Z];if(0>o(te,M))Z<z&&0>o(ae,te)?(T[H]=ae,T[Z]=M,H=Z):(T[H]=te,T[J]=M,H=J);else if(Z<z&&0>o(ae,M))T[H]=ae,T[Z]=M,H=Z;else break e}}return U}function o(T,U){var M=T.sortIndex-U.sortIndex;return M!==0?M:T.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,p=3,m=!1,g=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(T){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=T)r(u),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(u)}}function S(T){if(y=!1,b(T),!g)if(n(c)!==null)g=!0,V(C);else{var U=n(u);U!==null&&X(S,U.startTime-T)}}function C(T,U){g=!1,y&&(y=!1,h(E),E=-1),m=!0;var M=p;try{for(b(U),f=n(c);f!==null&&(!(f.expirationTime>U)||T&&!O());){var H=f.callback;if(typeof H=="function"){f.callback=null,p=f.priorityLevel;var z=H(f.expirationTime<=U);U=e.unstable_now(),typeof z=="function"?f.callback=z:f===n(c)&&r(c),b(U)}else r(c);f=n(c)}if(f!==null)var W=!0;else{var J=n(u);J!==null&&X(S,J.startTime-U),W=!1}return W}finally{f=null,p=M,m=!1}}var j=!1,_=null,E=-1,k=5,R=-1;function O(){return!(e.unstable_now()-R<k)}function N(){if(_!==null){var T=e.unstable_now();R=T;var U=!0;try{U=_(!0,T)}finally{U?P():(j=!1,_=null)}}else j=!1}var P;if(typeof v=="function")P=function(){v(N)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,D=A.port2;A.port1.onmessage=N,P=function(){D.postMessage(null)}}else P=function(){x(N,0)};function V(T){_=T,j||(j=!0,P())}function X(T,U){E=x(function(){T(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,V(C))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var M=p;p=U;try{return T()}finally{p=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,U){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var M=p;p=T;try{return U()}finally{p=M}},e.unstable_scheduleCallback=function(T,U,M){var H=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?H+M:H):M=H,T){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=M+z,T={id:d++,callback:U,priorityLevel:T,startTime:M,expirationTime:z,sortIndex:-1},M>H?(T.sortIndex=M,t(u,T),n(c)===null&&T===n(u)&&(y?(h(E),E=-1):y=!0,X(S,M-H))):(T.sortIndex=z,t(c,T),g||m||(g=!0,V(C))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var U=p;return function(){var M=p;p=U;try{return T.apply(this,arguments)}finally{p=M}}}})(Wg);Hg.exports=Wg;var w1=Hg.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
34
|
-
`+
|
|
33
|
+
*/var Kg=w,jt=w1;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gg=new Set,Es={};function Fr(e,t){yo(e,t),yo(e+"Capture",t)}function yo(e,t){for(Es[e]=t,e=0;e<t.length;e++)Gg.add(t[e])}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,S1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fp={},Lp={};function C1(e){return tu.call(Lp,e)?!0:tu.call(Fp,e)?!1:S1.test(e)?Lp[e]=!0:(Fp[e]=!0,!1)}function j1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _1(e,t,n,r){if(t===null||typeof t>"u"||j1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function it(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new it(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new it(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new it(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new it(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new it(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new it(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new it(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new it(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new it(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fd=/[\-:]([a-z])/g;function Ld(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fd,Ld);Ye[t]=new it(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fd,Ld);Ye[t]=new it(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fd,Ld);Ye[t]=new it(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new it(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new it("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new it(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ud(e,t,n,r){var o=Ye.hasOwnProperty(t)?Ye[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_1(t,n,o,r)&&(n=null),r||o===null?C1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ln=Kg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vi=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),Vd=Symbol.for("react.strict_mode"),nu=Symbol.for("react.profiler"),Yg=Symbol.for("react.provider"),Qg=Symbol.for("react.context"),zd=Symbol.for("react.forward_ref"),ru=Symbol.for("react.suspense"),ou=Symbol.for("react.suspense_list"),Bd=Symbol.for("react.memo"),Wn=Symbol.for("react.lazy"),Xg=Symbol.for("react.offscreen"),Up=Symbol.iterator;function Ho(e){return e===null||typeof e!="object"?null:(e=Up&&e[Up]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,ic;function as(e){if(ic===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ic=t&&t[1]||""}return`
|
|
34
|
+
`+ic+e}var ac=!1;function lc(e,t){if(!e||ac)return"";ac=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
35
35
|
`),s=r.stack.split(`
|
|
36
36
|
`),i=o.length-1,l=s.length-1;1<=i&&0<=l&&o[i]!==s[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==s[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==s[l]){var c=`
|
|
37
|
-
`+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{rc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function v1(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=oc(e.type,!1),e;case 11:return e=oc(e.type.render,!1),e;case 1:return e=oc(e.type,!0),e;default:return""}}function tu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gr:return"Fragment";case Kr:return"Portal";case Zc:return"Profiler";case Dd:return"StrictMode";case Jc:return"Suspense";case eu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qg:return(e.displayName||"Context")+".Consumer";case zg:return(e._context.displayName||"Context")+".Provider";case Fd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ld:return t=e.displayName||null,t!==null?t:tu(e.type)||"Memo";case Hn:t=e._payload,e=e._init;try{return tu(e(t))}catch{}}return null}function y1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tu(t);case 8:return t===Dd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function x1(e){var t=Wg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pi(e){e._valueTracker||(e._valueTracker=x1(e))}function Kg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ga(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nu(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $p(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gg(e,t){t=t.checked,t!=null&&Md(e,"checked",t,!1)}function ru(e,t){Gg(e,t);var n=lr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ou(e,t.type,n):t.hasOwnProperty("defaultValue")&&ou(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ap(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ou(e,t,n){(t!=="number"||ga(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var is=Array.isArray;function io(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function su(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(is(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:lr(n)}}function Yg(e,t){var n=lr(t.value),r=lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Dp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function iu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hi,Xg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hi=hi||document.createElement("div"),hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},b1=["Webkit","ms","Moz","O"];Object.keys(fs).forEach(function(e){b1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fs[t]=fs[e]})});function Zg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}function Jg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var w1=Ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function au(e,t){if(t){if(w1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function lu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cu=null;function Ud(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uu=null,ao=null,lo=null;function Fp(e){if(e=ti(e)){if(typeof uu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=gl(t),uu(e.stateNode,e.type,t))}}function ev(e){ao?lo?lo.push(e):lo=[e]:ao=e}function tv(){if(ao){var e=ao,t=lo;if(lo=ao=null,Fp(e),t)for(e=0;e<t.length;e++)Fp(t[e])}}function nv(e,t){return e(t)}function rv(){}var sc=!1;function ov(e,t,n){if(sc)return e(t,n);sc=!0;try{return nv(e,t,n)}finally{sc=!1,(ao!==null||lo!==null)&&(rv(),tv())}}function Es(e,t){var n=e.stateNode;if(n===null)return null;var r=gl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var du=!1;if(On)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){du=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{du=!1}function S1(e,t,n,r,o,s,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var ps=!1,va=null,ya=!1,fu=null,_1={onError:function(e){ps=!0,va=e}};function j1(e,t,n,r,o,s,i,l,c){ps=!1,va=null,S1.apply(_1,arguments)}function C1(e,t,n,r,o,s,i,l,c){if(j1.apply(this,arguments),ps){if(ps){var u=va;ps=!1,va=null}else throw Error(I(198));ya||(ya=!0,fu=u)}}function Lr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lp(e){if(Lr(e)!==e)throw Error(I(188))}function E1(e){var t=e.alternate;if(!t){if(t=Lr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Lp(o),e;if(s===r)return Lp(o),t;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function iv(e){return e=E1(e),e!==null?av(e):null}function av(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=av(e);if(t!==null)return t;e=e.sibling}return null}var lv=jt.unstable_scheduleCallback,Up=jt.unstable_cancelCallback,R1=jt.unstable_shouldYield,N1=jt.unstable_requestPaint,Pe=jt.unstable_now,k1=jt.unstable_getCurrentPriorityLevel,Vd=jt.unstable_ImmediatePriority,cv=jt.unstable_UserBlockingPriority,xa=jt.unstable_NormalPriority,T1=jt.unstable_LowPriority,uv=jt.unstable_IdlePriority,fl=null,un=null;function O1(e){if(un&&typeof un.onCommitFiberRoot=="function")try{un.onCommitFiberRoot(fl,e,void 0,(e.current.flags&128)===128)}catch{}}var Xt=Math.clz32?Math.clz32:$1,P1=Math.log,I1=Math.LN2;function $1(e){return e>>>=0,e===0?32:31-(P1(e)/I1|0)|0}var mi=64,gi=4194304;function as(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ba(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=as(l):(s&=i,s!==0&&(r=as(s)))}else i=n&~o,i!==0?r=as(i):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Xt(t),o=1<<n,r|=e[n],t&=~o;return r}function A1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Xt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=A1(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function pu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dv(){var e=mi;return mi<<=1,!(mi&4194240)&&(mi=64),e}function ic(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Js(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xt(t),e[t]=n}function D1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Xt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Bd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var he=0;function fv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pv,zd,hv,mv,gv,hu=!1,vi=[],er=null,tr=null,nr=null,Rs=new Map,Ns=new Map,Gn=[],F1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vp(e,t){switch(e){case"focusin":case"focusout":er=null;break;case"dragenter":case"dragleave":tr=null;break;case"mouseover":case"mouseout":nr=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function Wo(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=ti(t),t!==null&&zd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function L1(e,t,n,r,o){switch(t){case"focusin":return er=Wo(er,e,t,n,r,o),!0;case"dragenter":return tr=Wo(tr,e,t,n,r,o),!0;case"mouseover":return nr=Wo(nr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Rs.set(s,Wo(Rs.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Ns.set(s,Wo(Ns.get(s)||null,e,t,n,r,o)),!0}return!1}function vv(e){var t=xr(e.target);if(t!==null){var n=Lr(t);if(n!==null){if(t=n.tag,t===13){if(t=sv(n),t!==null){e.blockedOn=t,gv(e.priority,function(){hv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cu=r,n.target.dispatchEvent(r),cu=null}else return t=ti(n),t!==null&&zd(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){qi(e)&&n.delete(t)}function U1(){hu=!1,er!==null&&qi(er)&&(er=null),tr!==null&&qi(tr)&&(tr=null),nr!==null&&qi(nr)&&(nr=null),Rs.forEach(Bp),Ns.forEach(Bp)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,hu||(hu=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,U1)))}function ks(e){function t(o){return Ko(o,e)}if(0<vi.length){Ko(vi[0],e);for(var n=1;n<vi.length;n++){var r=vi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Ko(er,e),tr!==null&&Ko(tr,e),nr!==null&&Ko(nr,e),Rs.forEach(t),Ns.forEach(t),n=0;n<Gn.length;n++)r=Gn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gn.length&&(n=Gn[0],n.blockedOn===null);)vv(n),n.blockedOn===null&&Gn.shift()}var co=Ln.ReactCurrentBatchConfig,wa=!0;function V1(e,t,n,r){var o=he,s=co.transition;co.transition=null;try{he=1,qd(e,t,n,r)}finally{he=o,co.transition=s}}function B1(e,t,n,r){var o=he,s=co.transition;co.transition=null;try{he=4,qd(e,t,n,r)}finally{he=o,co.transition=s}}function qd(e,t,n,r){if(wa){var o=mu(e,t,n,r);if(o===null)gc(e,t,r,Sa,n),Vp(e,r);else if(L1(o,e,t,n,r))r.stopPropagation();else if(Vp(e,r),t&4&&-1<F1.indexOf(e)){for(;o!==null;){var s=ti(o);if(s!==null&&pv(s),s=mu(e,t,n,r),s===null&&gc(e,t,r,Sa,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else gc(e,t,r,null,n)}}var Sa=null;function mu(e,t,n,r){if(Sa=null,e=Ud(r),e=xr(e),e!==null)if(t=Lr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sa=e,null}function yv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(k1()){case Vd:return 1;case cv:return 4;case xa:case T1:return 16;case uv:return 536870912;default:return 16}default:return 16}}var Xn=null,Hd=null,Hi=null;function xv(){if(Hi)return Hi;var e,t=Hd,n=t.length,r,o="value"in Xn?Xn.value:Xn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Hi=o.slice(e,1<r?1-r:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yi(){return!0}function zp(){return!1}function Tt(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yi:zp,this.isPropagationStopped=zp,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Tt($o),ei=Ne({},$o,{view:0,detail:0}),z1=Tt(ei),ac,lc,Go,pl=Ne({},ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Go&&(Go&&e.type==="mousemove"?(ac=e.screenX-Go.screenX,lc=e.screenY-Go.screenY):lc=ac=0,Go=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:lc}}),qp=Tt(pl),q1=Ne({},pl,{dataTransfer:0}),H1=Tt(q1),W1=Ne({},ei,{relatedTarget:0}),cc=Tt(W1),K1=Ne({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),G1=Tt(K1),Y1=Ne({},$o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q1=Tt(Y1),X1=Ne({},$o,{data:0}),Hp=Tt(X1),Z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eS[e])?!!t[e]:!1}function Kd(){return tS}var nS=Ne({},ei,{key:function(e){if(e.key){var t=Z1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rS=Tt(nS),oS=Ne({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wp=Tt(oS),sS=Ne({},ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),iS=Tt(sS),aS=Ne({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),lS=Tt(aS),cS=Ne({},pl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uS=Tt(cS),dS=[9,13,27,32],Gd=On&&"CompositionEvent"in window,hs=null;On&&"documentMode"in document&&(hs=document.documentMode);var fS=On&&"TextEvent"in window&&!hs,bv=On&&(!Gd||hs&&8<hs&&11>=hs),Kp=" ",Gp=!1;function wv(e,t){switch(e){case"keyup":return dS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function pS(e,t){switch(e){case"compositionend":return Sv(t);case"keypress":return t.which!==32?null:(Gp=!0,Kp);case"textInput":return e=t.data,e===Kp&&Gp?null:e;default:return null}}function hS(e,t){if(Yr)return e==="compositionend"||!Gd&&wv(e,t)?(e=xv(),Hi=Hd=Xn=null,Yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bv&&t.locale!=="ko"?null:t.data;default:return null}}var mS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mS[e.type]:t==="textarea"}function _v(e,t,n,r){ev(r),t=_a(t,"onChange"),0<t.length&&(n=new Wd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ms=null,Ts=null;function gS(e){$v(e,0)}function hl(e){var t=Zr(e);if(Kg(t))return e}function vS(e,t){if(e==="change")return t}var jv=!1;if(On){var uc;if(On){var dc="oninput"in document;if(!dc){var Qp=document.createElement("div");Qp.setAttribute("oninput","return;"),dc=typeof Qp.oninput=="function"}uc=dc}else uc=!1;jv=uc&&(!document.documentMode||9<document.documentMode)}function Xp(){ms&&(ms.detachEvent("onpropertychange",Cv),Ts=ms=null)}function Cv(e){if(e.propertyName==="value"&&hl(Ts)){var t=[];_v(t,Ts,e,Ud(e)),ov(gS,t)}}function yS(e,t,n){e==="focusin"?(Xp(),ms=t,Ts=n,ms.attachEvent("onpropertychange",Cv)):e==="focusout"&&Xp()}function xS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hl(Ts)}function bS(e,t){if(e==="click")return hl(t)}function wS(e,t){if(e==="input"||e==="change")return hl(t)}function SS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:SS;function Os(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Xc.call(t,o)||!en(e[o],t[o]))return!1}return!0}function Zp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jp(e,t){var n=Zp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zp(n)}}function Ev(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ev(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rv(){for(var e=window,t=ga();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ga(e.document)}return t}function Yd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _S(e){var t=Rv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ev(n.ownerDocument.documentElement,n)){if(r!==null&&Yd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Jp(n,s);var i=Jp(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jS=On&&"documentMode"in document&&11>=document.documentMode,Qr=null,gu=null,gs=null,vu=!1;function eh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vu||Qr==null||Qr!==ga(r)||(r=Qr,"selectionStart"in r&&Yd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gs&&Os(gs,r)||(gs=r,r=_a(gu,"onSelect"),0<r.length&&(t=new Wd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xr={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},fc={},Nv={};On&&(Nv=document.createElement("div").style,"AnimationEvent"in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),"TransitionEvent"in window||delete Xr.transitionend.transition);function ml(e){if(fc[e])return fc[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nv)return fc[e]=t[n];return e}var kv=ml("animationend"),Tv=ml("animationiteration"),Ov=ml("animationstart"),Pv=ml("transitionend"),Iv=new Map,th="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fr(e,t){Iv.set(e,t),Fr(t,[e])}for(var pc=0;pc<th.length;pc++){var hc=th[pc],CS=hc.toLowerCase(),ES=hc[0].toUpperCase()+hc.slice(1);fr(CS,"on"+ES)}fr(kv,"onAnimationEnd");fr(Tv,"onAnimationIteration");fr(Ov,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Pv,"onTransitionEnd");vo("onMouseEnter",["mouseout","mouseover"]);vo("onMouseLeave",["mouseout","mouseover"]);vo("onPointerEnter",["pointerout","pointerover"]);vo("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ls));function nh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,C1(r,t,void 0,e),e.currentTarget=null}function $v(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&o.isPropagationStopped())break e;nh(o,l,u),s=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&o.isPropagationStopped())break e;nh(o,l,u),s=c}}}if(ya)throw e=fu,ya=!1,fu=null,e}function xe(e,t){var n=t[Su];n===void 0&&(n=t[Su]=new Set);var r=e+"__bubble";n.has(r)||(Av(t,e,2,!1),n.add(r))}function mc(e,t,n){var r=0;t&&(r|=4),Av(n,e,r,t)}var bi="_reactListening"+Math.random().toString(36).slice(2);function Ps(e){if(!e[bi]){e[bi]=!0,Bg.forEach(function(n){n!=="selectionchange"&&(RS.has(n)||mc(n,!1,e),mc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bi]||(t[bi]=!0,mc("selectionchange",!1,t))}}function Av(e,t,n,r){switch(yv(t)){case 1:var o=V1;break;case 4:o=B1;break;default:o=qd}n=o.bind(null,t,n,e),o=void 0,!du||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function gc(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=xr(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}ov(function(){var u=s,d=Ud(n),f=[];e:{var p=Iv.get(e);if(p!==void 0){var y=Wd,m=e;switch(e){case"keypress":if(Wi(n)===0)break e;case"keydown":case"keyup":y=rS;break;case"focusin":m="focus",y=cc;break;case"focusout":m="blur",y=cc;break;case"beforeblur":case"afterblur":y=cc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=qp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=H1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=iS;break;case kv:case Tv:case Ov:y=G1;break;case Pv:y=lS;break;case"scroll":y=z1;break;case"wheel":y=uS;break;case"copy":case"cut":case"paste":y=Q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Wp}var h=(t&4)!==0,x=!h&&e==="scroll",v=h?p!==null?p+"Capture":null:p;h=[];for(var g=u,b;g!==null;){b=g;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,v!==null&&(S=Es(g,v),S!=null&&h.push(Is(g,S,b)))),x)break;g=g.return}0<h.length&&(p=new y(p,m,null,n,d),f.push({event:p,listeners:h}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==cu&&(m=n.relatedTarget||n.fromElement)&&(xr(m)||m[Pn]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(m=n.relatedTarget||n.toElement,y=u,m=m?xr(m):null,m!==null&&(x=Lr(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(y=null,m=u),y!==m)){if(h=qp,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(h=Wp,S="onPointerLeave",v="onPointerEnter",g="pointer"),x=y==null?p:Zr(y),b=m==null?p:Zr(m),p=new h(S,g+"leave",y,n,d),p.target=x,p.relatedTarget=b,S=null,xr(d)===u&&(h=new h(v,g+"enter",m,n,d),h.target=b,h.relatedTarget=x,S=h),x=S,y&&m)t:{for(h=y,v=m,g=0,b=h;b;b=Br(b))g++;for(b=0,S=v;S;S=Br(S))b++;for(;0<g-b;)h=Br(h),g--;for(;0<b-g;)v=Br(v),b--;for(;g--;){if(h===v||v!==null&&h===v.alternate)break t;h=Br(h),v=Br(v)}h=null}else h=null;y!==null&&rh(f,p,y,h,!1),m!==null&&x!==null&&rh(f,x,m,h,!0)}}e:{if(p=u?Zr(u):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var _=vS;else if(Yp(p))if(jv)_=wS;else{_=xS;var j=yS}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=bS);if(_&&(_=_(e,u))){_v(f,_,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&ou(p,"number",p.value)}switch(j=u?Zr(u):window,e){case"focusin":(Yp(j)||j.contentEditable==="true")&&(Qr=j,gu=u,gs=null);break;case"focusout":gs=gu=Qr=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,eh(f,n,d);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":eh(f,n,d)}var C;if(Gd)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Yr?wv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(bv&&n.locale!=="ko"&&(Yr||E!=="onCompositionStart"?E==="onCompositionEnd"&&Yr&&(C=xv()):(Xn=d,Hd="value"in Xn?Xn.value:Xn.textContent,Yr=!0)),j=_a(u,E),0<j.length&&(E=new Hp(E,e,null,n,d),f.push({event:E,listeners:j}),C?E.data=C:(C=Sv(n),C!==null&&(E.data=C)))),(C=fS?pS(e,n):hS(e,n))&&(u=_a(u,"onBeforeInput"),0<u.length&&(d=new Hp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=C))}$v(f,t)})}function Is(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _a(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Es(e,n),s!=null&&r.unshift(Is(e,s,o)),s=Es(e,t),s!=null&&r.push(Is(e,s,o))),e=e.return}return r}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rh(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=Es(n,s),c!=null&&i.unshift(Is(n,c,l))):o||(c=Es(n,s),c!=null&&i.push(Is(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var NS=/\r\n?/g,kS=/\u0000|\uFFFD/g;function oh(e){return(typeof e=="string"?e:""+e).replace(NS,`
|
|
38
|
-
`).replace(kS,"")}function wi(e,t,n){if(t=oh(t),oh(e)!==t&&n)throw Error(I(425))}function ja(){}var yu=null,xu=null;function bu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=typeof setTimeout=="function"?setTimeout:void 0,TS=typeof clearTimeout=="function"?clearTimeout:void 0,sh=typeof Promise=="function"?Promise:void 0,OS=typeof queueMicrotask=="function"?queueMicrotask:typeof sh<"u"?function(e){return sh.resolve(null).then(e).catch(PS)}:wu;function PS(e){setTimeout(function(){throw e})}function vc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ks(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ks(t)}function rr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ih(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ao=Math.random().toString(36).slice(2),cn="__reactFiber$"+Ao,$s="__reactProps$"+Ao,Pn="__reactContainer$"+Ao,Su="__reactEvents$"+Ao,IS="__reactListeners$"+Ao,$S="__reactHandles$"+Ao;function xr(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ih(e);e!==null;){if(n=e[cn])return n;e=ih(e)}return t}e=n,n=e.parentNode}return null}function ti(e){return e=e[cn]||e[Pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function gl(e){return e[$s]||null}var _u=[],Jr=-1;function pr(e){return{current:e}}function we(e){0>Jr||(e.current=_u[Jr],_u[Jr]=null,Jr--)}function ye(e,t){Jr++,_u[Jr]=e.current,e.current=t}var cr={},et=pr(cr),ft=pr(!1),kr=cr;function yo(e,t){var n=e.type.contextTypes;if(!n)return cr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pt(e){return e=e.childContextTypes,e!=null}function Ca(){we(ft),we(et)}function ah(e,t,n){if(et.current!==cr)throw Error(I(168));ye(et,t),ye(ft,n)}function Mv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,y1(e)||"Unknown",o));return Ne({},n,r)}function Ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,kr=et.current,ye(et,e),ye(ft,ft.current),!0}function lh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Mv(e,t,kr),r.__reactInternalMemoizedMergedChildContext=e,we(ft),we(et),ye(et,e)):we(ft),ye(ft,n)}var wn=null,vl=!1,yc=!1;function Dv(e){wn===null?wn=[e]:wn.push(e)}function AS(e){vl=!0,Dv(e)}function hr(){if(!yc&&wn!==null){yc=!0;var e=0,t=he;try{var n=wn;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wn=null,vl=!1}catch(o){throw wn!==null&&(wn=wn.slice(e+1)),lv(Vd,hr),o}finally{he=t,yc=!1}}return null}var eo=[],to=0,Ra=null,Na=0,At=[],Mt=0,Tr=null,jn=1,Cn="";function gr(e,t){eo[to++]=Na,eo[to++]=Ra,Ra=e,Na=t}function Fv(e,t,n){At[Mt++]=jn,At[Mt++]=Cn,At[Mt++]=Tr,Tr=e;var r=jn;e=Cn;var o=32-Xt(r)-1;r&=~(1<<o),n+=1;var s=32-Xt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jn=1<<32-Xt(t)+o|n<<o|r,Cn=s+e}else jn=1<<s|n<<o|r,Cn=e}function Qd(e){e.return!==null&&(gr(e,1),Fv(e,1,0))}function Xd(e){for(;e===Ra;)Ra=eo[--to],eo[to]=null,Na=eo[--to],eo[to]=null;for(;e===Tr;)Tr=At[--Mt],At[Mt]=null,Cn=At[--Mt],At[Mt]=null,jn=At[--Mt],At[Mt]=null}var wt=null,bt=null,_e=!1,Yt=null;function Lv(e,t){var n=Ft(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ch(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,wt=e,bt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wt=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Tr!==null?{id:jn,overflow:Cn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wt=e,bt=null,!0):!1;default:return!1}}function ju(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cu(e){if(_e){var t=bt;if(t){var n=t;if(!ch(e,t)){if(ju(e))throw Error(I(418));t=rr(n.nextSibling);var r=wt;t&&ch(e,t)?Lv(r,n):(e.flags=e.flags&-4097|2,_e=!1,wt=e)}}else{if(ju(e))throw Error(I(418));e.flags=e.flags&-4097|2,_e=!1,wt=e}}}function uh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wt=e}function Si(e){if(e!==wt)return!1;if(!_e)return uh(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=bt)){if(ju(e))throw Uv(),Error(I(418));for(;t;)Lv(e,t),t=rr(t.nextSibling)}if(uh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){bt=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=wt?rr(e.stateNode.nextSibling):null;return!0}function Uv(){for(var e=bt;e;)e=rr(e.nextSibling)}function xo(){bt=wt=null,_e=!1}function Zd(e){Yt===null?Yt=[e]:Yt.push(e)}var MS=Ln.ReactCurrentBatchConfig;function Wt(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ka=pr(null),Ta=null,no=null,Jd=null;function ef(){Jd=no=Ta=null}function tf(e){var t=ka.current;we(ka),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function uo(e,t){Ta=e,Jd=no=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Jd!==e)if(e={context:e,memoizedValue:t,next:null},no===null){if(Ta===null)throw Error(I(308));no=e,Ta.dependencies={lanes:0,firstContext:e}}else no=no.next=e;return t}var br=null;function nf(e){br===null?br=[e]:br.push(e)}function Vv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,nf(t)):(n.next=o.next,o.next=n),t.interleaved=n,In(e,r)}function In(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Wn=!1;function rf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function or(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,In(e,n)}return o=r.interleaved,o===null?(t.next=t,nf(r)):(t.next=o.next,o.next=t),r.interleaved=t,In(e,n)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bd(e,n)}}function dh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Oa(e,t,n,r){var o=e.updateQueue;Wn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?s=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=o.baseState;i=0,d=u=c=null,l=s;do{var p=l.lane,y=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,h=l;switch(p=t,y=n,h.tag){case 1:if(m=h.payload,typeof m=="function"){f=m.call(y,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,p=typeof m=="function"?m.call(y,f,p):m,p==null)break e;f=Ne({},f,p);break e;case 2:Wn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,i|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Pr|=i,e.lanes=i,e.memoizedState=f}}function fh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var zv=new Vg.Component().refs;function Ru(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yl={isMounted:function(e){return(e=e._reactInternals)?Lr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rt(),o=ir(e),s=Rn(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Ki(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rt(),o=ir(e),s=Rn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Ki(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rt(),r=ir(e),o=Rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Zt(t,e,r,n),Ki(t,e,r))}};function ph(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Os(n,r)||!Os(o,s):!0}function qv(e,t,n){var r=!1,o=cr,s=t.contextType;return typeof s=="object"&&s!==null?s=Ut(s):(o=pt(t)?kr:et.current,r=t.contextTypes,s=(r=r!=null)?yo(e,o):cr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function hh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yl.enqueueReplaceState(t,t.state,null)}function Nu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zv,rf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ut(s):(s=pt(t)?kr:et.current,o.context=yo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ru(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&yl.enqueueReplaceState(o,o.state,null),Oa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;l===zv&&(l=o.refs={}),i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mh(e){var t=e._init;return t(e._payload)}function Hv(e){function t(v,g){if(e){var b=v.deletions;b===null?(v.deletions=[g],v.flags|=16):b.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function o(v,g){return v=ar(v,g),v.index=0,v.sibling=null,v}function s(v,g,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<g?(v.flags|=2,g):b):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,g,b,S){return g===null||g.tag!==6?(g=Cc(b,v.mode,S),g.return=v,g):(g=o(g,b),g.return=v,g)}function c(v,g,b,S){var _=b.type;return _===Gr?d(v,g,b.props.children,S,b.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&mh(_)===g.type)?(S=o(g,b.props),S.ref=Yo(v,g,b),S.return=v,S):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,S)}function u(v,g,b,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Ec(b,v.mode,S),g.return=v,g):(g=o(g,b.children||[]),g.return=v,g)}function d(v,g,b,S,_){return g===null||g.tag!==7?(g=jr(b,v.mode,S,_),g.return=v,g):(g=o(g,b),g.return=v,g)}function f(v,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Cc(""+g,v.mode,b),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return b=Ji(g.type,g.key,g.props,null,v.mode,b),b.ref=Yo(v,null,g),b.return=v,b;case Kr:return g=Ec(g,v.mode,b),g.return=v,g;case Hn:var S=g._init;return f(v,S(g._payload),b)}if(is(g)||qo(g))return g=jr(g,v.mode,b,null),g.return=v,g;_i(v,g)}return null}function p(v,g,b,S){var _=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:l(v,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:return b.key===_?c(v,g,b,S):null;case Kr:return b.key===_?u(v,g,b,S):null;case Hn:return _=b._init,p(v,g,_(b._payload),S)}if(is(b)||qo(b))return _!==null?null:d(v,g,b,S,null);_i(v,b)}return null}function y(v,g,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(b)||null,l(g,v,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case fi:return v=v.get(S.key===null?b:S.key)||null,c(g,v,S,_);case Kr:return v=v.get(S.key===null?b:S.key)||null,u(g,v,S,_);case Hn:var j=S._init;return y(v,g,b,j(S._payload),_)}if(is(S)||qo(S))return v=v.get(b)||null,d(g,v,S,_,null);_i(g,S)}return null}function m(v,g,b,S){for(var _=null,j=null,C=g,E=g=0,N=null;C!==null&&E<b.length;E++){C.index>E?(N=C,C=null):N=C.sibling;var R=p(v,C,b[E],S);if(R===null){C===null&&(C=N);break}e&&C&&R.alternate===null&&t(v,C),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R,C=N}if(E===b.length)return n(v,C),_e&&gr(v,E),_;if(C===null){for(;E<b.length;E++)C=f(v,b[E],S),C!==null&&(g=s(C,g,E),j===null?_=C:j.sibling=C,j=C);return _e&&gr(v,E),_}for(C=r(v,C);E<b.length;E++)N=y(C,v,E,b[E],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?E:N.key),g=s(N,g,E),j===null?_=N:j.sibling=N,j=N);return e&&C.forEach(function(T){return t(v,T)}),_e&&gr(v,E),_}function h(v,g,b,S){var _=qo(b);if(typeof _!="function")throw Error(I(150));if(b=_.call(b),b==null)throw Error(I(151));for(var j=_=null,C=g,E=g=0,N=null,R=b.next();C!==null&&!R.done;E++,R=b.next()){C.index>E?(N=C,C=null):N=C.sibling;var T=p(v,C,R.value,S);if(T===null){C===null&&(C=N);break}e&&C&&T.alternate===null&&t(v,C),g=s(T,g,E),j===null?_=T:j.sibling=T,j=T,C=N}if(R.done)return n(v,C),_e&&gr(v,E),_;if(C===null){for(;!R.done;E++,R=b.next())R=f(v,R.value,S),R!==null&&(g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return _e&&gr(v,E),_}for(C=r(v,C);!R.done;E++,R=b.next())R=y(C,v,E,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?E:R.key),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return e&&C.forEach(function(k){return t(v,k)}),_e&&gr(v,E),_}function x(v,g,b,S){if(typeof b=="object"&&b!==null&&b.type===Gr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:e:{for(var _=b.key,j=g;j!==null;){if(j.key===_){if(_=b.type,_===Gr){if(j.tag===7){n(v,j.sibling),g=o(j,b.props.children),g.return=v,v=g;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&mh(_)===j.type){n(v,j.sibling),g=o(j,b.props),g.ref=Yo(v,j,b),g.return=v,v=g;break e}n(v,j);break}else t(v,j);j=j.sibling}b.type===Gr?(g=jr(b.props.children,v.mode,S,b.key),g.return=v,v=g):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,v=S)}return i(v);case Kr:e:{for(j=b.key;g!==null;){if(g.key===j)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(v,g.sibling),g=o(g,b.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Ec(b,v.mode,S),g.return=v,v=g}return i(v);case Hn:return j=b._init,x(v,g,j(b._payload),S)}if(is(b))return m(v,g,b,S);if(qo(b))return h(v,g,b,S);_i(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(v,g.sibling),g=o(g,b),g.return=v,v=g):(n(v,g),g=Cc(b,v.mode,S),g.return=v,v=g),i(v)):n(v,g)}return x}var bo=Hv(!0),Wv=Hv(!1),ni={},dn=pr(ni),As=pr(ni),Ms=pr(ni);function wr(e){if(e===ni)throw Error(I(174));return e}function of(e,t){switch(ye(Ms,t),ye(As,e),ye(dn,ni),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:iu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=iu(t,e)}we(dn),ye(dn,t)}function wo(){we(dn),we(As),we(Ms)}function Kv(e){wr(Ms.current);var t=wr(dn.current),n=iu(t,e.type);t!==n&&(ye(As,e),ye(dn,n))}function sf(e){As.current===e&&(we(dn),we(As))}var Ee=pr(0);function Pa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xc=[];function af(){for(var e=0;e<xc.length;e++)xc[e]._workInProgressVersionPrimary=null;xc.length=0}var Gi=Ln.ReactCurrentDispatcher,bc=Ln.ReactCurrentBatchConfig,Or=0,Re=null,Me=null,Ve=null,Ia=!1,vs=!1,Ds=0,DS=0;function Qe(){throw Error(I(321))}function lf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!en(e[n],t[n]))return!1;return!0}function cf(e,t,n,r,o,s){if(Or=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gi.current=e===null||e.memoizedState===null?VS:BS,e=n(r,o),vs){s=0;do{if(vs=!1,Ds=0,25<=s)throw Error(I(301));s+=1,Ve=Me=null,t.updateQueue=null,Gi.current=zS,e=n(r,o)}while(vs)}if(Gi.current=$a,t=Me!==null&&Me.next!==null,Or=0,Ve=Me=Re=null,Ia=!1,t)throw Error(I(300));return e}function uf(){var e=Ds!==0;return Ds=0,e}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Re.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function Vt(){if(Me===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Ve===null?Re.memoizedState:Ve.next;if(t!==null)Ve=t,Me=e;else{if(e===null)throw Error(I(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ve===null?Re.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function Fs(e,t){return typeof t=="function"?t(e):t}function wc(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Me,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,c=null,u=s;do{var d=u.lane;if((Or&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=r):c=c.next=f,Re.lanes|=d,Pr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,en(r,t.memoizedState)||(dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Re.lanes|=s,Pr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sc(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);en(s,t.memoizedState)||(dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Gv(){}function Yv(e,t){var n=Re,r=Vt(),o=t(),s=!en(r.memoizedState,o);if(s&&(r.memoizedState=o,dt=!0),r=r.queue,df(Zv.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ve!==null&&Ve.memoizedState.tag&1){if(n.flags|=2048,Ls(9,Xv.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Or&30||Qv(n,t,o)}return o}function Qv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xv(e,t,n,r){t.value=n,t.getSnapshot=r,Jv(t)&&ey(e)}function Zv(e,t,n){return n(function(){Jv(t)&&ey(e)})}function Jv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function ey(e){var t=In(e,1);t!==null&&Zt(t,e,1,-1)}function gh(e){var t=on();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fs,lastRenderedState:e},t.queue=e,e=e.dispatch=US.bind(null,Re,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ty(){return Vt().memoizedState}function Yi(e,t,n,r){var o=on();Re.flags|=e,o.memoizedState=Ls(1|t,n,void 0,r===void 0?null:r)}function xl(e,t,n,r){var o=Vt();r=r===void 0?null:r;var s=void 0;if(Me!==null){var i=Me.memoizedState;if(s=i.destroy,r!==null&&lf(r,i.deps)){o.memoizedState=Ls(t,n,s,r);return}}Re.flags|=e,o.memoizedState=Ls(1|t,n,s,r)}function vh(e,t){return Yi(8390656,8,e,t)}function df(e,t){return xl(2048,8,e,t)}function ny(e,t){return xl(4,2,e,t)}function ry(e,t){return xl(4,4,e,t)}function oy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sy(e,t,n){return n=n!=null?n.concat([e]):null,xl(4,4,oy.bind(null,t,e),n)}function ff(){}function iy(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ay(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ly(e,t,n){return Or&21?(en(n,t)||(n=dv(),Re.lanes|=n,Pr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=n)}function FS(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=bc.transition;bc.transition={};try{e(!1),t()}finally{he=n,bc.transition=r}}function cy(){return Vt().memoizedState}function LS(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},uy(e))dy(t,n);else if(n=Vv(e,t,n,r),n!==null){var o=rt();Zt(n,e,r,o),fy(n,t,r)}}function US(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(uy(e))dy(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,en(l,i)){var c=t.interleaved;c===null?(o.next=o,nf(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Vv(e,t,o,r),n!==null&&(o=rt(),Zt(n,e,r,o),fy(n,t,r))}}function uy(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function dy(e,t){vs=Ia=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bd(e,n)}}var $a={readContext:Ut,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},VS={readContext:Ut,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:vh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yi(4194308,4,oy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var n=on();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=on();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=LS.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:gh,useDebugValue:ff,useDeferredValue:function(e){return on().memoizedState=e},useTransition:function(){var e=gh(!1),t=e[0];return e=FS.bind(null,e[1]),on().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,o=on();if(_e){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Or&30||Qv(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,vh(Zv.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,Xv.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=on(),t=Be.identifierPrefix;if(_e){var n=Cn,r=jn;n=(r&~(1<<32-Xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ds++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=DS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BS={readContext:Ut,useCallback:iy,useContext:Ut,useEffect:df,useImperativeHandle:sy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:ay,useReducer:wc,useRef:ty,useState:function(){return wc(Fs)},useDebugValue:ff,useDeferredValue:function(e){var t=Vt();return ly(t,Me.memoizedState,e)},useTransition:function(){var e=wc(Fs)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Gv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1},zS={readContext:Ut,useCallback:iy,useContext:Ut,useEffect:df,useImperativeHandle:sy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:ay,useReducer:Sc,useRef:ty,useState:function(){return Sc(Fs)},useDebugValue:ff,useDeferredValue:function(e){var t=Vt();return Me===null?t.memoizedState=e:ly(t,Me.memoizedState,e)},useTransition:function(){var e=Sc(Fs)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Gv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1};function So(e,t){try{var n="",r=t;do n+=v1(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
37
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?as(e):""}function E1(e){switch(e.tag){case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 2:case 15:return e=lc(e.type,!1),e;case 11:return e=lc(e.type.render,!1),e;case 1:return e=lc(e.type,!0),e;default:return""}}function su(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yr:return"Fragment";case Gr:return"Portal";case nu:return"Profiler";case Vd:return"StrictMode";case ru:return"Suspense";case ou:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qg:return(e.displayName||"Context")+".Consumer";case Yg:return(e._context.displayName||"Context")+".Provider";case zd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return t=e.displayName||null,t!==null?t:su(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return su(e(t))}catch{}}return null}function R1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return su(t);case 8:return t===Vd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function cr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k1(e){var t=Zg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yi(e){e._valueTracker||(e._valueTracker=k1(e))}function Jg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function iu(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=cr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ev(e,t){t=t.checked,t!=null&&Ud(e,"checked",t,!1)}function au(e,t){ev(e,t);var n=cr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(e,t.type,cr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function lu(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function ao(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+cr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(ls(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:cr(n)}}function tv(e,t){var n=cr(t.value),r=cr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function nv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function uu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xi,rv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xi=xi||document.createElement("div"),xi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},N1=["Webkit","ms","Moz","O"];Object.keys(hs).forEach(function(e){N1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hs[t]=hs[e]})});function ov(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hs.hasOwnProperty(e)&&hs[e]?(""+t).trim():t+"px"}function sv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ov(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var O1=Ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function du(e,t){if(t){if(O1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function fu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pu=null;function qd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hu=null,lo=null,co=null;function Hp(e){if(e=oi(e)){if(typeof hu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=xl(t),hu(e.stateNode,e.type,t))}}function iv(e){lo?co?co.push(e):co=[e]:lo=e}function av(){if(lo){var e=lo,t=co;if(co=lo=null,Hp(e),t)for(e=0;e<t.length;e++)Hp(t[e])}}function lv(e,t){return e(t)}function cv(){}var cc=!1;function uv(e,t,n){if(cc)return e(t,n);cc=!0;try{return lv(e,t,n)}finally{cc=!1,(lo!==null||co!==null)&&(cv(),av())}}function ks(e,t){var n=e.stateNode;if(n===null)return null;var r=xl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var mu=!1;if(Tn)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{mu=!1}function T1(e,t,n,r,o,s,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var ms=!1,Sa=null,Ca=!1,gu=null,P1={onError:function(e){ms=!0,Sa=e}};function I1(e,t,n,r,o,s,i,l,c){ms=!1,Sa=null,T1.apply(P1,arguments)}function $1(e,t,n,r,o,s,i,l,c){if(I1.apply(this,arguments),ms){if(ms){var u=Sa;ms=!1,Sa=null}else throw Error(I(198));Ca||(Ca=!0,gu=u)}}function Lr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function dv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Wp(e){if(Lr(e)!==e)throw Error(I(188))}function M1(e){var t=e.alternate;if(!t){if(t=Lr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Wp(o),e;if(s===r)return Wp(o),t;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function fv(e){return e=M1(e),e!==null?pv(e):null}function pv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pv(e);if(t!==null)return t;e=e.sibling}return null}var hv=jt.unstable_scheduleCallback,Kp=jt.unstable_cancelCallback,A1=jt.unstable_shouldYield,D1=jt.unstable_requestPaint,Ie=jt.unstable_now,F1=jt.unstable_getCurrentPriorityLevel,Hd=jt.unstable_ImmediatePriority,mv=jt.unstable_UserBlockingPriority,ja=jt.unstable_NormalPriority,L1=jt.unstable_LowPriority,gv=jt.unstable_IdlePriority,ml=null,ln=null;function U1(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(ml,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:B1,V1=Math.log,z1=Math.LN2;function B1(e){return e>>>=0,e===0?32:31-(V1(e)/z1|0)|0}var bi=64,wi=4194304;function cs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _a(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=cs(l):(s&=i,s!==0&&(r=cs(s)))}else i=n&~o,i!==0?r=cs(i):s!==0&&(r=cs(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qt(t),o=1<<n,r|=e[n],t&=~o;return r}function q1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Qt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=q1(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function vu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vv(){var e=bi;return bi<<=1,!(bi&4194240)&&(bi=64),e}function uc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ni(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function W1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Qt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Wd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var me=0;function yv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xv,Kd,bv,wv,Sv,yu=!1,Si=[],tr=null,nr=null,rr=null,Ns=new Map,Os=new Map,Yn=[],K1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Gp(e,t){switch(e){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function Ko(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=oi(t),t!==null&&Kd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function G1(e,t,n,r,o){switch(t){case"focusin":return tr=Ko(tr,e,t,n,r,o),!0;case"dragenter":return nr=Ko(nr,e,t,n,r,o),!0;case"mouseover":return rr=Ko(rr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ns.set(s,Ko(Ns.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Os.set(s,Ko(Os.get(s)||null,e,t,n,r,o)),!0}return!1}function Cv(e){var t=br(e.target);if(t!==null){var n=Lr(t);if(n!==null){if(t=n.tag,t===13){if(t=dv(n),t!==null){e.blockedOn=t,Sv(e.priority,function(){bv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pu=r,n.target.dispatchEvent(r),pu=null}else return t=oi(n),t!==null&&Kd(t),e.blockedOn=n,!1;t.shift()}return!0}function Yp(e,t,n){Gi(e)&&n.delete(t)}function Y1(){yu=!1,tr!==null&&Gi(tr)&&(tr=null),nr!==null&&Gi(nr)&&(nr=null),rr!==null&&Gi(rr)&&(rr=null),Ns.forEach(Yp),Os.forEach(Yp)}function Go(e,t){e.blockedOn===t&&(e.blockedOn=null,yu||(yu=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,Y1)))}function Ts(e){function t(o){return Go(o,e)}if(0<Si.length){Go(Si[0],e);for(var n=1;n<Si.length;n++){var r=Si[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tr!==null&&Go(tr,e),nr!==null&&Go(nr,e),rr!==null&&Go(rr,e),Ns.forEach(t),Os.forEach(t),n=0;n<Yn.length;n++)r=Yn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yn.length&&(n=Yn[0],n.blockedOn===null);)Cv(n),n.blockedOn===null&&Yn.shift()}var uo=Ln.ReactCurrentBatchConfig,Ea=!0;function Q1(e,t,n,r){var o=me,s=uo.transition;uo.transition=null;try{me=1,Gd(e,t,n,r)}finally{me=o,uo.transition=s}}function X1(e,t,n,r){var o=me,s=uo.transition;uo.transition=null;try{me=4,Gd(e,t,n,r)}finally{me=o,uo.transition=s}}function Gd(e,t,n,r){if(Ea){var o=xu(e,t,n,r);if(o===null)bc(e,t,r,Ra,n),Gp(e,r);else if(G1(o,e,t,n,r))r.stopPropagation();else if(Gp(e,r),t&4&&-1<K1.indexOf(e)){for(;o!==null;){var s=oi(o);if(s!==null&&xv(s),s=xu(e,t,n,r),s===null&&bc(e,t,r,Ra,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else bc(e,t,r,null,n)}}var Ra=null;function xu(e,t,n,r){if(Ra=null,e=qd(r),e=br(e),e!==null)if(t=Lr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ra=e,null}function jv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(F1()){case Hd:return 1;case mv:return 4;case ja:case L1:return 16;case gv:return 536870912;default:return 16}default:return 16}}var Zn=null,Yd=null,Yi=null;function _v(){if(Yi)return Yi;var e,t=Yd,n=t.length,r,o="value"in Zn?Zn.value:Zn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Yi=o.slice(e,1<r?1-r:void 0)}function Qi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ci(){return!0}function Qp(){return!1}function Ot(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ci:Qp,this.isPropagationStopped=Qp,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ci)},persist:function(){},isPersistent:Ci}),t}var Do={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qd=Ot(Do),ri=Ne({},Do,{view:0,detail:0}),Z1=Ot(ri),dc,fc,Yo,gl=Ne({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yo&&(Yo&&e.type==="mousemove"?(dc=e.screenX-Yo.screenX,fc=e.screenY-Yo.screenY):fc=dc=0,Yo=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),Xp=Ot(gl),J1=Ne({},gl,{dataTransfer:0}),eS=Ot(J1),tS=Ne({},ri,{relatedTarget:0}),pc=Ot(tS),nS=Ne({},Do,{animationName:0,elapsedTime:0,pseudoElement:0}),rS=Ot(nS),oS=Ne({},Do,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sS=Ot(oS),iS=Ne({},Do,{data:0}),Zp=Ot(iS),aS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cS[e])?!!t[e]:!1}function Xd(){return uS}var dS=Ne({},ri,{key:function(e){if(e.key){var t=aS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xd,charCode:function(e){return e.type==="keypress"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fS=Ot(dS),pS=Ne({},gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jp=Ot(pS),hS=Ne({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xd}),mS=Ot(hS),gS=Ne({},Do,{propertyName:0,elapsedTime:0,pseudoElement:0}),vS=Ot(gS),yS=Ne({},gl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xS=Ot(yS),bS=[9,13,27,32],Zd=Tn&&"CompositionEvent"in window,gs=null;Tn&&"documentMode"in document&&(gs=document.documentMode);var wS=Tn&&"TextEvent"in window&&!gs,Ev=Tn&&(!Zd||gs&&8<gs&&11>=gs),eh=" ",th=!1;function Rv(e,t){switch(e){case"keyup":return bS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qr=!1;function SS(e,t){switch(e){case"compositionend":return kv(t);case"keypress":return t.which!==32?null:(th=!0,eh);case"textInput":return e=t.data,e===eh&&th?null:e;default:return null}}function CS(e,t){if(Qr)return e==="compositionend"||!Zd&&Rv(e,t)?(e=_v(),Yi=Yd=Zn=null,Qr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ev&&t.locale!=="ko"?null:t.data;default:return null}}var jS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jS[e.type]:t==="textarea"}function Nv(e,t,n,r){iv(r),t=ka(t,"onChange"),0<t.length&&(n=new Qd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vs=null,Ps=null;function _S(e){Uv(e,0)}function vl(e){var t=Jr(e);if(Jg(t))return e}function ES(e,t){if(e==="change")return t}var Ov=!1;if(Tn){var hc;if(Tn){var mc="oninput"in document;if(!mc){var rh=document.createElement("div");rh.setAttribute("oninput","return;"),mc=typeof rh.oninput=="function"}hc=mc}else hc=!1;Ov=hc&&(!document.documentMode||9<document.documentMode)}function oh(){vs&&(vs.detachEvent("onpropertychange",Tv),Ps=vs=null)}function Tv(e){if(e.propertyName==="value"&&vl(Ps)){var t=[];Nv(t,Ps,e,qd(e)),uv(_S,t)}}function RS(e,t,n){e==="focusin"?(oh(),vs=t,Ps=n,vs.attachEvent("onpropertychange",Tv)):e==="focusout"&&oh()}function kS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vl(Ps)}function NS(e,t){if(e==="click")return vl(t)}function OS(e,t){if(e==="input"||e==="change")return vl(t)}function TS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:TS;function Is(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!tu.call(t,o)||!Jt(e[o],t[o]))return!1}return!0}function sh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ih(e,t){var n=sh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sh(n)}}function Pv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iv(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function Jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function PS(e){var t=Iv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pv(n.ownerDocument.documentElement,n)){if(r!==null&&Jd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=ih(n,s);var i=ih(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var IS=Tn&&"documentMode"in document&&11>=document.documentMode,Xr=null,bu=null,ys=null,wu=!1;function ah(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||Xr==null||Xr!==wa(r)||(r=Xr,"selectionStart"in r&&Jd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ys&&Is(ys,r)||(ys=r,r=ka(bu,"onSelect"),0<r.length&&(t=new Qd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zr={animationend:ji("Animation","AnimationEnd"),animationiteration:ji("Animation","AnimationIteration"),animationstart:ji("Animation","AnimationStart"),transitionend:ji("Transition","TransitionEnd")},gc={},$v={};Tn&&($v=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function yl(e){if(gc[e])return gc[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $v)return gc[e]=t[n];return e}var Mv=yl("animationend"),Av=yl("animationiteration"),Dv=yl("animationstart"),Fv=yl("transitionend"),Lv=new Map,lh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function pr(e,t){Lv.set(e,t),Fr(t,[e])}for(var vc=0;vc<lh.length;vc++){var yc=lh[vc],$S=yc.toLowerCase(),MS=yc[0].toUpperCase()+yc.slice(1);pr($S,"on"+MS)}pr(Mv,"onAnimationEnd");pr(Av,"onAnimationIteration");pr(Dv,"onAnimationStart");pr("dblclick","onDoubleClick");pr("focusin","onFocus");pr("focusout","onBlur");pr(Fv,"onTransitionEnd");yo("onMouseEnter",["mouseout","mouseover"]);yo("onMouseLeave",["mouseout","mouseover"]);yo("onPointerEnter",["pointerout","pointerover"]);yo("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),AS=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function ch(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,$1(r,t,void 0,e),e.currentTarget=null}function Uv(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&o.isPropagationStopped())break e;ch(o,l,u),s=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&o.isPropagationStopped())break e;ch(o,l,u),s=c}}}if(Ca)throw e=gu,Ca=!1,gu=null,e}function be(e,t){var n=t[Eu];n===void 0&&(n=t[Eu]=new Set);var r=e+"__bubble";n.has(r)||(Vv(t,e,2,!1),n.add(r))}function xc(e,t,n){var r=0;t&&(r|=4),Vv(n,e,r,t)}var _i="_reactListening"+Math.random().toString(36).slice(2);function $s(e){if(!e[_i]){e[_i]=!0,Gg.forEach(function(n){n!=="selectionchange"&&(AS.has(n)||xc(n,!1,e),xc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,xc("selectionchange",!1,t))}}function Vv(e,t,n,r){switch(jv(t)){case 1:var o=Q1;break;case 4:o=X1;break;default:o=Gd}n=o.bind(null,t,n,e),o=void 0,!mu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function bc(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=br(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}uv(function(){var u=s,d=qd(n),f=[];e:{var p=Lv.get(e);if(p!==void 0){var m=Qd,g=e;switch(e){case"keypress":if(Qi(n)===0)break e;case"keydown":case"keyup":m=fS;break;case"focusin":g="focus",m=pc;break;case"focusout":g="blur",m=pc;break;case"beforeblur":case"afterblur":m=pc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Xp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=eS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=mS;break;case Mv:case Av:case Dv:m=rS;break;case Fv:m=vS;break;case"scroll":m=Z1;break;case"wheel":m=xS;break;case"copy":case"cut":case"paste":m=sS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Jp}var y=(t&4)!==0,x=!y&&e==="scroll",h=y?p!==null?p+"Capture":null:p;y=[];for(var v=u,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,h!==null&&(S=ks(v,h),S!=null&&y.push(Ms(v,S,b)))),x)break;v=v.return}0<y.length&&(p=new m(p,g,null,n,d),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==pu&&(g=n.relatedTarget||n.fromElement)&&(br(g)||g[Pn]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(g=n.relatedTarget||n.toElement,m=u,g=g?br(g):null,g!==null&&(x=Lr(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(y=Xp,S="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Jp,S="onPointerLeave",h="onPointerEnter",v="pointer"),x=m==null?p:Jr(m),b=g==null?p:Jr(g),p=new y(S,v+"leave",m,n,d),p.target=x,p.relatedTarget=b,S=null,br(d)===u&&(y=new y(h,v+"enter",g,n,d),y.target=b,y.relatedTarget=x,S=y),x=S,m&&g)t:{for(y=m,h=g,v=0,b=y;b;b=Br(b))v++;for(b=0,S=h;S;S=Br(S))b++;for(;0<v-b;)y=Br(y),v--;for(;0<b-v;)h=Br(h),b--;for(;v--;){if(y===h||h!==null&&y===h.alternate)break t;y=Br(y),h=Br(h)}y=null}else y=null;m!==null&&uh(f,p,m,y,!1),g!==null&&x!==null&&uh(f,x,g,y,!0)}}e:{if(p=u?Jr(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var C=ES;else if(nh(p))if(Ov)C=OS;else{C=kS;var j=RS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=NS);if(C&&(C=C(e,u))){Nv(f,C,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&lu(p,"number",p.value)}switch(j=u?Jr(u):window,e){case"focusin":(nh(j)||j.contentEditable==="true")&&(Xr=j,bu=u,ys=null);break;case"focusout":ys=bu=Xr=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,ah(f,n,d);break;case"selectionchange":if(IS)break;case"keydown":case"keyup":ah(f,n,d)}var _;if(Zd)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Qr?Rv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Ev&&n.locale!=="ko"&&(Qr||E!=="onCompositionStart"?E==="onCompositionEnd"&&Qr&&(_=_v()):(Zn=d,Yd="value"in Zn?Zn.value:Zn.textContent,Qr=!0)),j=ka(u,E),0<j.length&&(E=new Zp(E,e,null,n,d),f.push({event:E,listeners:j}),_?E.data=_:(_=kv(n),_!==null&&(E.data=_)))),(_=wS?SS(e,n):CS(e,n))&&(u=ka(u,"onBeforeInput"),0<u.length&&(d=new Zp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=_))}Uv(f,t)})}function Ms(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ka(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=ks(e,n),s!=null&&r.unshift(Ms(e,s,o)),s=ks(e,t),s!=null&&r.push(Ms(e,s,o))),e=e.return}return r}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uh(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=ks(n,s),c!=null&&i.unshift(Ms(n,c,l))):o||(c=ks(n,s),c!=null&&i.push(Ms(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var DS=/\r\n?/g,FS=/\u0000|\uFFFD/g;function dh(e){return(typeof e=="string"?e:""+e).replace(DS,`
|
|
38
|
+
`).replace(FS,"")}function Ei(e,t,n){if(t=dh(t),dh(e)!==t&&n)throw Error(I(425))}function Na(){}var Su=null,Cu=null;function ju(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _u=typeof setTimeout=="function"?setTimeout:void 0,LS=typeof clearTimeout=="function"?clearTimeout:void 0,fh=typeof Promise=="function"?Promise:void 0,US=typeof queueMicrotask=="function"?queueMicrotask:typeof fh<"u"?function(e){return fh.resolve(null).then(e).catch(VS)}:_u;function VS(e){setTimeout(function(){throw e})}function wc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ts(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ts(t)}function or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ph(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fo=Math.random().toString(36).slice(2),an="__reactFiber$"+Fo,As="__reactProps$"+Fo,Pn="__reactContainer$"+Fo,Eu="__reactEvents$"+Fo,zS="__reactListeners$"+Fo,BS="__reactHandles$"+Fo;function br(e){var t=e[an];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[an]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ph(e);e!==null;){if(n=e[an])return n;e=ph(e)}return t}e=n,n=e.parentNode}return null}function oi(e){return e=e[an]||e[Pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function xl(e){return e[As]||null}var Ru=[],eo=-1;function hr(e){return{current:e}}function we(e){0>eo||(e.current=Ru[eo],Ru[eo]=null,eo--)}function xe(e,t){eo++,Ru[eo]=e.current,e.current=t}var ur={},et=hr(ur),ft=hr(!1),Nr=ur;function xo(e,t){var n=e.type.contextTypes;if(!n)return ur;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pt(e){return e=e.childContextTypes,e!=null}function Oa(){we(ft),we(et)}function hh(e,t,n){if(et.current!==ur)throw Error(I(168));xe(et,t),xe(ft,n)}function zv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,R1(e)||"Unknown",o));return Ne({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ur,Nr=et.current,xe(et,e),xe(ft,ft.current),!0}function mh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=zv(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,we(ft),we(et),xe(et,e)):we(ft),xe(ft,n)}var wn=null,bl=!1,Sc=!1;function Bv(e){wn===null?wn=[e]:wn.push(e)}function qS(e){bl=!0,Bv(e)}function mr(){if(!Sc&&wn!==null){Sc=!0;var e=0,t=me;try{var n=wn;for(me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wn=null,bl=!1}catch(o){throw wn!==null&&(wn=wn.slice(e+1)),hv(Hd,mr),o}finally{me=t,Sc=!1}}return null}var to=[],no=0,Pa=null,Ia=0,$t=[],Mt=0,Or=null,jn=1,_n="";function vr(e,t){to[no++]=Ia,to[no++]=Pa,Pa=e,Ia=t}function qv(e,t,n){$t[Mt++]=jn,$t[Mt++]=_n,$t[Mt++]=Or,Or=e;var r=jn;e=_n;var o=32-Qt(r)-1;r&=~(1<<o),n+=1;var s=32-Qt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jn=1<<32-Qt(t)+o|n<<o|r,_n=s+e}else jn=1<<s|n<<o|r,_n=e}function ef(e){e.return!==null&&(vr(e,1),qv(e,1,0))}function tf(e){for(;e===Pa;)Pa=to[--no],to[no]=null,Ia=to[--no],to[no]=null;for(;e===Or;)Or=$t[--Mt],$t[Mt]=null,_n=$t[--Mt],$t[Mt]=null,jn=$t[--Mt],$t[Mt]=null}var St=null,wt=null,Ce=!1,Gt=null;function Hv(e,t){var n=Dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function gh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,St=e,wt=or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,St=e,wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Or!==null?{id:jn,overflow:_n}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,St=e,wt=null,!0):!1;default:return!1}}function ku(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Nu(e){if(Ce){var t=wt;if(t){var n=t;if(!gh(e,t)){if(ku(e))throw Error(I(418));t=or(n.nextSibling);var r=St;t&&gh(e,t)?Hv(r,n):(e.flags=e.flags&-4097|2,Ce=!1,St=e)}}else{if(ku(e))throw Error(I(418));e.flags=e.flags&-4097|2,Ce=!1,St=e}}}function vh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function Ri(e){if(e!==St)return!1;if(!Ce)return vh(e),Ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ju(e.type,e.memoizedProps)),t&&(t=wt)){if(ku(e))throw Wv(),Error(I(418));for(;t;)Hv(e,t),t=or(t.nextSibling)}if(vh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){wt=or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=St?or(e.stateNode.nextSibling):null;return!0}function Wv(){for(var e=wt;e;)e=or(e.nextSibling)}function bo(){wt=St=null,Ce=!1}function nf(e){Gt===null?Gt=[e]:Gt.push(e)}var HS=Ln.ReactCurrentBatchConfig;function Ht(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var $a=hr(null),Ma=null,ro=null,rf=null;function of(){rf=ro=Ma=null}function sf(e){var t=$a.current;we($a),e._currentValue=t}function Ou(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fo(e,t){Ma=e,rf=ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(rf!==e)if(e={context:e,memoizedValue:t,next:null},ro===null){if(Ma===null)throw Error(I(308));ro=e,Ma.dependencies={lanes:0,firstContext:e}}else ro=ro.next=e;return t}var wr=null;function af(e){wr===null?wr=[e]:wr.push(e)}function Kv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,af(t)):(n.next=o.next,o.next=n),t.interleaved=n,In(e,r)}function In(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kn=!1;function lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ue&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,In(e,n)}return o=r.interleaved,o===null?(t.next=t,af(r)):(t.next=o.next,o.next=t),r.interleaved=t,In(e,n)}function Xi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wd(e,n)}}function yh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Aa(e,t,n,r){var o=e.updateQueue;Kn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?s=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=o.baseState;i=0,d=u=c=null,l=s;do{var p=l.lane,m=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,y=l;switch(p=t,m=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){f=g.call(m,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,p=typeof g=="function"?g.call(m,f,p):g,p==null)break e;f=Ne({},f,p);break e;case 2:Kn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,i|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Pr|=i,e.lanes=i,e.memoizedState=f}}function xh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var Yv=new Kg.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Lr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),o=ar(e),s=Rn(r,o);s.payload=t,n!=null&&(s.callback=n),t=sr(e,s,o),t!==null&&(Xt(t,e,o,r),Xi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ot(),o=ar(e),s=Rn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=sr(e,s,o),t!==null&&(Xt(t,e,o,r),Xi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ot(),r=ar(e),o=Rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=sr(e,o,r),t!==null&&(Xt(t,e,r,n),Xi(t,e,r))}};function bh(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Is(n,r)||!Is(o,s):!0}function Qv(e,t,n){var r=!1,o=ur,s=t.contextType;return typeof s=="object"&&s!==null?s=Lt(s):(o=pt(t)?Nr:et.current,r=t.contextTypes,s=(r=r!=null)?xo(e,o):ur),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function wh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wl.enqueueReplaceState(t,t.state,null)}function Pu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Yv,lf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Lt(s):(s=pt(t)?Nr:et.current,o.context=xo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Tu(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&wl.enqueueReplaceState(o,o.state,null),Aa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Qo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;l===Yv&&(l=o.refs={}),i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function ki(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sh(e){var t=e._init;return t(e._payload)}function Xv(e){function t(h,v){if(e){var b=h.deletions;b===null?(h.deletions=[v],h.flags|=16):b.push(v)}}function n(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function r(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function o(h,v){return h=lr(h,v),h.index=0,h.sibling=null,h}function s(h,v,b){return h.index=b,e?(b=h.alternate,b!==null?(b=b.index,b<v?(h.flags|=2,v):b):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,v,b,S){return v===null||v.tag!==6?(v=Nc(b,h.mode,S),v.return=h,v):(v=o(v,b),v.return=h,v)}function c(h,v,b,S){var C=b.type;return C===Yr?d(h,v,b.props.children,S,b.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Wn&&Sh(C)===v.type)?(S=o(v,b.props),S.ref=Qo(h,v,b),S.return=h,S):(S=ra(b.type,b.key,b.props,null,h.mode,S),S.ref=Qo(h,v,b),S.return=h,S)}function u(h,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Oc(b,h.mode,S),v.return=h,v):(v=o(v,b.children||[]),v.return=h,v)}function d(h,v,b,S,C){return v===null||v.tag!==7?(v=_r(b,h.mode,S,C),v.return=h,v):(v=o(v,b),v.return=h,v)}function f(h,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Nc(""+v,h.mode,b),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case vi:return b=ra(v.type,v.key,v.props,null,h.mode,b),b.ref=Qo(h,null,v),b.return=h,b;case Gr:return v=Oc(v,h.mode,b),v.return=h,v;case Wn:var S=v._init;return f(h,S(v._payload),b)}if(ls(v)||Ho(v))return v=_r(v,h.mode,b,null),v.return=h,v;ki(h,v)}return null}function p(h,v,b,S){var C=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:l(h,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vi:return b.key===C?c(h,v,b,S):null;case Gr:return b.key===C?u(h,v,b,S):null;case Wn:return C=b._init,p(h,v,C(b._payload),S)}if(ls(b)||Ho(b))return C!==null?null:d(h,v,b,S,null);ki(h,b)}return null}function m(h,v,b,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(b)||null,l(v,h,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case vi:return h=h.get(S.key===null?b:S.key)||null,c(v,h,S,C);case Gr:return h=h.get(S.key===null?b:S.key)||null,u(v,h,S,C);case Wn:var j=S._init;return m(h,v,b,j(S._payload),C)}if(ls(S)||Ho(S))return h=h.get(b)||null,d(v,h,S,C,null);ki(v,S)}return null}function g(h,v,b,S){for(var C=null,j=null,_=v,E=v=0,k=null;_!==null&&E<b.length;E++){_.index>E?(k=_,_=null):k=_.sibling;var R=p(h,_,b[E],S);if(R===null){_===null&&(_=k);break}e&&_&&R.alternate===null&&t(h,_),v=s(R,v,E),j===null?C=R:j.sibling=R,j=R,_=k}if(E===b.length)return n(h,_),Ce&&vr(h,E),C;if(_===null){for(;E<b.length;E++)_=f(h,b[E],S),_!==null&&(v=s(_,v,E),j===null?C=_:j.sibling=_,j=_);return Ce&&vr(h,E),C}for(_=r(h,_);E<b.length;E++)k=m(_,h,E,b[E],S),k!==null&&(e&&k.alternate!==null&&_.delete(k.key===null?E:k.key),v=s(k,v,E),j===null?C=k:j.sibling=k,j=k);return e&&_.forEach(function(O){return t(h,O)}),Ce&&vr(h,E),C}function y(h,v,b,S){var C=Ho(b);if(typeof C!="function")throw Error(I(150));if(b=C.call(b),b==null)throw Error(I(151));for(var j=C=null,_=v,E=v=0,k=null,R=b.next();_!==null&&!R.done;E++,R=b.next()){_.index>E?(k=_,_=null):k=_.sibling;var O=p(h,_,R.value,S);if(O===null){_===null&&(_=k);break}e&&_&&O.alternate===null&&t(h,_),v=s(O,v,E),j===null?C=O:j.sibling=O,j=O,_=k}if(R.done)return n(h,_),Ce&&vr(h,E),C;if(_===null){for(;!R.done;E++,R=b.next())R=f(h,R.value,S),R!==null&&(v=s(R,v,E),j===null?C=R:j.sibling=R,j=R);return Ce&&vr(h,E),C}for(_=r(h,_);!R.done;E++,R=b.next())R=m(_,h,E,R.value,S),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?E:R.key),v=s(R,v,E),j===null?C=R:j.sibling=R,j=R);return e&&_.forEach(function(N){return t(h,N)}),Ce&&vr(h,E),C}function x(h,v,b,S){if(typeof b=="object"&&b!==null&&b.type===Yr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case vi:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===Yr){if(j.tag===7){n(h,j.sibling),v=o(j,b.props.children),v.return=h,h=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Wn&&Sh(C)===j.type){n(h,j.sibling),v=o(j,b.props),v.ref=Qo(h,j,b),v.return=h,h=v;break e}n(h,j);break}else t(h,j);j=j.sibling}b.type===Yr?(v=_r(b.props.children,h.mode,S,b.key),v.return=h,h=v):(S=ra(b.type,b.key,b.props,null,h.mode,S),S.ref=Qo(h,v,b),S.return=h,h=S)}return i(h);case Gr:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(h,v.sibling),v=o(v,b.children||[]),v.return=h,h=v;break e}else{n(h,v);break}else t(h,v);v=v.sibling}v=Oc(b,h.mode,S),v.return=h,h=v}return i(h);case Wn:return j=b._init,x(h,v,j(b._payload),S)}if(ls(b))return g(h,v,b,S);if(Ho(b))return y(h,v,b,S);ki(h,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(h,v.sibling),v=o(v,b),v.return=h,h=v):(n(h,v),v=Nc(b,h.mode,S),v.return=h,h=v),i(h)):n(h,v)}return x}var wo=Xv(!0),Zv=Xv(!1),si={},cn=hr(si),Ds=hr(si),Fs=hr(si);function Sr(e){if(e===si)throw Error(I(174));return e}function cf(e,t){switch(xe(Fs,t),xe(Ds,e),xe(cn,si),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:uu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uu(t,e)}we(cn),xe(cn,t)}function So(){we(cn),we(Ds),we(Fs)}function Jv(e){Sr(Fs.current);var t=Sr(cn.current),n=uu(t,e.type);t!==n&&(xe(Ds,e),xe(cn,n))}function uf(e){Ds.current===e&&(we(cn),we(Ds))}var Ee=hr(0);function Da(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Cc=[];function df(){for(var e=0;e<Cc.length;e++)Cc[e]._workInProgressVersionPrimary=null;Cc.length=0}var Zi=Ln.ReactCurrentDispatcher,jc=Ln.ReactCurrentBatchConfig,Tr=0,ke=null,De=null,ze=null,Fa=!1,xs=!1,Ls=0,WS=0;function Qe(){throw Error(I(321))}function ff(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jt(e[n],t[n]))return!1;return!0}function pf(e,t,n,r,o,s){if(Tr=s,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=e===null||e.memoizedState===null?QS:XS,e=n(r,o),xs){s=0;do{if(xs=!1,Ls=0,25<=s)throw Error(I(301));s+=1,ze=De=null,t.updateQueue=null,Zi.current=ZS,e=n(r,o)}while(xs)}if(Zi.current=La,t=De!==null&&De.next!==null,Tr=0,ze=De=ke=null,Fa=!1,t)throw Error(I(300));return e}function hf(){var e=Ls!==0;return Ls=0,e}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?ke.memoizedState=ze=e:ze=ze.next=e,ze}function Ut(){if(De===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=ze===null?ke.memoizedState:ze.next;if(t!==null)ze=t,De=e;else{if(e===null)throw Error(I(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},ze===null?ke.memoizedState=ze=e:ze=ze.next=e}return ze}function Us(e,t){return typeof t=="function"?t(e):t}function _c(e){var t=Ut(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=De,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,c=null,u=s;do{var d=u.lane;if((Tr&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=r):c=c.next=f,ke.lanes|=d,Pr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,Jt(r,t.memoizedState)||(dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,ke.lanes|=s,Pr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ec(e){var t=Ut(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Jt(s,t.memoizedState)||(dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ey(){}function ty(e,t){var n=ke,r=Ut(),o=t(),s=!Jt(r.memoizedState,o);if(s&&(r.memoizedState=o,dt=!0),r=r.queue,mf(oy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,Vs(9,ry.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Tr&30||ny(n,t,o)}return o}function ny(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ry(e,t,n,r){t.value=n,t.getSnapshot=r,sy(t)&&iy(e)}function oy(e,t,n){return n(function(){sy(t)&&iy(e)})}function sy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function iy(e){var t=In(e,1);t!==null&&Xt(t,e,1,-1)}function Ch(e){var t=nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Us,lastRenderedState:e},t.queue=e,e=e.dispatch=YS.bind(null,ke,e),[t.memoizedState,e]}function Vs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ay(){return Ut().memoizedState}function Ji(e,t,n,r){var o=nn();ke.flags|=e,o.memoizedState=Vs(1|t,n,void 0,r===void 0?null:r)}function Sl(e,t,n,r){var o=Ut();r=r===void 0?null:r;var s=void 0;if(De!==null){var i=De.memoizedState;if(s=i.destroy,r!==null&&ff(r,i.deps)){o.memoizedState=Vs(t,n,s,r);return}}ke.flags|=e,o.memoizedState=Vs(1|t,n,s,r)}function jh(e,t){return Ji(8390656,8,e,t)}function mf(e,t){return Sl(2048,8,e,t)}function ly(e,t){return Sl(4,2,e,t)}function cy(e,t){return Sl(4,4,e,t)}function uy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dy(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4,4,uy.bind(null,t,e),n)}function gf(){}function fy(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ff(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function py(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ff(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hy(e,t,n){return Tr&21?(Jt(n,t)||(n=vv(),ke.lanes|=n,Pr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=n)}function KS(e,t){var n=me;me=n!==0&&4>n?n:4,e(!0);var r=jc.transition;jc.transition={};try{e(!1),t()}finally{me=n,jc.transition=r}}function my(){return Ut().memoizedState}function GS(e,t,n){var r=ar(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gy(e))vy(t,n);else if(n=Kv(e,t,n,r),n!==null){var o=ot();Xt(n,e,r,o),yy(n,t,r)}}function YS(e,t,n){var r=ar(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gy(e))vy(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,Jt(l,i)){var c=t.interleaved;c===null?(o.next=o,af(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Kv(e,t,o,r),n!==null&&(o=ot(),Xt(n,e,r,o),yy(n,t,r))}}function gy(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function vy(e,t){xs=Fa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wd(e,n)}}var La={readContext:Lt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},QS={readContext:Lt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:jh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ji(4194308,4,uy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ji(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ji(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Ch,useDebugValue:gf,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Ch(!1),t=e[0];return e=KS.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=nn();if(Ce){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Tr&30||ny(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,jh(oy.bind(null,r,s,e),[e]),r.flags|=2048,Vs(9,ry.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=nn(),t=Be.identifierPrefix;if(Ce){var n=_n,r=jn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ls++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=WS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},XS={readContext:Lt,useCallback:fy,useContext:Lt,useEffect:mf,useImperativeHandle:dy,useInsertionEffect:ly,useLayoutEffect:cy,useMemo:py,useReducer:_c,useRef:ay,useState:function(){return _c(Us)},useDebugValue:gf,useDeferredValue:function(e){var t=Ut();return hy(t,De.memoizedState,e)},useTransition:function(){var e=_c(Us)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ey,useSyncExternalStore:ty,useId:my,unstable_isNewReconciler:!1},ZS={readContext:Lt,useCallback:fy,useContext:Lt,useEffect:mf,useImperativeHandle:dy,useInsertionEffect:ly,useLayoutEffect:cy,useMemo:py,useReducer:Ec,useRef:ay,useState:function(){return Ec(Us)},useDebugValue:gf,useDeferredValue:function(e){var t=Ut();return De===null?t.memoizedState=e:hy(t,De.memoizedState,e)},useTransition:function(){var e=Ec(Us)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ey,useSyncExternalStore:ty,useId:my,unstable_isNewReconciler:!1};function Co(e,t){try{var n="",r=t;do n+=E1(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
39
39
|
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function _c(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ku(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qS=typeof WeakMap=="function"?WeakMap:Map;function py(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ma||(Ma=!0,Lu=r),ku(e,t)},n}function hy(e,t,n){n=Rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ku(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ku(e,t),typeof r!="function"&&(sr===null?sr=new Set([this]):sr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function yh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=o_.bind(null,e,t,n),t.then(e,e))}function xh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rn(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var HS=Ln.ReactCurrentOwner,dt=!1;function tt(e,t,n,r){t.child=e===null?Wv(t,null,n,r):bo(t,e.child,n,r)}function wh(e,t,n,r,o){n=n.render;var s=t.ref;return uo(t,o),r=cf(e,t,n,r,s,o),n=uf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(_e&&n&&Qd(t),t.flags|=1,tt(e,t,r,o),t.child)}function Sh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!bf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,my(e,t,s,r,o)):(e=Ji(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Os,n(i,r)&&e.ref===t.ref)return $n(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function my(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Os(s,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(dt=!0);else return t.lanes=e.lanes,$n(e,t,o)}return Tu(e,t,n,r,o)}function gy(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(oo,xt),xt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(oo,xt),xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ye(oo,xt),xt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ye(oo,xt),xt|=r;return tt(e,t,o,n),t.child}function vy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tu(e,t,n,r,o){var s=pt(n)?kr:et.current;return s=yo(t,s),uo(t,o),n=cf(e,t,n,r,s,o),r=uf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(_e&&r&&Qd(t),t.flags|=1,tt(e,t,n,o),t.child)}function _h(e,t,n,r,o){if(pt(n)){var s=!0;Ea(t)}else s=!1;if(uo(t,o),t.stateNode===null)Qi(e,t),qv(t,n,r),Nu(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ut(u):(u=pt(n)?kr:et.current,u=yo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&hh(t,i,r,u),Wn=!1;var p=t.memoizedState;i.state=p,Oa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ft.current||Wn?(typeof d=="function"&&(Ru(t,n,d,r),c=t.memoizedState),(l=Wn||ph(t,n,l,r,p,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Bv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Wt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ut(c):(c=pt(n)?kr:et.current,c=yo(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&hh(t,i,r,c),Wn=!1,p=t.memoizedState,i.state=p,Oa(t,r,i,o);var m=t.memoizedState;l!==f||p!==m||ft.current||Wn?(typeof y=="function"&&(Ru(t,n,y,r),m=t.memoizedState),(u=Wn||ph(t,n,u,r,p,m,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ou(e,t,n,r,s,o)}function Ou(e,t,n,r,o,s){vy(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&lh(t,n,!1),$n(e,t,s);r=t.stateNode,HS.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=bo(t,e.child,null,s),t.child=bo(t,null,l,s)):tt(e,t,l,s),t.memoizedState=r.state,o&&lh(t,n,!0),t.child}function yy(e){var t=e.stateNode;t.pendingContext?ah(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ah(e,t.context,!1),of(e,t.containerInfo)}function jh(e,t,n,r,o){return xo(),Zd(o),t.flags|=256,tt(e,t,n,r),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0};function Iu(e){return{baseLanes:e,cachePool:null,transitions:null}}function xy(e,t,n){var r=t.pendingProps,o=Ee.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ye(Ee,o&1),e===null)return Cu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Sl(i,r,0,null),e=jr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Iu(n),t.memoizedState=Pu,e):pf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return WS(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ar(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=ar(l,s):(s=jr(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Iu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Pu,r}return s=e.child,e=s.sibling,r=ar(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function pf(e,t){return t=Sl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,n,r){return r!==null&&Zd(r),bo(t,e.child,null,n),e=pf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WS(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=_c(Error(I(422))),ji(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Sl({mode:"visible",children:r.children},o,0,null),s=jr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&bo(t,e.child,null,i),t.child.memoizedState=Iu(i),t.memoizedState=Pu,s);if(!(t.mode&1))return ji(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(I(419)),r=_c(s,r,void 0),ji(e,t,i,r)}if(l=(i&e.childLanes)!==0,dt||l){if(r=Be,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,In(e,o),Zt(r,e,o,-1))}return xf(),r=_c(Error(I(421))),ji(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=s_.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,bt=rr(o.nextSibling),wt=t,_e=!0,Yt=null,e!==null&&(At[Mt++]=jn,At[Mt++]=Cn,At[Mt++]=Tr,jn=e.id,Cn=e.overflow,Tr=t),t=pf(t,r.children),t.flags|=4096,t)}function Ch(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Eu(e.return,t,n)}function jc(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function by(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(tt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ch(e,n,t);else if(e.tag===19)Ch(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ye(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Pa(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),jc(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pa(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}jc(t,!0,n,null,s);break;case"together":jc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KS(e,t,n){switch(t.tag){case 3:yy(t),xo();break;case 5:Kv(t);break;case 1:pt(t.type)&&Ea(t);break;case 4:of(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ye(ka,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ye(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?xy(e,t,n):(ye(Ee,Ee.current&1),e=$n(e,t,n),e!==null?e.sibling:null);ye(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return by(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ye(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,gy(e,t,n)}return $n(e,t,n)}var wy,$u,Sy,_y;wy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$u=function(){};Sy=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(dn.current);var s=null;switch(n){case"input":o=nu(e,o),r=nu(e,r),s=[];break;case"select":o=Ne({},o,{value:void 0}),r=Ne({},r,{value:void 0}),s=[];break;case"textarea":o=su(e,o),r=su(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ja)}au(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};_y=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function GS(e,t,n){var r=t.pendingProps;switch(Xd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return pt(t.type)&&Ca(),Xe(t),null;case 3:return r=t.stateNode,wo(),we(ft),we(et),af(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yt!==null&&(Bu(Yt),Yt=null))),$u(e,t),Xe(t),null;case 5:sf(t);var o=wr(Ms.current);if(n=t.type,e!==null&&t.stateNode!=null)Sy(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Xe(t),null}if(e=wr(dn.current),Si(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[cn]=t,r[$s]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":$p(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":Mp(r,s),xe("invalid",r)}au(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",""+l]):js.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":pi(r),Ap(r,s,!0);break;case"textarea":pi(r),Dp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ja)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[cn]=t,e[$s]=r,wy(e,t,!1,!1),t.stateNode=e;e:{switch(i=lu(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":$p(e,r),o=nu(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ne({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Mp(e,r),o=su(e,r),xe("invalid",e);break;default:o=r}au(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?Jg(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Xg(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Cs(e,c):typeof c=="number"&&Cs(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&xe("scroll",e):c!=null&&Md(e,s,c,i))}switch(n){case"input":pi(e),Ap(e,r,!1);break;case"textarea":pi(e),Dp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+lr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?io(e,!!r.multiple,s,!1):r.defaultValue!=null&&io(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ja)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xe(t),null;case 6:if(e&&t.stateNode!=null)_y(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ms.current),wr(dn.current),Si(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(s=r.nodeValue!==n)&&(e=wt,e!==null))switch(e.tag){case 3:wi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return Xe(t),null;case 13:if(we(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&bt!==null&&t.mode&1&&!(t.flags&128))Uv(),xo(),t.flags|=98560,s=!1;else if(s=Si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[cn]=t}else xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),s=!1}else Yt!==null&&(Bu(Yt),Yt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?De===0&&(De=3):xf())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return wo(),$u(e,t),e===null&&Ps(t.stateNode.containerInfo),Xe(t),null;case 10:return tf(t.type._context),Xe(t),null;case 17:return pt(t.type)&&Ca(),Xe(t),null;case 19:if(we(Ee),s=t.memoizedState,s===null)return Xe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Qo(s,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Pa(e),i!==null){for(t.flags|=128,Qo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&Pe()>_o&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pa(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return Xe(t),null}else 2*Pe()-s.renderingStartTime>_o&&n!==1073741824&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Pe(),t.sibling=null,n=Ee.current,ye(Ee,r?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return yf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function YS(e,t){switch(Xd(t),t.tag){case 1:return pt(t.type)&&Ca(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wo(),we(ft),we(et),af(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sf(t),null;case 13:if(we(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ee),null;case 4:return wo(),null;case 10:return tf(t.type._context),null;case 22:case 23:return yf(),null;case 24:return null;default:return null}}var Ci=!1,Je=!1,QS=typeof WeakSet=="function"?WeakSet:Set,z=null;function ro(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function Au(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Eh=!1;function XS(e,t){if(yu=wa,e=Rv(),Yd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||o!==0&&f.nodeType!==3||(l=i+o),f!==s||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(xu={focusedElem:e,selectionRange:n},wa=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,x=m.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:Wt(t.type,h),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){ke(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return m=Eh,Eh=!1,m}function ys(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Au(t,n,s)}o=o.next}while(o!==r)}}function bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function jy(e){var t=e.alternate;t!==null&&(e.alternate=null,jy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[$s],delete t[Su],delete t[IS],delete t[$S])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cy(e){return e.tag===5||e.tag===3||e.tag===4}function Rh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Du(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ja));else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}function Fu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fu(e,t,n),e=e.sibling;e!==null;)Fu(e,t,n),e=e.sibling}var He=null,Kt=!1;function qn(e,t,n){for(n=n.child;n!==null;)Ey(e,t,n),n=n.sibling}function Ey(e,t,n){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(fl,n)}catch{}switch(n.tag){case 5:Je||ro(n,t);case 6:var r=He,o=Kt;He=null,qn(e,t,n),He=r,Kt=o,He!==null&&(Kt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Kt?(e=He,n=n.stateNode,e.nodeType===8?vc(e.parentNode,n):e.nodeType===1&&vc(e,n),ks(e)):vc(He,n.stateNode));break;case 4:r=He,o=Kt,He=n.stateNode.containerInfo,Kt=!0,qn(e,t,n),He=r,Kt=o;break;case 0:case 11:case 14:case 15:if(!Je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Au(n,t,i),o=o.next}while(o!==r)}qn(e,t,n);break;case 1:if(!Je&&(ro(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ke(n,t,l)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(Je=(r=Je)||n.memoizedState!==null,qn(e,t,n),Je=r):qn(e,t,n);break;default:qn(e,t,n)}}function Nh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QS),t.forEach(function(r){var o=i_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:He=l.stateNode,Kt=!1;break e;case 3:He=l.stateNode.containerInfo,Kt=!0;break e;case 4:He=l.stateNode.containerInfo,Kt=!0;break e}l=l.return}if(He===null)throw Error(I(160));Ey(s,i,o),He=null,Kt=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){ke(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ry(t,e),t=t.sibling}function Ry(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),nn(e),r&4){try{ys(3,e,e.return),bl(3,e)}catch(h){ke(e,e.return,h)}try{ys(5,e,e.return)}catch(h){ke(e,e.return,h)}}break;case 1:qt(t,e),nn(e),r&512&&n!==null&&ro(n,n.return);break;case 5:if(qt(t,e),nn(e),r&512&&n!==null&&ro(n,n.return),e.flags&32){var o=e.stateNode;try{Cs(o,"")}catch(h){ke(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Gg(o,s),lu(l,i);var u=lu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?Jg(o,f):d==="dangerouslySetInnerHTML"?Xg(o,f):d==="children"?Cs(o,f):Md(o,d,f,u)}switch(l){case"input":ru(o,s);break;case"textarea":Yg(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?io(o,!!s.multiple,y,!1):p!==!!s.multiple&&(s.defaultValue!=null?io(o,!!s.multiple,s.defaultValue,!0):io(o,!!s.multiple,s.multiple?[]:"",!1))}o[$s]=s}catch(h){ke(e,e.return,h)}}break;case 6:if(qt(t,e),nn(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(h){ke(e,e.return,h)}}break;case 3:if(qt(t,e),nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ks(t.containerInfo)}catch(h){ke(e,e.return,h)}break;case 4:qt(t,e),nn(e);break;case 13:qt(t,e),nn(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(gf=Pe())),r&4&&Nh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Je=(u=Je)||d,qt(t,e),Je=u):qt(t,e),nn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(f=z=d;z!==null;){switch(p=z,y=p.child,p.tag){case 0:case 11:case 14:case 15:ys(4,p,p.return);break;case 1:ro(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(h){ke(r,n,h)}}break;case 5:ro(p,p.return);break;case 22:if(p.memoizedState!==null){Th(f);continue}}y!==null?(y.return=p,z=y):Th(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Zg("display",i))}catch(h){ke(e,e.return,h)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(h){ke(e,e.return,h)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qt(t,e),nn(e),r&4&&Nh(e);break;case 21:break;default:qt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Cy(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Cs(o,""),r.flags&=-33);var s=Rh(e);Fu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Rh(e);Du(e,l,i);break;default:throw Error(I(161))}}catch(c){ke(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ZS(e,t,n){z=e,Ny(e)}function Ny(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var o=z,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ci;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Je;l=Ci;var u=Je;if(Ci=i,(Je=c)&&!u)for(z=o;z!==null;)i=z,c=i.child,i.tag===22&&i.memoizedState!==null?Oh(o):c!==null?(c.return=i,z=c):Oh(o);for(;s!==null;)z=s,Ny(s),s=s.sibling;z=o,Ci=l,Je=u}kh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,z=s):kh(e)}}function kh(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Je||bl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Je)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Wt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&fh(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fh(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&ks(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Je||t.flags&512&&Mu(t)}catch(p){ke(t,t.return,p)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Th(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function Oh(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bl(4,t)}catch(c){ke(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){ke(t,o,c)}}var s=t.return;try{Mu(t)}catch(c){ke(t,s,c)}break;case 5:var i=t.return;try{Mu(t)}catch(c){ke(t,i,c)}}}catch(c){ke(t,t.return,c)}if(t===e){z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,z=l;break}z=t.return}}var JS=Math.ceil,Aa=Ln.ReactCurrentDispatcher,hf=Ln.ReactCurrentOwner,Lt=Ln.ReactCurrentBatchConfig,ce=0,Be=null,$e=null,Ke=0,xt=0,oo=pr(0),De=0,Us=null,Pr=0,wl=0,mf=0,xs=null,ut=null,gf=0,_o=1/0,bn=null,Ma=!1,Lu=null,sr=null,Ei=!1,Zn=null,Da=0,bs=0,Uu=null,Xi=-1,Zi=0;function rt(){return ce&6?Pe():Xi!==-1?Xi:Xi=Pe()}function ir(e){return e.mode&1?ce&2&&Ke!==0?Ke&-Ke:MS.transition!==null?(Zi===0&&(Zi=dv()),Zi):(e=he,e!==0||(e=window.event,e=e===void 0?16:yv(e.type)),e):1}function Zt(e,t,n,r){if(50<bs)throw bs=0,Uu=null,Error(I(185));Js(e,n,r),(!(ce&2)||e!==Be)&&(e===Be&&(!(ce&2)&&(wl|=n),De===4&&Yn(e,Ke)),ht(e,r),n===1&&ce===0&&!(t.mode&1)&&(_o=Pe()+500,vl&&hr()))}function ht(e,t){var n=e.callbackNode;M1(e,t);var r=ba(e,e===Be?Ke:0);if(r===0)n!==null&&Up(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Up(n),t===1)e.tag===0?AS(Ph.bind(null,e)):Dv(Ph.bind(null,e)),OS(function(){!(ce&6)&&hr()}),n=null;else{switch(fv(r)){case 1:n=Vd;break;case 4:n=cv;break;case 16:n=xa;break;case 536870912:n=uv;break;default:n=xa}n=My(n,ky.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ky(e,t){if(Xi=-1,Zi=0,ce&6)throw Error(I(327));var n=e.callbackNode;if(fo()&&e.callbackNode!==n)return null;var r=ba(e,e===Be?Ke:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fa(e,r);else{t=r;var o=ce;ce|=2;var s=Oy();(Be!==e||Ke!==t)&&(bn=null,_o=Pe()+500,_r(e,t));do try{n_();break}catch(l){Ty(e,l)}while(!0);ef(),Aa.current=s,ce=o,$e!==null?t=0:(Be=null,Ke=0,t=De)}if(t!==0){if(t===2&&(o=pu(e),o!==0&&(r=o,t=Vu(e,o))),t===1)throw n=Us,_r(e,0),Yn(e,r),ht(e,Pe()),n;if(t===6)Yn(e,r);else{if(o=e.current.alternate,!(r&30)&&!e_(o)&&(t=Fa(e,r),t===2&&(s=pu(e),s!==0&&(r=s,t=Vu(e,s))),t===1))throw n=Us,_r(e,0),Yn(e,r),ht(e,Pe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ut,bn);break;case 3:if(Yn(e,r),(r&130023424)===r&&(t=gf+500-Pe(),10<t)){if(ba(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=wu(vr.bind(null,e,ut,bn),t);break}vr(e,ut,bn);break;case 4:if(Yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Xt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JS(r/1960))-r,10<r){e.timeoutHandle=wu(vr.bind(null,e,ut,bn),r);break}vr(e,ut,bn);break;case 5:vr(e,ut,bn);break;default:throw Error(I(329))}}}return ht(e,Pe()),e.callbackNode===n?ky.bind(null,e):null}function Vu(e,t){var n=xs;return e.current.memoizedState.isDehydrated&&(_r(e,t).flags|=256),e=Fa(e,t),e!==2&&(t=ut,ut=n,t!==null&&Bu(t)),e}function Bu(e){ut===null?ut=e:ut.push.apply(ut,e)}function e_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!en(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yn(e,t){for(t&=~mf,t&=~wl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xt(t),r=1<<n;e[n]=-1,t&=~r}}function Ph(e){if(ce&6)throw Error(I(327));fo();var t=ba(e,0);if(!(t&1))return ht(e,Pe()),null;var n=Fa(e,t);if(e.tag!==0&&n===2){var r=pu(e);r!==0&&(t=r,n=Vu(e,r))}if(n===1)throw n=Us,_r(e,0),Yn(e,t),ht(e,Pe()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ut,bn),ht(e,Pe()),null}function vf(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(_o=Pe()+500,vl&&hr())}}function Ir(e){Zn!==null&&Zn.tag===0&&!(ce&6)&&fo();var t=ce;ce|=1;var n=Lt.transition,r=he;try{if(Lt.transition=null,he=1,e)return e()}finally{he=r,Lt.transition=n,ce=t,!(ce&6)&&hr()}}function yf(){xt=oo.current,we(oo)}function _r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TS(n)),$e!==null)for(n=$e.return;n!==null;){var r=n;switch(Xd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ca();break;case 3:wo(),we(ft),we(et),af();break;case 5:sf(r);break;case 4:wo();break;case 13:we(Ee);break;case 19:we(Ee);break;case 10:tf(r.type._context);break;case 22:case 23:yf()}n=n.return}if(Be=e,$e=e=ar(e.current,null),Ke=xt=t,De=0,Us=null,mf=wl=Pr=0,ut=xs=null,br!==null){for(t=0;t<br.length;t++)if(n=br[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}br=null}return e}function Ty(e,t){do{var n=$e;try{if(ef(),Gi.current=$a,Ia){for(var r=Re.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ia=!1}if(Or=0,Ve=Me=Re=null,vs=!1,Ds=0,hf.current=null,n===null||n.return===null){De=1,Us=t,$e=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ke,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=xh(i);if(y!==null){y.flags&=-257,bh(y,i,l,s,t),y.mode&1&&yh(s,u,t),t=y,c=u;var m=t.updateQueue;if(m===null){var h=new Set;h.add(c),t.updateQueue=h}else m.add(c);break e}else{if(!(t&1)){yh(s,u,t),xf();break e}c=Error(I(426))}}else if(_e&&l.mode&1){var x=xh(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),bh(x,i,l,s,t),Zd(So(c,l));break e}}s=c=So(c,l),De!==4&&(De=2),xs===null?xs=[s]:xs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=py(s,c,t);dh(s,v);break e;case 1:l=c;var g=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(sr===null||!sr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=hy(s,l,t);dh(s,S);break e}}s=s.return}while(s!==null)}Iy(n)}catch(_){t=_,$e===n&&n!==null&&($e=n=n.return);continue}break}while(!0)}function Oy(){var e=Aa.current;return Aa.current=$a,e===null?$a:e}function xf(){(De===0||De===3||De===2)&&(De=4),Be===null||!(Pr&268435455)&&!(wl&268435455)||Yn(Be,Ke)}function Fa(e,t){var n=ce;ce|=2;var r=Oy();(Be!==e||Ke!==t)&&(bn=null,_r(e,t));do try{t_();break}catch(o){Ty(e,o)}while(!0);if(ef(),ce=n,Aa.current=r,$e!==null)throw Error(I(261));return Be=null,Ke=0,De}function t_(){for(;$e!==null;)Py($e)}function n_(){for(;$e!==null&&!R1();)Py($e)}function Py(e){var t=Ay(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?Iy(e):$e=t,hf.current=null}function Iy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YS(n,t),n!==null){n.flags&=32767,$e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,$e=null;return}}else if(n=GS(n,t,xt),n!==null){$e=n;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);De===0&&(De=5)}function vr(e,t,n){var r=he,o=Lt.transition;try{Lt.transition=null,he=1,r_(e,t,n,r)}finally{Lt.transition=o,he=r}return null}function r_(e,t,n,r){do fo();while(Zn!==null);if(ce&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(D1(e,s),e===Be&&($e=Be=null,Ke=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ei||(Ei=!0,My(xa,function(){return fo(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Lt.transition,Lt.transition=null;var i=he;he=1;var l=ce;ce|=4,hf.current=null,XS(e,n),Ry(n,e),_S(xu),wa=!!yu,xu=yu=null,e.current=n,ZS(n),N1(),ce=l,he=i,Lt.transition=s}else e.current=n;if(Ei&&(Ei=!1,Zn=e,Da=o),s=e.pendingLanes,s===0&&(sr=null),O1(n.stateNode),ht(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ma)throw Ma=!1,e=Lu,Lu=null,e;return Da&1&&e.tag!==0&&fo(),s=e.pendingLanes,s&1?e===Uu?bs++:(bs=0,Uu=e):bs=0,hr(),null}function fo(){if(Zn!==null){var e=fv(Da),t=Lt.transition,n=he;try{if(Lt.transition=null,he=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=null,Da=0,ce&6)throw Error(I(331));var o=ce;for(ce|=4,z=e.current;z!==null;){var s=z,i=s.child;if(z.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:ys(8,d,s)}var f=d.child;if(f!==null)f.return=d,z=f;else for(;z!==null;){d=z;var p=d.sibling,y=d.return;if(jy(d),d===u){z=null;break}if(p!==null){p.return=y,z=p;break}z=y}}}var m=s.alternate;if(m!==null){var h=m.child;if(h!==null){m.child=null;do{var x=h.sibling;h.sibling=null,h=x}while(h!==null)}}z=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,z=i;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ys(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,z=v;break e}z=s.return}}var g=e.current;for(z=g;z!==null;){i=z;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,z=b;else e:for(i=g;z!==null;){if(l=z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bl(9,l)}}catch(_){ke(l,l.return,_)}if(l===i){z=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,z=S;break e}z=l.return}}if(ce=o,hr(),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(fl,e)}catch{}r=!0}return r}finally{he=n,Lt.transition=t}}return!1}function Ih(e,t,n){t=So(n,t),t=py(e,t,1),e=or(e,t,1),t=rt(),e!==null&&(Js(e,1,t),ht(e,t))}function ke(e,t,n){if(e.tag===3)Ih(e,e,n);else for(;t!==null;){if(t.tag===3){Ih(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(sr===null||!sr.has(r))){e=So(n,e),e=hy(t,e,1),t=or(t,e,1),e=rt(),t!==null&&(Js(t,1,e),ht(t,e));break}}t=t.return}}function o_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ke&n)===n&&(De===4||De===3&&(Ke&130023424)===Ke&&500>Pe()-gf?_r(e,0):mf|=n),ht(e,t)}function $y(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=rt();e=In(e,t),e!==null&&(Js(e,t,n),ht(e,n))}function s_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$y(e,n)}function i_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),$y(e,n)}var Ay;Ay=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dt=!1,KS(e,t,n);dt=!!(e.flags&131072)}else dt=!1,_e&&t.flags&1048576&&Fv(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qi(e,t),e=t.pendingProps;var o=yo(t,et.current);uo(t,n),o=cf(null,t,r,e,o,n);var s=uf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(s=!0,Ea(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,rf(t),o.updater=yl,t.stateNode=o,o._reactInternals=t,Nu(t,r,e,n),t=Ou(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Qd(t),tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=l_(r),e=Wt(r,e),o){case 0:t=Tu(null,t,r,e,n);break e;case 1:t=_h(null,t,r,e,n);break e;case 11:t=wh(null,t,r,e,n);break e;case 14:t=Sh(null,t,r,Wt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Tu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),_h(e,t,r,o,n);case 3:e:{if(yy(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Bv(e,t),Oa(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=So(Error(I(423)),t),t=jh(e,t,r,n,o);break e}else if(r!==o){o=So(Error(I(424)),t),t=jh(e,t,r,n,o);break e}else for(bt=rr(t.stateNode.containerInfo.firstChild),wt=t,_e=!0,Yt=null,n=Wv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xo(),r===o){t=$n(e,t,n);break e}tt(e,t,r,n)}t=t.child}return t;case 5:return Kv(t),e===null&&Cu(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,bu(r,o)?i=null:s!==null&&bu(r,s)&&(t.flags|=32),vy(e,t),tt(e,t,i,n),t.child;case 6:return e===null&&Cu(t),null;case 13:return xy(e,t,n);case 4:return of(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(t,null,r,n):tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),wh(e,t,r,o,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ye(ka,r._currentValue),r._currentValue=i,s!==null)if(en(s.value,i)){if(s.children===o.children&&!ft.current){t=$n(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Rn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Eu(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(I(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Eu(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,uo(t,n),o=Ut(o),r=r(o),t.flags|=1,tt(e,t,r,n),t.child;case 14:return r=t.type,o=Wt(r,t.pendingProps),o=Wt(r.type,o),Sh(e,t,r,o,n);case 15:return my(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Qi(e,t),t.tag=1,pt(r)?(e=!0,Ea(t)):e=!1,uo(t,n),qv(t,r,o),Nu(t,r,o,n),Ou(null,t,r,!0,e,n);case 19:return by(e,t,n);case 22:return gy(e,t,n)}throw Error(I(156,t.tag))};function My(e,t){return lv(e,t)}function a_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,r){return new a_(e,t,n,r)}function bf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l_(e){if(typeof e=="function")return bf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fd)return 11;if(e===Ld)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=Ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ji(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")bf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Gr:return jr(n.children,o,s,t);case Dd:i=8,o|=8;break;case Zc:return e=Ft(12,n,t,o|2),e.elementType=Zc,e.lanes=s,e;case Jc:return e=Ft(13,n,t,o),e.elementType=Jc,e.lanes=s,e;case eu:return e=Ft(19,n,t,o),e.elementType=eu,e.lanes=s,e;case Hg:return Sl(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zg:i=10;break e;case qg:i=9;break e;case Fd:i=11;break e;case Ld:i=14;break e;case Hn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Ft(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function jr(e,t,n,r){return e=Ft(7,e,r,t),e.lanes=n,e}function Sl(e,t,n,r){return e=Ft(22,e,r,t),e.elementType=Hg,e.lanes=n,e.stateNode={isHidden:!1},e}function Cc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Ec(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function c_(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function wf(e,t,n,r,o,s,i,l,c){return e=new c_(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ft(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rf(s),e}function u_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Kr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Dy(e){if(!e)return cr;e=e._reactInternals;e:{if(Lr(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(pt(n))return Mv(e,n,t)}return t}function Fy(e,t,n,r,o,s,i,l,c){return e=wf(n,r,!0,e,o,s,i,l,c),e.context=Dy(null),n=e.current,r=rt(),o=ir(n),s=Rn(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,Js(e,o,r),ht(e,r),e}function _l(e,t,n,r){var o=t.current,s=rt(),i=ir(o);return n=Dy(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=or(o,t,i),e!==null&&(Zt(e,o,i,s),Ki(e,o,i)),i}function La(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sf(e,t){$h(e,t),(e=e.alternate)&&$h(e,t)}function d_(){return null}var Ly=typeof reportError=="function"?reportError:function(e){console.error(e)};function _f(e){this._internalRoot=e}jl.prototype.render=_f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));_l(e,t,null,null)};jl.prototype.unmount=_f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){_l(null,e,null,null)}),t[Pn]=null}};function jl(e){this._internalRoot=e}jl.prototype.unstable_scheduleHydration=function(e){if(e){var t=mv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gn.length&&t!==0&&t<Gn[n].priority;n++);Gn.splice(n,0,e),n===0&&vv(e)}};function jf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ah(){}function f_(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=La(i);s.call(u)}}var i=Fy(t,r,e,0,null,!1,!1,"",Ah);return e._reactRootContainer=i,e[Pn]=i.current,Ps(e.nodeType===8?e.parentNode:e),Ir(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=La(c);l.call(u)}}var c=wf(e,0,!1,null,null,!1,!1,"",Ah);return e._reactRootContainer=c,e[Pn]=c.current,Ps(e.nodeType===8?e.parentNode:e),Ir(function(){_l(t,c,n,r)}),c}function El(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var c=La(i);l.call(c)}}_l(t,i,e,o)}else i=f_(n,t,e,o,r);return La(i)}pv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(Bd(t,n|1),ht(t,Pe()),!(ce&6)&&(_o=Pe()+500,hr()))}break;case 13:Ir(function(){var r=In(e,1);if(r!==null){var o=rt();Zt(r,e,1,o)}}),Sf(e,1)}};zd=function(e){if(e.tag===13){var t=In(e,134217728);if(t!==null){var n=rt();Zt(t,e,134217728,n)}Sf(e,134217728)}};hv=function(e){if(e.tag===13){var t=ir(e),n=In(e,t);if(n!==null){var r=rt();Zt(n,e,t,r)}Sf(e,t)}};mv=function(){return he};gv=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};uu=function(e,t,n){switch(t){case"input":if(ru(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=gl(r);if(!o)throw Error(I(90));Kg(r),ru(r,o)}}}break;case"textarea":Yg(e,n);break;case"select":t=n.value,t!=null&&io(e,!!n.multiple,t,!1)}};nv=vf;rv=Ir;var p_={usingClientEntryPoint:!1,Events:[ti,Zr,gl,ev,tv,vf]},Xo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},h_={bundleType:Xo.bundleType,version:Xo.version,rendererPackageName:Xo.rendererPackageName,rendererConfig:Xo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=iv(e),e===null?null:e.stateNode},findFiberByHostInstance:Xo.findFiberByHostInstance||d_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ri.isDisabled&&Ri.supportsFiber)try{fl=Ri.inject(h_),un=Ri}catch{}}kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p_;kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jf(t))throw Error(I(200));return u_(e,t,null,n)};kt.createRoot=function(e,t){if(!jf(e))throw Error(I(299));var n=!1,r="",o=Ly;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wf(e,1,!1,null,null,n,!1,r,o),e[Pn]=t.current,Ps(e.nodeType===8?e.parentNode:e),new _f(t)};kt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=iv(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e){return Ir(e)};kt.hydrate=function(e,t,n){if(!Cl(t))throw Error(I(200));return El(null,e,t,!0,n)};kt.hydrateRoot=function(e,t,n){if(!jf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Ly;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Fy(t,null,e,1,n??null,o,!1,s,i),e[Pn]=t.current,Ps(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new jl(t)};kt.render=function(e,t,n){if(!Cl(t))throw Error(I(200));return El(null,e,t,!1,n)};kt.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(I(40));return e._reactRootContainer?(Ir(function(){El(null,null,e,!1,function(){e._reactRootContainer=null,e[Pn]=null})}),!0):!1};kt.unstable_batchedUpdates=vf;kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return El(e,t,n,!1,r)};kt.version="18.2.0-next-9e3b772b8-20220608";function Uy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uy)}catch(e){console.error(e)}}Uy(),Fg.exports=kt;var Cf=Fg.exports;const Sr=Xs(Cf);var Mh=Cf;_t.createRoot=Mh.createRoot,_t.hydrateRoot=Mh.hydrateRoot;function qe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var m_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dh=m_,Rc=()=>Math.random().toString(36).substring(7).split("").join("."),g_={INIT:`@@redux/INIT${Rc()}`,REPLACE:`@@redux/REPLACE${Rc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rc()}`},Ua=g_;function Ef(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vy(e,t,n){if(typeof e!="function")throw new Error(qe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qe(1));return n(Vy)(e,t)}let r=e,o=t,s=new Map,i=s,l=0,c=!1;function u(){i===s&&(i=new Map,s.forEach((x,v)=>{i.set(v,x)}))}function d(){if(c)throw new Error(qe(3));return o}function f(x){if(typeof x!="function")throw new Error(qe(4));if(c)throw new Error(qe(5));let v=!0;u();const g=l++;return i.set(g,x),function(){if(v){if(c)throw new Error(qe(6));v=!1,u(),i.delete(g),s=null}}}function p(x){if(!Ef(x))throw new Error(qe(7));if(typeof x.type>"u")throw new Error(qe(8));if(typeof x.type!="string")throw new Error(qe(17));if(c)throw new Error(qe(9));try{c=!0,o=r(o,x)}finally{c=!1}return(s=i).forEach(g=>{g()}),x}function y(x){if(typeof x!="function")throw new Error(qe(10));r=x,p({type:Ua.REPLACE})}function m(){const x=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(qe(11));function g(){const S=v;S.next&&S.next(d())}return g(),{unsubscribe:x(g)}},[Dh](){return this}}}return p({type:Ua.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:y,[Dh]:m}}function v_(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ua.INIT})>"u")throw new Error(qe(12));if(typeof n(void 0,{type:Ua.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qe(13))})}function y_(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;try{v_(n)}catch(s){o=s}return function(i={},l){if(o)throw o;let c=!1;const u={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],y=i[f],m=p(y,l);if(typeof m>"u")throw l&&l.type,new Error(qe(14));u[f]=m,c=c||m!==y}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Va(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function x_(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(qe(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Va(...l)(o.dispatch),{...o,dispatch:s}}}function b_(e){return Ef(e)&&"type"in e&&typeof e.type=="string"}var By=Symbol.for("immer-nothing"),Fh=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state");function Qt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Ct]}function An(e){var t;return e?zy(e)||Array.isArray(e)||!!e[Fh]||!!((t=e.constructor)!=null&&t[Fh])||Nl(e)||kl(e):!1}var w_=Object.prototype.constructor.toString();function zy(e){if(!e||typeof e!="object")return!1;const t=jo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===w_}function Vs(e,t){Rl(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Rl(e){const t=e[Ct];return t?t.type_:Array.isArray(e)?1:Nl(e)?2:kl(e)?3:0}function zu(e,t){return Rl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qy(e,t,n){const r=Rl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function S_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Nl(e){return e instanceof Map}function kl(e){return e instanceof Set}function yr(e){return e.copy_||e.base_}function qu(e,t){if(Nl(e))return new Map(e);if(kl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&zy(e))return jo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ct];let r=Reflect.ownKeys(n);for(let o=0;o<r.length;o++){const s=r[o],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(jo(e),n)}function Rf(e,t=!1){return Tl(e)||ur(e)||!An(e)||(Rl(e)>1&&(e.set=e.add=e.clear=e.delete=__),Object.freeze(e),t&&Vs(e,(n,r)=>Rf(r,!0))),e}function __(){Qt(2)}function Tl(e){return Object.isFrozen(e)}var j_={};function $r(e){const t=j_[e];return t||Qt(0,e),t}var Bs;function Hy(){return Bs}function C_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Lh(e,t){t&&($r("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hu(e){Wu(e),e.drafts_.forEach(E_),e.drafts_=null}function Wu(e){e===Bs&&(Bs=e.parent_)}function Uh(e){return Bs=C_(Bs,e)}function E_(e){const t=e[Ct];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ct].modified_&&(Hu(t),Qt(4)),An(e)&&(e=Ba(t,e),t.parent_||za(t,e)),t.patches_&&$r("Patches").generateReplacementPatches_(n[Ct].base_,e,t.patches_,t.inversePatches_)):e=Ba(t,n,[]),Hu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==By?e:void 0}function Ba(e,t,n){if(Tl(t))return t;const r=t[Ct];if(!r)return Vs(t,(o,s)=>Bh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return za(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Vs(s,(l,c)=>Bh(e,r,o,l,c,n,i)),za(e,o,!1),n&&e.patches_&&$r("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Bh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!zu(t.assigned_,r)?s.concat(r):void 0,c=Ba(e,o,l);if(qy(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(An(o)&&!Tl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ba(e,o),(!t||!t.scope_.parent_)&&za(e,o)}}function za(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rf(t,n)}function R_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Hy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Nf;n&&(o=[r],s=zs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var Nf={get(e,t){if(t===Ct)return e;const n=yr(e);if(!zu(n,t))return N_(e,n,t);const r=n[t];return e.finalized_||!An(r)?r:r===Nc(e.base_,t)?(kc(e),e.copy_[t]=Gu(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=Wy(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Nc(yr(e),t),s=o==null?void 0:o[Ct];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(S_(n,o)&&(n!==void 0||zu(e.base_,t)))return!0;kc(e),Ku(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Nc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,kc(e),Ku(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qt(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){Qt(12)}},zs={};Vs(Nf,(e,t)=>{zs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});zs.deleteProperty=function(e,t){return zs.set.call(this,e,t,void 0)};zs.set=function(e,t,n){return Nf.set.call(this,e[0],t,n,e[0])};function Nc(e,t){const n=e[Ct];return(n?yr(n):e)[t]}function N_(e,t,n){var o;const r=Wy(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Wy(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function Ku(e){e.modified_||(e.modified_=!0,e.parent_&&Ku(e.parent_))}function kc(e){e.copy_||(e.copy_=qu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var k_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(c=s,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Qt(6),r!==void 0&&typeof r!="function"&&Qt(7);let o;if(An(t)){const s=Uh(this),i=Gu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Hu(s):Wu(s)}return Lh(s,r),Vh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===By&&(o=void 0),this.autoFreeze_&&Rf(o,!0),r){const s=[],i=[];$r("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Qt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){An(e)||Qt(8),ur(e)&&(e=Ky(e));const t=Uh(this),n=Gu(e,void 0);return n[Ct].isManual_=!0,Wu(t),n}finishDraft(e,t){const n=e&&e[Ct];(!n||!n.isManual_)&&Qt(9);const{scope_:r}=n;return Lh(r,t),Vh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=$r("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Gu(e,t){const n=Nl(e)?$r("MapSet").proxyMap_(e,t):kl(e)?$r("MapSet").proxySet_(e,t):R_(e,t);return(t?t.scope_:Hy()).drafts_.push(n),n}function Ky(e){return ur(e)||Qt(10,e),Gy(e)}function Gy(e){if(!An(e)||Tl(e))return e;const t=e[Ct];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=qu(e,!0);return Vs(n,(r,o)=>{qy(n,r,Gy(o))}),t&&(t.finalized_=!1),n}var Et=new k_,$t=Et.produce;Et.produceWithPatches.bind(Et);Et.setAutoFreeze.bind(Et);Et.setUseStrictShallowCopy.bind(Et);Et.applyPatches.bind(Et);Et.createDraft.bind(Et);Et.finishDraft.bind(Et);function T_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function O_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function P_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var zh=e=>Array.isArray(e)?e:[e];function I_(e){const t=Array.isArray(e[0])?e[0]:e;return P_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $_(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var A_=class{constructor(e){this.value=e}deref(){return this.value}},M_=typeof WeakRef<"u"?WeakRef:A_,D_=0,qh=1;function Ni(){return{s:D_,v:void 0,o:null,p:null}}function kf(e,t={}){let n=Ni();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,y=c;p<y;p++){const m=arguments[p];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=l.o;h===null&&(l.o=h=new WeakMap);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}else{let h=l.p;h===null&&(l.p=h=new Map);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}}const u=l;let d;if(l.s===qh?d=l.v:(d=e.apply(null,arguments),s++),u.s=qh,r){const p=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;p!=null&&r(p,d)&&(d=p,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new M_(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ni(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Yy(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,l,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),T_(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:y=kf,argsMemoizeOptions:m=[],devModeChecks:h={}}=d,x=zh(p),v=zh(m),g=I_(o),b=f(function(){return s++,u.apply(null,arguments)},...x),S=y(function(){i++;const j=$_(g,arguments);return l=b.apply(null,j),l},...v);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var F_=Yy(kf),L_=Object.assign((e,t=F_)=>{O_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,l,c)=>(i[n[c]]=l,i),{}))},{withTypes:()=>L_});function Qy(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var U_=Qy(),V_=Qy,B_=(...e)=>{const t=Yy(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?Ky(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};B_(kf);var z_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Va:Va.apply(null,arguments)},q_=e=>e&&typeof e.match=="function";function Nn(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(mt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>b_(r)&&r.type===e,n}var Xy=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Hh(e){return An(e)?$t(e,()=>{}):e}function Wh(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(mt(10));const r=n.insert(t,e);return e.set(t,r),r}function H_(e){return typeof e=="boolean"}var W_=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Xy;return n&&(H_(n)?i.push(U_):i.push(V_(n.extraArgument))),i},K_="RTK_autoBatch",Zy=e=>t=>{setTimeout(t,e)},G_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Zy(10),Y_=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?G_:e.type==="callback"?e.queueNotification:Zy(e.timeout),u=()=>{i=!1,s&&(s=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>o&&d(),p=r.subscribe(f);return l.add(d),()=>{p(),l.delete(d)}},dispatch(d){var f;try{return o=!((f=d==null?void 0:d.meta)!=null&&f[K_]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},Q_=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new Xy(e);return r&&o.push(Y_(typeof r=="object"?r:void 0)),o},X_=!0;function Mo(e){const t=W_(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Ef(n))l=y_(n);else throw new Error(mt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Va;o&&(u=z_({trace:!X_,...typeof o=="object"&&o}));const d=x_(...c),f=Q_(d);let p=typeof i=="function"?i(f):f();const y=u(...p);return Vy(l,s,y)}function Jy(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(mt(28));if(l in t)throw new Error(mt(29));return t[l]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function Z_(e){return typeof e=="function"}function J_(e,t){let[n,r,o]=Jy(t),s;if(Z_(e))s=()=>Hh(e());else{const l=Hh(e);s=()=>l}function i(l=s(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[o]),u.reduce((d,f)=>{if(f)if(ur(d)){const y=f(d,c);return y===void 0?d:y}else{if(An(d))return $t(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(mt(9))}return p}}return d},l)}return i.getInitialState=s,i}var ej="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ex=(e=21)=>{let t="",n=e;for(;n--;)t+=ej[Math.random()*64|0];return t},tj=(e,t)=>q_(e)?e.match(t):e(t);function nj(...e){return t=>e.some(n=>tj(n,t))}var rj=["name","message","stack","code"],Tc=class{constructor(e,t){ec(this,"_type");this.payload=e,this.meta=t}},Kh=class{constructor(e,t){ec(this,"_type");this.payload=e,this.meta=t}},oj=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of rj)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Ye=(()=>{function e(t,n,r){const o=Nn(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=Nn(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=Nn(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||oj)(c||"Rejected"),meta:{...p||{},arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function l(c){return(u,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(c):ex(),y=new AbortController;let m,h;function x(g){h=g,y.abort()}const v=async function(){var S,_;let g;try{let j=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(ij(j)&&(j=await j),j===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const C=new Promise((E,N)=>{m=()=>{N({name:"AbortError",message:h||"Aborted"})},y.signal.addEventListener("abort",m)});u(s(p,c,(_=r==null?void 0:r.getPendingMeta)==null?void 0:_.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),g=await Promise.race([C,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:y.signal,abort:x,rejectWithValue:(E,N)=>new Tc(E,N),fulfillWithValue:(E,N)=>new Kh(E,N)})).then(E=>{if(E instanceof Tc)throw E;return E instanceof Kh?o(E.payload,p,c,E.meta):o(E,p,c)})])}catch(j){g=j instanceof Tc?i(null,p,c,j.payload,j.meta):i(j,p,c)}finally{m&&y.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&i.match(g)&&g.meta.condition||u(g),g}();return Object.assign(v,{abort:x,requestId:p,arg:c,unwrap(){return v.then(sj)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:nj(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function sj(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ij(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var aj=Symbol.for("rtk-slice-createasyncthunk");function lj(e,t){return`${e}/${t}`}function cj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[aj];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(mt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(dj()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const _=typeof b=="string"?b:b.type;if(!_)throw new Error(mt(12));if(_ in u.sliceCaseReducersByType)throw new Error(mt(13));return u.sliceCaseReducersByType[_]=S,d},addMatcher(b,S){return u.sliceMatchers.push({matcher:b,reducer:S}),d},exposeAction(b,S){return u.actionCreators[b]=S,d},exposeCaseReducer(b,S){return u.sliceCaseReducersByName[b]=S,d}};c.forEach(b=>{const S=l[b],_={reducerName:b,type:lj(s,b),createNotation:typeof o.reducers=="function"};pj(S)?mj(_,S,d,t):fj(_,S,d)});function f(){const[b={},S=[],_=void 0]=typeof o.extraReducers=="function"?Jy(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return J_(o.initialState,C=>{for(let E in j)C.addCase(E,j[E]);for(let E of u.sliceMatchers)C.addMatcher(E.matcher,E.reducer);for(let E of S)C.addMatcher(E.matcher,E.reducer);_&&C.addDefaultCase(_)})}const p=b=>b,y=new Map;let m;function h(b,S){return m||(m=f()),m(b,S)}function x(){return m||(m=f()),m.getInitialState()}function v(b,S=!1){function _(C){let E=C[b];return typeof E>"u"&&S&&(E=x()),E}function j(C=p){const E=Wh(y,S,{insert:()=>new WeakMap});return Wh(E,C,{insert:()=>{const N={};for(const[R,T]of Object.entries(o.selectors??{}))N[R]=uj(T,C,x,S);return N}})}return{reducerPath:b,getSelectors:j,get selectors(){return j(_)},selectSlice:_}}const g={name:s,reducer:h,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:x,...v(i),injectInto(b,{reducerPath:S,..._}={}){const j=S??i;return b.inject({reducerPath:j,reducer:h},_),{...g,...v(j,!0)}}};return g}}function uj(e,t,n,r){function o(s,...i){let l=t(s);return typeof l>"u"&&r&&(l=n()),e(l,...i)}return o.unwrapped=e,o}var ri=cj();function dj(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function fj({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!hj(r))throw new Error(mt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?Nn(e,i):Nn(e))}function pj(e){return e._reducerDefinitionType==="asyncThunk"}function hj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mj({type:e,reducerName:t},n,r,o){if(!o)throw new Error(mt(18));const{payloadCreator:s,fulfilled:i,pending:l,rejected:c,settled:u,options:d}=n,f=o(e,s,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:i||ki,pending:l||ki,rejected:c||ki,settled:u||ki})}function ki(){}var gj=(e,t)=>{if(typeof e!="function")throw new Error(mt(32))},Tf="listenerMiddleware",vj=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=Nn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(mt(21));return gj(s),{predicate:o,type:t,effect:s}},yj=Object.assign(e=>{const{type:t,predicate:n,effect:r}=vj(e);return{id:ex(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>yj}),xj=Object.assign(Nn(`${Tf}/add`),{withTypes:()=>xj});Nn(`${Tf}/removeAll`);var bj=Object.assign(Nn(`${Tf}/remove`),{withTypes:()=>bj});function mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tx={exports:{}},nx={};/**
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Rc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Iu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JS=typeof WeakMap=="function"?WeakMap:Map;function xy(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Va||(Va=!0,Bu=r),Iu(e,t)},n}function by(e,t,n){n=Rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Iu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Iu(e,t),typeof r!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function _h(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=pC.bind(null,e,t,n),t.then(e,e))}function Eh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Rh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rn(-1,1),t.tag=2,sr(n,t,1))),n.lanes|=1),e)}var eC=Ln.ReactCurrentOwner,dt=!1;function nt(e,t,n,r){t.child=e===null?Zv(t,null,n,r):wo(t,e.child,n,r)}function kh(e,t,n,r,o){n=n.render;var s=t.ref;return fo(t,o),r=pf(e,t,n,r,s,o),n=hf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(Ce&&n&&ef(t),t.flags|=1,nt(e,t,r,o),t.child)}function Nh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!jf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,wy(e,t,s,r,o)):(e=ra(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Is,n(i,r)&&e.ref===t.ref)return $n(e,t,o)}return t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e}function wy(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Is(s,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(dt=!0);else return t.lanes=e.lanes,$n(e,t,o)}return $u(e,t,n,r,o)}function Sy(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(so,bt),bt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(so,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(so,bt),bt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(so,bt),bt|=r;return nt(e,t,o,n),t.child}function Cy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $u(e,t,n,r,o){var s=pt(n)?Nr:et.current;return s=xo(t,s),fo(t,o),n=pf(e,t,n,r,s,o),r=hf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(Ce&&r&&ef(t),t.flags|=1,nt(e,t,n,o),t.child)}function Oh(e,t,n,r,o){if(pt(n)){var s=!0;Ta(t)}else s=!1;if(fo(t,o),t.stateNode===null)ea(e,t),Qv(t,n,r),Pu(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Lt(u):(u=pt(n)?Nr:et.current,u=xo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&wh(t,i,r,u),Kn=!1;var p=t.memoizedState;i.state=p,Aa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ft.current||Kn?(typeof d=="function"&&(Tu(t,n,d,r),c=t.memoizedState),(l=Kn||bh(t,n,l,r,p,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Gv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ht(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Lt(c):(c=pt(n)?Nr:et.current,c=xo(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&wh(t,i,r,c),Kn=!1,p=t.memoizedState,i.state=p,Aa(t,r,i,o);var g=t.memoizedState;l!==f||p!==g||ft.current||Kn?(typeof m=="function"&&(Tu(t,n,m,r),g=t.memoizedState),(u=Kn||bh(t,n,u,r,p,g,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Mu(e,t,n,r,s,o)}function Mu(e,t,n,r,o,s){Cy(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&mh(t,n,!1),$n(e,t,s);r=t.stateNode,eC.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=wo(t,e.child,null,s),t.child=wo(t,null,l,s)):nt(e,t,l,s),t.memoizedState=r.state,o&&mh(t,n,!0),t.child}function jy(e){var t=e.stateNode;t.pendingContext?hh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hh(e,t.context,!1),cf(e,t.containerInfo)}function Th(e,t,n,r,o){return bo(),nf(o),t.flags|=256,nt(e,t,n,r),t.child}var Au={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function _y(e,t,n){var r=t.pendingProps,o=Ee.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),xe(Ee,o&1),e===null)return Nu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=_l(i,r,0,null),e=_r(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Du(n),t.memoizedState=Au,e):vf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return tC(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=lr(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=lr(l,s):(s=_r(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Du(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Au,r}return s=e.child,e=s.sibling,r=lr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function vf(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ni(e,t,n,r){return r!==null&&nf(r),wo(t,e.child,null,n),e=vf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tC(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Rc(Error(I(422))),Ni(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=_l({mode:"visible",children:r.children},o,0,null),s=_r(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&wo(t,e.child,null,i),t.child.memoizedState=Du(i),t.memoizedState=Au,s);if(!(t.mode&1))return Ni(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(I(419)),r=Rc(s,r,void 0),Ni(e,t,i,r)}if(l=(i&e.childLanes)!==0,dt||l){if(r=Be,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,In(e,o),Xt(r,e,o,-1))}return Cf(),r=Rc(Error(I(421))),Ni(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=hC.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,wt=or(o.nextSibling),St=t,Ce=!0,Gt=null,e!==null&&($t[Mt++]=jn,$t[Mt++]=_n,$t[Mt++]=Or,jn=e.id,_n=e.overflow,Or=t),t=vf(t,r.children),t.flags|=4096,t)}function Ph(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ou(e.return,t,n)}function kc(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Ey(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(nt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ph(e,n,t);else if(e.tag===19)Ph(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Da(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),kc(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Da(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}kc(t,!0,n,null,s);break;case"together":kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ea(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=lr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=lr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nC(e,t,n){switch(t.tag){case 3:jy(t),bo();break;case 5:Jv(t);break;case 1:pt(t.type)&&Ta(t);break;case 4:cf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xe($a,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?_y(e,t,n):(xe(Ee,Ee.current&1),e=$n(e,t,n),e!==null?e.sibling:null);xe(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ey(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xe(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Sy(e,t,n)}return $n(e,t,n)}var Ry,Fu,ky,Ny;Ry=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fu=function(){};ky=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Sr(cn.current);var s=null;switch(n){case"input":o=iu(e,o),r=iu(e,r),s=[];break;case"select":o=Ne({},o,{value:void 0}),r=Ne({},r,{value:void 0}),s=[];break;case"textarea":o=cu(e,o),r=cu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Na)}du(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Es.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Es.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&be("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ny=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xo(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rC(e,t,n){var r=t.pendingProps;switch(tf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return pt(t.type)&&Oa(),Xe(t),null;case 3:return r=t.stateNode,So(),we(ft),we(et),df(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gt!==null&&(Wu(Gt),Gt=null))),Fu(e,t),Xe(t),null;case 5:uf(t);var o=Sr(Fs.current);if(n=t.type,e!==null&&t.stateNode!=null)ky(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Xe(t),null}if(e=Sr(cn.current),Ri(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[an]=t,r[As]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)be(us[o],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Vp(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":Bp(r,s),be("invalid",r)}du(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ei(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ei(r.textContent,l,e),o=["children",""+l]):Es.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&be("scroll",r)}switch(n){case"input":yi(r),zp(r,s,!0);break;case"textarea":yi(r),qp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Na)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=nv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[an]=t,e[As]=r,Ry(e,t,!1,!1),t.stateNode=e;e:{switch(i=fu(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)be(us[o],e);o=r;break;case"source":be("error",e),o=r;break;case"img":case"image":case"link":be("error",e),be("load",e),o=r;break;case"details":be("toggle",e),o=r;break;case"input":Vp(e,r),o=iu(e,r),be("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ne({},r,{value:void 0}),be("invalid",e);break;case"textarea":Bp(e,r),o=cu(e,r),be("invalid",e);break;default:o=r}du(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?sv(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&rv(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Rs(e,c):typeof c=="number"&&Rs(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Es.hasOwnProperty(s)?c!=null&&s==="onScroll"&&be("scroll",e):c!=null&&Ud(e,s,c,i))}switch(n){case"input":yi(e),zp(e,r,!1);break;case"textarea":yi(e),qp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+cr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ao(e,!!r.multiple,s,!1):r.defaultValue!=null&&ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Na)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xe(t),null;case 6:if(e&&t.stateNode!=null)Ny(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=Sr(Fs.current),Sr(cn.current),Ri(t)){if(r=t.stateNode,n=t.memoizedProps,r[an]=t,(s=r.nodeValue!==n)&&(e=St,e!==null))switch(e.tag){case 3:Ei(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ei(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[an]=t,t.stateNode=r}return Xe(t),null;case 13:if(we(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&&wt!==null&&t.mode&1&&!(t.flags&128))Wv(),bo(),t.flags|=98560,s=!1;else if(s=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[an]=t}else bo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),s=!1}else Gt!==null&&(Wu(Gt),Gt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?Fe===0&&(Fe=3):Cf())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return So(),Fu(e,t),e===null&&$s(t.stateNode.containerInfo),Xe(t),null;case 10:return sf(t.type._context),Xe(t),null;case 17:return pt(t.type)&&Oa(),Xe(t),null;case 19:if(we(Ee),s=t.memoizedState,s===null)return Xe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Xo(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Da(e),i!==null){for(t.flags|=128,Xo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ie()>jo&&(t.flags|=128,r=!0,Xo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Da(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ce)return Xe(t),null}else 2*Ie()-s.renderingStartTime>jo&&n!==1073741824&&(t.flags|=128,r=!0,Xo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ie(),t.sibling=null,n=Ee.current,xe(Ee,r?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return Sf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?bt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function oC(e,t){switch(tf(t),t.tag){case 1:return pt(t.type)&&Oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return So(),we(ft),we(et),df(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uf(t),null;case 13:if(we(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));bo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ee),null;case 4:return So(),null;case 10:return sf(t.type._context),null;case 22:case 23:return Sf(),null;case 24:return null;default:return null}}var Oi=!1,Je=!1,sC=typeof WeakSet=="function"?WeakSet:Set,B=null;function oo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Oe(e,t,r)}else n.current=null}function Lu(e,t,n){try{n()}catch(r){Oe(e,t,r)}}var Ih=!1;function iC(e,t){if(Su=Ea,e=Iv(),Jd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var m;f!==n||o!==0&&f.nodeType!==3||(l=i+o),f!==s||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cu={focusedElem:e,selectionRange:n},Ea=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,x=g.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ht(t.type,y),x);h.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){Oe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return g=Ih,Ih=!1,g}function bs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Lu(t,n,s)}o=o.next}while(o!==r)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Uu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Oy(e){var t=e.alternate;t!==null&&(e.alternate=null,Oy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[As],delete t[Eu],delete t[zS],delete t[BS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ty(e){return e.tag===5||e.tag===3||e.tag===4}function $h(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ty(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Na));else if(r!==4&&(e=e.child,e!==null))for(Vu(e,t,n),e=e.sibling;e!==null;)Vu(e,t,n),e=e.sibling}function zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zu(e,t,n),e=e.sibling;e!==null;)zu(e,t,n),e=e.sibling}var We=null,Wt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)Py(e,t,n),n=n.sibling}function Py(e,t,n){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:Je||oo(n,t);case 6:var r=We,o=Wt;We=null,Hn(e,t,n),We=r,Wt=o,We!==null&&(Wt?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Wt?(e=We,n=n.stateNode,e.nodeType===8?wc(e.parentNode,n):e.nodeType===1&&wc(e,n),Ts(e)):wc(We,n.stateNode));break;case 4:r=We,o=Wt,We=n.stateNode.containerInfo,Wt=!0,Hn(e,t,n),We=r,Wt=o;break;case 0:case 11:case 14:case 15:if(!Je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Lu(n,t,i),o=o.next}while(o!==r)}Hn(e,t,n);break;case 1:if(!Je&&(oo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Oe(n,t,l)}Hn(e,t,n);break;case 21:Hn(e,t,n);break;case 22:n.mode&1?(Je=(r=Je)||n.memoizedState!==null,Hn(e,t,n),Je=r):Hn(e,t,n);break;default:Hn(e,t,n)}}function Mh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sC),t.forEach(function(r){var o=mC.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:We=l.stateNode,Wt=!1;break e;case 3:We=l.stateNode.containerInfo,Wt=!0;break e;case 4:We=l.stateNode.containerInfo,Wt=!0;break e}l=l.return}if(We===null)throw Error(I(160));Py(s,i,o),We=null,Wt=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){Oe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iy(t,e),t=t.sibling}function Iy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),en(e),r&4){try{bs(3,e,e.return),Cl(3,e)}catch(y){Oe(e,e.return,y)}try{bs(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:Bt(t,e),en(e),r&512&&n!==null&&oo(n,n.return);break;case 5:if(Bt(t,e),en(e),r&512&&n!==null&&oo(n,n.return),e.flags&32){var o=e.stateNode;try{Rs(o,"")}catch(y){Oe(e,e.return,y)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&ev(o,s),fu(l,i);var u=fu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?sv(o,f):d==="dangerouslySetInnerHTML"?rv(o,f):d==="children"?Rs(o,f):Ud(o,d,f,u)}switch(l){case"input":au(o,s);break;case"textarea":tv(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?ao(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?ao(o,!!s.multiple,s.defaultValue,!0):ao(o,!!s.multiple,s.multiple?[]:"",!1))}o[As]=s}catch(y){Oe(e,e.return,y)}}break;case 6:if(Bt(t,e),en(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(y){Oe(e,e.return,y)}}break;case 3:if(Bt(t,e),en(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ts(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:Bt(t,e),en(e);break;case 13:Bt(t,e),en(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(bf=Ie())),r&4&&Mh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Je=(u=Je)||d,Bt(t,e),Je=u):Bt(t,e),en(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(f=B=d;B!==null;){switch(p=B,m=p.child,p.tag){case 0:case 11:case 14:case 15:bs(4,p,p.return);break;case 1:oo(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){Oe(r,n,y)}}break;case 5:oo(p,p.return);break;case 22:if(p.memoizedState!==null){Dh(f);continue}}m!==null?(m.return=p,B=m):Dh(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=ov("display",i))}catch(y){Oe(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Oe(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Bt(t,e),en(e),r&4&&Mh(e);break;case 21:break;default:Bt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ty(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Rs(o,""),r.flags&=-33);var s=$h(e);zu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=$h(e);Vu(e,l,i);break;default:throw Error(I(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function aC(e,t,n){B=e,$y(e)}function $y(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var o=B,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Oi;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Je;l=Oi;var u=Je;if(Oi=i,(Je=c)&&!u)for(B=o;B!==null;)i=B,c=i.child,i.tag===22&&i.memoizedState!==null?Fh(o):c!==null?(c.return=i,B=c):Fh(o);for(;s!==null;)B=s,$y(s),s=s.sibling;B=o,Oi=l,Je=u}Ah(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,B=s):Ah(e)}}function Ah(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Je||Cl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Je)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ht(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&xh(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xh(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ts(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Je||t.flags&512&&Uu(t)}catch(p){Oe(t,t.return,p)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Dh(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Fh(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cl(4,t)}catch(c){Oe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Oe(t,o,c)}}var s=t.return;try{Uu(t)}catch(c){Oe(t,s,c)}break;case 5:var i=t.return;try{Uu(t)}catch(c){Oe(t,i,c)}}}catch(c){Oe(t,t.return,c)}if(t===e){B=null;break}var l=t.sibling;if(l!==null){l.return=t.return,B=l;break}B=t.return}}var lC=Math.ceil,Ua=Ln.ReactCurrentDispatcher,yf=Ln.ReactCurrentOwner,Ft=Ln.ReactCurrentBatchConfig,ue=0,Be=null,Me=null,Ge=0,bt=0,so=hr(0),Fe=0,zs=null,Pr=0,jl=0,xf=0,ws=null,ut=null,bf=0,jo=1/0,bn=null,Va=!1,Bu=null,ir=null,Ti=!1,Jn=null,za=0,Ss=0,qu=null,ta=-1,na=0;function ot(){return ue&6?Ie():ta!==-1?ta:ta=Ie()}function ar(e){return e.mode&1?ue&2&&Ge!==0?Ge&-Ge:HS.transition!==null?(na===0&&(na=vv()),na):(e=me,e!==0||(e=window.event,e=e===void 0?16:jv(e.type)),e):1}function Xt(e,t,n,r){if(50<Ss)throw Ss=0,qu=null,Error(I(185));ni(e,n,r),(!(ue&2)||e!==Be)&&(e===Be&&(!(ue&2)&&(jl|=n),Fe===4&&Qn(e,Ge)),ht(e,r),n===1&&ue===0&&!(t.mode&1)&&(jo=Ie()+500,bl&&mr()))}function ht(e,t){var n=e.callbackNode;H1(e,t);var r=_a(e,e===Be?Ge:0);if(r===0)n!==null&&Kp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kp(n),t===1)e.tag===0?qS(Lh.bind(null,e)):Bv(Lh.bind(null,e)),US(function(){!(ue&6)&&mr()}),n=null;else{switch(yv(r)){case 1:n=Hd;break;case 4:n=mv;break;case 16:n=ja;break;case 536870912:n=gv;break;default:n=ja}n=zy(n,My.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function My(e,t){if(ta=-1,na=0,ue&6)throw Error(I(327));var n=e.callbackNode;if(po()&&e.callbackNode!==n)return null;var r=_a(e,e===Be?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ba(e,r);else{t=r;var o=ue;ue|=2;var s=Dy();(Be!==e||Ge!==t)&&(bn=null,jo=Ie()+500,jr(e,t));do try{dC();break}catch(l){Ay(e,l)}while(!0);of(),Ua.current=s,ue=o,Me!==null?t=0:(Be=null,Ge=0,t=Fe)}if(t!==0){if(t===2&&(o=vu(e),o!==0&&(r=o,t=Hu(e,o))),t===1)throw n=zs,jr(e,0),Qn(e,r),ht(e,Ie()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!cC(o)&&(t=Ba(e,r),t===2&&(s=vu(e),s!==0&&(r=s,t=Hu(e,s))),t===1))throw n=zs,jr(e,0),Qn(e,r),ht(e,Ie()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:yr(e,ut,bn);break;case 3:if(Qn(e,r),(r&130023424)===r&&(t=bf+500-Ie(),10<t)){if(_a(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ot(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_u(yr.bind(null,e,ut,bn),t);break}yr(e,ut,bn);break;case 4:if(Qn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Qt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lC(r/1960))-r,10<r){e.timeoutHandle=_u(yr.bind(null,e,ut,bn),r);break}yr(e,ut,bn);break;case 5:yr(e,ut,bn);break;default:throw Error(I(329))}}}return ht(e,Ie()),e.callbackNode===n?My.bind(null,e):null}function Hu(e,t){var n=ws;return e.current.memoizedState.isDehydrated&&(jr(e,t).flags|=256),e=Ba(e,t),e!==2&&(t=ut,ut=n,t!==null&&Wu(t)),e}function Wu(e){ut===null?ut=e:ut.push.apply(ut,e)}function cC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Jt(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qn(e,t){for(t&=~xf,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),r=1<<n;e[n]=-1,t&=~r}}function Lh(e){if(ue&6)throw Error(I(327));po();var t=_a(e,0);if(!(t&1))return ht(e,Ie()),null;var n=Ba(e,t);if(e.tag!==0&&n===2){var r=vu(e);r!==0&&(t=r,n=Hu(e,r))}if(n===1)throw n=zs,jr(e,0),Qn(e,t),ht(e,Ie()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yr(e,ut,bn),ht(e,Ie()),null}function wf(e,t){var n=ue;ue|=1;try{return e(t)}finally{ue=n,ue===0&&(jo=Ie()+500,bl&&mr())}}function Ir(e){Jn!==null&&Jn.tag===0&&!(ue&6)&&po();var t=ue;ue|=1;var n=Ft.transition,r=me;try{if(Ft.transition=null,me=1,e)return e()}finally{me=r,Ft.transition=n,ue=t,!(ue&6)&&mr()}}function Sf(){bt=so.current,we(so)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,LS(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(tf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Oa();break;case 3:So(),we(ft),we(et),df();break;case 5:uf(r);break;case 4:So();break;case 13:we(Ee);break;case 19:we(Ee);break;case 10:sf(r.type._context);break;case 22:case 23:Sf()}n=n.return}if(Be=e,Me=e=lr(e.current,null),Ge=bt=t,Fe=0,zs=null,xf=jl=Pr=0,ut=ws=null,wr!==null){for(t=0;t<wr.length;t++)if(n=wr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}wr=null}return e}function Ay(e,t){do{var n=Me;try{if(of(),Zi.current=La,Fa){for(var r=ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Fa=!1}if(Tr=0,ze=De=ke=null,xs=!1,Ls=0,yf.current=null,n===null||n.return===null){Fe=1,zs=t,Me=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ge,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Eh(i);if(m!==null){m.flags&=-257,Rh(m,i,l,s,t),m.mode&1&&_h(s,u,t),t=m,c=u;var g=t.updateQueue;if(g===null){var y=new Set;y.add(c),t.updateQueue=y}else g.add(c);break e}else{if(!(t&1)){_h(s,u,t),Cf();break e}c=Error(I(426))}}else if(Ce&&l.mode&1){var x=Eh(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Rh(x,i,l,s,t),nf(Co(c,l));break e}}s=c=Co(c,l),Fe!==4&&(Fe=2),ws===null?ws=[s]:ws.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=xy(s,c,t);yh(s,h);break e;case 1:l=c;var v=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ir===null||!ir.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=by(s,l,t);yh(s,S);break e}}s=s.return}while(s!==null)}Ly(n)}catch(C){t=C,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function Dy(){var e=Ua.current;return Ua.current=La,e===null?La:e}function Cf(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Be===null||!(Pr&268435455)&&!(jl&268435455)||Qn(Be,Ge)}function Ba(e,t){var n=ue;ue|=2;var r=Dy();(Be!==e||Ge!==t)&&(bn=null,jr(e,t));do try{uC();break}catch(o){Ay(e,o)}while(!0);if(of(),ue=n,Ua.current=r,Me!==null)throw Error(I(261));return Be=null,Ge=0,Fe}function uC(){for(;Me!==null;)Fy(Me)}function dC(){for(;Me!==null&&!A1();)Fy(Me)}function Fy(e){var t=Vy(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?Ly(e):Me=t,yf.current=null}function Ly(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=oC(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Me=null;return}}else if(n=rC(n,t,bt),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Fe===0&&(Fe=5)}function yr(e,t,n){var r=me,o=Ft.transition;try{Ft.transition=null,me=1,fC(e,t,n,r)}finally{Ft.transition=o,me=r}return null}function fC(e,t,n,r){do po();while(Jn!==null);if(ue&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(W1(e,s),e===Be&&(Me=Be=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ti||(Ti=!0,zy(ja,function(){return po(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ft.transition,Ft.transition=null;var i=me;me=1;var l=ue;ue|=4,yf.current=null,iC(e,n),Iy(n,e),PS(Cu),Ea=!!Su,Cu=Su=null,e.current=n,aC(n),D1(),ue=l,me=i,Ft.transition=s}else e.current=n;if(Ti&&(Ti=!1,Jn=e,za=o),s=e.pendingLanes,s===0&&(ir=null),U1(n.stateNode),ht(e,Ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Va)throw Va=!1,e=Bu,Bu=null,e;return za&1&&e.tag!==0&&po(),s=e.pendingLanes,s&1?e===qu?Ss++:(Ss=0,qu=e):Ss=0,mr(),null}function po(){if(Jn!==null){var e=yv(za),t=Ft.transition,n=me;try{if(Ft.transition=null,me=16>e?16:e,Jn===null)var r=!1;else{if(e=Jn,Jn=null,za=0,ue&6)throw Error(I(331));var o=ue;for(ue|=4,B=e.current;B!==null;){var s=B,i=s.child;if(B.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(B=u;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:bs(8,d,s)}var f=d.child;if(f!==null)f.return=d,B=f;else for(;B!==null;){d=B;var p=d.sibling,m=d.return;if(Oy(d),d===u){B=null;break}if(p!==null){p.return=m,B=p;break}B=m}}}var g=s.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}B=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,B=i;else e:for(;B!==null;){if(s=B,s.flags&2048)switch(s.tag){case 0:case 11:case 15:bs(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,B=h;break e}B=s.return}}var v=e.current;for(B=v;B!==null;){i=B;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,B=b;else e:for(i=v;B!==null;){if(l=B,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cl(9,l)}}catch(C){Oe(l,l.return,C)}if(l===i){B=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,B=S;break e}B=l.return}}if(ue=o,mr(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(ml,e)}catch{}r=!0}return r}finally{me=n,Ft.transition=t}}return!1}function Uh(e,t,n){t=Co(n,t),t=xy(e,t,1),e=sr(e,t,1),t=ot(),e!==null&&(ni(e,1,t),ht(e,t))}function Oe(e,t,n){if(e.tag===3)Uh(e,e,n);else for(;t!==null;){if(t.tag===3){Uh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ir===null||!ir.has(r))){e=Co(n,e),e=by(t,e,1),t=sr(t,e,1),e=ot(),t!==null&&(ni(t,1,e),ht(t,e));break}}t=t.return}}function pC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ge&n)===n&&(Fe===4||Fe===3&&(Ge&130023424)===Ge&&500>Ie()-bf?jr(e,0):xf|=n),ht(e,t)}function Uy(e,t){t===0&&(e.mode&1?(t=wi,wi<<=1,!(wi&130023424)&&(wi=4194304)):t=1);var n=ot();e=In(e,t),e!==null&&(ni(e,t,n),ht(e,n))}function hC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uy(e,n)}function mC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),Uy(e,n)}var Vy;Vy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dt=!1,nC(e,t,n);dt=!!(e.flags&131072)}else dt=!1,Ce&&t.flags&1048576&&qv(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ea(e,t),e=t.pendingProps;var o=xo(t,et.current);fo(t,n),o=pf(null,t,r,e,o,n);var s=hf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(s=!0,Ta(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,lf(t),o.updater=wl,t.stateNode=o,o._reactInternals=t,Pu(t,r,e,n),t=Mu(null,t,r,!0,s,n)):(t.tag=0,Ce&&s&&ef(t),nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ea(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=vC(r),e=Ht(r,e),o){case 0:t=$u(null,t,r,e,n);break e;case 1:t=Oh(null,t,r,e,n);break e;case 11:t=kh(null,t,r,e,n);break e;case 14:t=Nh(null,t,r,Ht(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ht(r,o),$u(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ht(r,o),Oh(e,t,r,o,n);case 3:e:{if(jy(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Gv(e,t),Aa(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Co(Error(I(423)),t),t=Th(e,t,r,n,o);break e}else if(r!==o){o=Co(Error(I(424)),t),t=Th(e,t,r,n,o);break e}else for(wt=or(t.stateNode.containerInfo.firstChild),St=t,Ce=!0,Gt=null,n=Zv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bo(),r===o){t=$n(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return Jv(t),e===null&&Nu(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,ju(r,o)?i=null:s!==null&&ju(r,s)&&(t.flags|=32),Cy(e,t),nt(e,t,i,n),t.child;case 6:return e===null&&Nu(t),null;case 13:return _y(e,t,n);case 4:return cf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ht(r,o),kh(e,t,r,o,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,xe($a,r._currentValue),r._currentValue=i,s!==null)if(Jt(s.value,i)){if(s.children===o.children&&!ft.current){t=$n(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Rn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Ou(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(I(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ou(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,fo(t,n),o=Lt(o),r=r(o),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,o=Ht(r,t.pendingProps),o=Ht(r.type,o),Nh(e,t,r,o,n);case 15:return wy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ht(r,o),ea(e,t),t.tag=1,pt(r)?(e=!0,Ta(t)):e=!1,fo(t,n),Qv(t,r,o),Pu(t,r,o,n),Mu(null,t,r,!0,e,n);case 19:return Ey(e,t,n);case 22:return Sy(e,t,n)}throw Error(I(156,t.tag))};function zy(e,t){return hv(e,t)}function gC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,r){return new gC(e,t,n,r)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vC(e){if(typeof e=="function")return jf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zd)return 11;if(e===Bd)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ra(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")jf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yr:return _r(n.children,o,s,t);case Vd:i=8,o|=8;break;case nu:return e=Dt(12,n,t,o|2),e.elementType=nu,e.lanes=s,e;case ru:return e=Dt(13,n,t,o),e.elementType=ru,e.lanes=s,e;case ou:return e=Dt(19,n,t,o),e.elementType=ou,e.lanes=s,e;case Xg:return _l(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yg:i=10;break e;case Qg:i=9;break e;case zd:i=11;break e;case Bd:i=14;break e;case Wn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Dt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function _r(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=Xg,e.lanes=n,e.stateNode={isHidden:!1},e}function Nc(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function Oc(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yC(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uc(0),this.expirationTimes=uc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function _f(e,t,n,r,o,s,i,l,c){return e=new yC(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Dt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lf(s),e}function xC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function By(e){if(!e)return ur;e=e._reactInternals;e:{if(Lr(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(pt(n))return zv(e,n,t)}return t}function qy(e,t,n,r,o,s,i,l,c){return e=_f(n,r,!0,e,o,s,i,l,c),e.context=By(null),n=e.current,r=ot(),o=ar(n),s=Rn(r,o),s.callback=t??null,sr(n,s,o),e.current.lanes=o,ni(e,o,r),ht(e,r),e}function El(e,t,n,r){var o=t.current,s=ot(),i=ar(o);return n=By(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=sr(o,t,i),e!==null&&(Xt(e,o,i,s),Xi(e,o,i)),i}function qa(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Vh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ef(e,t){Vh(e,t),(e=e.alternate)&&Vh(e,t)}function bC(){return null}var Hy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rf(e){this._internalRoot=e}Rl.prototype.render=Rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));El(e,t,null,null)};Rl.prototype.unmount=Rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){El(null,e,null,null)}),t[Pn]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=wv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yn.length&&t!==0&&t<Yn[n].priority;n++);Yn.splice(n,0,e),n===0&&Cv(e)}};function kf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function kl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zh(){}function wC(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=qa(i);s.call(u)}}var i=qy(t,r,e,0,null,!1,!1,"",zh);return e._reactRootContainer=i,e[Pn]=i.current,$s(e.nodeType===8?e.parentNode:e),Ir(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=qa(c);l.call(u)}}var c=_f(e,0,!1,null,null,!1,!1,"",zh);return e._reactRootContainer=c,e[Pn]=c.current,$s(e.nodeType===8?e.parentNode:e),Ir(function(){El(t,c,n,r)}),c}function Nl(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var c=qa(i);l.call(c)}}El(t,i,e,o)}else i=wC(n,t,e,o,r);return qa(i)}xv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cs(t.pendingLanes);n!==0&&(Wd(t,n|1),ht(t,Ie()),!(ue&6)&&(jo=Ie()+500,mr()))}break;case 13:Ir(function(){var r=In(e,1);if(r!==null){var o=ot();Xt(r,e,1,o)}}),Ef(e,1)}};Kd=function(e){if(e.tag===13){var t=In(e,134217728);if(t!==null){var n=ot();Xt(t,e,134217728,n)}Ef(e,134217728)}};bv=function(e){if(e.tag===13){var t=ar(e),n=In(e,t);if(n!==null){var r=ot();Xt(n,e,t,r)}Ef(e,t)}};wv=function(){return me};Sv=function(e,t){var n=me;try{return me=e,t()}finally{me=n}};hu=function(e,t,n){switch(t){case"input":if(au(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xl(r);if(!o)throw Error(I(90));Jg(r),au(r,o)}}}break;case"textarea":tv(e,n);break;case"select":t=n.value,t!=null&&ao(e,!!n.multiple,t,!1)}};lv=wf;cv=Ir;var SC={usingClientEntryPoint:!1,Events:[oi,Jr,xl,iv,av,wf]},Zo={findFiberByHostInstance:br,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},CC={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fv(e),e===null?null:e.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||bC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pi.isDisabled&&Pi.supportsFiber)try{ml=Pi.inject(CC),ln=Pi}catch{}}Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SC;Nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kf(t))throw Error(I(200));return xC(e,t,null,n)};Nt.createRoot=function(e,t){if(!kf(e))throw Error(I(299));var n=!1,r="",o=Hy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=_f(e,1,!1,null,null,n,!1,r,o),e[Pn]=t.current,$s(e.nodeType===8?e.parentNode:e),new Rf(t)};Nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=fv(t),e=e===null?null:e.stateNode,e};Nt.flushSync=function(e){return Ir(e)};Nt.hydrate=function(e,t,n){if(!kl(t))throw Error(I(200));return Nl(null,e,t,!0,n)};Nt.hydrateRoot=function(e,t,n){if(!kf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Hy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=qy(t,null,e,1,n??null,o,!1,s,i),e[Pn]=t.current,$s(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Rl(t)};Nt.render=function(e,t,n){if(!kl(t))throw Error(I(200));return Nl(null,e,t,!1,n)};Nt.unmountComponentAtNode=function(e){if(!kl(e))throw Error(I(40));return e._reactRootContainer?(Ir(function(){Nl(null,null,e,!1,function(){e._reactRootContainer=null,e[Pn]=null})}),!0):!1};Nt.unstable_batchedUpdates=wf;Nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!kl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Nl(e,t,n,!1,r)};Nt.version="18.2.0-next-9e3b772b8-20220608";function Wy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wy)}catch(e){console.error(e)}}Wy(),qg.exports=Nt;var Nf=qg.exports;const Cr=ei(Nf);var Bh=Nf;yt.createRoot=Bh.createRoot,yt.hydrateRoot=Bh.hydrateRoot;function He(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jC=typeof Symbol=="function"&&Symbol.observable||"@@observable",qh=jC,Tc=()=>Math.random().toString(36).substring(7).split("").join("."),_C={INIT:`@@redux/INIT${Tc()}`,REPLACE:`@@redux/REPLACE${Tc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tc()}`},Ha=_C;function Of(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ky(e,t,n){if(typeof e!="function")throw new Error(He(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(He(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(He(1));return n(Ky)(e,t)}let r=e,o=t,s=new Map,i=s,l=0,c=!1;function u(){i===s&&(i=new Map,s.forEach((x,h)=>{i.set(h,x)}))}function d(){if(c)throw new Error(He(3));return o}function f(x){if(typeof x!="function")throw new Error(He(4));if(c)throw new Error(He(5));let h=!0;u();const v=l++;return i.set(v,x),function(){if(h){if(c)throw new Error(He(6));h=!1,u(),i.delete(v),s=null}}}function p(x){if(!Of(x))throw new Error(He(7));if(typeof x.type>"u")throw new Error(He(8));if(typeof x.type!="string")throw new Error(He(17));if(c)throw new Error(He(9));try{c=!0,o=r(o,x)}finally{c=!1}return(s=i).forEach(v=>{v()}),x}function m(x){if(typeof x!="function")throw new Error(He(10));r=x,p({type:Ha.REPLACE})}function g(){const x=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(He(11));function v(){const S=h;S.next&&S.next(d())}return v(),{unsubscribe:x(v)}},[qh](){return this}}}return p({type:Ha.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[qh]:g}}function EC(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ha.INIT})>"u")throw new Error(He(12));if(typeof n(void 0,{type:Ha.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(He(13))})}function RC(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;try{EC(n)}catch(s){o=s}return function(i={},l){if(o)throw o;let c=!1;const u={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],m=i[f],g=p(m,l);if(typeof g>"u")throw l&&l.type,new Error(He(14));u[f]=g,c=c||g!==m}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Wa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function kC(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(He(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Wa(...l)(o.dispatch),{...o,dispatch:s}}}function NC(e){return Of(e)&&"type"in e&&typeof e.type=="string"}var Gy=Symbol.for("immer-nothing"),Hh=Symbol.for("immer-draftable"),_t=Symbol.for("immer-state");function Yt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _o=Object.getPrototypeOf;function dr(e){return!!e&&!!e[_t]}function Mn(e){var t;return e?Yy(e)||Array.isArray(e)||!!e[Hh]||!!((t=e.constructor)!=null&&t[Hh])||Tl(e)||Pl(e):!1}var OC=Object.prototype.constructor.toString();function Yy(e){if(!e||typeof e!="object")return!1;const t=_o(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===OC}function Bs(e,t){Ol(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Ol(e){const t=e[_t];return t?t.type_:Array.isArray(e)?1:Tl(e)?2:Pl(e)?3:0}function Ku(e,t){return Ol(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qy(e,t,n){const r=Ol(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function TC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Tl(e){return e instanceof Map}function Pl(e){return e instanceof Set}function xr(e){return e.copy_||e.base_}function Gu(e,t){if(Tl(e))return new Map(e);if(Pl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Yy(e))return _o(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[_t];let r=Reflect.ownKeys(n);for(let o=0;o<r.length;o++){const s=r[o],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(_o(e),n)}function Tf(e,t=!1){return Il(e)||dr(e)||!Mn(e)||(Ol(e)>1&&(e.set=e.add=e.clear=e.delete=PC),Object.freeze(e),t&&Bs(e,(n,r)=>Tf(r,!0))),e}function PC(){Yt(2)}function Il(e){return Object.isFrozen(e)}var IC={};function $r(e){const t=IC[e];return t||Yt(0,e),t}var qs;function Xy(){return qs}function $C(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wh(e,t){t&&($r("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yu(e){Qu(e),e.drafts_.forEach(MC),e.drafts_=null}function Qu(e){e===qs&&(qs=e.parent_)}function Kh(e){return qs=$C(qs,e)}function MC(e){const t=e[_t];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[_t].modified_&&(Yu(t),Yt(4)),Mn(e)&&(e=Ka(t,e),t.parent_||Ga(t,e)),t.patches_&&$r("Patches").generateReplacementPatches_(n[_t].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),Yu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gy?e:void 0}function Ka(e,t,n){if(Il(t))return t;const r=t[_t];if(!r)return Bs(t,(o,s)=>Yh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ga(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Bs(s,(l,c)=>Yh(e,r,o,l,c,n,i)),Ga(e,o,!1),n&&e.patches_&&$r("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Yh(e,t,n,r,o,s,i){if(dr(o)){const l=s&&t&&t.type_!==3&&!Ku(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(Qy(n,r,c),dr(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Mn(o)&&!Il(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,o),(!t||!t.scope_.parent_)&&Ga(e,o)}}function Ga(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tf(t,n)}function AC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Xy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Pf;n&&(o=[r],s=Hs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var Pf={get(e,t){if(t===_t)return e;const n=xr(e);if(!Ku(n,t))return DC(e,n,t);const r=n[t];return e.finalized_||!Mn(r)?r:r===Pc(e.base_,t)?(Ic(e),e.copy_[t]=Zu(r,e)):r},has(e,t){return t in xr(e)},ownKeys(e){return Reflect.ownKeys(xr(e))},set(e,t,n){const r=Zy(xr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Pc(xr(e),t),s=o==null?void 0:o[_t];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(TC(n,o)&&(n!==void 0||Ku(e.base_,t)))return!0;Ic(e),Xu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Pc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ic(e),Xu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=xr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Yt(11)},getPrototypeOf(e){return _o(e.base_)},setPrototypeOf(){Yt(12)}},Hs={};Bs(Pf,(e,t)=>{Hs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Hs.deleteProperty=function(e,t){return Hs.set.call(this,e,t,void 0)};Hs.set=function(e,t,n){return Pf.set.call(this,e[0],t,n,e[0])};function Pc(e,t){const n=e[_t];return(n?xr(n):e)[t]}function DC(e,t,n){var o;const r=Zy(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Zy(e,t){if(!(t in e))return;let n=_o(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=_o(n)}}function Xu(e){e.modified_||(e.modified_=!0,e.parent_&&Xu(e.parent_))}function Ic(e){e.copy_||(e.copy_=Gu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var FC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(c=s,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Yt(6),r!==void 0&&typeof r!="function"&&Yt(7);let o;if(Mn(t)){const s=Kh(this),i=Zu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Yu(s):Qu(s)}return Wh(s,r),Gh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Gy&&(o=void 0),this.autoFreeze_&&Tf(o,!0),r){const s=[],i=[];$r("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Yt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Mn(e)||Yt(8),dr(e)&&(e=Jy(e));const t=Kh(this),n=Zu(e,void 0);return n[_t].isManual_=!0,Qu(t),n}finishDraft(e,t){const n=e&&e[_t];(!n||!n.isManual_)&&Yt(9);const{scope_:r}=n;return Wh(r,t),Gh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=$r("Patches").applyPatches_;return dr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Zu(e,t){const n=Tl(e)?$r("MapSet").proxyMap_(e,t):Pl(e)?$r("MapSet").proxySet_(e,t):AC(e,t);return(t?t.scope_:Xy()).drafts_.push(n),n}function Jy(e){return dr(e)||Yt(10,e),ex(e)}function ex(e){if(!Mn(e)||Il(e))return e;const t=e[_t];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gu(e,!0);return Bs(n,(r,o)=>{Qy(n,r,ex(o))}),t&&(t.finalized_=!1),n}var Et=new FC,tx=Et.produce;Et.produceWithPatches.bind(Et);Et.setAutoFreeze.bind(Et);Et.setUseStrictShallowCopy.bind(Et);Et.applyPatches.bind(Et);Et.createDraft.bind(Et);Et.finishDraft.bind(Et);function LC(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function UC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function VC(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Qh=e=>Array.isArray(e)?e:[e];function zC(e){const t=Array.isArray(e[0])?e[0]:e;return VC(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function BC(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var qC=class{constructor(e){this.value=e}deref(){return this.value}},HC=typeof WeakRef<"u"?WeakRef:qC,WC=0,Xh=1;function Ii(){return{s:WC,v:void 0,o:null,p:null}}function If(e,t={}){let n=Ii();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,m=c;p<m;p++){const g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const x=y.get(g);x===void 0?(l=Ii(),y.set(g,l)):l=x}else{let y=l.p;y===null&&(l.p=y=new Map);const x=y.get(g);x===void 0?(l=Ii(),y.set(g,l)):l=x}}const u=l;let d;if(l.s===Xh?d=l.v:(d=e.apply(null,arguments),s++),u.s=Xh,r){const p=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;p!=null&&r(p,d)&&(d=p,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new HC(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ii(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function nx(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,l,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),LC(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:m=If,argsMemoizeOptions:g=[],devModeChecks:y={}}=d,x=Qh(p),h=Qh(g),v=zC(o),b=f(function(){return s++,u.apply(null,arguments)},...x),S=m(function(){i++;const j=BC(v,arguments);return l=b.apply(null,j),l},...h);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var KC=nx(If),GC=Object.assign((e,t=KC)=>{UC(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,l,c)=>(i[n[c]]=l,i),{}))},{withTypes:()=>GC});function rx(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var YC=rx(),QC=rx,XC=(...e)=>{const t=nx(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(dr(i)?Jy(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};XC(If);var ZC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wa:Wa.apply(null,arguments)},JC=e=>e&&typeof e.match=="function";function kn(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(mt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>NC(r)&&r.type===e,n}var ox=class ds extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ds.prototype)}static get[Symbol.species](){return ds}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ds(...t[0].concat(this)):new ds(...t.concat(this))}};function Zh(e){return Mn(e)?tx(e,()=>{}):e}function Jh(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(mt(10));const r=n.insert(t,e);return e.set(t,r),r}function ej(e){return typeof e=="boolean"}var tj=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new ox;return n&&(ej(n)?i.push(YC):i.push(QC(n.extraArgument))),i},nj="RTK_autoBatch",sx=e=>t=>{setTimeout(t,e)},rj=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sx(10),oj=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?rj:e.type==="callback"?e.queueNotification:sx(e.timeout),u=()=>{i=!1,s&&(s=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>o&&d(),p=r.subscribe(f);return l.add(d),()=>{p(),l.delete(d)}},dispatch(d){var f;try{return o=!((f=d==null?void 0:d.meta)!=null&&f[nj]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},sj=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new ox(e);return r&&o.push(oj(typeof r=="object"?r:void 0)),o},ij=!0;function Un(e){const t=tj(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Of(n))l=RC(n);else throw new Error(mt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=ZC({trace:!ij,...typeof o=="object"&&o}));const d=kC(...c),f=sj(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Ky(l,s,m)}function ix(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(mt(28));if(l in t)throw new Error(mt(29));return t[l]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function aj(e){return typeof e=="function"}function lj(e,t){let[n,r,o]=ix(t),s;if(aj(e))s=()=>Zh(e());else{const l=Zh(e);s=()=>l}function i(l=s(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[o]),u.reduce((d,f)=>{if(f)if(dr(d)){const m=f(d,c);return m===void 0?d:m}else{if(Mn(d))return tx(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(mt(9))}return p}}return d},l)}return i.getInitialState=s,i}var cj="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ax=(e=21)=>{let t="",n=e;for(;n--;)t+=cj[Math.random()*64|0];return t},uj=(e,t)=>JC(e)?e.match(t):e(t);function dj(...e){return t=>e.some(n=>uj(n,t))}var fj=["name","message","stack","code"],$c=class{constructor(e,t){oc(this,"_type");this.payload=e,this.meta=t}},em=class{constructor(e,t){oc(this,"_type");this.payload=e,this.meta=t}},pj=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of fj)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},tt=(()=>{function e(t,n,r){const o=kn(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=kn(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=kn(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||pj)(c||"Rejected"),meta:{...p||{},arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function l(c){return(u,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(c):ax(),m=new AbortController;let g,y;function x(v){y=v,m.abort()}const h=async function(){var S,C;let v;try{let j=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(mj(j)&&(j=await j),j===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((E,k)=>{g=()=>{k({name:"AbortError",message:y||"Aborted"})},m.signal.addEventListener("abort",g)});u(s(p,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),v=await Promise.race([_,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:x,rejectWithValue:(E,k)=>new $c(E,k),fulfillWithValue:(E,k)=>new em(E,k)})).then(E=>{if(E instanceof $c)throw E;return E instanceof em?o(E.payload,p,c,E.meta):o(E,p,c)})])}catch(j){v=j instanceof $c?i(null,p,c,j.payload,j.meta):i(j,p,c)}finally{g&&m.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&i.match(v)&&v.meta.condition||u(v),v}();return Object.assign(h,{abort:x,requestId:p,arg:c,unwrap(){return h.then(hj)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:dj(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function hj(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mj(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var gj=Symbol.for("rtk-slice-createasyncthunk");function vj(e,t){return`${e}/${t}`}function yj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[gj];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(mt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(bj()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const C=typeof b=="string"?b:b.type;if(!C)throw new Error(mt(12));if(C in u.sliceCaseReducersByType)throw new Error(mt(13));return u.sliceCaseReducersByType[C]=S,d},addMatcher(b,S){return u.sliceMatchers.push({matcher:b,reducer:S}),d},exposeAction(b,S){return u.actionCreators[b]=S,d},exposeCaseReducer(b,S){return u.sliceCaseReducersByName[b]=S,d}};c.forEach(b=>{const S=l[b],C={reducerName:b,type:vj(s,b),createNotation:typeof o.reducers=="function"};Sj(S)?jj(C,S,d,t):wj(C,S,d)});function f(){const[b={},S=[],C=void 0]=typeof o.extraReducers=="function"?ix(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return lj(o.initialState,_=>{for(let E in j)_.addCase(E,j[E]);for(let E of u.sliceMatchers)_.addMatcher(E.matcher,E.reducer);for(let E of S)_.addMatcher(E.matcher,E.reducer);C&&_.addDefaultCase(C)})}const p=b=>b,m=new Map;let g;function y(b,S){return g||(g=f()),g(b,S)}function x(){return g||(g=f()),g.getInitialState()}function h(b,S=!1){function C(_){let E=_[b];return typeof E>"u"&&S&&(E=x()),E}function j(_=p){const E=Jh(m,S,{insert:()=>new WeakMap});return Jh(E,_,{insert:()=>{const k={};for(const[R,O]of Object.entries(o.selectors??{}))k[R]=xj(O,_,x,S);return k}})}return{reducerPath:b,getSelectors:j,get selectors(){return j(C)},selectSlice:C}}const v={name:s,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:x,...h(i),injectInto(b,{reducerPath:S,...C}={}){const j=S??i;return b.inject({reducerPath:j,reducer:y},C),{...v,...h(j,!0)}}};return v}}function xj(e,t,n,r){function o(s,...i){let l=t(s);return typeof l>"u"&&r&&(l=n()),e(l,...i)}return o.unwrapped=e,o}var Ur=yj();function bj(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function wj({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!Cj(r))throw new Error(mt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?kn(e,i):kn(e))}function Sj(e){return e._reducerDefinitionType==="asyncThunk"}function Cj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function jj({type:e,reducerName:t},n,r,o){if(!o)throw new Error(mt(18));const{payloadCreator:s,fulfilled:i,pending:l,rejected:c,settled:u,options:d}=n,f=o(e,s,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:i||$i,pending:l||$i,rejected:c||$i,settled:u||$i})}function $i(){}var _j=(e,t)=>{if(typeof e!="function")throw new Error(mt(32))},$f="listenerMiddleware",Ej=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=kn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(mt(21));return _j(s),{predicate:o,type:t,effect:s}},Rj=Object.assign(e=>{const{type:t,predicate:n,effect:r}=Ej(e);return{id:ax(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>Rj}),kj=Object.assign(kn(`${$f}/add`),{withTypes:()=>kj});kn(`${$f}/removeAll`);var Nj=Object.assign(kn(`${$f}/remove`),{withTypes:()=>Nj});function mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var lx={exports:{}},cx={};/**
|
|
41
41
|
* @license React
|
|
42
42
|
* use-sync-external-store-with-selector.production.min.js
|
|
43
43
|
*
|
|
@@ -45,26 +45,26 @@ Error generating stack: `+s.message+`
|
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
48
|
+
*/var ii=w;function Oj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tj=typeof Object.is=="function"?Object.is:Oj,Pj=ii.useSyncExternalStore,Ij=ii.useRef,$j=ii.useEffect,Mj=ii.useMemo,Aj=ii.useDebugValue;cx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=Ij(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=Mj(function(){function c(m){if(!u){if(u=!0,d=m,m=r(m),o!==void 0&&i.hasValue){var g=i.value;if(o(g,m))return f=g}return f=m}if(g=f,Tj(d,m))return g;var y=r(m);return o!==void 0&&o(g,y)?g:(d=m,f=y)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,n,r,o]);var l=Pj(e,s[0],s[1]);return $j(function(){i.hasValue=!0,i.value=l},[l]),Aj(l),l};lx.exports=cx;var Dj=lx.exports,le="default"in ba?Re:ba,tm=Symbol.for("react-redux-context"),nm=typeof globalThis<"u"?globalThis:{};function Fj(){if(!le.createContext)return{};const e=nm[tm]??(nm[tm]=new Map);let t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var An=Fj(),ux=()=>{throw new Error("uSES not initialized!")};function Mf(e=An){return function(){return le.useContext(e)}}var dx=Mf(),fx=ux,Lj=e=>{fx=e},Uj=(e,t)=>e===t;function Vj(e=An){const t=e===An?dx:Mf(e),n=(r,o={})=>{const{equalityFn:s=Uj,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();le.useRef(!0);const p=le.useCallback({[r.name](g){return r(g)}}[r.name],[r,d,i.stabilityCheck]),m=fx(c.addNestedSub,l.getState,u||l.getState,p,s);return le.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var Y=Vj(),zj=Symbol.for("react.element"),Bj=Symbol.for("react.portal"),qj=Symbol.for("react.fragment"),Hj=Symbol.for("react.strict_mode"),Wj=Symbol.for("react.profiler"),Kj=Symbol.for("react.provider"),Gj=Symbol.for("react.context"),Yj=Symbol.for("react.server_context"),px=Symbol.for("react.forward_ref"),Qj=Symbol.for("react.suspense"),Xj=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),Zj=Symbol.for("react.lazy"),Jj=px,e_=Af;function t_(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case zj:{const n=e.type;switch(n){case qj:case Wj:case Hj:case Qj:case Xj:return n;default:{const r=n&&n.$$typeof;switch(r){case Yj:case Gj:case px:case Zj:case Af:case Kj:return r;default:return t}}}}case Bj:return t}}}function n_(e){return t_(e)===Af}function r_(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function m(v,b){return c=v,u=b,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}function g(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function y(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function x(){const v=e(c,u),b=!i(v,d);return d=v,b&&(p=n(d,f,u)),p}function h(v,b){const S=!s(b,u),C=!o(v,c,b,u);return c=v,u=b,S&&C?g():S?y():C?x():p}return function(b,S){return l?h(b,S):m(b,S)}}function o_(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return r_(s,i,l,e,o)}function s_(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function Ju(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function rm(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function hx(e,t){return function(r,{displayName:o}){const s=function(l,c){return s.dependsOnOwnProps?s.mapToProps(l,c):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,c){s.mapToProps=e,s.dependsOnOwnProps=rm(e);let u=s(l,c);return typeof u=="function"&&(s.mapToProps=u,s.dependsOnOwnProps=rm(u),u=s(l,c)),u},s}}function Df(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function i_(e){return e&&typeof e=="object"?Ju(t=>s_(e,t)):e?typeof e=="function"?hx(e):Df(e,"mapDispatchToProps"):Ju(t=>({dispatch:t}))}function a_(e){return e?typeof e=="function"?hx(e):Df(e,"mapStateToProps"):Ju(()=>({}))}function l_(e,t,n){return{...n,...e,...t}}function c_(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(c,u,d){const f=e(c,u,d);return s?o(f,i)||(i=f):(s=!0,i=f),i}}}function u_(e){return e?typeof e=="function"?c_(e):Df(e,"mergeProps"):()=>l_}function d_(e){e()}function f_(){let e=null,t=null;return{clear(){e=null,t=null},notify(){d_(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var om={notify(){},get:()=>[]};function mx(e,t){let n,r=om,o=0,s=!1;function i(y){d();const x=r.subscribe(y);let h=!1;return()=>{h||(h=!0,x(),f())}}function l(){r.notify()}function c(){g.onStateChange&&g.onStateChange()}function u(){return s}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=f_())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=om)}function p(){s||(s=!0,d())}function m(){s&&(s=!1,f())}const g={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return g}var p_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ya=p_?le.useLayoutEffect:le.useEffect;function sm(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Mc(e,t){if(sm(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!sm(e[n[o]],t[n[o]]))return!1;return!0}var h_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},m_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},g_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},v_={[Jj]:g_,[e_]:gx};function im(e){return n_(e)?gx:v_[e.$$typeof]||h_}var y_=Object.defineProperty,x_=Object.getOwnPropertyNames,am=Object.getOwnPropertySymbols,b_=Object.getOwnPropertyDescriptor,w_=Object.getPrototypeOf,lm=Object.prototype;function ed(e,t){if(typeof t!="string"){if(lm){const s=w_(t);s&&s!==lm&&ed(e,s)}let n=x_(t);am&&(n=n.concat(am(t)));const r=im(e),o=im(t);for(let s=0;s<n.length;++s){const i=n[s];if(!m_[i]&&!(o&&o[i])&&!(r&&r[i])){const l=b_(t,i);try{y_(e,i,l)}catch{}}}}return e}var vx=ux,S_=e=>{vx=e},C_=[null,null];function j_(e,t,n){Ya(()=>e(...t),n)}function __(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function E_(e,t,n,r,o,s,i,l,c,u,d){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!l.current)return;const y=t.getState();let x,h;try{x=r(y,o.current)}catch(v){h=v,p=v}h||(p=null),x===s.current?i.current||u():(s.current=x,c.current=x,i.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function R_(e,t){return e===t}function k_(e,t,n,{pure:r,areStatesEqual:o=R_,areOwnPropsEqual:s=Mc,areStatePropsEqual:i=Mc,areMergedPropsEqual:l=Mc,forwardRef:c=!1,context:u=An}={}){const d=u,f=a_(e),p=i_(t),m=u_(n),g=!!e;return x=>{const h=x.displayName||x.name||"Component",v=`Connect(${h})`,b={shouldHandleStateChanges:g,displayName:v,wrappedComponentName:h,WrappedComponent:x,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(_){const[E,k,R]=le.useMemo(()=>{const{reactReduxForwardedRef:L,...ne}=_;return[_.context,L,ne]},[_]),O=le.useMemo(()=>{let L=d;return E!=null&&E.Consumer,L},[E,d]),N=le.useContext(O),P=!!_.store&&!!_.store.getState&&!!_.store.dispatch,A=!!N&&!!N.store,D=P?_.store:N.store,V=A?N.getServerState:D.getState,X=le.useMemo(()=>o_(D.dispatch,b),[D]),[T,U]=le.useMemo(()=>{if(!g)return C_;const L=mx(D,P?void 0:N.subscription),ne=L.notifyNestedSubs.bind(L);return[L,ne]},[D,P,N]),M=le.useMemo(()=>P?N:{...N,subscription:T},[P,N,T]),H=le.useRef(),z=le.useRef(R),W=le.useRef(),J=le.useRef(!1);le.useRef(!1);const te=le.useRef(!1),Z=le.useRef();Ya(()=>(te.current=!0,()=>{te.current=!1}),[]);const ae=le.useMemo(()=>()=>W.current&&R===z.current?W.current:X(D.getState(),R),[D,R]),ve=le.useMemo(()=>ne=>T?E_(g,D,T,X,z,H,J,te,W,U,ne):()=>{},[T]);j_(__,[z,H,J,R,W,U]);let Se;try{Se=vx(ve,ae,V?()=>X(V(),R):ae)}catch(L){throw Z.current&&(L.message+=`
|
|
49
49
|
The error may be correlated with this previous error:
|
|
50
|
-
${
|
|
50
|
+
${Z.current.stack}
|
|
51
51
|
|
|
52
|
-
`),L}qa(()=>{X.current=void 0,W.current=void 0,H.current=Se});const Ae=ae.useMemo(()=>ae.createElement(x,{...Se,ref:N}),[N,x,Se]);return ae.useMemo(()=>m?ae.createElement(T.Provider,{value:A},Ae):Ae,[T,Ae,A])}const j=ae.memo(S);if(j.WrappedComponent=x,j.displayName=S.displayName=g,c){const E=ae.forwardRef(function(R,T){return ae.createElement(j,{...R,reactReduxForwardedRef:T})});return E.displayName=g,E.WrappedComponent=x,Qu(E,x)}return Qu(j,x)}}var tn=xC;function bC({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ae.useMemo(()=>{const u=lx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=ae.useMemo(()=>e.getState(),[e]);qa(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),l!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,l]);const c=t||Mn;return ae.createElement(c.Provider,{value:i},n)}var Ur=bC;function dx(e=Mn){const t=e===Mn?ox:Of(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var wC=dx();function SC(e=Mn){const t=e===Mn?wC:dx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var it=SC();Tj(Nj.useSyncExternalStoreWithSelector);pC(w.useSyncExternalStore);const rn="https://allocations.access-ci.org",ne={creditAlertThreshold:1e3,resourceTypeIcons:{credit:"cash-coin",compute:"cpu-fill",storage:"hdd-fill",program:"person-square"},routes:{edit_request_action_path:(e,t)=>`/requests/${e}/actions/${t}/edit`,edit_request_path:e=>`/requests/${e}/edit`,how_to_path:()=>"/how-to",get_your_first_project_path:()=>`${rn}/get-your-first-project`,profile_path:()=>`${rn}/profile`,project_types_path:()=>`${rn}/project-types`,projects_path:()=>`${rn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${rn}/requests/${e}/renew`,request_action_path:(e,t)=>`${rn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${rn}/requests/${e}/actions`,request_path:e=>`${rn}/requests/${e}`,resources_path:()=>`${rn}/resources`,search_people_path:()=>`${rn}/search/people`,usage_detail_path:(e,t)=>`/usage/${e}/${t}`},roleIcons:{PI:"person-fill-check","Co-PI":"person-fill-add","Allocation Manager":"person-fill-gear",User:"people-fill"}},po=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},_C=e=>new Date(`${e}T00:00:00`),jC={year:"numeric",month:"short",day:"numeric"},ho=(e,t)=>_C(e).toLocaleString("en-us",t||jC),nt=(e,{abbreviate:t=!1,decimalPlaces:n=void 0}={})=>{if(t){let r=0;for(;Math.abs(e)/Math.pow(1e3,r)>=1e3;)r+=1;const o=["","K","M","B","T","Q"][r];return`${(e/Math.pow(1e3,r)).toLocaleString("en-US",{maximumSignificantDigits:3})}${o}`}return e.toLocaleString("en-US",{maximumFractionDigits:n,minimumFractionDigits:n})},$f=(e,t)=>{if(e.startDate&&e.endDate){const o=ho(e.startDate,t),s=ho(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=ho(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},kn=e=>a.jsx("i",{className:`bi bi-${e}`}),Ol=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},nm=e=>{const t=Ol(e.name);return t.short||t.full},Ha=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||nm(e)<nm(t)?-1:1,rm=(...e)=>{for(let t of e)if(t!=null)return t;return null},fx=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Af=e=>e?a.jsxs(a.Fragment,{children:[kn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[kn("x-circle")," No"]}),Mf=e=>fx(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),om=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,CC=(e,t,n)=>`${nt(t)} ${om(n,t)} / ${om(e,1)}`,px=e=>{let t=0,n=0;for(let r of e.resources){if(r.isBoolean)continue;let{unitCost:o}=r.exchangeRates.base;t+=r.allocated*o,n+=Math.min(r.used,r.allocated)*o}return t>0?n/t:0},Pl=[{role:"pi",name:"PI",xrasRole:"PI"},{role:"co_pi",name:"Co-PI",xrasRole:"CoPI"},{role:"allocation_manager",name:"Allocation Manager",xrasRole:"Allocation Manager"},{role:"user",name:"User",xrasRole:"User"}],hx={};for(let e of Pl)hx[e.role]=e;const Xu={};for(let{role:e,xrasRole:t}of Pl)Xu[e]=t;const Zu=["info","success","secondary","warning","danger"];function Ju(e,t="total"){const n=e.exchangeRates[e.requested<=e.allocated?"base":"current"].unitCost;let r=(e.requested-e.allocated)*n;return t!="total"?r:r+e.allocated*e.exchangeRates.base.unitCost}function Df(e){e&&(ne.routes={...ne.routes,...e})}const ed={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Pc={};function mx(e,t=3){let n=0;for(;e/Math.pow(1e3,n)>1e3;)n+=1;const r=e.toString().length,o=Math.pow(10,r-t);return(Math.round(e/o)*o/Math.pow(1e3,n)).toString()+["","K","M","B","T"][n]}async function EC(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function RC(e){if(Pc[e])return Pc[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return Pc[e]=o,o}function NC(e){const t=[...e.creditLines.features.map(r=>r.properties.credits)],n=[...e.rpPoints.features.map(r=>r.properties.rpCredits),...e.userPoints.features.map(r=>r.properties.userCredits)];return{lines:im(t),points:im(n)}}function sm({activeOrg:e,basemapStyle:t,creditLevels:n,creditType:r,geoJSON:o,organizationType:s}){const i={},l=[];if(o&&n){const u=s==="user"?"rp":"user",d=o[`${s}Points`],f=o[`${u}Points`],p=`${s}Credits`,y=`${u}Credits`;i.organizations={type:"geojson",data:d};const m={user:[],rp:[]},h=[];n.points.forEach((v,g)=>{Object.keys(ed).forEach(b=>{m[b].push(v[1],ed[b].colors[g])}),h.push(v[1],5*(g+1))});const x=[];if(n.lines.forEach((v,g)=>{x.push(v[1],1*(g+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...h],"circle-color":["interpolate",["linear"],["get",p],...m[s]],"circle-opacity":e?["match",["id"],e.id,1,.3]:1,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),e&&r!=="allocated"){i.opp={type:"geojson",data:f};const v=["get",e.id.toString(),["get",`${y}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${y}Map`]],paint:{"circle-radius":["interpolate",["linear"],v,...h],"circle-color":["interpolate",["linear"],v,...m[u]],"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),i.credits={type:"geojson",data:o.creditLines},l.push({id:"credits",type:"line",source:"credits",filter:["==",["get",`${s}_organization_id`],e.id],paint:{"line-color":"#444444","line-opacity":.4,"line-width":["interpolate",["linear"],["get","credits"],...x]}})}}const c=t||{version:8,sources:{},layers:[]};return{...c,sources:{...c.sources,...i},layers:[...c.layers.filter(u=>u.id!=="Marine waterbody/label/2x large"),...l]}}function kC(e,t,n,r,o=20){return[...Array(o+1).keys()].map(s=>s/o).map(s=>{let i=s*(n-e)+e,l=s*(r-t)+t+Math.abs(Math.sin(s*Math.PI)*(n-e)*.1);return[i,l]})}function TC(e,t,n){const r={};return e.features.forEach(s=>r[s.id]={type:s.type,geometry:s.geometry,id:s.id,properties:{name:s.properties.name,abbr:s.properties.abbr,userCredits:0,userCreditsMap:{},rpCredits:0,rpCreditsMap:{}}},{}),{creditLines:{type:"FeatureCollection",features:t.result.filter(s=>r[s.user_organization_id]!==void 0&&(n==="allocated"||r[s.rp_organization_id]!==void 0)).map(s=>{const i=r[s.user_organization_id],l=r[s.rp_organization_id];if(i.properties.userCredits+=s.credits,l&&(l.properties.rpCredits+=s.credits),i.properties.userCreditsMap[s.rp_organization_id]=(i.properties.userCreditsMap[s.rp_organization_id]||0)+s.credits,l&&(l.properties.rpCreditsMap[s.user_organization_id]=(l.properties.rpCreditsMap[s.user_organization_id]||0)+s.credits),n!=="allocated")return{type:"Feature",geometry:{type:"LineString",coordinates:kC(...r[s.user_organization_id].geometry.coordinates,...r[s.rp_organization_id].geometry.coordinates)},properties:s}}).filter(s=>s!==void 0)},userPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.userCredits>0).sort((s,i)=>s.properties.userCredits>i.properties.userCredits?-1:1)},rpPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.rpCredits>0).sort((s,i)=>s.properties.rpCredits>i.properties.rpCredits?-1:1)}}}function im(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=OC(e,n),s=r===t.length-1?"+":"";return[`${mx(Math.round(o))}${s}`,o]})}function OC(e,t){e.sort((s,i)=>s-i);const n=(e.length-1)*t,r=Math.floor(n),o=n-r;return e[r+1]!==void 0?e[r]+o*(e[r+1]-e[r]):e[r]}const PC="_fullscreen_1iid9_6",IC="_map_1iid9_14",Ti={"allocations-map":"_allocations-map_1iid9_1",fullscreen:PC,map:IC},$C="_group_11k83_1",AC="_button_11k83_6",MC="_icon_11k83_16",Ic={group:$C,button:AC,icon:MC};function am({choices:e,disabledValues:t=[],label:n,value:r,setValue:o}){const s=[];return e.forEach(([i,l])=>s.push(a.jsx("input",{type:"radio",className:"btn-check",name:i,id:i,autoComplete:"off",checked:r===i,onChange:()=>o(i),disabled:t.includes(i)},i),a.jsxs("label",{className:`btn btn-outline-primary ${Ic.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Ic.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Ic.group}`,role:"group","aria-label":n,children:s})})}const DC="_controls_1be4t_1",FC={controls:DC};function LC({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:FC.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(am,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(am,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const UC="_legend_odgg9_1",VC="_symbols_odgg9_17",BC="_symbol_odgg9_17",ea={legend:UC,symbols:VC,symbol:BC};function zC(e,t){const n=2*e+2;return a.jsx("svg",{viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg",stroke:"white",strokeWidth:"1",height:n,width:n,children:a.jsx("circle",{fill:t,cx:e+1,cy:e+1,r:e})})}function qC({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ea.symbol,children:[zC(5*(s+1),ed[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:ea.legend,children:[a.jsxs("h2",{className:"fs-6 mt-0 mb-0",children:["ACCESS Credits ",a.jsx("small",{children:"or credit equivalents"})]}),a.jsx("div",{className:ea.symbols,children:r})]})}const HC="_info_oxxoh_1",WC="_user_oxxoh_7",KC="_rp_oxxoh_10",GC="_credits_oxxoh_15",ta={info:HC,user:WC,rp:KC,credits:GC};function lm(e,t,n){e.sort((o,s)=>s[1]-o[1]);const r=e.slice(0,3).map(o=>o[0]);return e.length>3&&(r[2]=`${e.length-2} other ${n}s`),r.reduce((o,s,i,l)=>[o,a.jsx("span",{className:`name ${ta[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function YC({activeOrg:e,creditType:t,organizationMap:n,organizationType:r}){if(!e||!n)return;const o=e.properties,s=o[`${r}Credits`],i=r==="rp"?"user":"rp",l=JSON.parse(o[`${r}CreditsMap`]),c={user:[],rp:[]};return c[r].push([o.name,s]),Object.keys(l).forEach(u=>c[i].push([n[u],l[u]])),a.jsx("div",{className:`${ea.legend} ${ta.info}`,children:a.jsxs("p",{className:ta[r],children:["Researchers at ",lm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:ta.credits,children:[mx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",lm(c.rp,"rp","resource provider")]}):"","."]})})}function QC(){const e=w.useRef(null),t=w.useRef(null),[n,r]=w.useState(null),[o,s]=w.useState(null),[i,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[p,y]=w.useState(null),[m,h]=w.useState(null),[x,v]=w.useState("user"),[g,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await EC()))()},[]),w.useEffect(()=>{(async S=>{const[_,j]=await Promise.all(["organizations",`credits_${S}`].map(RC));if(!m){const E={};_.features.forEach(N=>E[N.id.toString()]=N.properties.name),h(E)}const C=TC(_,j,g);f(C),S==="exchanged"&&!i&&l(NC(C))})(g)},[g]),w.useEffect(()=>{p&&p.setStyle(sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}))},[n,d,p,x]),w.useEffect(()=>{p&&(p.on("mousemove","organizations",S=>r(S.features.length?S.features[0]:null)),p.on("mouseleave","organizations",()=>r(null)))},[p]),w.useEffect(()=>{p&&p.resize()},[c]),w.useEffect(()=>{g==="allocated"&&v("user")},[g]),w.useLayoutEffect(()=>y(new maplibregl.Map({container:t.current,style:sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}),center:[-111.01,38.88],zoom:3.4,hash:!0})),[]),w.useLayoutEffect(()=>e.current.addEventListener("keydown",S=>{S.key==="Escape"&&u(!1)}),[]),a.jsxs("section",{className:`${Ti["allocations-map"]} ${c?Ti.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:Ti.map,ref:t}),a.jsx(LC,{creditType:g,fullscreen:c,organizationType:x,setCreditType:b,setFullscreen:u,setOrganizationType:v}),a.jsx(qC,{activeOrg:n,creditLevels:i,organizationType:x}),a.jsx(YC,{activeOrg:n,creditType:g,organizationMap:m,organizationType:x}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:Ti.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const XC=async(e,t)=>{try{const n=await fetch(`${e}/resources`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resources:t.map((o,s)=>({resource_id:o.resource_id,relative_order:s+1}))})});if(!n.ok){const o=await n.json();throw new Error(o.error||"Failed to update resource order")}const r=await n.json();console.log(r.message)}catch(n){console.error("Error updating resource order:",n)}},cm=e=>[...e].sort((t,n)=>t.relative_order===null&&n.relative_order===null?t.display_resource_name.localeCompare(n.display_resource_name):t.relative_order===null?1:n.relative_order===null?-1:t.relative_order-n.relative_order),um=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},$c=e=>{e.current&&(clearInterval(e.current),e.current=null)},ZC="_dragging_1vb1t_45",Ht={"resources-container":"_resources-container_1vb1t_1","drag-instruction":"_drag-instruction_1vb1t_6","resources-list":"_resources-list_1vb1t_12","resources-header":"_resources-header_1vb1t_18","resources-item":"_resources-item_1vb1t_28",dragging:ZC,"drag-handle":"_drag-handle_1vb1t_52","resource-name":"_resource-name_1vb1t_61","resource-repo":"_resource-repo_1vb1t_65","resource-link":"_resource-link_1vb1t_71"};var gx={exports:{}},JC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",eE=JC,tE=eE;function vx(){}function yx(){}yx.resetWarningCache=vx;var nE=function(){function e(r,o,s,i,l,c){if(c!==tE){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:yx,resetWarningCache:vx};return n.PropTypes=n,n};gx.exports=nE();var rE=gx.exports;const q=Xs(rE),oE=(e,t)=>{switch(t.type){case"SET_RESOURCE_DATA":return{...e,resourceData:t.payload,loading:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_SUCCESS_MESSAGE":return{...e,successMessage:t.payload};case"SET_ERRORS":return{...e,errors:Array.isArray(t.payload)?t.payload:[t.payload],loading:!1};case"UPDATE_RESOURCE_FIELD":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,[t.field]:t.value}}};case"UPDATE_ALLOCATION":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,allocation_types:e.resourceData.resource_details.allocation_types.map(n=>n.allocation_type_id===t.payload.allocationTypeId?{...n,...t.payload.updates}:n)}}};case"UPDATE_BASE_RATE":return console.log("Reducer: Updating base rate to:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,base_rate:t.payload}}}};case"UPDATE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.map(n=>n.id===t.payload.rateId?{...n,...t.payload.changes}:n)}}}};case"ADD_EXCHANGE_RATE":return console.log("Reducer: Adding new discount rate:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:[...e.resourceData.resource_details.exchange_rates.discount_rates||[],t.payload]}}}};case"DELETE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.filter(n=>n.id!==t.payload)}}}};default:return e}},td=e=>({type:"SET_RESOURCE_DATA",payload:e}),sE=e=>({type:"SET_LOADING",payload:e}),dm=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Zo=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Ac=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),iE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),aE=async(e,t,n,r)=>(console.log("update resource",n),await fetch(`${t}/resources/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resource:n,required_resources:r})})),lE=(e,t)=>{const[n,r]=w.useReducer(oE,{resourceData:null,loading:!0,errors:[],successMessage:{message:"",color:""}}),o=w.useCallback(async(i,l)=>{let c=[l];try{const u=await i.json();u.errors?c=u.errors:u.message&&(c=[u.message])}catch(u){console.error("Error parsing error response:",u)}r({type:"SET_ERRORS",payload:c})},[]),s=w.useCallback(async()=>{r(sE(!0));try{const i=await iE(e,t);r(td(i))}catch(i){console.error("Failed to fetch resource data:",i),r({type:"SET_ERRORS",payload:"Failed to fetch resource data. Please try again later."})}},[e,t]);return w.useEffect(()=>{s()},[s]),{state:n,dispatch:r,handleError:o,fetchData:s}},Ff=e=>{var t,n,r;return{allowedActionsOptions:((t=e==null?void 0:e.resource_state_types_available)==null?void 0:t.map(o=>({value:o.resource_state_type_id,label:o.display_resource_state_type,additionalInfo:o.action_types.map(s=>s.display_action_type).join(", ")})))||[],resourceTypesOptions:((n=e==null?void 0:e.resource_types_available)==null?void 0:n.map(o=>({value:o.resource_type_id,label:o.display_resource_type})))||[],unitTypesOptions:((r=e==null?void 0:e.unit_types_available)==null?void 0:r.map(o=>({value:o.unit_type_id,label:o.display_unit_type})))||[],availableResources:(e==null?void 0:e.required_resources_available)||[],availableAllocationTypes:(e==null?void 0:e.unassigned_allocation_types)||[]}},cE=(e,t,n,r,o,s,i)=>{const c=(()=>{var p;if(!e)return[];const f=new Set;return(p=e.allocation_types)==null||p.forEach(y=>{var m;(m=y.required_resources)==null||m.forEach(h=>{f.add(h.resource_name)})}),Array.from(f).sort((y,m)=>y.localeCompare(m)).map(y=>({key:y,name:`Require ${y}`,width:150,type:"checkbox"}))})();return{allocationColumns:[{key:"display_name",name:"Allocation Type",width:200},{key:"allowed_actions",name:"Allowed Actions",width:200,type:"select"},{key:"comment",name:"Descriptive Text",width:200,type:"input",tooltip:"Appears below the resource name and allocations description in the form when making a new request"},...c],allocationRows:e!=null&&e.allocation_types?e.allocation_types.map(f=>{var p;return{display_name:f.display_name,allocation_type_id:f.allocation_type_id,allowed_actions:{options:r,value:((p=f.allowed_action)==null?void 0:p.resource_state_type_id)||"",onChange:y=>o(f.allocation_type_id,y)},comment:{value:f.comment||"",onChange:y=>s(f.allocation_type_id,y)},...Object.fromEntries(c.map(y=>{var m;return[y.key,{checked:((m=f.required_resources)==null?void 0:m.some(h=>h.resource_name===y.key))||!1,onChange:h=>i(f.allocation_type_id,y.key,h,f)}]}))}}):[],requiredResourcesColumns:c}},uE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=Ff(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,y]=w.useState(""),m=w.useCallback((_,j)=>{n(Ac(_,{allowed_action:{resource_state_type_id:j}}))},[n]),h=w.useCallback((_,j)=>{n(Ac(_,{comment:j}))},[n]),x=w.useCallback((_,j,C,E)=>{const N=C?[...E.required_resources||[],{resource_name:j,required_resource_id:e.required_resources_available.find(R=>R.resource_name===j).resource_id}]:(E.required_resources||[]).filter(R=>R.resource_name!==j);n(Ac(_,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const _=t.allocation_types.flatMap(j=>j.required_resources||[]).map(j=>j.required_resource_id);f(_)}},[i,t]);const v=w.useCallback((_,j)=>{f(C=>j?[...C,_]:C.filter(E=>E!==_))},[]),g=w.useCallback(()=>{const _=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),j=d.filter(N=>!_.includes(N)),C=_.filter(N=>!d.includes(N)),E=t.allocation_types.map(N=>{const R=N.required_resources||[],T=j.map(P=>{const M=r.find(D=>D.resource_id===P);return{resource_name:M.resource_name,required_resource_id:M.resource_id}}),k=R.filter(P=>!C.includes(P.required_resource_id)).concat(T.filter(P=>!R.some(M=>M.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(td({...e,resource_details:{...t,allocation_types:E}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(_=>{const j=_.target.value;y(j)},[]),S=w.useCallback(()=>{var C,E;if(!p)return;const _=o.find(N=>N.allocation_type_id.toString()===p),j=(C=t.allocation_types)==null?void 0:C.some(N=>N.allocation_type_id===_.allocation_type_id);if(_&&!j){const N=(E=s[0])==null?void 0:E.value,R=[...t.allocation_types||[],{allocation_type_id:_.allocation_type_id,display_name:_.display_name,allowed_action:{resource_state_type_id:N},comment:"",required_resources:[]}];n(td({...e,resource_details:{...t,allocation_types:R}})),u(!1)}},[p,o,t,e,n,s]);return{showAddResourceModal:i,setShowAddResourceModal:l,showAddAllocationTypeModal:c,setShowAddAllocationTypeModal:u,selectedNewResource:d,handleSelectNewResource:v,handleSaveResources:g,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:m,handleCommentChange:h,handleRequiredResourceChange:x}},dE=(e,t,n,r,o,s)=>w.useCallback(async()=>{var c,u,d;if(!e)return;const i={resource_name:e.resource_name,description:e.description,resource_type_id:e.resource_type_id,unit_type_id:e.unit_type_id,dollar_value:e.dollar_value,allocation_types:e.allocation_types.map(f=>{var p;return{allocation_type_id:f.allocation_type_id,allowed_action:{resource_state_type_id:(p=f.allowed_action)==null?void 0:p.resource_state_type_id},comment:f.comment||""}}),exchange_rates:{base_rate:(c=e.exchange_rates)==null?void 0:c.base_rate,discount_rates:(d=(u=e.exchange_rates)==null?void 0:u.discount_rates)==null?void 0:d.map(f=>({id:f.id,exchange_rate:f.exchange_rate,begin_date:f.begin_date,end_date:f.end_date}))}},l={};e.allocation_types.forEach(f=>{f.required_resources.forEach(p=>{l[p.required_resource_id]||(l[p.required_resource_id]=[]),l[p.required_resource_id].push(f.allocation_type_id)})});try{const f=await aE(t,n,i,l);if(f.ok){const p=await f.json();return s(dm(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(dm("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),fE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},pE={"form-wrapper":"_form-wrapper_mu0yh_1"},Wa=({show:e,onClose:t,title:n,children:r,onSave:o,buttonText:s,cancelText:i="Cancel",canSave:l=!0})=>e?a.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",zIndex:1050},children:a.jsx("div",{className:"modal fade in",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{width:"90%",maxWidth:"600px",maxHeight:"90%",overflow:"auto",backgroundColor:"white",position:"relative"},children:a.jsx("div",{className:"modal-dialog",role:"document",children:a.jsxs("div",{className:"modal-content",children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:t,"aria-label":"Close",children:a.jsx("h3",{"aria-hidden":"true",className:"text-danger",children:"×"})}),a.jsx("h3",{className:"modal-title",children:n})]}),a.jsx("div",{className:"modal-body",children:r}),a.jsxs("div",{className:"modal-footer",style:{padding:"15px",textAlign:"right",borderTop:"1px solid #e5e5e5",backgroundColor:"#f8f9fa"},children:[a.jsx("button",{className:"btn btn-danger",onClick:t,children:i}),a.jsx("button",{className:"btn btn-success",onClick:o,disabled:!l,children:s})]})]})})})}):null;Wa.propTypes={show:q.bool.isRequired,onClose:q.func.isRequired,title:q.string.isRequired,children:q.node.isRequired,onSave:q.func.isRequired,buttonText:q.string,cancelText:q.string,canSave:q.bool};const be=({children:e,color:t,dismissable:n=!1})=>a.jsxs("div",{className:`alert alert-${t} mt-3 alert-dismissible show`,role:"alert",children:[e,n&&a.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",children:a.jsx("span",{"aria-hidden":"true",children:"×"})})]}),Co=({label:e,options:t,value:n,onChange:r,...o})=>a.jsxs("div",{className:"form-group",children:[e&&a.jsx("label",{children:e}),a.jsx("select",{className:"form-control",value:n,onChange:r,...o,children:t.map(s=>a.jsxs("option",{value:s.value,children:[s.label,s.additionalInfo&&` - ${s.additionalInfo}`]},s.value))})]});Co.propTypes={label:q.string,options:q.arrayOf(q.shape({value:q.oneOfType([q.string,q.number]).isRequired,label:q.string.isRequired,additionalInfo:q.string})).isRequired,value:q.oneOfType([q.string,q.number]),onChange:q.func.isRequired};function us({label:e,type:t="text",value:n,onChange:r,disabled:o=!1,infoText:s="",style:i,inputClassName:l,inputAddon:c}){return a.jsxs(a.Fragment,{children:[e&&a.jsx("label",{children:e}),s&&a.jsx("small",{className:"form-text help-block",children:s}),t==="textarea"?a.jsx("textarea",{className:`form-control ${l||""}`,value:n,onChange:r,disabled:o,rows:"6"}):c?a.jsxs("div",{className:"input-prepend",children:[a.jsx("span",{className:"add-on",children:c}),a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]}):a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]})}const hE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:hE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},Lf=({headerText:e,header:t,children:n,isEditing:r=!1,onEditingChange:o,warningMessage:s=""})=>{const i=e&&e.type==="label";return a.jsxs("div",{className:yn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:yn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${yn["header-buttons-container"]} ${r?"":yn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${yn["alt-warning-banner"]}`:yn["warning-banner"],children:[a.jsxs("span",{className:yn["warning-text"],children:[a.jsx("strong",{children:"CAUTION! "})," ",s]}),a.jsx("button",{className:"btn btn-danger",onClick:()=>o(!0),children:"I understand the risks"})]}),a.jsx("div",{className:`${yn["content-container"]} ${r?"":yn.blurred}`,children:n})]})]})};Lf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const Uf=je.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){const d="Dollar Value per SUs",f=l?a.jsx(us,{label:u?null:d,value:t.dollar_value,onChange:p=>o(Zo("dollar_value",p.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(us,{label:"Resource Name",value:t.resource_name,onChange:p=>o(Zo("resource_name",p.target.value)),inputClassName:"span8"}),c&&a.jsx(us,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(Lf,{headerText:a.jsx("label",{children:d}),isEditing:s,onEditingChange:i,warningMessage:"Dollar value is for reporting and should only be modified if the SU rate changes.",children:f}):f,a.jsx(us,{label:"Allocations Description",type:"textarea",value:t.description,infoText:"Appears below the resource name in the form when making a new request, as well as under the header Allocations Description in resource catalogs",onChange:p=>o(Zo("description",p.target.value)),inputClassName:"span8"}),a.jsx(Co,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:p=>o(Zo("resource_type_id",p.target.value)),className:"span8"}),a.jsx(Co,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:p=>o(Zo("unit_type_id",p.target.value)),className:"span8"})]})});Uf.propTypes={resourceDetails:q.object.isRequired,resourceTypesOptions:q.array.isRequired,unitTypesOptions:q.array.isRequired,dispatch:q.func.isRequired,isDollarValueEditing:q.bool,onDollarValueEditingChange:q.func,showDollarValue:q.bool,showResourceId:q.bool,useAdvancedSettings:q.bool};function xx({onClose:e}){const[t,n]=w.useState(!0),[r,o]=w.useState([]),[s,i]=w.useState(null),[l,c]=w.useState(-1),[u,d]=w.useState(null),f=Ff(u);f.resourceTypesOptions.unshift({value:0,label:"Select a resource type..."}),f.unitTypesOptions.unshift({value:0,label:"Select a unit type..."}),w.useEffect(()=>{(async()=>{const g=await fetch("/resources/addable.json");n(!1),g.status==200?o(await g.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const g=await fetch(`/resources/addable/${l}.json`);g.status==200?d(await g.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(be,{color:"danger",children:s}):r.length==0&&(p=a.jsx(be,{children:"There are currently no resources available to add."}));const y=[{value:-1,label:"Select a resource..."}].concat(r.map(g=>({value:g.xras_cider_resource_id,label:g.resource_descriptive_name}))),m=u?u.resource_details:null,h=!s&&m&&m.resource_name.length>0&&m.resource_type_id>0&&m.unit_type_id>0,x=g=>{g.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[g.field]:g.value}})},v=()=>{(async()=>{const g=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...m,resource_repository_key:l})});if(g.status==200){const b=await g.json();window.location=`/resources/${b.resource_id}`}else i("Error saving resource.")})()};return p===null&&(p=a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Select a Resource to Add"}),a.jsx(Co,{options:y,onChange:g=>c(parseInt(g.target.value))}),!u&&l!==-1?a.jsx("p",{children:"Loading…"}):null,u&&a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Properties"}),a.jsx("p",{style:{fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"}),a.jsx("div",{className:pE["form-wrapper"],children:a.jsx(Uf,{resourceDetails:m,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:x})})]})]})),a.jsx(Wa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:v,buttonText:"Save",canSave:h,children:p})}xx.propTypes={onClose:q.func.isRequired};function mE({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>cm(e),[e]),s=w.useMemo(()=>cm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",y="Inactive",[m,h]=w.useState(p),x=_=>{h(_),console.log(_),_==p?l(o):l(s)};function v(_,j){j.preventDefault(),h(_),x(_)}w.useEffect(()=>{l(o)},[o]);const g=(_,j)=>{d.current=j},b=(_,j)=>{if(_.preventDefault(),d.current===j)return;const C=[...i],E=C[d.current];C.splice(d.current,1),C.splice(j,0,E),d.current=j,l(C);const{clientY:N}=_,R=130;N<R?um(-1,f):window.innerHeight-N<R?um(1,f):$c(f)},S=()=>{d.current=null,$c(f),XC(r,i)};return w.useEffect(()=>()=>$c(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Ht["resources-container"],children:[n&&a.jsx("button",{className:"btn btn-primary pull-right",onClick:()=>u(!0),children:"Add a Resource from CIDeR"}),a.jsx("h2",{children:"Select a resource from the list to modify"}),a.jsx("p",{className:Ht["drag-instruction"],children:"Drag items to reorder the list."}),a.jsxs("div",{className:"w-full max-w-md mx-auto p-4",children:[a.jsxs("ul",{className:"nav nav-tabs",children:[a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===p?"active":""}`,"data-toggle":m===p?"tab":void 0,style:{cursor:"default",...m===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:_=>v(p,_),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===y?"active":""}`,"data-toggle":m===y?"tab":void 0,style:{cursor:"default"},onClick:_=>v(y,_),children:y})})]}),a.jsxs("div",{className:Ht["resources-list"],children:[a.jsxs("div",{className:Ht["resources-header"],children:[a.jsx("span",{className:Ht["header-name"],children:"Resource Name"}),a.jsx("span",{className:Ht["header-repo"],children:"Repository Key"})]}),i.map((_,j)=>a.jsxs("div",{className:`${Ht["resources-item"]}`,draggable:!0,onDragStart:C=>g(C,j),onDragOver:C=>b(C,j),onDrop:S,children:[a.jsx("span",{className:Ht["drag-handle"]}),a.jsx("span",{className:Ht["resource-name"],children:a.jsx("a",{href:`${r}/resources/${_.resource_id}`,className:Ht["resource-link"],children:_.display_resource_name})}),a.jsx("span",{className:Ht["resource-repo"],children:_.resource_repository_key||"N/A"})]},_.resource_id))]})]})]}),c&&a.jsx(xx,{onClose:()=>u(!1)})]})}function Do(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const gE="_grid_afccc_1",vE="_important_afccc_30",yE="_input_afccc_34",xE="_edited_afccc_38",bE="_disabled_afccc_46",wE="_scroll_afccc_59",Cr={grid:gE,important:vE,input:yE,edited:xE,disabled:bE,scroll:wE};function SE({column:e,row:t,style:n={}}){const r=e.format?e.format(t[e.key],t):t[e.key],o=["cell"];return e.class&&o.push(e.class),e.rowClass&&o.push(e.rowClass(t)),a.jsx("td",{className:o.join(" "),style:n,children:r})}const Vf=({title:e,placement:t,children:n})=>(w.useEffect(()=>($('[data-toggle="tooltip"]').tooltip(),()=>{$('[data-toggle="tooltip"]').tooltip("destroy")}),[]),a.jsx("span",{"data-toggle":"tooltip","data-placement":t,title:e,style:{margin:"10px"},children:n}));Vf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};Vf.defaultProps={placement:"top"};const _E="_datepicker_19wnv_1",jE="_error_19wnv_1",fm={datepicker:_E,error:jE},CE=({value:e,onChange:t,disabled:n=!1,style:r,className:o="",minDate:s="",maxDate:i="",error:l=""})=>{const c=l;return a.jsx("div",{className:`w-full ${o}`,children:a.jsx("input",{type:"date",style:r,className:`${fm.datepicker} ${c?fm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},Jo=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},EE={text:SE,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Co,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"100%",margin:0}})}),input:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(us,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"92%",margin:0}})}),checkbox:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx("input",{type:"checkbox",checked:t[e.key].checked,onChange:r=>Jo(t,e,r.target.checked)})}),date:({column:e,row:t,style:n})=>{const r=t[e.key];return!(r!=null&&r.value)&&typeof r!="object"?a.jsx("td",{style:n,children:r||""}):a.jsx("td",{style:n,children:a.jsx(CE,{value:r.value,onChange:o=>Jo(t,e,o),disabled:r.disabled,style:{width:"92%",margin:0},minDate:e.minDate,maxDate:e.maxDate,error:r.error})})},action:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:t.rate_type==="Discount"&&a.jsx("button",{className:"btn btn-link text-danger",onClick:()=>{var r;return Jo(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function Un({columns:e,rows:t,classes:n,frozenColumns:r=0,minWidth:o,rowClasses:s=[],scroll:i=!0,scrollBehavior:l="smooth",scrollRowIndex:c=0}){const u=w.useRef();w.useLayoutEffect(()=>{if(!i||!u.current)return;const h=u.current.querySelector(`tbody tr:nth-child(${c+1})`);h&&h.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let h=0;h<r;h++)d[h+1]=d[h]+(e[h].width||100);const f=(h,x)=>h<r?{position:"sticky",left:`${d[h]}px`,minWidth:`${e[h].width||100}px`,width:`${e[h].width||100}px`,zIndex:x||1}:{},p=e.map((h,x)=>a.jsxs("th",{className:h.headerClass||h.class||"",style:f(x,100),children:[h.formatHeader?h.formatHeader(h.name,h):h.name,h.tooltip&&a.jsx(Vf,{title:h.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},h.key)),y=t.map((h,x)=>{const v=e.map((g,b)=>{const S=EE[g.type||"text"];return a.jsx(S,{column:g,row:h,style:f(b)},g.key)});return a.jsx("tr",{className:s[x]||"",children:v},x)}),m={};return o&&(m.minWidth=o),a.jsx("div",{className:`${Cr.grid} ${i?Cr.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:m,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:y})]})})}const nd={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},bx=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:nd["header-buttons"],children:[a.jsxs("button",{className:"btn btn-primary",onClick:e,children:[a.jsx("i",{className:"fa fa-plus"})," Add Allocation Type"]}),a.jsxs("button",{className:"btn btn-primary",onClick:t,children:[a.jsx("i",{className:"fa fa-plus"})," Add Required Resource"]})]});bx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const wx=je.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:nd["allocation-types-grid"],children:[a.jsx(Un,{columns:t,rows:n,rowClasses:Array(n.length).fill(nd["vertical-align-center"]),scroll:!1}),a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Note: You may need to contact your Allocations Coordinator if you have added this resource to an allocation type."})]})});wx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const zr={"exchange-rates-grid":"_exchange-rates-grid_5qkd5_1","header-container":"_header-container_5qkd5_5","header-buttons":"_header-buttons_5qkd5_11","vertical-align-center":"_vertical-align-center_5qkd5_18","error-summary":"_error-summary_5qkd5_35"},Sx=je.memo(function({columns:t,rows:n,onAddDiscountRate:r,dateErrors:o=[]}){return a.jsxs("div",{className:zr["exchange-rates-grid"],children:[a.jsxs("div",{className:zr["header-container"],children:[a.jsx("h2",{className:zr["header-title"],children:"Exchange Rates"}),a.jsx("div",{className:zr["header-buttons"],children:a.jsxs("button",{className:"btn btn-primary",onClick:r,children:[a.jsx("i",{className:"fa fa-plus"})," Add Discount Rate"]})})]}),a.jsx(Un,{columns:t,rows:n,rowClasses:Array(n.length).fill(zr["vertical-align-center"]),scroll:!1}),o.length>0&&a.jsx("div",{className:zr["error-summary"],children:a.jsx("ul",{children:o.map((s,i)=>a.jsx("li",{children:s},i))})})]})});Sx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const RE=(e,t)=>{const n=w.useCallback(y=>{var h,x;t({type:"DELETE_EXCHANGE_RATE",payload:y}),(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates.filter(v=>v.id!==y))||[]).forEach(v=>{v.begin_date&&v.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:v.id,changes:{start_date_error:"",end_date_error:""}}})})},[t,e]),r=[{key:"rate_type",name:"Rate Type",width:150},{key:"rate",name:"Exchange Rate",width:100,type:"input",tooltip:"Exchange rate is the cost in ACCESS Credits of one resource unit. ACCESS Credits / exchange rate = resource units"},{key:"conversion",name:"Resource Units per ACCESS Credit",width:150},{key:"start_date",name:"Start Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"end_date",name:"End Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"actions",name:"",width:80,type:"action",onChange:n}],o=y=>{t({type:"UPDATE_BASE_RATE",payload:y})},s=(y,m)=>{const h={exchange_rate:m},x={};m?x.rate_error="":x.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...h,...x}}})},i=()=>{var h,x;const y=[];return(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates)||[]).forEach(v=>{v.start_date_error&&y.push(v.start_date_error),v.end_date_error&&y.push(v.end_date_error),v.rate_error&&y.push(v.rate_error)}),y.filter((v,g)=>v&&v!==""&&(!v.includes("overlaps")||y.indexOf(v)===g))},l=y=>{const m=new Date(y);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(m)},c=(y,m,h,x)=>{const v=new Date(y).getTime(),g=new Date(m).getTime(),b=new Date(h).getTime(),S=new Date(x).getTime();return v<=S&&b<=g},u=(y,m)=>{let h="";if(y.begin_date&&y.end_date){const x=m.filter(v=>v.id!==y.id);for(const v of x)if(v.begin_date&&v.end_date&&c(y.begin_date,y.end_date,v.begin_date,v.end_date)){h=`The selected date range (${l(y.begin_date)} to ${l(y.end_date)}) overlaps with an existing discount rate (${l(v.begin_date)} to ${l(v.end_date)})`;break}}return h},d=(y,m,h)=>{var R,T;const x={start_date:"begin_date",end_date:"end_date"},v=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},g=((T=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:T.discount_rates)||[],b=g.find(k=>k.id===y);if(!b)return;const S={[x[m]]:h},_={},j=m==="end_date",C=()=>{if(!h)return _[`${m}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===m),P=(k==null?void 0:k.minDate)||"1900-01-01",M=(k==null?void 0:k.maxDate)||"2100-12-31",D=j&&b.begin_date?b.begin_date:P;return h<D?(_[`${m}_error`]=`${m.replace("_"," ")} ${v(h)} cannot be before ${v(D)}`,!1):h>M?(_[`${m}_error`]=`${m.replace("_"," ")} cannot be after ${v(M)}`,!1):(_[`${m}_error`]="",!0)},E=()=>{const k=m==="end_date"?h:b.end_date;if(m==="start_date"&&k){if(h>k)return _.end_date_error=`end date ${v(k)} cannot be before ${v(h)}`,!1;_.end_date_error=_.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=m==="start_date"?h:b.begin_date,P=m==="end_date"?h:b.end_date;if(k&&P){const M=u({...b,begin_date:k,end_date:P},g);return _.start_date_error=M,_.end_date_error=M,!M}return!0};if(!C()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}});return}E(),N(),j&&!b.begin_date?_.start_date_error="Date cannot be empty or invalid":!j&&!b.end_date&&(_.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}})},f=()=>{var _,j;const y=((j=(_=e==null?void 0:e.resource_details)==null?void 0:_.exchange_rates)==null?void 0:j.discount_rates)||[];let h=new Date;y.forEach(C=>{if(C.end_date){const E=new Date(C.end_date);E>h&&(h=E)}});const x=new Date(h);x.setDate(x.getDate()+1);const v=x.toISOString().split("T")[0],g=new Date(x);g.setDate(g.getDate()+15);const b=g.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:v,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const y=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,m=(y==null?void 0:y.base_rate)??"",h=(y==null?void 0:y.discount_rates)||[],x=new Date().toISOString().split("T")[0],v=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",g=_=>!_||Number(_)===0?"-":`${(1/Number(_)).toFixed(2)} ${v}`;return[{rate_type:"Base Rate",rate:{value:m.toString(),onChange:_=>o(_)},conversion:g(m)},...h.map(_=>{var N;const j=_.is_new||_.begin_date>x,C=j||_.begin_date==="",E=_.is_new||_.end_date>=x||_.end_date==="";return{rate_type:"Discount",rate:{value:((N=_.exchange_rate)==null?void 0:N.toString())||"",onChange:j?R=>s(_.id,R):null,disabled:!j},conversion:g(_.exchange_rate),start_date:{value:_.begin_date||"",onChange:R=>d(_.id,"start_date",R),error:_.start_date_error,disabled:!C},end_date:{value:_.end_date||"",onChange:R=>d(_.id,"end_date",R),error:_.end_date_error,disabled:!E},actions:{id:_.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function _x({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=lE(e,t),{isEditing:l,handleEditingChange:c}=fE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,y=u==null?void 0:u.resource_details,m=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:h,resourceTypesOptions:x,unitTypesOptions:v,availableResources:g,availableAllocationTypes:b}=Ff(u),{showAddResourceModal:S,setShowAddResourceModal:_,showAddAllocationTypeModal:j,setShowAddAllocationTypeModal:C,selectedNewResource:E,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:T,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:M,handleCommentChange:D,handleRequiredResourceChange:V}=uE(u,y,o),{exchangeRateColumns:Q,exchangeRateRows:O,handleAddDiscountRate:U,dateErrors:A}=RE(u,o),H=dE(y,e,t,i,s,o);w.useEffect(()=>{n&&A.length==0?n(H):n(null)},[H,n,A]);const{allocationColumns:B,allocationRows:W}=cE(y,g,E,h,M,D,V),[Z,ee]=w.useState(!1);return d?a.jsx(Do,{}):f.length>0?a.jsx("div",{children:f.map((X,ie)=>a.jsx(be,{color:"danger",dismissable:!0,children:X},ie))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(be,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Propeties"}),a.jsx("div",{style:{marginBottom:"0.75rem"},children:a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"})}),a.jsx(Uf,{resourceDetails:y,resourceTypesOptions:x,unitTypesOptions:v,dispatch:o,isDollarValueEditing:Z,onDollarValueEditingChange:ee})]}),m&&a.jsx(Sx,{columns:Q,rows:O,onAddDiscountRate:U,dateErrors:A}),a.jsx(Lf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(bx,{onAddAllocationType:()=>l&&C(!0),onAddRequiredResource:()=>l&&_(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
|
|
52
|
+
`),L}Ya(()=>{Z.current=void 0,W.current=void 0,H.current=Se});const Ae=le.useMemo(()=>le.createElement(x,{...Se,ref:k}),[k,x,Se]);return le.useMemo(()=>g?le.createElement(O.Provider,{value:M},Ae):Ae,[O,Ae,M])}const j=le.memo(S);if(j.WrappedComponent=x,j.displayName=S.displayName=v,c){const E=le.forwardRef(function(R,O){return le.createElement(j,{...R,reactReduxForwardedRef:O})});return E.displayName=v,E.WrappedComponent=x,ed(E,x)}return ed(j,x)}}var N_=k_;function O_({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=le.useMemo(()=>{const u=mx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=le.useMemo(()=>e.getState(),[e]);Ya(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),l!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,l]);const c=t||An;return le.createElement(c.Provider,{value:i},n)}var Vn=O_;function yx(e=An){const t=e===An?dx:Mf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var T_=yx();function P_(e=An){const t=e===An?T_:yx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var he=P_();Lj(Dj.useSyncExternalStoreWithSelector);S_(w.useSyncExternalStore);const tn="https://allocations.access-ci.org",re={creditAlertThreshold:1e3,resourceTypeIcons:{credit:"cash-coin",compute:"cpu-fill",storage:"hdd-fill",program:"person-square"},routes:{edit_request_action_path:(e,t)=>`/requests/${e}/actions/${t}/edit`,edit_request_path:e=>`/requests/${e}/edit`,how_to_path:()=>"/how-to",get_your_first_project_path:()=>`${tn}/get-your-first-project`,profile_path:()=>`${tn}/profile`,project_types_path:()=>`${tn}/project-types`,projects_path:()=>`${tn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${tn}/requests/${e}/renew`,request_action_path:(e,t)=>`${tn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${tn}/requests/${e}/actions`,request_path:e=>`${tn}/requests/${e}`,resources_path:()=>`${tn}/resources`,search_people_path:()=>`${tn}/search/people`,usage_detail_path:(e,t)=>`/usage/${e}/${t}`},roleIcons:{PI:"person-fill-check","Co-PI":"person-fill-add","Allocation Manager":"person-fill-gear",User:"people-fill"}},ho=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},I_=e=>new Date(`${e}T00:00:00`),$_={year:"numeric",month:"short",day:"numeric"},mo=(e,t)=>I_(e).toLocaleString("en-us",t||$_),rt=(e,{abbreviate:t=!1,decimalPlaces:n=void 0}={})=>{if(t){let r=0;for(;Math.abs(e)/Math.pow(1e3,r)>=1e3;)r+=1;const o=["","K","M","B","T","Q"][r];return`${(e/Math.pow(1e3,r)).toLocaleString("en-US",{maximumSignificantDigits:3})}${o}`}return e.toLocaleString("en-US",{maximumFractionDigits:n,minimumFractionDigits:n})},Ff=(e,t)=>{if(e.startDate&&e.endDate){const o=mo(e.startDate,t),s=mo(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=mo(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},Nn=e=>a.jsx("i",{className:`bi bi-${e}`}),ai=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},cm=e=>{const t=ai(e.name);return t.short||t.full},Qa=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||cm(e)<cm(t)?-1:1,um=(...e)=>{for(let t of e)if(t!=null)return t;return null},xx=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Lf=e=>e?a.jsxs(a.Fragment,{children:[Nn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[Nn("x-circle")," No"]}),Uf=e=>xx(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),dm=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,M_=(e,t,n)=>`${rt(t)} ${dm(n,t)} / ${dm(e,1)}`,bx=e=>{let t=0,n=0;for(let r of e.resources){if(r.isBoolean)continue;let{unitCost:o}=r.exchangeRates.base;t+=r.allocated*o,n+=Math.min(r.used,r.allocated)*o}return t>0?n/t:0},$l=[{role:"pi",name:"PI",xrasRole:"PI"},{role:"co_pi",name:"Co-PI",xrasRole:"CoPI"},{role:"allocation_manager",name:"Allocation Manager",xrasRole:"Allocation Manager"},{role:"user",name:"User",xrasRole:"User"}],wx={};for(let e of $l)wx[e.role]=e;const td={};for(let{role:e,xrasRole:t}of $l)td[e]=t;const nd=["info","success","secondary","warning","danger"];function rd(e,t="total"){const n=e.exchangeRates[e.requested<=e.allocated?"base":"current"].unitCost;let r=(e.requested-e.allocated)*n;return t!="total"?r:r+e.allocated*e.exchangeRates.base.unitCost}function li(e){e&&(re.routes={...re.routes,...e})}const od={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Ac={};function Sx(e,t=3){let n=0;for(;e/Math.pow(1e3,n)>1e3;)n+=1;const r=e.toString().length,o=Math.pow(10,r-t);return(Math.round(e/o)*o/Math.pow(1e3,n)).toString()+["","K","M","B","T"][n]}async function A_(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function D_(e){if(Ac[e])return Ac[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return Ac[e]=o,o}function F_(e){const t=[...e.creditLines.features.map(r=>r.properties.credits)],n=[...e.rpPoints.features.map(r=>r.properties.rpCredits),...e.userPoints.features.map(r=>r.properties.userCredits)];return{lines:pm(t),points:pm(n)}}function fm({activeOrg:e,basemapStyle:t,creditLevels:n,creditType:r,geoJSON:o,organizationType:s}){const i={},l=[];if(o&&n){const u=s==="user"?"rp":"user",d=o[`${s}Points`],f=o[`${u}Points`],p=`${s}Credits`,m=`${u}Credits`;i.organizations={type:"geojson",data:d};const g={user:[],rp:[]},y=[];n.points.forEach((h,v)=>{Object.keys(od).forEach(b=>{g[b].push(h[1],od[b].colors[v])}),y.push(h[1],5*(v+1))});const x=[];if(n.lines.forEach((h,v)=>{x.push(h[1],1*(v+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...y],"circle-color":["interpolate",["linear"],["get",p],...g[s]],"circle-opacity":e?["match",["id"],e.id,1,.3]:1,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),e&&r!=="allocated"){i.opp={type:"geojson",data:f};const h=["get",e.id.toString(),["get",`${m}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${m}Map`]],paint:{"circle-radius":["interpolate",["linear"],h,...y],"circle-color":["interpolate",["linear"],h,...g[u]],"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),i.credits={type:"geojson",data:o.creditLines},l.push({id:"credits",type:"line",source:"credits",filter:["==",["get",`${s}_organization_id`],e.id],paint:{"line-color":"#444444","line-opacity":.4,"line-width":["interpolate",["linear"],["get","credits"],...x]}})}}const c=t||{version:8,sources:{},layers:[]};return{...c,sources:{...c.sources,...i},layers:[...c.layers.filter(u=>u.id!=="Marine waterbody/label/2x large"),...l]}}function L_(e,t,n,r,o=20){return[...Array(o+1).keys()].map(s=>s/o).map(s=>{let i=s*(n-e)+e,l=s*(r-t)+t+Math.abs(Math.sin(s*Math.PI)*(n-e)*.1);return[i,l]})}function U_(e,t,n){const r={};return e.features.forEach(s=>r[s.id]={type:s.type,geometry:s.geometry,id:s.id,properties:{name:s.properties.name,abbr:s.properties.abbr,userCredits:0,userCreditsMap:{},rpCredits:0,rpCreditsMap:{}}},{}),{creditLines:{type:"FeatureCollection",features:t.result.filter(s=>r[s.user_organization_id]!==void 0&&(n==="allocated"||r[s.rp_organization_id]!==void 0)).map(s=>{const i=r[s.user_organization_id],l=r[s.rp_organization_id];if(i.properties.userCredits+=s.credits,l&&(l.properties.rpCredits+=s.credits),i.properties.userCreditsMap[s.rp_organization_id]=(i.properties.userCreditsMap[s.rp_organization_id]||0)+s.credits,l&&(l.properties.rpCreditsMap[s.user_organization_id]=(l.properties.rpCreditsMap[s.user_organization_id]||0)+s.credits),n!=="allocated")return{type:"Feature",geometry:{type:"LineString",coordinates:L_(...r[s.user_organization_id].geometry.coordinates,...r[s.rp_organization_id].geometry.coordinates)},properties:s}}).filter(s=>s!==void 0)},userPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.userCredits>0).sort((s,i)=>s.properties.userCredits>i.properties.userCredits?-1:1)},rpPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.rpCredits>0).sort((s,i)=>s.properties.rpCredits>i.properties.rpCredits?-1:1)}}}function pm(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=V_(e,n),s=r===t.length-1?"+":"";return[`${Sx(Math.round(o))}${s}`,o]})}function V_(e,t){e.sort((s,i)=>s-i);const n=(e.length-1)*t,r=Math.floor(n),o=n-r;return e[r+1]!==void 0?e[r]+o*(e[r+1]-e[r]):e[r]}const z_="_fullscreen_1iid9_6",B_="_map_1iid9_14",Mi={"allocations-map":"_allocations-map_1iid9_1",fullscreen:z_,map:B_},q_="_group_11k83_1",H_="_button_11k83_6",W_="_icon_11k83_16",Dc={group:q_,button:H_,icon:W_};function hm({choices:e,disabledValues:t=[],label:n,value:r,setValue:o}){const s=[];return e.forEach(([i,l])=>s.push(a.jsx("input",{type:"radio",className:"btn-check",name:i,id:i,autoComplete:"off",checked:r===i,onChange:()=>o(i),disabled:t.includes(i)},i),a.jsxs("label",{className:`btn btn-outline-primary ${Dc.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Dc.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Dc.group}`,role:"group","aria-label":n,children:s})})}const K_="_controls_1be4t_1",G_={controls:K_};function Y_({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:G_.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(hm,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(hm,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const Q_="_legend_odgg9_1",X_="_symbols_odgg9_17",Z_="_symbol_odgg9_17",oa={legend:Q_,symbols:X_,symbol:Z_};function J_(e,t){const n=2*e+2;return a.jsx("svg",{viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg",stroke:"white",strokeWidth:"1",height:n,width:n,children:a.jsx("circle",{fill:t,cx:e+1,cy:e+1,r:e})})}function eE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:oa.symbol,children:[J_(5*(s+1),od[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:oa.legend,children:[a.jsxs("h2",{className:"fs-6 mt-0 mb-0",children:["ACCESS Credits ",a.jsx("small",{children:"or credit equivalents"})]}),a.jsx("div",{className:oa.symbols,children:r})]})}const tE="_info_oxxoh_1",nE="_user_oxxoh_7",rE="_rp_oxxoh_10",oE="_credits_oxxoh_15",sa={info:tE,user:nE,rp:rE,credits:oE};function mm(e,t,n){e.sort((o,s)=>s[1]-o[1]);const r=e.slice(0,3).map(o=>o[0]);return e.length>3&&(r[2]=`${e.length-2} other ${n}s`),r.reduce((o,s,i,l)=>[o,a.jsx("span",{className:`name ${sa[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function sE({activeOrg:e,creditType:t,organizationMap:n,organizationType:r}){if(!e||!n)return;const o=e.properties,s=o[`${r}Credits`],i=r==="rp"?"user":"rp",l=JSON.parse(o[`${r}CreditsMap`]),c={user:[],rp:[]};return c[r].push([o.name,s]),Object.keys(l).forEach(u=>c[i].push([n[u],l[u]])),a.jsx("div",{className:`${oa.legend} ${sa.info}`,children:a.jsxs("p",{className:sa[r],children:["Researchers at ",mm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:sa.credits,children:[Sx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",mm(c.rp,"rp","resource provider")]}):"","."]})})}function iE(){const e=w.useRef(null),t=w.useRef(null),[n,r]=w.useState(null),[o,s]=w.useState(null),[i,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[p,m]=w.useState(null),[g,y]=w.useState(null),[x,h]=w.useState("user"),[v,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await A_()))()},[]),w.useEffect(()=>{(async S=>{const[C,j]=await Promise.all(["organizations",`credits_${S}`].map(D_));if(!g){const E={};C.features.forEach(k=>E[k.id.toString()]=k.properties.name),y(E)}const _=U_(C,j,v);f(_),S==="exchanged"&&!i&&l(F_(_))})(v)},[v]),w.useEffect(()=>{p&&p.setStyle(fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:v,geoJSON:d,organizationType:x}))},[n,d,p,x]),w.useEffect(()=>{p&&(p.on("mousemove","organizations",S=>r(S.features.length?S.features[0]:null)),p.on("mouseleave","organizations",()=>r(null)))},[p]),w.useEffect(()=>{p&&p.resize()},[c]),w.useEffect(()=>{v==="allocated"&&h("user")},[v]),w.useLayoutEffect(()=>m(new maplibregl.Map({container:t.current,style:fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:v,geoJSON:d,organizationType:x}),center:[-111.01,38.88],zoom:3.4,hash:!0})),[]),w.useLayoutEffect(()=>e.current.addEventListener("keydown",S=>{S.key==="Escape"&&u(!1)}),[]),a.jsxs("section",{className:`${Mi["allocations-map"]} ${c?Mi.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:Mi.map,ref:t}),a.jsx(Y_,{creditType:v,fullscreen:c,organizationType:x,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(eE,{activeOrg:n,creditLevels:i,organizationType:x}),a.jsx(sE,{activeOrg:n,creditType:v,organizationMap:g,organizationType:x}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:Mi.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const aE=async(e,t)=>{try{const n=await fetch(`${e}/resources`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resources:t.map((o,s)=>({resource_id:o.resource_id,relative_order:s+1}))})});if(!n.ok){const o=await n.json();throw new Error(o.error||"Failed to update resource order")}const r=await n.json();console.log(r.message)}catch(n){console.error("Error updating resource order:",n)}},gm=e=>[...e].sort((t,n)=>t.relative_order===null&&n.relative_order===null?t.display_resource_name.localeCompare(n.display_resource_name):t.relative_order===null?1:n.relative_order===null?-1:t.relative_order-n.relative_order),vm=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},Fc=e=>{e.current&&(clearInterval(e.current),e.current=null)},lE="_dragging_1vb1t_45",qt={"resources-container":"_resources-container_1vb1t_1","drag-instruction":"_drag-instruction_1vb1t_6","resources-list":"_resources-list_1vb1t_12","resources-header":"_resources-header_1vb1t_18","resources-item":"_resources-item_1vb1t_28",dragging:lE,"drag-handle":"_drag-handle_1vb1t_52","resource-name":"_resource-name_1vb1t_61","resource-repo":"_resource-repo_1vb1t_65","resource-link":"_resource-link_1vb1t_71"};var Cx={exports:{}},cE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",uE=cE,dE=uE;function jx(){}function _x(){}_x.resetWarningCache=jx;var fE=function(){function e(r,o,s,i,l,c){if(c!==dE){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_x,resetWarningCache:jx};return n.PropTypes=n,n};Cx.exports=fE();var pE=Cx.exports;const q=ei(pE),hE=(e,t)=>{switch(t.type){case"SET_RESOURCE_DATA":return{...e,resourceData:t.payload,loading:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_SUCCESS_MESSAGE":return{...e,successMessage:t.payload};case"SET_ERRORS":return{...e,errors:Array.isArray(t.payload)?t.payload:[t.payload],loading:!1};case"UPDATE_RESOURCE_FIELD":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,[t.field]:t.value}}};case"UPDATE_ALLOCATION":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,allocation_types:e.resourceData.resource_details.allocation_types.map(n=>n.allocation_type_id===t.payload.allocationTypeId?{...n,...t.payload.updates}:n)}}};case"UPDATE_BASE_RATE":return console.log("Reducer: Updating base rate to:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,base_rate:t.payload}}}};case"UPDATE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.map(n=>n.id===t.payload.rateId?{...n,...t.payload.changes}:n)}}}};case"ADD_EXCHANGE_RATE":return console.log("Reducer: Adding new discount rate:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:[...e.resourceData.resource_details.exchange_rates.discount_rates||[],t.payload]}}}};case"DELETE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.filter(n=>n.id!==t.payload)}}}};default:return e}},sd=e=>({type:"SET_RESOURCE_DATA",payload:e}),mE=e=>({type:"SET_LOADING",payload:e}),ym=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Jo=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Lc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),gE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),vE=async(e,t,n,r)=>(console.log("update resource",n),await fetch(`${t}/resources/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resource:n,required_resources:r})})),yE=(e,t)=>{const[n,r]=w.useReducer(hE,{resourceData:null,loading:!0,errors:[],successMessage:{message:"",color:""}}),o=w.useCallback(async(i,l)=>{let c=[l];try{const u=await i.json();u.errors?c=u.errors:u.message&&(c=[u.message])}catch(u){console.error("Error parsing error response:",u)}r({type:"SET_ERRORS",payload:c})},[]),s=w.useCallback(async()=>{r(mE(!0));try{const i=await gE(e,t);r(sd(i))}catch(i){console.error("Failed to fetch resource data:",i),r({type:"SET_ERRORS",payload:"Failed to fetch resource data. Please try again later."})}},[e,t]);return w.useEffect(()=>{s()},[s]),{state:n,dispatch:r,handleError:o,fetchData:s}},Vf=e=>{var t,n,r;return{allowedActionsOptions:((t=e==null?void 0:e.resource_state_types_available)==null?void 0:t.map(o=>({value:o.resource_state_type_id,label:o.display_resource_state_type,additionalInfo:o.action_types.map(s=>s.display_action_type).join(", ")})))||[],resourceTypesOptions:((n=e==null?void 0:e.resource_types_available)==null?void 0:n.map(o=>({value:o.resource_type_id,label:o.display_resource_type})))||[],unitTypesOptions:((r=e==null?void 0:e.unit_types_available)==null?void 0:r.map(o=>({value:o.unit_type_id,label:o.display_unit_type})))||[],availableResources:(e==null?void 0:e.required_resources_available)||[],availableAllocationTypes:(e==null?void 0:e.unassigned_allocation_types)||[]}},xE=(e,t,n,r,o,s,i)=>{const c=(()=>{var p;if(!e)return[];const f=new Set;return(p=e.allocation_types)==null||p.forEach(m=>{var g;(g=m.required_resources)==null||g.forEach(y=>{f.add(y.resource_name)})}),Array.from(f).sort((m,g)=>m.localeCompare(g)).map(m=>({key:m,name:`Require ${m}`,width:150,type:"checkbox"}))})();return{allocationColumns:[{key:"display_name",name:"Allocation Type",width:200},{key:"allowed_actions",name:"Allowed Actions",width:200,type:"select"},{key:"comment",name:"Descriptive Text",width:200,type:"input",tooltip:"Appears below the resource name and allocations description in the form when making a new request"},...c],allocationRows:e!=null&&e.allocation_types?e.allocation_types.map(f=>{var p;return{display_name:f.display_name,allocation_type_id:f.allocation_type_id,allowed_actions:{options:r,value:((p=f.allowed_action)==null?void 0:p.resource_state_type_id)||"",onChange:m=>o(f.allocation_type_id,m)},comment:{value:f.comment||"",onChange:m=>s(f.allocation_type_id,m)},...Object.fromEntries(c.map(m=>{var g;return[m.key,{checked:((g=f.required_resources)==null?void 0:g.some(y=>y.resource_name===m.key))||!1,onChange:y=>i(f.allocation_type_id,m.key,y,f)}]}))}}):[],requiredResourcesColumns:c}},bE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=Vf(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,m]=w.useState(""),g=w.useCallback((C,j)=>{n(Lc(C,{allowed_action:{resource_state_type_id:j}}))},[n]),y=w.useCallback((C,j)=>{n(Lc(C,{comment:j}))},[n]),x=w.useCallback((C,j,_,E)=>{const k=_?[...E.required_resources||[],{resource_name:j,required_resource_id:e.required_resources_available.find(R=>R.resource_name===j).resource_id}]:(E.required_resources||[]).filter(R=>R.resource_name!==j);n(Lc(C,{required_resources:k}))},[e,n]);w.useEffect(()=>{if(i&&t){const C=t.allocation_types.flatMap(j=>j.required_resources||[]).map(j=>j.required_resource_id);f(C)}},[i,t]);const h=w.useCallback((C,j)=>{f(_=>j?[..._,C]:_.filter(E=>E!==C))},[]),v=w.useCallback(()=>{const C=t.allocation_types.flatMap(k=>k.required_resources||[]).map(k=>k.required_resource_id),j=d.filter(k=>!C.includes(k)),_=C.filter(k=>!d.includes(k)),E=t.allocation_types.map(k=>{const R=k.required_resources||[],O=j.map(P=>{const A=r.find(D=>D.resource_id===P);return{resource_name:A.resource_name,required_resource_id:A.resource_id}}),N=R.filter(P=>!_.includes(P.required_resource_id)).concat(O.filter(P=>!R.some(A=>A.required_resource_id===P.required_resource_id)));return{...k,required_resources:N}});n(sd({...e,resource_details:{...t,allocation_types:E}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(C=>{const j=C.target.value;m(j)},[]),S=w.useCallback(()=>{var _,E;if(!p)return;const C=o.find(k=>k.allocation_type_id.toString()===p),j=(_=t.allocation_types)==null?void 0:_.some(k=>k.allocation_type_id===C.allocation_type_id);if(C&&!j){const k=(E=s[0])==null?void 0:E.value,R=[...t.allocation_types||[],{allocation_type_id:C.allocation_type_id,display_name:C.display_name,allowed_action:{resource_state_type_id:k},comment:"",required_resources:[]}];n(sd({...e,resource_details:{...t,allocation_types:R}})),u(!1)}},[p,o,t,e,n,s]);return{showAddResourceModal:i,setShowAddResourceModal:l,showAddAllocationTypeModal:c,setShowAddAllocationTypeModal:u,selectedNewResource:d,handleSelectNewResource:h,handleSaveResources:v,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:g,handleCommentChange:y,handleRequiredResourceChange:x}},wE=(e,t,n,r,o,s)=>w.useCallback(async()=>{var c,u,d;if(!e)return;const i={resource_name:e.resource_name,description:e.description,resource_type_id:e.resource_type_id,unit_type_id:e.unit_type_id,dollar_value:e.dollar_value,allocation_types:e.allocation_types.map(f=>{var p;return{allocation_type_id:f.allocation_type_id,allowed_action:{resource_state_type_id:(p=f.allowed_action)==null?void 0:p.resource_state_type_id},comment:f.comment||""}}),exchange_rates:{base_rate:(c=e.exchange_rates)==null?void 0:c.base_rate,discount_rates:(d=(u=e.exchange_rates)==null?void 0:u.discount_rates)==null?void 0:d.map(f=>({id:f.id,exchange_rate:f.exchange_rate,begin_date:f.begin_date,end_date:f.end_date}))}},l={};e.allocation_types.forEach(f=>{f.required_resources.forEach(p=>{l[p.required_resource_id]||(l[p.required_resource_id]=[]),l[p.required_resource_id].push(f.allocation_type_id)})});try{const f=await vE(t,n,i,l);if(f.ok){const p=await f.json();return s(ym(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(ym("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),SE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},CE={"form-wrapper":"_form-wrapper_mu0yh_1"},Xa=({show:e,onClose:t,title:n,children:r,onSave:o,buttonText:s,cancelText:i="Cancel",canSave:l=!0})=>e?a.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",zIndex:1050},children:a.jsx("div",{className:"modal fade in",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{width:"90%",maxWidth:"600px",maxHeight:"90%",overflow:"auto",backgroundColor:"white",position:"relative"},children:a.jsx("div",{className:"modal-dialog",role:"document",children:a.jsxs("div",{className:"modal-content",children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:t,"aria-label":"Close",children:a.jsx("h3",{"aria-hidden":"true",className:"text-danger",children:"×"})}),a.jsx("h3",{className:"modal-title",children:n})]}),a.jsx("div",{className:"modal-body",children:r}),a.jsxs("div",{className:"modal-footer",style:{padding:"15px",textAlign:"right",borderTop:"1px solid #e5e5e5",backgroundColor:"#f8f9fa"},children:[a.jsx("button",{className:"btn btn-danger",onClick:t,children:i}),a.jsx("button",{className:"btn btn-success",onClick:o,disabled:!l,children:s})]})]})})})}):null;Xa.propTypes={show:q.bool.isRequired,onClose:q.func.isRequired,title:q.string.isRequired,children:q.node.isRequired,onSave:q.func.isRequired,buttonText:q.string,cancelText:q.string,canSave:q.bool};const je=({children:e,color:t,dismissable:n=!1})=>a.jsxs("div",{className:`alert alert-${t} mt-3 alert-dismissible show`,role:"alert",children:[e,n&&a.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",children:a.jsx("span",{"aria-hidden":"true",children:"×"})})]}),Eo=({label:e,options:t,value:n,onChange:r,...o})=>a.jsxs("div",{className:"form-group",children:[e&&a.jsx("label",{children:e}),a.jsx("select",{className:"form-control",value:n,onChange:r,...o,children:t.map(s=>a.jsxs("option",{value:s.value,children:[s.label,s.additionalInfo&&` - ${s.additionalInfo}`]},s.value))})]});Eo.propTypes={label:q.string,options:q.arrayOf(q.shape({value:q.oneOfType([q.string,q.number]).isRequired,label:q.string.isRequired,additionalInfo:q.string})).isRequired,value:q.oneOfType([q.string,q.number]),onChange:q.func.isRequired};function fs({label:e,type:t="text",value:n,onChange:r,disabled:o=!1,infoText:s="",style:i,inputClassName:l,inputAddon:c}){return a.jsxs(a.Fragment,{children:[e&&a.jsx("label",{children:e}),s&&a.jsx("small",{className:"form-text help-block",children:s}),t==="textarea"?a.jsx("textarea",{className:`form-control ${l||""}`,value:n,onChange:r,disabled:o,rows:"6"}):c?a.jsxs("div",{className:"input-prepend",children:[a.jsx("span",{className:"add-on",children:c}),a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]}):a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]})}const jE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:jE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},zf=({headerText:e,header:t,children:n,isEditing:r=!1,onEditingChange:o,warningMessage:s=""})=>{const i=e&&e.type==="label";return a.jsxs("div",{className:yn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:yn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${yn["header-buttons-container"]} ${r?"":yn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${yn["alt-warning-banner"]}`:yn["warning-banner"],children:[a.jsxs("span",{className:yn["warning-text"],children:[a.jsx("strong",{children:"CAUTION! "})," ",s]}),a.jsx("button",{className:"btn btn-danger",onClick:()=>o(!0),children:"I understand the risks"})]}),a.jsx("div",{className:`${yn["content-container"]} ${r?"":yn.blurred}`,children:n})]})]})};zf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const Bf=Re.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){const d="Dollar Value per SUs",f=l?a.jsx(fs,{label:u?null:d,value:t.dollar_value,onChange:p=>o(Jo("dollar_value",p.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(fs,{label:"Resource Name",value:t.resource_name,onChange:p=>o(Jo("resource_name",p.target.value)),inputClassName:"span8"}),c&&a.jsx(fs,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(zf,{headerText:a.jsx("label",{children:d}),isEditing:s,onEditingChange:i,warningMessage:"Dollar value is for reporting and should only be modified if the SU rate changes.",children:f}):f,a.jsx(fs,{label:"Allocations Description",type:"textarea",value:t.description,infoText:"Appears below the resource name in the form when making a new request, as well as under the header Allocations Description in resource catalogs",onChange:p=>o(Jo("description",p.target.value)),inputClassName:"span8"}),a.jsx(Eo,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:p=>o(Jo("resource_type_id",p.target.value)),className:"span8"}),a.jsx(Eo,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:p=>o(Jo("unit_type_id",p.target.value)),className:"span8"})]})});Bf.propTypes={resourceDetails:q.object.isRequired,resourceTypesOptions:q.array.isRequired,unitTypesOptions:q.array.isRequired,dispatch:q.func.isRequired,isDollarValueEditing:q.bool,onDollarValueEditingChange:q.func,showDollarValue:q.bool,showResourceId:q.bool,useAdvancedSettings:q.bool};function Ex({onClose:e}){const[t,n]=w.useState(!0),[r,o]=w.useState([]),[s,i]=w.useState(null),[l,c]=w.useState(-1),[u,d]=w.useState(null),f=Vf(u);f.resourceTypesOptions.unshift({value:0,label:"Select a resource type..."}),f.unitTypesOptions.unshift({value:0,label:"Select a unit type..."}),w.useEffect(()=>{(async()=>{const v=await fetch("/resources/addable.json");n(!1),v.status==200?o(await v.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const v=await fetch(`/resources/addable/${l}.json`);v.status==200?d(await v.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(je,{color:"danger",children:s}):r.length==0&&(p=a.jsx(je,{children:"There are currently no resources available to add."}));const m=[{value:-1,label:"Select a resource..."}].concat(r.map(v=>({value:v.xras_cider_resource_id,label:v.resource_descriptive_name}))),g=u?u.resource_details:null,y=!s&&g&&g.resource_name.length>0&&g.resource_type_id>0&&g.unit_type_id>0,x=v=>{v.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[v.field]:v.value}})},h=()=>{(async()=>{const v=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...g,resource_repository_key:l})});if(v.status==200){const b=await v.json();window.location=`/resources/${b.resource_id}`}else i("Error saving resource.")})()};return p===null&&(p=a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Select a Resource to Add"}),a.jsx(Eo,{options:m,onChange:v=>c(parseInt(v.target.value))}),!u&&l!==-1?a.jsx("p",{children:"Loading…"}):null,u&&a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Properties"}),a.jsx("p",{style:{fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"}),a.jsx("div",{className:CE["form-wrapper"],children:a.jsx(Bf,{resourceDetails:g,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:x})})]})]})),a.jsx(Xa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:h,buttonText:"Save",canSave:y,children:p})}Ex.propTypes={onClose:q.func.isRequired};function _E({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>gm(e),[e]),s=w.useMemo(()=>gm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",m="Inactive",[g,y]=w.useState(p),x=C=>{y(C),console.log(C),C==p?l(o):l(s)};function h(C,j){j.preventDefault(),y(C),x(C)}w.useEffect(()=>{l(o)},[o]);const v=(C,j)=>{d.current=j},b=(C,j)=>{if(C.preventDefault(),d.current===j)return;const _=[...i],E=_[d.current];_.splice(d.current,1),_.splice(j,0,E),d.current=j,l(_);const{clientY:k}=C,R=130;k<R?vm(-1,f):window.innerHeight-k<R?vm(1,f):Fc(f)},S=()=>{d.current=null,Fc(f),aE(r,i)};return w.useEffect(()=>()=>Fc(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:qt["resources-container"],children:[n&&a.jsx("button",{className:"btn btn-primary pull-right",onClick:()=>u(!0),children:"Add a Resource from CIDeR"}),a.jsx("h2",{children:"Select a resource from the list to modify"}),a.jsx("p",{className:qt["drag-instruction"],children:"Drag items to reorder the list."}),a.jsxs("div",{className:"w-full max-w-md mx-auto p-4",children:[a.jsxs("ul",{className:"nav nav-tabs",children:[a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${g===p?"active":""}`,"data-toggle":g===p?"tab":void 0,style:{cursor:"default",...g===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:C=>h(p,C),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${g===m?"active":""}`,"data-toggle":g===m?"tab":void 0,style:{cursor:"default"},onClick:C=>h(m,C),children:m})})]}),a.jsxs("div",{className:qt["resources-list"],children:[a.jsxs("div",{className:qt["resources-header"],children:[a.jsx("span",{className:qt["header-name"],children:"Resource Name"}),a.jsx("span",{className:qt["header-repo"],children:"Repository Key"})]}),i.map((C,j)=>a.jsxs("div",{className:`${qt["resources-item"]}`,draggable:!0,onDragStart:_=>v(_,j),onDragOver:_=>b(_,j),onDrop:S,children:[a.jsx("span",{className:qt["drag-handle"]}),a.jsx("span",{className:qt["resource-name"],children:a.jsx("a",{href:`${r}/resources/${C.resource_id}`,className:qt["resource-link"],children:C.display_resource_name})}),a.jsx("span",{className:qt["resource-repo"],children:C.resource_repository_key||"N/A"})]},C.resource_id))]})]})]}),c&&a.jsx(Ex,{onClose:()=>u(!1)})]})}function Vr(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const EE="_grid_afccc_1",RE="_important_afccc_30",kE="_input_afccc_34",NE="_edited_afccc_38",OE="_disabled_afccc_46",TE="_scroll_afccc_59",Er={grid:EE,important:RE,input:kE,edited:NE,disabled:OE,scroll:TE};function PE({column:e,row:t,style:n={}}){const r=e.format?e.format(t[e.key],t):t[e.key],o=["cell"];return e.class&&o.push(e.class),e.rowClass&&o.push(e.rowClass(t)),a.jsx("td",{className:o.join(" "),style:n,children:r})}const qf=({title:e,placement:t,children:n})=>(w.useEffect(()=>($('[data-toggle="tooltip"]').tooltip(),()=>{$('[data-toggle="tooltip"]').tooltip("destroy")}),[]),a.jsx("span",{"data-toggle":"tooltip","data-placement":t,title:e,style:{margin:"10px"},children:n}));qf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};qf.defaultProps={placement:"top"};const IE="_datepicker_19wnv_1",$E="_error_19wnv_1",xm={datepicker:IE,error:$E},ME=({value:e,onChange:t,disabled:n=!1,style:r,className:o="",minDate:s="",maxDate:i="",error:l=""})=>{const c=l;return a.jsx("div",{className:`w-full ${o}`,children:a.jsx("input",{type:"date",style:r,className:`${xm.datepicker} ${c?xm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},es=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},AE={text:PE,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Eo,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>es(t,e,r.target.value),style:{width:"100%",margin:0}})}),input:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(fs,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>es(t,e,r.target.value),style:{width:"92%",margin:0}})}),checkbox:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx("input",{type:"checkbox",checked:t[e.key].checked,onChange:r=>es(t,e,r.target.checked)})}),date:({column:e,row:t,style:n})=>{const r=t[e.key];return!(r!=null&&r.value)&&typeof r!="object"?a.jsx("td",{style:n,children:r||""}):a.jsx("td",{style:n,children:a.jsx(ME,{value:r.value,onChange:o=>es(t,e,o),disabled:r.disabled,style:{width:"92%",margin:0},minDate:e.minDate,maxDate:e.maxDate,error:r.error})})},action:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:t.rate_type==="Discount"&&a.jsx("button",{className:"btn btn-link text-danger",onClick:()=>{var r;return es(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function hn({columns:e,rows:t,classes:n,frozenColumns:r=0,minWidth:o,rowClasses:s=[],scroll:i=!0,scrollBehavior:l="smooth",scrollRowIndex:c=0}){const u=w.useRef();w.useLayoutEffect(()=>{if(!i||!u.current)return;const y=u.current.querySelector(`tbody tr:nth-child(${c+1})`);y&&y.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(e[y].width||100);const f=(y,x)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${e[y].width||100}px`,width:`${e[y].width||100}px`,zIndex:x||1}:{},p=e.map((y,x)=>a.jsxs("th",{className:y.headerClass||y.class||"",style:f(x,100),children:[y.formatHeader?y.formatHeader(y.name,y):y.name,y.tooltip&&a.jsx(qf,{title:y.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},y.key)),m=t.map((y,x)=>{const h=e.map((v,b)=>{const S=AE[v.type||"text"];return a.jsx(S,{column:v,row:y,style:f(b)},v.key)});return a.jsx("tr",{className:s[x]||"",children:h},x)}),g={};return o&&(g.minWidth=o),a.jsx("div",{className:`${Er.grid} ${i?Er.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:g,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:m})]})})}const id={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},Rx=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:id["header-buttons"],children:[a.jsxs("button",{className:"btn btn-primary",onClick:e,children:[a.jsx("i",{className:"fa fa-plus"})," Add Allocation Type"]}),a.jsxs("button",{className:"btn btn-primary",onClick:t,children:[a.jsx("i",{className:"fa fa-plus"})," Add Required Resource"]})]});Rx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const kx=Re.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:id["allocation-types-grid"],children:[a.jsx(hn,{columns:t,rows:n,rowClasses:Array(n.length).fill(id["vertical-align-center"]),scroll:!1}),a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Note: You may need to contact your Allocations Coordinator if you have added this resource to an allocation type."})]})});kx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const qr={"exchange-rates-grid":"_exchange-rates-grid_5qkd5_1","header-container":"_header-container_5qkd5_5","header-buttons":"_header-buttons_5qkd5_11","vertical-align-center":"_vertical-align-center_5qkd5_18","error-summary":"_error-summary_5qkd5_35"},Nx=Re.memo(function({columns:t,rows:n,onAddDiscountRate:r,dateErrors:o=[]}){return a.jsxs("div",{className:qr["exchange-rates-grid"],children:[a.jsxs("div",{className:qr["header-container"],children:[a.jsx("h2",{className:qr["header-title"],children:"Exchange Rates"}),a.jsx("div",{className:qr["header-buttons"],children:a.jsxs("button",{className:"btn btn-primary",onClick:r,children:[a.jsx("i",{className:"fa fa-plus"})," Add Discount Rate"]})})]}),a.jsx(hn,{columns:t,rows:n,rowClasses:Array(n.length).fill(qr["vertical-align-center"]),scroll:!1}),o.length>0&&a.jsx("div",{className:qr["error-summary"],children:a.jsx("ul",{children:o.map((s,i)=>a.jsx("li",{children:s},i))})})]})});Nx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const DE=(e,t)=>{const n=w.useCallback(m=>{var y,x;t({type:"DELETE_EXCHANGE_RATE",payload:m}),(((x=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:x.discount_rates.filter(h=>h.id!==m))||[]).forEach(h=>{h.begin_date&&h.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:h.id,changes:{start_date_error:"",end_date_error:""}}})})},[t,e]),r=[{key:"rate_type",name:"Rate Type",width:150},{key:"rate",name:"Exchange Rate",width:100,type:"input",tooltip:"Exchange rate is the cost in ACCESS Credits of one resource unit. ACCESS Credits / exchange rate = resource units"},{key:"conversion",name:"Resource Units per ACCESS Credit",width:150},{key:"start_date",name:"Start Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"end_date",name:"End Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"actions",name:"",width:80,type:"action",onChange:n}],o=m=>{t({type:"UPDATE_BASE_RATE",payload:m})},s=(m,g)=>{const y={exchange_rate:g},x={};g?x.rate_error="":x.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...y,...x}}})},i=()=>{var y,x;const m=[];return(((x=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:x.discount_rates)||[]).forEach(h=>{h.start_date_error&&m.push(h.start_date_error),h.end_date_error&&m.push(h.end_date_error),h.rate_error&&m.push(h.rate_error)}),m.filter((h,v)=>h&&h!==""&&(!h.includes("overlaps")||m.indexOf(h)===v))},l=m=>{const g=new Date(m);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(g)},c=(m,g,y,x)=>{const h=new Date(m).getTime(),v=new Date(g).getTime(),b=new Date(y).getTime(),S=new Date(x).getTime();return h<=S&&b<=v},u=(m,g)=>{let y="";if(m.begin_date&&m.end_date){const x=g.filter(h=>h.id!==m.id);for(const h of x)if(h.begin_date&&h.end_date&&c(m.begin_date,m.end_date,h.begin_date,h.end_date)){y=`The selected date range (${l(m.begin_date)} to ${l(m.end_date)}) overlaps with an existing discount rate (${l(h.begin_date)} to ${l(h.end_date)})`;break}}return y},d=(m,g,y)=>{var R,O;const x={start_date:"begin_date",end_date:"end_date"},h=N=>{const P=new Date(N);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},v=((O=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:O.discount_rates)||[],b=v.find(N=>N.id===m);if(!b)return;const S={[x[g]]:y},C={},j=g==="end_date",_=()=>{if(!y)return C[`${g}_error`]="Date cannot be empty or invalid",!1;const N=r.find(V=>V.key===g),P=(N==null?void 0:N.minDate)||"1900-01-01",A=(N==null?void 0:N.maxDate)||"2100-12-31",D=j&&b.begin_date?b.begin_date:P;return y<D?(C[`${g}_error`]=`${g.replace("_"," ")} ${h(y)} cannot be before ${h(D)}`,!1):y>A?(C[`${g}_error`]=`${g.replace("_"," ")} cannot be after ${h(A)}`,!1):(C[`${g}_error`]="",!0)},E=()=>{const N=g==="end_date"?y:b.end_date;if(g==="start_date"&&N){if(y>N)return C.end_date_error=`end date ${h(N)} cannot be before ${h(y)}`,!1;C.end_date_error=C.end_date_error||""}return!0},k=()=>{console.log("validating overlaps");const N=g==="start_date"?y:b.begin_date,P=g==="end_date"?y:b.end_date;if(N&&P){const A=u({...b,begin_date:N,end_date:P},v);return C.start_date_error=A,C.end_date_error=A,!A}return!0};if(!_()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...C}}});return}E(),k(),j&&!b.begin_date?C.start_date_error="Date cannot be empty or invalid":!j&&!b.end_date&&(C.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...C}}})},f=()=>{var C,j;const m=((j=(C=e==null?void 0:e.resource_details)==null?void 0:C.exchange_rates)==null?void 0:j.discount_rates)||[];let y=new Date;m.forEach(_=>{if(_.end_date){const E=new Date(_.end_date);E>y&&(y=E)}});const x=new Date(y);x.setDate(x.getDate()+1);const h=x.toISOString().split("T")[0],v=new Date(x);v.setDate(v.getDate()+15);const b=v.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:h,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const m=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,g=(m==null?void 0:m.base_rate)??"",y=(m==null?void 0:m.discount_rates)||[],x=new Date().toISOString().split("T")[0],h=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",v=C=>!C||Number(C)===0?"-":`${(1/Number(C)).toFixed(2)} ${h}`;return[{rate_type:"Base Rate",rate:{value:g.toString(),onChange:C=>o(C)},conversion:v(g)},...y.map(C=>{var k;const j=C.is_new||C.begin_date>x,_=j||C.begin_date==="",E=C.is_new||C.end_date>=x||C.end_date==="";return{rate_type:"Discount",rate:{value:((k=C.exchange_rate)==null?void 0:k.toString())||"",onChange:j?R=>s(C.id,R):null,disabled:!j},conversion:v(C.exchange_rate),start_date:{value:C.begin_date||"",onChange:R=>d(C.id,"start_date",R),error:C.start_date_error,disabled:!_},end_date:{value:C.end_date||"",onChange:R=>d(C.id,"end_date",R),error:C.end_date_error,disabled:!E},actions:{id:C.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function Ox({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=yE(e,t),{isEditing:l,handleEditingChange:c}=SE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,m=u==null?void 0:u.resource_details,g=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:y,resourceTypesOptions:x,unitTypesOptions:h,availableResources:v,availableAllocationTypes:b}=Vf(u),{showAddResourceModal:S,setShowAddResourceModal:C,showAddAllocationTypeModal:j,setShowAddAllocationTypeModal:_,selectedNewResource:E,handleSelectNewResource:k,handleSaveResources:R,selectedNewAllocationType:O,handleSelectNewAllocationType:N,handleSaveAllocationType:P,handleAllowedActionChange:A,handleCommentChange:D,handleRequiredResourceChange:V}=bE(u,m,o),{exchangeRateColumns:X,exchangeRateRows:T,handleAddDiscountRate:U,dateErrors:M}=DE(u,o),H=wE(m,e,t,i,s,o);w.useEffect(()=>{n&&M.length==0?n(H):n(null)},[H,n,M]);const{allocationColumns:z,allocationRows:W}=xE(m,v,E,y,A,D,V),[J,te]=w.useState(!1);return d?a.jsx(Vr,{}):f.length>0?a.jsx("div",{children:f.map((Z,ae)=>a.jsx(je,{color:"danger",dismissable:!0,children:Z},ae))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(je,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Propeties"}),a.jsx("div",{style:{marginBottom:"0.75rem"},children:a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"})}),a.jsx(Bf,{resourceDetails:m,resourceTypesOptions:x,unitTypesOptions:h,dispatch:o,isDollarValueEditing:J,onDollarValueEditingChange:te})]}),g&&a.jsx(Nx,{columns:X,rows:T,onAddDiscountRate:U,dateErrors:M}),a.jsx(zf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(Rx,{onAddAllocationType:()=>l&&_(!0),onAddRequiredResource:()=>l&&C(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
|
|
53
53
|
process settings can make a resource unavailable for allocation.
|
|
54
|
-
Please proceed with caution.`,children:a.jsx(wx,{columns:B,rows:W})}),a.jsx(Wa,{show:S,onClose:()=>_(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:g.map(X=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:E.includes(X.resource_id),onChange:ie=>N(X.resource_id,ie.target.checked)}),X.resource_name]},X.resource_id))})}),a.jsx(Wa,{show:j,onClose:()=>C(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Co,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(X=>({value:X.allocation_type_id,label:X.display_name}))],value:T,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}_x.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Le={error:"error",pending:"pending",success:"success"},Ka=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,pm=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,NE=(e,{grantNumber:t,projectManager:n,requestMasterId:r,requests:o,title:s,users:i},l)=>{t=t||r,o.sort((d,f)=>Ka(d)>Ka(f)?-1:1);const c=o.find(d=>d.timeStatus=="current"),u=c?c.requestId:null;e.projects[t]={currentRequestId:u,grantNumber:t,isManager:n,requestsList:o.map(d=>{const{actions:f,allocationType:p,endDate:y,requestId:m,startDate:h,status:x}=d,v=f.map(({entryDate:g})=>g).sort()[0].split("T")[0];return kE(e,d,{entryDate:v,grantNumber:t}),{allocationType:p,endDate:y,entryDate:v,requestId:m,startDate:h,status:x}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:y,lastName:m,organization:h,resources:x,role:v,username:g})=>{const b=x.filter(E=>E.userAccountState=="active"&&E.unitType!="ACCESS Credits"),S=b.map(E=>E.xrasResourceId),_=b.filter(E=>E.resourceProviderState=="pending-active").map(E=>E.xrasResourceId),j=x.filter(E=>E.userAccountState!="active").map(E=>E.xrasResourceId),C={};for(let E of b)C[E.xrasResourceId]=E.resourceUsername;return{eligibility:y,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:v,lastName:m,organization:h,resourceAccountPendingIds:_,resourceAccountInactiveIds:j,resourceIds:S,resourceUsernames:C,role:v,username:g}}).sort((d,f)=>pm(d)<pm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},kE=(e,{actions:t,allocationType:n,allowedActions:r,endDate:o,requestId:s,requestType:i,resources:l,startDate:c,status:u,timeStatus:d},{entryDate:f,grantNumber:p})=>{l=l||[];const y={actions:t.map(({actionId:x,actionStatusType:v,actionType:g,allowedOperations:b,approvedStartDate:S,detailAvailable:_,entryDate:j,isRequest:C,requestedStartDate:E,resources:N})=>({actionId:x,allowedOperations:b,detailAvailable:_,date:(j||S||E).split("T")[0],deleteStatus:null,isRequest:C,resources:N.map(rd).sort(Ha),showDeleteModal:!1,status:v,type:g})),allocationType:n,allowedActions:TE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(rd).filter(x=>x.isCredit||x.allocated>0).sort(Ha),resourcesReason:"",returnedForCorrections:!!t.find(x=>x.returnedForCorrections),returnedForCorrectionsNotes:t.map(x=>x.adminComments).join(","),showActionsModal:!1,showConfirmModal:!1,showResourcesModal:!1,startDate:c,status:u,timeStatus:d,type:i,usageDetail:null,usageDetailStatus:null,usesCredits:["Explore","Discover","Accelerate"].includes(n)};let m={};for(let x of y.actions)if(["Exchange","Transfer"].includes(x.type)&&["Submitted","Under Review","Incomplete"].includes(x.status)){y.exchangeActionId=x.actionId,y.exchangeActionEditable=x.status==="Incomplete";for(let v of x.resources)m[v.resourceId]=v;for(let v of y.resources)v.resourceId in m&&(v.requested+=m[v.resourceId].requested,delete m[v.resourceId]);y.resources.push(...Object.values(m).map(v=>({...v,isNew:!0})));break}const h=y.allowedActions.Exchange||y.allowedActions.Transfer;if(h){m={};for(let x of h.resources)m[x.resourceId]=x;for(let x of y.resources)x.resourceId in m&&(x.questions=m[x.resourceId].questions||[],x.requires=m[x.resourceId].requires||[])}y.resources.length&&!y.resources.find(x=>x.isCredit)&&y.resources.push(h&&h.resources.find(x=>x.isCredit)||{allocated:0,decimalPlaces:0,exchangeRates:{base:{type:"base",unitCost:1},current:{type:"base",unitCost:1}},icon:"credit",isActive:!0,isBoolean:!1,isCredit:!0,isFake:!0,name:"Credit Equivalents",requested:0,requires:[],resourceId:0,unit:"Credit Equivalents",used:0}),e.requests[s]=y},TE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(rd).sort(Ha),opportunityId:o,opportunityName:s};n in t?(Array.isArray(t[n])||(t[n]=[t[n]]),t[n].push(i)):t[n]=i}return"Transfer"in t&&!("Exchange"in t)&&(t.Exchange=t.Transfer),t},hm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,rd=({allocationState:e,amountAllocated:t,amountApproved:n,amountRequested:r,amountUsed:o,attributeSets:s,baseExchangeRate:i,currentExchangeRate:l,currentExchangeRateEndDate:c,currentExchangeRateType:u,dependentResourceXrasIds:d,displayResourceName:f,endDate:p,exchangeRate:y,organizationId:m,organizationFaviconUrl:h,organizationName:x,resourceRepositoryKey:v,resourceType:g,startDate:b,unitType:S,userGuideUrl:_,xrasResourceId:j})=>{const C=S=="Yes / No",E=S=="ACCESS Credits";return{allocated:po(rm(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:C?0:i||y},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:C?0:l||y}},icon:E?"credit":g.toLowerCase(),isActive:e=="active",isBoolean:C,isCredit:E,isFake:!1,isUnderReview:!1,isNew:!1,name:f.trim(),questions:(s||[]).filter(({isActive:N})=>N).sort(hm).map(N=>({attributeSetId:N.attributeSetId,attributes:N.attributes.sort(hm).map(R=>({required:R.isRequired,resourceAttributeId:R.resourceAttributeId,label:R.attributeName})),fieldType:N.attributeSetRelationType,label:N.attributeSetName,resourceId:j,values:[]})),resourceProvider:{organizationId:m,name:x,favicon:h},requested:po(rm(r,t)||0,0,"floor"),requires:d||[],resourceId:j,resourceRepositoryKey:v,startDate:b,type:g,unit:S,used:po(o||0,0,"ceil"),userGuideUrl:_}},mm=(e,t)=>{const n=t.allowedActions.Exchange;if(!n)return;const r={};for(let c of n.resources)r[c.resourceId]=c;const o=t.resources.map(c=>c.resourceId),s=r[e].requires||[];let i=!s.some(c=>o.includes(c));const l=[e,...i?s:[]].filter(c=>c in r&&!o.includes(c));t.resources.push(...l.map(c=>({...r[c],allocated:0,isNew:!0,used:0,requested:0})))},jx=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Oi=(e,t)=>{const n=Fe(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},sn=(e,t)=>e.projects[t.payload.grantNumber],Fe=(e,t)=>e.requests[t.payload.requestId],OE=(e,t)=>sn(e,t).users.find(({username:n})=>n==t.payload.username),od=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,gm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!jx(e.resourceIds,e.initialResourceIds),Cx=()=>document.querySelector("meta[name=csrf-token]").content,PE=async e=>{const t=new URLSearchParams({q:e});return(await(await fetch(`${ne.routes.search_people_path()}?${t}`)).json()).map(({eligible_reason:r,email:o,first_name:s,is_eligible:i,last_name:l,username:c,organization:u})=>({eligibility:i,eligibilityReason:r,email:o,firstName:s,lastName:l,username:c,organization:u}))},na=Ye("api/fetchProjectsList",async(e,{rejectWithValue:t})=>{const n=await fetch(`${ne.routes.projects_path()}.json`);return n.status==200?{username:e,projectsList:(await n.json()).result}:t({})}),Ex=Ye("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Rx=Ye("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ra=Ye("api/fetchUsageDetail",async({grantNumber:e,requestId:t,resourceRepositoryKey:n},{rejectWithValue:r})=>{const o=await fetch(`${ne.routes.usage_detail_path(e,n)}.json`);return o.status==200?{grantNumber:e,requestId:t,resourceRepositoryKey:n,usageDetail:(await o.json()).usage}:r({grantNumber:e,requestId:t,resourceRepositoryKey:n})}),oa=Ye("api/deleteAction",async({actionId:e,requestId:t},{getState:n,rejectWithValue:r})=>{const o=n().api.requests[t],s=o.actions.find(u=>u.actionId==e);if(!s||!s.allowedOperations||!s.allowedOperations.includes("Delete"))return r({actionId:e,requestId:t});const i=ne.routes.request_action_path(o.requestId,s.actionId),l={_method:"delete",authenticity_token:Cx()};return(await fetch(i,{body:Object.keys(l).map(u=>`${encodeURIComponent(u)}=${encodeURIComponent(l[u])}`).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},method:"POST"})).status==200?{actionId:e,requestId:t}:r({actionId:e,requestId:t})}),sa=Ye("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:y,requested:m,resourceId:h}of r.resources)if(m!=f&&!p){o[h]={resource_id:h,requested:1,amount:m-f};for(let{attributes:x,values:v,fieldType:g}of y)if(v.length){let b=x[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(g),j={resource_attribute_id:g=="multi_sel"?v:S?v[0]:b};S||(j.attribute_value=v[0]),s[b]=j}}const i={authenticity_token:Cx(),request_action:{action_type:r.allowedActions.Exchange.name,user_comments:r.resourcesReason,resource_attributes:s},requested_resources:o},l=r.exchangeActionId?ne.routes.request_action_path(r.requestId,r.exchangeActionId):ne.routes.request_actions_path(r.requestId),c=await fetch(`${l}.json`,{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:r.exchangeActionId?"PUT":"POST"});let u,d;try{const f=await c.json();u=f.errors,d=f.actionId}catch{u=["Unable to save exchange"],d=null}return c.status==200?{requestId:e,exchangeActionId:d}:n({requestId:e,exchangeActionId:d,errors:u})}),ia=Ye("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!jx(u.resourceIds,u.initialResourceIds)||u.isNew).length==0?[]:o.map(u=>({username:u.username,resources:u.resourceIds})),i=o.filter(u=>u.role!=u.initialRole).map(u=>({username:u.username,role:Xu[u.role],initialRole:Xu[u.initialRole]})),l={grantNumber:e,resourceChanges:s,roleChanges:i,authenticity_token:document.querySelector("meta[name=csrf-token]").content};return(await fetch(ne.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}})).status==200?{grantNumber:e}:n({grantNumber:e})}),Nx=ri({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Fe(e,t);mm(n,r)},addUser:(e,t)=>{const n=sn(e,t),r=e.requests[n.currentRequestId],{user:o}=t.payload;n.users.map(({username:s})=>s).includes(o.username)||(n.users.push({...o,resourceIds:r.resources.filter(od).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Fe(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Fe(e,t);n.resourcesReason="",n.resources=n.resources.filter(r=>r.isCredit||r.allocated).map(r=>({...r,requested:r.allocated}))},resetUsers:(e,t)=>{const n=sn(e,t);n.users=n.users.filter(({isNew:r})=>!r).map(r=>({...r,resourceIds:[...r.initialResourceIds],role:r.initialRole,hasChanges:!1}))},setRequest:(e,t)=>{const n=sn(e,t);n&&(n.selectedRequestId=t.payload.requestId,n.tab=="users"&&n.currentRequestId!=n.selectedRequestId&&(n.tab="overview"))},setResourceQuestionValues:(e,t)=>{const{attributeSetId:n,resourceId:r,values:o}=t.payload,s=Fe(e,t);for(let i of s.resources)if(i.resourceId==r){for(let l of i.questions)if(l.attributeSetId==n){l.values=o;break}break}},setResourceRequest:(e,t)=>{const{resourceId:n,requested:r}=t.payload,o=Fe(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&mm(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=Ju(l,"difference");s&&(s.requested=po(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Fe(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=sn(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=OE(e,t);n.role=t.payload.role,gm(n)},toggleActionsModal:(e,t)=>{const n=Fe(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Fe(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Oi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Fe(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=sn(e,t),r=e.requests[n.currentRequestId],{username:o,resourceId:s,checked:i}=t.payload,l=o?[n.users.find(c=>c.username==o)]:n.users;for(let c of l){if(s){let u=c.resourceIds.indexOf(s);i&&u==-1?c.resourceIds.push(s):!i&&u>=0&&c.resourceIds.splice(u,1)}else c.resourceIds=i?r.resources.filter(od).map(({resourceId:u})=>u):[];gm(c)}}},extraReducers:e=>{e.addCase(na.pending,t=>{t.projectListLoading=!0}).addCase(na.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Ka(r.requests[0])>Ka(o.requests[0])?-1:1),t.username=n.payload.username,t.projectsList=n.payload.projectsList.map(r=>{const{grantNumber:o,requestMasterId:s,requests:i,status:l,title:c}=r,d=r.requests.filter(f=>f.actions.filter(p=>p.returnedForCorrections).length>0).length>0?"Returned for Corrections":l||i&&(i.find(({timeStatus:f})=>f=="current")?"Active":i[0].timeStatus=="past"?"Inactive":i[0].status);return i&&NE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(na.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Ex.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Rx.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ra.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.usageDetailStatus=Le.pending}).addCase(ra.fulfilled,(t,n)=>{const r=Fe(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Le.success}).addCase(ra.rejected,(t,n)=>{const r=Fe(t,n);r.usageDetailStatus=Le.error}).addCase(oa.pending,(t,n)=>{const r=Oi(t,{payload:n.meta.arg});r.deleteStatus=Le.pending}).addCase(oa.fulfilled,(t,n)=>{const r=Fe(t,n),o=Oi(t,n);o.isRequest?(r.error="This request has been deleted.",o.allowedOperations=[]):r.actions=r.actions.filter(s=>s.actionId!=o.actionId),o.deleteStatus=Le.success,o.showDeleteModal=!1}).addCase(oa.rejected,(t,n)=>{const r=Oi(t,n);r.deleteStatus=Le.error}).addCase(sa.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.exchangeStatus=Le.pending,r.showResourcesModal=!1}).addCase(sa.fulfilled,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Le.success}).addCase(sa.rejected,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Le.error}).addCase(ia.pending,(t,n)=>{const r=sn(t,{payload:n.meta.arg});r.usersStatus=Le.pending}).addCase(ia.fulfilled,(t,n)=>{const r=sn(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Le.success}).addCase(ia.rejected,(t,n)=>{const r=sn(t,n);r.usersStatus=Le.error})}}),IE=e=>e.api.error,$E=e=>e.api.projectsList,AE=e=>e.api.projectListLoading,ME=(e,t)=>sn(e.api,{payload:{grantNumber:t}}),DE=(e,t)=>Fe(e.api,{payload:{requestId:t}}),FE=e=>e.api.username,{addResource:LE,addUser:UE,closeUsageDetailModal:VE,hideAlert:dD,resetResources:BE,resetUsers:zE,setRequest:qE,setResourceQuestionValues:HE,setResourceRequest:WE,setResourcesReason:KE,setTab:GE,setUserRole:YE,toggleActionsModal:QE,toggleConfirmModal:XE,toggleDeleteModal:ZE,toggleResourcesModal:JE,toggleUsersResources:eR}=Nx.actions,tR=Nx.reducer,nR=e=>{const t=pe(IE),n=pe(AE),r=pe($E),o=it();return w.useEffect(()=>{o(na(e))},[]),{error:t,loading:n,projects:r}},Rt=(e,t)=>{const n=pe(s=>ME(s,e)),r=pe(FE),o=it();return w.useEffect(()=>{!n&&!t&&o(Ex({grantNumber:e}))},[t]),{project:n,addUser:s=>o(UE({grantNumber:e,user:s})),resetUsers:()=>o(zE({grantNumber:e})),saveUsers:()=>o(ia({grantNumber:e})),setRequest:s=>o(qE({grantNumber:e,requestId:s})),setTab:s=>o(GE({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(YE({grantNumber:e,username:s,role:i})),statuses:Le,toggleUsersResources:(s,i,l)=>o(eR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},at=(e,t)=>{const n=pe(o=>DE(o,e)),r=it();return w.useEffect(()=>{n||r(Rx({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(LE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(VE({requestId:e})),deleteAction:o=>r(oa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ra({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(BE({requestId:e})),saveResources:()=>r(sa({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(HE({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(WE({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(KE({requestId:e,reason:o})),statuses:Le,toggleActionsModal:()=>r(QE({requestId:e})),toggleConfirmModal:()=>r(XE({requestId:e})),toggleDeleteModal:o=>r(ZE({requestId:e,actionId:o})),toggleResourcesModal:()=>r(JE({requestId:e}))}},rR="_project_qqnbz_1",oR="_expand_qqnbz_5",vm={project:rR,expand:oR},sR="_returnedForCorrectionsNotes_jujbd_1",iR={returnedForCorrectionsNotes:sR};function kx(e,t,n){const r=w.useRef(e!==void 0),[o,s]=w.useState(t),i=e!==void 0,l=r.current;return r.current=i,!i&&l&&o!==t&&s(t),[i?e:o,w.useCallback((...c)=>{const[u,...d]=c;let f=n==null?void 0:n(u,...d);return s(u),f},[n])]}const Ga={prefix:String(Math.round(Math.random()*1e10)),current:0},Tx=je.createContext(Ga),aR=je.createContext(!1);let lR=!!(typeof window<"u"&&window.document&&window.document.createElement),Mc=new WeakMap;function cR(e=!1){let t=w.useContext(Tx),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let i=Mc.get(s);i==null?Mc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Mc.delete(s))}n.current=++t.current}return n.current}function uR(e){let t=w.useContext(Tx);t===Ga&&!lR&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=cR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function dR(e){let t=je.useId(),[n]=w.useState(mR()),r=n?"react-aria":`react-aria${Ga.prefix}`;return e||`${r}-${t}`}const Ox=typeof je.useId=="function"?dR:uR;function fR(){return!1}function pR(){return!0}function hR(e){return()=>{}}function mR(){return typeof je.useSyncExternalStore=="function"?je.useSyncExternalStore(hR,fR,pR):w.useContext(aR)}const gR=w.createContext(null),Fo=gR,vR=w.createContext(null),Ar=(e,t=null)=>e!=null?String(e):t||null,Dn=vR;function yR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=yR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const ym=e=>!e||typeof e=="function"?e:t=>{e.current=t};function xR(e,t){const n=ym(e),r=ym(t);return o=>{n&&n(o),r&&r(o)}}function mn(e,t){return w.useMemo(()=>xR(e,t),[e,t])}function Bf({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=w.useRef(null),i=w.useRef(t),l=Te(n);w.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=mn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const bR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],wR=["activeKey","getControlledId","getControllerId"],SR=["as"];function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Px(e){let{active:t,eventKey:n,mountOnEnter:r,transition:o,unmountOnExit:s,role:i="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}=e,y=sd(e,bR);const m=w.useContext(Fo);if(!m)return[Object.assign({},y,{role:i}),{eventKey:n,isActive:t,mountOnEnter:r,transition:o,unmountOnExit:s,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}];const{activeKey:h,getControlledId:x,getControllerId:v}=m,g=sd(m,wR),b=Ar(n);return[Object.assign({},y,{role:i,id:x(n),"aria-labelledby":v(n)}),{eventKey:n,isActive:t==null&&b!=null?Ar(h)===b:t,transition:o||g.transition,mountOnEnter:r??g.mountOnEnter,unmountOnExit:s??g.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Ix=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=sd(e,SR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,transition:m=Bf}]=Px(r);return a.jsx(Fo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(m,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});Ix.displayName="TabPanel";const $x=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=kx(o,s,r),p=Ox(t),y=w.useMemo(()=>n||((h,x)=>p?`${p}-${x}-${h}`:null),[p,n]),m=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:h=>y(h,"tabpane"),getControllerId:h=>y(h,"tab")}),[f,d,i,l,c,y]);return a.jsx(Fo.Provider,{value:m,children:a.jsx(Dn.Provider,{value:f||null,children:u})})};$x.Panel=Ix;const Ax=$x;var Mx={exports:{}};/*!
|
|
54
|
+
Please proceed with caution.`,children:a.jsx(kx,{columns:z,rows:W})}),a.jsx(Xa,{show:S,onClose:()=>C(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:v.map(Z=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:E.includes(Z.resource_id),onChange:ae=>k(Z.resource_id,ae.target.checked)}),Z.resource_name]},Z.resource_id))})}),a.jsx(Xa,{show:j,onClose:()=>_(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Eo,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(Z=>({value:Z.allocation_type_id,label:Z.display_name}))],value:O,onChange:N})})]}):a.jsx("div",{children:"No resource data available."})}Ox.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Ue={error:"error",pending:"pending",success:"success"},Za=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,bm=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,FE=(e,{grantNumber:t,projectManager:n,requestMasterId:r,requests:o,title:s,users:i},l)=>{t=t||r,o.sort((d,f)=>Za(d)>Za(f)?-1:1);const c=o.find(d=>d.timeStatus=="current"),u=c?c.requestId:null;e.projects[t]={currentRequestId:u,grantNumber:t,isManager:n,requestsList:o.map(d=>{const{actions:f,allocationType:p,endDate:m,requestId:g,startDate:y,status:x}=d,h=f.map(({entryDate:v})=>v).sort()[0].split("T")[0];return LE(e,d,{entryDate:h,grantNumber:t}),{allocationType:p,endDate:m,entryDate:h,requestId:g,startDate:y,status:x}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:m,lastName:g,organization:y,resources:x,role:h,username:v})=>{const b=x.filter(E=>E.userAccountState=="active"&&E.unitType!="ACCESS Credits"),S=b.map(E=>E.xrasResourceId),C=b.filter(E=>E.resourceProviderState=="pending-active").map(E=>E.xrasResourceId),j=x.filter(E=>E.userAccountState!="active").map(E=>E.xrasResourceId),_={};for(let E of b)_[E.xrasResourceId]=E.resourceUsername;return{eligibility:m,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:h,lastName:g,organization:y,resourceAccountPendingIds:C,resourceAccountInactiveIds:j,resourceIds:S,resourceUsernames:_,role:h,username:v}}).sort((d,f)=>bm(d)<bm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},LE=(e,{actions:t,allocationType:n,allowedActions:r,endDate:o,requestId:s,requestType:i,resources:l,startDate:c,status:u,timeStatus:d},{entryDate:f,grantNumber:p})=>{l=l||[];const m={actions:t.map(({actionId:x,actionStatusType:h,actionType:v,allowedOperations:b,approvedStartDate:S,detailAvailable:C,entryDate:j,isRequest:_,requestedStartDate:E,resources:k})=>({actionId:x,allowedOperations:b,detailAvailable:C,date:(j||S||E).split("T")[0],deleteStatus:null,isRequest:_,resources:k.map(ad).sort(Qa),showDeleteModal:!1,status:h,type:v})),allocationType:n,allowedActions:UE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(ad).filter(x=>x.isCredit||x.allocated>0).sort(Qa),resourcesReason:"",returnedForCorrections:!!t.find(x=>x.returnedForCorrections),returnedForCorrectionsNotes:t.map(x=>x.adminComments).join(","),showActionsModal:!1,showConfirmModal:!1,showResourcesModal:!1,startDate:c,status:u,timeStatus:d,type:i,usageDetail:null,usageDetailStatus:null,usesCredits:["Explore","Discover","Accelerate"].includes(n)};let g={};for(let x of m.actions)if(["Exchange","Transfer"].includes(x.type)&&["Submitted","Under Review","Incomplete"].includes(x.status)){m.exchangeActionId=x.actionId,m.exchangeActionEditable=x.status==="Incomplete";for(let h of x.resources)g[h.resourceId]=h;for(let h of m.resources)h.resourceId in g&&(h.requested+=g[h.resourceId].requested,delete g[h.resourceId]);m.resources.push(...Object.values(g).map(h=>({...h,isNew:!0})));break}const y=m.allowedActions.Exchange||m.allowedActions.Transfer;if(y){g={};for(let x of y.resources)g[x.resourceId]=x;for(let x of m.resources)x.resourceId in g&&(x.questions=g[x.resourceId].questions||[],x.requires=g[x.resourceId].requires||[])}m.resources.length&&!m.resources.find(x=>x.isCredit)&&m.resources.push(y&&y.resources.find(x=>x.isCredit)||{allocated:0,decimalPlaces:0,exchangeRates:{base:{type:"base",unitCost:1},current:{type:"base",unitCost:1}},icon:"credit",isActive:!0,isBoolean:!1,isCredit:!0,isFake:!0,name:"Credit Equivalents",requested:0,requires:[],resourceId:0,unit:"Credit Equivalents",used:0}),e.requests[s]=m},UE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(ad).sort(Qa),opportunityId:o,opportunityName:s};n in t?(Array.isArray(t[n])||(t[n]=[t[n]]),t[n].push(i)):t[n]=i}return"Transfer"in t&&!("Exchange"in t)&&(t.Exchange=t.Transfer),t},wm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,ad=({allocationState:e,amountAllocated:t,amountApproved:n,amountRequested:r,amountUsed:o,attributeSets:s,baseExchangeRate:i,currentExchangeRate:l,currentExchangeRateEndDate:c,currentExchangeRateType:u,dependentResourceXrasIds:d,displayResourceName:f,endDate:p,exchangeRate:m,organizationId:g,organizationFaviconUrl:y,organizationName:x,resourceRepositoryKey:h,resourceType:v,startDate:b,unitType:S,userGuideUrl:C,xrasResourceId:j})=>{const _=S=="Yes / No",E=S=="ACCESS Credits";return{allocated:ho(um(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:_?0:i||m},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:_?0:l||m}},icon:E?"credit":v.toLowerCase(),isActive:e=="active",isBoolean:_,isCredit:E,isFake:!1,isUnderReview:!1,isNew:!1,name:f.trim(),questions:(s||[]).filter(({isActive:k})=>k).sort(wm).map(k=>({attributeSetId:k.attributeSetId,attributes:k.attributes.sort(wm).map(R=>({required:R.isRequired,resourceAttributeId:R.resourceAttributeId,label:R.attributeName})),fieldType:k.attributeSetRelationType,label:k.attributeSetName,resourceId:j,values:[]})),resourceProvider:{organizationId:g,name:x,favicon:y},requested:ho(um(r,t)||0,0,"floor"),requires:d||[],resourceId:j,resourceRepositoryKey:h,startDate:b,type:v,unit:S,used:ho(o||0,0,"ceil"),userGuideUrl:C}},Sm=(e,t)=>{const n=t.allowedActions.Exchange;if(!n)return;const r={};for(let c of n.resources)r[c.resourceId]=c;const o=t.resources.map(c=>c.resourceId),s=r[e].requires||[];let i=!s.some(c=>o.includes(c));const l=[e,...i?s:[]].filter(c=>c in r&&!o.includes(c));t.resources.push(...l.map(c=>({...r[c],allocated:0,isNew:!0,used:0,requested:0})))},Tx=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Ai=(e,t)=>{const n=Le(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},rn=(e,t)=>e.projects[t.payload.grantNumber],Le=(e,t)=>e.requests[t.payload.requestId],VE=(e,t)=>rn(e,t).users.find(({username:n})=>n==t.payload.username),ld=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,Cm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Tx(e.resourceIds,e.initialResourceIds),Px=()=>document.querySelector("meta[name=csrf-token]").content,zE=async e=>{const t=new URLSearchParams({q:e});return(await(await fetch(`${re.routes.search_people_path()}?${t}`)).json()).map(({eligible_reason:r,email:o,first_name:s,is_eligible:i,last_name:l,username:c,organization:u})=>({eligibility:i,eligibilityReason:r,email:o,firstName:s,lastName:l,username:c,organization:u}))},ia=tt("api/fetchProjectsList",async(e,{rejectWithValue:t})=>{const n=await fetch(`${re.routes.projects_path()}.json`);return n.status==200?{username:e,projectsList:(await n.json()).result}:t({})}),Ix=tt("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),$x=tt("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),aa=tt("api/fetchUsageDetail",async({grantNumber:e,requestId:t,resourceRepositoryKey:n},{rejectWithValue:r})=>{const o=await fetch(`${re.routes.usage_detail_path(e,n)}.json`);return o.status==200?{grantNumber:e,requestId:t,resourceRepositoryKey:n,usageDetail:(await o.json()).usage}:r({grantNumber:e,requestId:t,resourceRepositoryKey:n})}),la=tt("api/deleteAction",async({actionId:e,requestId:t},{getState:n,rejectWithValue:r})=>{const o=n().api.requests[t],s=o.actions.find(u=>u.actionId==e);if(!s||!s.allowedOperations||!s.allowedOperations.includes("Delete"))return r({actionId:e,requestId:t});const i=re.routes.request_action_path(o.requestId,s.actionId),l={_method:"delete",authenticity_token:Px()};return(await fetch(i,{body:Object.keys(l).map(u=>`${encodeURIComponent(u)}=${encodeURIComponent(l[u])}`).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},method:"POST"})).status==200?{actionId:e,requestId:t}:r({actionId:e,requestId:t})}),ca=tt("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:m,requested:g,resourceId:y}of r.resources)if(g!=f&&!p){o[y]={resource_id:y,requested:1,amount:g-f};for(let{attributes:x,values:h,fieldType:v}of m)if(h.length){let b=x[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(v),j={resource_attribute_id:v=="multi_sel"?h:S?h[0]:b};S||(j.attribute_value=h[0]),s[b]=j}}const i={authenticity_token:Px(),request_action:{action_type:r.allowedActions.Exchange.name,user_comments:r.resourcesReason,resource_attributes:s},requested_resources:o},l=r.exchangeActionId?re.routes.request_action_path(r.requestId,r.exchangeActionId):re.routes.request_actions_path(r.requestId),c=await fetch(`${l}.json`,{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:r.exchangeActionId?"PUT":"POST"});let u,d;try{const f=await c.json();u=f.errors,d=f.actionId}catch{u=["Unable to save exchange"],d=null}return c.status==200?{requestId:e,exchangeActionId:d}:n({requestId:e,exchangeActionId:d,errors:u})}),ua=tt("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Tx(u.resourceIds,u.initialResourceIds)||u.isNew).length==0?[]:o.map(u=>({username:u.username,resources:u.resourceIds})),i=o.filter(u=>u.role!=u.initialRole).map(u=>({username:u.username,role:td[u.role],initialRole:td[u.initialRole]})),l={grantNumber:e,resourceChanges:s,roleChanges:i,authenticity_token:document.querySelector("meta[name=csrf-token]").content};return(await fetch(re.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}})).status==200?{grantNumber:e}:n({grantNumber:e})}),Mx=Ur({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Le(e,t);Sm(n,r)},addUser:(e,t)=>{const n=rn(e,t),r=e.requests[n.currentRequestId],{user:o}=t.payload;n.users.map(({username:s})=>s).includes(o.username)||(n.users.push({...o,resourceIds:r.resources.filter(ld).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Le(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Le(e,t);n.resourcesReason="",n.resources=n.resources.filter(r=>r.isCredit||r.allocated).map(r=>({...r,requested:r.allocated}))},resetUsers:(e,t)=>{const n=rn(e,t);n.users=n.users.filter(({isNew:r})=>!r).map(r=>({...r,resourceIds:[...r.initialResourceIds],role:r.initialRole,hasChanges:!1}))},setRequest:(e,t)=>{const n=rn(e,t);n&&(n.selectedRequestId=t.payload.requestId,n.tab=="users"&&n.currentRequestId!=n.selectedRequestId&&(n.tab="overview"))},setResourceQuestionValues:(e,t)=>{const{attributeSetId:n,resourceId:r,values:o}=t.payload,s=Le(e,t);for(let i of s.resources)if(i.resourceId==r){for(let l of i.questions)if(l.attributeSetId==n){l.values=o;break}break}},setResourceRequest:(e,t)=>{const{resourceId:n,requested:r}=t.payload,o=Le(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&Sm(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=rd(l,"difference");s&&(s.requested=ho(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Le(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=rn(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=VE(e,t);n.role=t.payload.role,Cm(n)},toggleActionsModal:(e,t)=>{const n=Le(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Le(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Ai(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Le(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=rn(e,t),r=e.requests[n.currentRequestId],{username:o,resourceId:s,checked:i}=t.payload,l=o?[n.users.find(c=>c.username==o)]:n.users;for(let c of l){if(s){let u=c.resourceIds.indexOf(s);i&&u==-1?c.resourceIds.push(s):!i&&u>=0&&c.resourceIds.splice(u,1)}else c.resourceIds=i?r.resources.filter(ld).map(({resourceId:u})=>u):[];Cm(c)}}},extraReducers:e=>{e.addCase(ia.pending,t=>{t.projectListLoading=!0}).addCase(ia.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Za(r.requests[0])>Za(o.requests[0])?-1:1),t.username=n.payload.username,t.projectsList=n.payload.projectsList.map(r=>{const{grantNumber:o,requestMasterId:s,requests:i,status:l,title:c}=r,d=r.requests.filter(f=>f.actions.filter(p=>p.returnedForCorrections).length>0).length>0?"Returned for Corrections":l||i&&(i.find(({timeStatus:f})=>f=="current")?"Active":i[0].timeStatus=="past"?"Inactive":i[0].status);return i&&FE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(ia.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Ix.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase($x.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(aa.pending,(t,n)=>{const r=Le(t,{payload:n.meta.arg});r.usageDetailStatus=Ue.pending}).addCase(aa.fulfilled,(t,n)=>{const r=Le(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ue.success}).addCase(aa.rejected,(t,n)=>{const r=Le(t,n);r.usageDetailStatus=Ue.error}).addCase(la.pending,(t,n)=>{const r=Ai(t,{payload:n.meta.arg});r.deleteStatus=Ue.pending}).addCase(la.fulfilled,(t,n)=>{const r=Le(t,n),o=Ai(t,n);o.isRequest?(r.error="This request has been deleted.",o.allowedOperations=[]):r.actions=r.actions.filter(s=>s.actionId!=o.actionId),o.deleteStatus=Ue.success,o.showDeleteModal=!1}).addCase(la.rejected,(t,n)=>{const r=Ai(t,n);r.deleteStatus=Ue.error}).addCase(ca.pending,(t,n)=>{const r=Le(t,{payload:n.meta.arg});r.exchangeStatus=Ue.pending,r.showResourcesModal=!1}).addCase(ca.fulfilled,(t,n)=>{const r=Le(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ue.success}).addCase(ca.rejected,(t,n)=>{const r=Le(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Ue.error}).addCase(ua.pending,(t,n)=>{const r=rn(t,{payload:n.meta.arg});r.usersStatus=Ue.pending}).addCase(ua.fulfilled,(t,n)=>{const r=rn(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Ue.success}).addCase(ua.rejected,(t,n)=>{const r=rn(t,n);r.usersStatus=Ue.error})}}),BE=e=>e.api.error,qE=e=>e.api.projectsList,HE=e=>e.api.projectListLoading,WE=(e,t)=>rn(e.api,{payload:{grantNumber:t}}),KE=(e,t)=>Le(e.api,{payload:{requestId:t}}),GE=e=>e.api.username,{addResource:YE,addUser:QE,closeUsageDetailModal:XE,hideAlert:ZA,resetResources:ZE,resetUsers:JE,setRequest:eR,setResourceQuestionValues:tR,setResourceRequest:nR,setResourcesReason:rR,setTab:oR,setUserRole:sR,toggleActionsModal:iR,toggleConfirmModal:aR,toggleDeleteModal:lR,toggleResourcesModal:cR,toggleUsersResources:uR}=Mx.actions,dR=Mx.reducer,fR=e=>{const t=Y(BE),n=Y(HE),r=Y(qE),o=he();return w.useEffect(()=>{o(ia(e))},[]),{error:t,loading:n,projects:r}},Rt=(e,t)=>{const n=Y(s=>WE(s,e)),r=Y(GE),o=he();return w.useEffect(()=>{!n&&!t&&o(Ix({grantNumber:e}))},[t]),{project:n,addUser:s=>o(QE({grantNumber:e,user:s})),resetUsers:()=>o(JE({grantNumber:e})),saveUsers:()=>o(ua({grantNumber:e})),setRequest:s=>o(eR({grantNumber:e,requestId:s})),setTab:s=>o(oR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(sR({grantNumber:e,username:s,role:i})),statuses:Ue,toggleUsersResources:(s,i,l)=>o(uR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},at=(e,t)=>{const n=Y(o=>KE(o,e)),r=he();return w.useEffect(()=>{n||r($x({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(YE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(XE({requestId:e})),deleteAction:o=>r(la({actionId:o,requestId:e})),openUsageDetailModal:o=>r(aa({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(ZE({requestId:e})),saveResources:()=>r(ca({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(tR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(nR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(rR({requestId:e,reason:o})),statuses:Ue,toggleActionsModal:()=>r(iR({requestId:e})),toggleConfirmModal:()=>r(aR({requestId:e})),toggleDeleteModal:o=>r(lR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(cR({requestId:e}))}},pR="_project_qqnbz_1",hR="_expand_qqnbz_5",jm={project:pR,expand:hR},mR="_returnedForCorrectionsNotes_jujbd_1",gR={returnedForCorrectionsNotes:mR};function Ax(e,t,n){const r=w.useRef(e!==void 0),[o,s]=w.useState(t),i=e!==void 0,l=r.current;return r.current=i,!i&&l&&o!==t&&s(t),[i?e:o,w.useCallback((...c)=>{const[u,...d]=c;let f=n==null?void 0:n(u,...d);return s(u),f},[n])]}const Ja={prefix:String(Math.round(Math.random()*1e10)),current:0},Dx=Re.createContext(Ja),vR=Re.createContext(!1);let yR=!!(typeof window<"u"&&window.document&&window.document.createElement),Uc=new WeakMap;function xR(e=!1){let t=w.useContext(Dx),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let i=Uc.get(s);i==null?Uc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Uc.delete(s))}n.current=++t.current}return n.current}function bR(e){let t=w.useContext(Dx);t===Ja&&!yR&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=xR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function wR(e){let t=Re.useId(),[n]=w.useState(_R()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const Fx=typeof Re.useId=="function"?wR:bR;function SR(){return!1}function CR(){return!0}function jR(e){return()=>{}}function _R(){return typeof Re.useSyncExternalStore=="function"?Re.useSyncExternalStore(jR,SR,CR):w.useContext(vR)}const ER=w.createContext(null),Lo=ER,RR=w.createContext(null),Mr=(e,t=null)=>e!=null?String(e):t||null,Dn=RR;function kR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=kR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const _m=e=>!e||typeof e=="function"?e:t=>{e.current=t};function NR(e,t){const n=_m(e),r=_m(t);return o=>{n&&n(o),r&&r(o)}}function mn(e,t){return w.useMemo(()=>NR(e,t),[e,t])}function Hf({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=w.useRef(null),i=w.useRef(t),l=Te(n);w.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=mn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const OR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],TR=["activeKey","getControlledId","getControllerId"],PR=["as"];function cd(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Lx(e){let{active:t,eventKey:n,mountOnEnter:r,transition:o,unmountOnExit:s,role:i="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}=e,m=cd(e,OR);const g=w.useContext(Lo);if(!g)return[Object.assign({},m,{role:i}),{eventKey:n,isActive:t,mountOnEnter:r,transition:o,unmountOnExit:s,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}];const{activeKey:y,getControlledId:x,getControllerId:h}=g,v=cd(g,TR),b=Mr(n);return[Object.assign({},m,{role:i,id:x(n),"aria-labelledby":h(n)}),{eventKey:n,isActive:t==null&&b!=null?Mr(y)===b:t,transition:o||v.transition,mountOnEnter:r??v.mountOnEnter,unmountOnExit:s??v.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Ux=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=cd(e,PR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:g=Hf}]=Lx(r);return a.jsx(Lo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(g,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});Ux.displayName="TabPanel";const Vx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Ax(o,s,r),p=Fx(t),m=w.useMemo(()=>n||((y,x)=>p?`${p}-${x}-${y}`:null),[p,n]),g=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:y=>m(y,"tabpane"),getControllerId:y=>m(y,"tab")}),[f,d,i,l,c,m]);return a.jsx(Lo.Provider,{value:g,children:a.jsx(Dn.Provider,{value:f||null,children:u})})};Vx.Panel=Ux;const zx=Vx;var Bx={exports:{}};/*!
|
|
55
55
|
Copyright (c) 2018 Jed Watson.
|
|
56
56
|
Licensed under the MIT License (MIT), see
|
|
57
57
|
http://jedwatson.github.io/classnames
|
|
58
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var l in s)t.call(s,l)&&s[l]&&(i=o(i,l));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Mx);var _R=Mx.exports;const oe=Xs(_R);function zf(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ya(e,t){return Ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ya(e,t)}function jR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ya(e,t)}const xm={disabled:!1},Dx=je.createContext(null);var CR=function(t){return t.scrollTop},ds="unmounted",Kn="exited",Sn="entering",Qn="entered",Qa="exiting",Vn=function(e){jR(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=Kn,s.appearStatus=Sn):c=Qn:r.unmountOnExit||r.mountOnEnter?c=ds:c=Kn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===ds?{status:Kn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Sn&&i!==Qn&&(s=Sn):(i===Sn||i===Qn)&&(s=Qa)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Sn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this);i&&CR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Kn&&this.setState({status:ds})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[Sr.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!o&&!i||xm.disabled){this.safeSetState({status:Qn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Sn},function(){s.props.onEntering(u,d),s.onTransitionEnd(p,function(){s.safeSetState({status:Qn},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:Sr.findDOMNode(this);if(!s||xm.disabled){this.safeSetState({status:Kn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Qa},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Kn},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===ds)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=zf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return je.createElement(Dx.Provider,{value:null},typeof i=="function"?i(o,l):je.cloneElement(je.Children.only(i),l))},t}(je.Component);Vn.contextType=Dx;Vn.propTypes={};function qr(){}Vn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qr,onEntering:qr,onEntered:qr,onExit:qr,onExiting:qr,onExited:qr};Vn.UNMOUNTED=ds;Vn.EXITED=Kn;Vn.ENTERING=Sn;Vn.ENTERED=Qn;Vn.EXITING=Qa;const ER=Vn;function Lo(e){return e&&e.ownerDocument||document}function RR(e){var t=Lo(e);return t&&t.defaultView||window}function NR(e,t){return RR(e).getComputedStyle(e,t)}var kR=/([A-Z])/g;function TR(e){return e.replace(kR,"-$1").toLowerCase()}var OR=/^ms-/;function Pi(e){return TR(e).replace(OR,"-ms-")}var PR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function IR(e){return!!(e&&PR.test(e))}function Tn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Pi(t))||NR(e).getPropertyValue(Pi(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Pi(o)):IR(o)?r+=o+"("+s+") ":n+=Pi(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Uo=!!(typeof window<"u"&&window.document&&window.document.createElement);var id=!1,ad=!1;try{var Dc={get passive(){return id=!0},get once(){return ad=id=!0}};Uo&&(window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,!0))}catch{}function qf(e,t,n,r){if(r&&typeof r!="boolean"&&!ad){var o=r.once,s=r.capture,i=n;!ad&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,id?r:s)}e.addEventListener(t,n,r)}function ld(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function En(e,t,n,r){return qf(e,t,n,r),function(){ld(e,t,n,r)}}function $R(e,t,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function AR(e){var t=Tn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function MR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||$R(e,"transitionend",!0)},t+n),s=En(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Fx(e,t,n,r){n==null&&(n=AR(e)||0);var o=MR(e,n,r),s=En(e,"transitionend",t);return function(){o(),s()}}function bm(e,t){const n=Tn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Lx(e,t){const n=bm(e,"transitionDuration"),r=bm(e,"transitionDelay"),o=Fx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Ux(e){e.offsetHeight}function Xa(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const DR=je.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},d)=>{const f=w.useRef(null),p=mn(f,c),y=j=>{p(Xa(j))},m=j=>C=>{j&&f.current&&j(f.current,C)},h=w.useCallback(m(e),[e]),x=w.useCallback(m(t),[t]),v=w.useCallback(m(n),[n]),g=w.useCallback(m(r),[r]),b=w.useCallback(m(o),[o]),S=w.useCallback(m(s),[s]),_=w.useCallback(m(i),[i]);return a.jsx(ER,{ref:d,...u,onEnter:h,onEntered:v,onEntering:x,onExit:g,onExited:S,onExiting:b,addEndListener:_,nodeRef:f,children:typeof l=="function"?(j,C)=>l(j,{...C,ref:y}):je.cloneElement(l,{ref:y})})}),Vx=DR,FR={[Sn]:"show",[Qn]:"show"},Bx=w.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=w.useCallback((c,u)=>{Ux(c),r==null||r(c,u)},[r]);return a.jsx(Vx,{ref:s,addEndListener:Lx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,FR[c],n[c])})})});Bx.displayName="Fade";const Eo=Bx;function Hf(e){return typeof e=="boolean"?e?Eo:Bf:e}const zx=({transition:e,...t})=>a.jsx(Ax,{...t,transition:Hf(e)});zx.displayName="TabContainer";const LR=zx,UR=["xxl","xl","lg","md","sm","xs"],VR="xs",qx=w.createContext({prefixes:{},breakpoints:UR,minBreakpoint:VR});function fe(e,t){const{prefixes:n}=w.useContext(qx);return e||n[t]||t}function Il(){const{dir:e}=w.useContext(qx);return e==="rtl"}const Hx=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"tab-content"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Hx.displayName="TabContent";const Wx=Hx,Kx=w.forwardRef(({bsPrefix:e,transition:t,...n},r)=>{const[{className:o,as:s="div",...i},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,transition:x=Eo}]=Px({...n,transition:Hf(t)}),v=fe(e,"tab-pane");return a.jsx(Fo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(x,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,children:a.jsx(s,{...i,ref:r,className:oe(o,v,l&&"active")})})})})});Kx.displayName="TabPane";const Gx=Kx,BR={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},Yx=()=>{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")};Yx.propTypes=BR;const Ii=Object.assign(Yx,{Container:LR,Content:Wx,Pane:Gx});function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}function wm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function zR(e){var t=qR(e,"string");return typeof t=="symbol"?t:String(t)}function qR(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qx(e,t,n){var r=w.useRef(e!==void 0),o=w.useState(t),s=o[0],i=o[1],l=e!==void 0,c=r.current;return r.current=l,!l&&c&&s!==t&&i(t),[l?e:s,w.useCallback(function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];n&&n.apply(void 0,[u].concat(f)),i(u)},[n])]}function $l(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[wm(r)],l=s[r],c=zf(s,[wm(r),r].map(zR)),u=t[r],d=Qx(l,i,e[u]),f=d[0],p=d[1];return Y({},c,(o={},o[r]=f,o[u]=p,o))},e)}var Sm={exports:{}},cd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){function o(i,l,c,u,d,f){var p=u||"<<anonymous>>",y=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+y+"` was not specified "+("in `"+p+"`.")):null;for(var m=arguments.length,h=Array(m>6?m-6:0),x=6;x<m;x++)h[x-6]=arguments[x];return r.apply(void 0,[l,c,p,d,y].concat(h))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(cd,cd.exports);var HR=cd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=HR,r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(){for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];function u(){for(var d=arguments.length,f=Array(d),p=0;p<d;p++)f[p]=arguments[p];var y=null;return l.forEach(function(m){if(y==null){var h=m.apply(void 0,f);h!=null&&(y=h)}}),y}return(0,r.default)(u)}e.exports=t.default})(Sm,Sm.exports);var WR=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return WR(e.querySelectorAll(t))}function Xx(){const[,e]=w.useReducer(t=>!t,!1);return e}const Zx=w.createContext(null);Zx.displayName="NavContext";const Wf=Zx,KR="data-rr-ui-",GR="rrUi";function Vo(e){return`${KR}${e}`}function YR(e){return`${GR}${e}`}const QR=["as","disabled"];function XR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ZR(e){return!e||e.trim()==="#"}function Kf({tagName:e,disabled:t,href:n,target:r,rel:o,role:s,onClick:i,tabIndex:l=0,type:c}){e||(n!=null||r!=null||o!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},u];const d=p=>{if((t||e==="a"&&ZR(n))&&p.preventDefault(),t){p.stopPropagation();return}i==null||i(p)},f=p=>{p.key===" "&&(p.preventDefault(),d(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:t?void 0:l,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:d,onKeyDown:f},u]}const Gf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=XR(e,QR);const[s,{tagName:i}]=Kf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Gf.displayName="Button";const JR=["as","active","eventKey"];function eN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Jx({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Dn),l=w.useContext(Wf),c=w.useContext(Fo);let u=n;const d={role:o};if(l){!o&&l.role==="tablist"&&(d.role="tab");const f=l.getControllerId(e??null),p=l.getControlledId(e??null);d[Vo("event-key")]=e,d.id=f||r,u=n==null&&e!=null?l.activeKey===e:n,(u||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(d["aria-controls"]=p)}return d.role==="tab"&&(d["aria-selected"]=u,u||(d.tabIndex=-1),s&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Te(f=>{s||(t==null||t(f),e!=null&&i&&!f.isPropagationStopped()&&i(e,f))}),[d,{isActive:u}]}const e0=w.forwardRef((e,t)=>{let{as:n=Gf,active:r,eventKey:o}=e,s=eN(e,JR);const[i,l]=Jx(Object.assign({key:Ar(o,s.href),active:r},s));return i[Vo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});e0.displayName="NavItem";const tN=e0,nN=["as","onSelect","activeKey","role","onKeyDown"];function rN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const _m=()=>{},jm=Vo("event-key"),t0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=rN(e,nN);const c=Xx(),u=w.useRef(!1),d=w.useContext(Dn),f=w.useContext(Fo);let p,y;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,y=f.getControllerId);const m=w.useRef(null),h=b=>{const S=m.current;if(!S)return null;const _=_n(S,`[${jm}]:not([aria-disabled=true])`),j=S.querySelector("[aria-selected=true]");if(!j||j!==document.activeElement)return null;const C=_.indexOf(j);if(C===-1)return null;let E=C+b;return E>=_.length&&(E=0),E<0&&(E=_.length-1),_[E]},x=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},v=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=h(-1);break;case"ArrowRight":case"ArrowDown":S=h(1);break;default:return}S&&(b.preventDefault(),x(S.dataset[YR("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(m.current&&u.current){const b=m.current.querySelector(`[${jm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const g=mn(t,m);return a.jsx(Dn.Provider,{value:x,children:a.jsx(Wf.Provider,{value:{role:s,activeKey:Ar(o),getControlledId:p||_m,getControllerId:y||_m},children:a.jsx(n,Object.assign({},l,{onKeyDown:v,ref:g,role:s}))})})});t0.displayName="Nav";const oN=Object.assign(t0,{Item:tN}),n0=w.createContext(null);n0.displayName="NavbarContext";const r0=n0,o0=w.createContext(null);o0.displayName="CardHeaderContext";const sN=o0,s0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"nav-item"),a.jsx(n,{ref:o,className:oe(e,t),...r})));s0.displayName="NavItem";const i0=s0;function Za(){return w.useState(null)}function iN(e,t,n,r=!1){const o=Te(n);w.useEffect(()=>{const s=typeof e=="function"?e():e;return s.addEventListener(t,o,r),()=>s.removeEventListener(t,o,r)},[e])}function Yf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function a0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const aN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",lN=typeof document<"u",Ja=lN||aN?w.useLayoutEffect:w.useEffect,cN=["onKeyDown"];function uN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function dN(e){return!e||e.trim()==="#"}const l0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=uN(e,cN);const[o]=Kf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return dN(r.href)||r.role==="button"?a.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:s})):a.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});l0.displayName="Anchor";const c0=l0,u0=w.forwardRef(({bsPrefix:e,className:t,as:n=c0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=fe(e,"nav-link");const[c,u]=Jx({key:Ar(o,i.href),active:r,disabled:s,...i});return a.jsx(n,{...i,...c,ref:l,disabled:s,className:oe(t,e,s&&"disabled",u.isActive&&"active")})});u0.displayName="NavLink";const d0=u0,f0=w.forwardRef((e,t)=>{const{as:n="div",bsPrefix:r,variant:o,fill:s=!1,justify:i=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...f}=$l(e,{activeKey:"onSelect"}),p=fe(r,"nav");let y,m,h=!1;const x=w.useContext(r0),v=w.useContext(sN);return x?(y=x.bsPrefix,h=l??!0):v&&({cardHeaderBsPrefix:m}=v),a.jsx(oN,{as:n,ref:t,activeKey:d,className:oe(u,{[p]:!h,[`${y}-nav`]:h,[`${y}-nav-scroll`]:h&&c,[`${m}-${o}`]:!!m,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});f0.displayName="Nav";const fN=Object.assign(f0,{Item:i0,Link:d0});function Cm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function pN(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function hN(e){let t;return pN(e,n=>{t==null&&(t=n.props.eventKey)}),t}function mN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(i0,{as:"li",role:"presentation",children:a.jsx(d0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const p0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=hN(l),...u}=$l(e,{activeKey:"onSelect"});return a.jsxs(Ax,{id:t,activeKey:c,onSelect:n,transition:Hf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(fN,{...u,role:"tablist",as:"ul",variant:i,children:Cm(l,mN)}),a.jsx(Wx,{children:Cm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(Gx,{...f})})})]})};p0.displayName="Tabs";const gN=p0,vN=w.createContext(null),Al=vN;var Em=Object.prototype.hasOwnProperty;function Rm(e,t,n){for(n of e.keys())if(ws(n,t))return n}function ws(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ws(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=Rm(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=Rm(t,o),!o)||!ws(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Em.call(e,n)&&++r&&!Em.call(t,n)||!(n in t)||!ws(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function yN(e){const t=Yf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var gt="top",Bt="bottom",zt="right",vt="left",Qf="auto",si=[gt,Bt,zt,vt],Ro="start",qs="end",xN="clippingParents",h0="viewport",es="popper",bN="reference",Nm=si.reduce(function(e,t){return e.concat([t+"-"+Ro,t+"-"+qs])},[]),m0=[].concat(si,[Qf]).reduce(function(e,t){return e.concat([t,t+"-"+Ro,t+"-"+qs])},[]),wN="beforeRead",SN="read",_N="afterRead",jN="beforeMain",CN="main",EN="afterMain",RN="beforeWrite",NN="write",kN="afterWrite",TN=[wN,SN,_N,jN,CN,EN,RN,NN,kN];function fn(e){return e.split("-")[0]}function Nt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mr(e){var t=Nt(e).Element;return e instanceof t||e instanceof Element}function pn(e){var t=Nt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xf(e){if(typeof ShadowRoot>"u")return!1;var t=Nt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,el=Math.min,No=Math.round;function ud(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function g0(){return!/^((?!chrome|android).)*safari/i.test(ud())}function ko(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&pn(e)&&(o=e.offsetWidth>0&&No(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&No(r.height)/e.offsetHeight||1);var i=Mr(e)?Nt(e):window,l=i.visualViewport,c=!g0()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/s,f=r.width/o,p=r.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Zf(e){var t=ko(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function v0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Xf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function dr(e){return e?(e.nodeName||"").toLowerCase():null}function Fn(e){return Nt(e).getComputedStyle(e)}function ON(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ml(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(Xf(e)?e.host:null)||mr(e)}function km(e){return!pn(e)||Fn(e).position==="fixed"?null:e.offsetParent}function PN(e){var t=/firefox/i.test(ud()),n=/Trident/i.test(ud());if(n&&pn(e)){var r=Fn(e);if(r.position==="fixed")return null}var o=Ml(e);for(Xf(o)&&(o=o.host);pn(o)&&["html","body"].indexOf(dr(o))<0;){var s=Fn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ii(e){for(var t=Nt(e),n=km(e);n&&ON(n)&&Fn(n).position==="static";)n=km(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Fn(n).position==="static")?t:n||PN(e)||t}function Jf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ss(e,t,n){return Er(e,el(t,n))}function IN(e,t,n){var r=Ss(e,t,n);return r>n?n:r}function y0(){return{top:0,right:0,bottom:0,left:0}}function x0(e){return Object.assign({},y0(),e)}function b0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var $N=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,x0(typeof t!="number"?t:b0(t,si))};function AN(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=fn(n.placement),c=Jf(l),u=[vt,zt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=$N(o.padding,n),p=Zf(s),y=c==="y"?gt:vt,m=c==="y"?Bt:zt,h=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],x=i[c]-n.rects.reference[c],v=ii(s),g=v?c==="y"?v.clientHeight||0:v.clientWidth||0:0,b=h/2-x/2,S=f[y],_=g-p[d]-f[m],j=g/2-p[d]/2+b,C=Ss(S,j,_),E=c;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-j,t)}}function MN(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||v0(t.elements.popper,o)&&(t.elements.arrow=o))}const DN={name:"arrow",enabled:!0,phase:"main",fn:AN,effect:MN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function To(e){return e.split("-")[1]}var FN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LN(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:No(n*o)/o||0,y:No(r*o)/o||0}}function Tm(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=i.x,y=p===void 0?0:p,m=i.y,h=m===void 0?0:m,x=typeof d=="function"?d({x:y,y:h}):{x:y,y:h};y=x.x,h=x.y;var v=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=vt,S=gt,_=window;if(u){var j=ii(n),C="clientHeight",E="clientWidth";if(j===Nt(n)&&(j=mr(n),Fn(j).position!=="static"&&l==="absolute"&&(C="scrollHeight",E="scrollWidth")),j=j,o===gt||(o===vt||o===zt)&&s===qs){S=Bt;var N=f&&j===_&&_.visualViewport?_.visualViewport.height:j[C];h-=N-r.height,h*=c?1:-1}if(o===vt||(o===gt||o===Bt)&&s===qs){b=zt;var R=f&&j===_&&_.visualViewport?_.visualViewport.width:j[E];y-=R-r.width,y*=c?1:-1}}var T=Object.assign({position:l},u&&FN),k=d===!0?LN({x:y,y:h},Nt(n)):{x:y,y:h};if(y=k.x,h=k.y,c){var P;return Object.assign({},T,(P={},P[S]=g?"0":"",P[b]=v?"0":"",P.transform=(_.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",P))}return Object.assign({},T,(t={},t[S]=g?h+"px":"",t[b]=v?y+"px":"",t.transform="",t))}function UN(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:fn(t.placement),variation:To(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Tm(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Tm(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const VN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:UN,data:{}};var $i={passive:!0};function BN(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=Nt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,$i)}),l&&c.addEventListener("resize",n.update,$i),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,$i)}),l&&c.removeEventListener("resize",n.update,$i)}}const zN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:BN,data:{}};var qN={left:"right",right:"left",bottom:"top",top:"bottom"};function aa(e){return e.replace(/left|right|bottom|top/g,function(t){return qN[t]})}var HN={start:"end",end:"start"};function Om(e){return e.replace(/start|end/g,function(t){return HN[t]})}function ep(e){var t=Nt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function tp(e){return ko(mr(e)).left+ep(e).scrollLeft}function WN(e,t){var n=Nt(e),r=mr(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;var u=g0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+tp(e),y:c}}function KN(e){var t,n=mr(e),r=ep(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Er(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Er(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+tp(e),c=-r.scrollTop;return Fn(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function np(e){var t=Fn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function w0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:pn(e)&&np(e)?e:w0(Ml(e))}function _s(e,t){var n;t===void 0&&(t=[]);var r=w0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Nt(r),i=o?[s].concat(s.visualViewport||[],np(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(_s(Ml(i)))}function dd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function GN(e,t){var n=ko(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Pm(e,t,n){return t===h0?dd(WN(e,n)):Mr(t)?GN(t,n):dd(KN(mr(e)))}function YN(e){var t=_s(Ml(e)),n=["absolute","fixed"].indexOf(Fn(e).position)>=0,r=n&&pn(e)?ii(e):e;return Mr(r)?t.filter(function(o){return Mr(o)&&v0(o,r)&&dr(o)!=="body"}):[]}function QN(e,t,n,r){var o=t==="clippingParents"?YN(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Pm(e,u,r);return c.top=Er(d.top,c.top),c.right=el(d.right,c.right),c.bottom=el(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},Pm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function S0(e){var t=e.reference,n=e.element,r=e.placement,o=r?fn(r):null,s=r?To(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case gt:c={x:i,y:t.y-n.height};break;case Bt:c={x:i,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:l};break;case vt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?Jf(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case Ro:c[u]=c[u]-(t[d]/2-n[d]/2);break;case qs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Hs(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?xN:l,u=n.rootBoundary,d=u===void 0?h0:u,f=n.elementContext,p=f===void 0?es:f,y=n.altBoundary,m=y===void 0?!1:y,h=n.padding,x=h===void 0?0:h,v=x0(typeof x!="number"?x:b0(x,si)),g=p===es?bN:es,b=e.rects.popper,S=e.elements[m?g:p],_=QN(Mr(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),j=ko(e.elements.reference),C=S0({reference:j,element:b,strategy:"absolute",placement:o}),E=dd(Object.assign({},b,C)),N=p===es?E:j,R={top:_.top-N.top+v.top,bottom:N.bottom-_.bottom+v.bottom,left:_.left-N.left+v.left,right:N.right-_.right+v.right},T=e.modifiersData.offset;if(p===es&&T){var k=T[o];Object.keys(R).forEach(function(P){var M=[zt,Bt].indexOf(P)>=0?1:-1,D=[gt,Bt].indexOf(P)>=0?"y":"x";R[P]+=k[D]*M})}return R}function XN(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?m0:c,d=To(r),f=d?l?Nm:Nm.filter(function(m){return To(m)===d}):si,p=f.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=f);var y=p.reduce(function(m,h){return m[h]=Hs(e,{placement:h,boundary:o,rootBoundary:s,padding:i})[fn(h)],m},{});return Object.keys(y).sort(function(m,h){return y[m]-y[h]})}function ZN(e){if(fn(e)===Qf)return[];var t=aa(e);return[Om(e),t,Om(t)]}function JN(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,y=n.flipVariations,m=y===void 0?!0:y,h=n.allowedAutoPlacements,x=t.options.placement,v=fn(x),g=v===x,b=c||(g||!m?[aa(x)]:ZN(x)),S=[x].concat(b).reduce(function(Z,ee){return Z.concat(fn(ee)===Qf?XN(t,{placement:ee,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,j=t.rects.popper,C=new Map,E=!0,N=S[0],R=0;R<S.length;R++){var T=S[R],k=fn(T),P=To(T)===Ro,M=[gt,Bt].indexOf(k)>=0,D=M?"width":"height",V=Hs(t,{placement:T,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Q=M?P?zt:vt:P?Bt:gt;_[D]>j[D]&&(Q=aa(Q));var O=aa(Q),U=[];if(s&&U.push(V[k]<=0),l&&U.push(V[Q]<=0,V[O]<=0),U.every(function(Z){return Z})){N=T,E=!1;break}C.set(T,U)}if(E)for(var A=m?3:1,H=function(ee){var X=S.find(function(ie){var ge=C.get(ie);if(ge)return ge.slice(0,ee).every(function(Se){return Se})});if(X)return N=X,"break"},B=A;B>0;B--){var W=H(B);if(W==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const ek={name:"flip",enabled:!0,phase:"main",fn:JN,requiresIfExists:["offset"],data:{_skip:!1}};function Im(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $m(e){return[gt,zt,Bt,vt].some(function(t){return e[t]>=0})}function tk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Hs(t,{elementContext:"reference"}),l=Hs(t,{altBoundary:!0}),c=Im(i,r),u=Im(l,o,s),d=$m(c),f=$m(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const nk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tk};function rk(e,t,n){var r=fn(e),o=[vt,gt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[vt,zt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function ok(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=m0.reduce(function(d,f){return d[f]=rk(f,t.rects,s),d},{}),l=i[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const sk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ok};function ik(e){var t=e.state,n=e.name;t.modifiersData[n]=S0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ak={name:"popperOffsets",enabled:!0,phase:"read",fn:ik,data:{}};function lk(e){return e==="x"?"y":"x"}function ck(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,y=p===void 0?!0:p,m=n.tetherOffset,h=m===void 0?0:m,x=Hs(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),v=fn(t.placement),g=To(t.placement),b=!g,S=Jf(v),_=lk(S),j=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,N=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(j){if(s){var P,M=S==="y"?gt:vt,D=S==="y"?Bt:zt,V=S==="y"?"height":"width",Q=j[S],O=Q+x[M],U=Q-x[D],A=y?-E[V]/2:0,H=g===Ro?C[V]:E[V],B=g===Ro?-E[V]:-C[V],W=t.elements.arrow,Z=y&&W?Zf(W):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:y0(),X=ee[M],ie=ee[D],ge=Ss(0,C[V],Z[V]),Se=b?C[V]/2-A-ge-X-R.mainAxis:H-ge-X-R.mainAxis,Ae=b?-C[V]/2+A+ge+ie+R.mainAxis:B+ge+ie+R.mainAxis,F=t.elements.arrow&&ii(t.elements.arrow),L=F?S==="y"?F.clientTop||0:F.clientLeft||0:0,te=(P=T==null?void 0:T[S])!=null?P:0,J=Q+Se-te-L,re=Q+Ae-te,lt=Ss(y?el(O,J):O,Q,y?Er(U,re):U);j[S]=lt,k[S]=lt-Q}if(l){var Pt,It=S==="x"?gt:vt,ct=S==="x"?Bt:zt,Ce=j[_],Bn=_==="y"?"height":"width",zn=Ce+x[It],ci=Ce-x[ct],Vr=[gt,vt].indexOf(v)!==-1,ui=(Pt=T==null?void 0:T[_])!=null?Pt:0,le=Vr?zn:Ce-C[Bn]-E[Bn]-ui+R.altAxis,vn=Vr?Ce+C[Bn]+E[Bn]-ui-R.altAxis:ci,zo=y&&Vr?IN(le,Ce,vn):Ss(y?le:zn,Ce,y?vn:ci);j[_]=zo,k[_]=zo-Ce}t.modifiersData[r]=k}}const uk={name:"preventOverflow",enabled:!0,phase:"main",fn:ck,requiresIfExists:["offset"]};function dk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fk(e){return e===Nt(e)||!pn(e)?ep(e):dk(e)}function pk(e){var t=e.getBoundingClientRect(),n=No(t.width)/e.offsetWidth||1,r=No(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hk(e,t,n){n===void 0&&(n=!1);var r=pn(t),o=pn(t)&&pk(t),s=mr(t),i=ko(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||np(s))&&(l=fk(t)),pn(t)?(c=ko(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=tp(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function mk(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function gk(e){var t=mk(e);return TN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function vk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function yk(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Am={placement:"bottom",modifiers:[],strategy:"absolute"};function Mm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?Am:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Am,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,y={state:d,setOptions:function(v){var g=typeof v=="function"?v(d.options):v;h(),d.options=Object.assign({},s,d.options,g),d.scrollParents={reference:Mr(l)?_s(l):l.contextElement?_s(l.contextElement):[],popper:_s(c)};var b=gk(yk([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),m(),y.update()},forceUpdate:function(){if(!p){var v=d.elements,g=v.reference,b=v.popper;if(Mm(g,b)){d.rects={reference:hk(g,ii(b),d.options.strategy==="fixed"),popper:Zf(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var _=d.orderedModifiers[S],j=_.fn,C=_.options,E=C===void 0?{}:C,N=_.name;typeof j=="function"&&(d=j({state:d,options:E,name:N,instance:y})||d)}}}},update:vk(function(){return new Promise(function(x){y.forceUpdate(),x(d)})}),destroy:function(){h(),p=!0}};if(!Mm(l,c))return y;y.setOptions(u).then(function(x){!p&&u.onFirstUpdate&&u.onFirstUpdate(x)});function m(){d.orderedModifiers.forEach(function(x){var v=x.name,g=x.options,b=g===void 0?{}:g,S=x.effect;if(typeof S=="function"){var _=S({state:d,name:v,instance:y,options:b}),j=function(){};f.push(_||j)}})}function h(){f.forEach(function(x){return x()}),f=[]}return y}}const bk=xk({defaultModifiers:[nk,ak,VN,zN,sk,ek,uk,DN]}),wk=["enabled","placement","strategy","modifiers"];function Sk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const _k={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},jk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const s=r.getAttribute("aria-describedby");if(s&&s.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",s?`${s},${n.id}`:n.id)}}},Ck=[];function _0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Ck}=n,l=Sk(n,wk);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var x;(x=u.current)==null||x.update()},[]),f=w.useCallback(()=>{var x;(x=u.current)==null||x.forceUpdate()},[]),[p,y]=yN(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),m=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:x})=>{const v={},g={};Object.keys(x.elements).forEach(b=>{v[b]=x.styles[b],g[b]=x.attributes[b]}),y({state:x,styles:v,attributes:g,update:d,forceUpdate:f,placement:x.placement})}}),[d,f,y]),h=w.useMemo(()=>(ws(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...h,m,_k]})},[s,o,m,r,h]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=bk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...h,jk,m]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,y(x=>Object.assign({},x,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ws(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Ek=function(){},Rk=Ek;const Nk=Xs(Rk),Dm=()=>{};function kk(e){return e.button===0}function Tk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const la=e=>e&&("current"in e?e.current:e),Fm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function j0(e,t=Dm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=la(e);Nk(!!d,"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"),o.current=!d||Tk(u)||!kk(u)||!!Ws(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=la(e);d&&Ws(d,u.target)&&(s.current=!0)}),c=Te(u=>{o.current||t(u)});w.useEffect(()=>{var u,d;if(n||e==null)return;const f=Lo(la(e)),p=f.defaultView||window;let y=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,m=null;Fm[r]&&(m=En(f,Fm[r],l,!0));const h=En(f,r,i,!0),x=En(f,r,g=>{if(g===y){y=void 0;return}c(g)});let v=[];return"ontouchstart"in f.documentElement&&(v=[].slice.call(f.body.children).map(g=>En(g,"mousemove",Dm))),()=>{m==null||m(),h(),x(),v.forEach(g=>g())}},[e,n,r,i,l,c])}function Ok(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Pk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function C0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,y;const m=Ok(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:Pk(Object.assign({},m,{eventListeners:{enabled:t,options:(u=m.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},m.preventOverflow,{options:i?Object.assign({padding:i},(d=m.preventOverflow)==null?void 0:d.options):(f=m.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=m.offset)==null?void 0:p.options)},arrow:Object.assign({},m.arrow,{enabled:!!l,options:Object.assign({},(y=m.arrow)==null?void 0:y.options,{element:l})}),flip:Object.assign({enabled:!!r},m.flip)}))})}const Ik=["children"];function $k(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Ak=()=>{};function E0(e={}){const t=w.useContext(Al),[n,r]=Za(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,y=(t==null?void 0:t.show)==null?!!e.show:t.show;y&&!o.current&&(o.current=!0);const m=j=>{t==null||t.toggle(!1,j)},{placement:h,setMenu:x,menuElement:v,toggleElement:g}=t||{},b=_0(g,v,C0({placement:u||h||"bottom-start",enabled:p,enableEvents:f??y,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:x||Ak,"aria-labelledby":g==null?void 0:g.id},b.attributes.popper,{style:b.styles.popper}),_={show:y,placement:h,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?b:null,arrowProps:p?Object.assign({ref:r},b.attributes.arrow,{style:b.styles.arrow}):{}};return j0(v,m,{clickTrigger:l,disabled:!y}),[S,_]}const Mk={usePopper:!0};function rp(e){let{children:t}=e,n=$k(e,Ik);const[r,o]=E0(n);return a.jsx(a.Fragment,{children:t(r,o)})}rp.displayName="DropdownMenu";rp.defaultProps=Mk;const R0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Lm=()=>{};function N0(){const e=Ox(),{show:t=!1,toggle:n=Lm,setToggle:r,menuElement:o}=w.useContext(Al)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Lm,onClick:s,"aria-expanded":!!t};return o&&R0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function k0({children:e}){const[t,n]=N0();return a.jsx(a.Fragment,{children:e(t,n)})}k0.displayName="DropdownToggle";const Dk=["eventKey","disabled","onClick","active","as"];function Fk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function T0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Dn),i=w.useContext(Wf),{activeKey:l}=i||{},c=Ar(e,t),u=n==null&&e!=null?Ar(l)===c:n;return[{onClick:Te(f=>{r||(o==null||o(f),s&&!f.isPropagationStopped()&&s(c,f))}),"aria-disabled":r||void 0,"aria-selected":u,[Vo("dropdown-item")]:""},{isActive:u}]}const O0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Gf}=e,l=Fk(e,Dk);const[c]=T0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});O0.displayName="DropdownItem";const P0=w.createContext(Uo?window:void 0);P0.Provider;function Dl(){return w.useContext(P0)}function Um(){const e=Xx(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ai({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Vo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Dl(),[u,d]=kx(t,e,r),[f,p]=Um(),y=f.current,[m,h]=Um(),x=m.current,v=a0(u),g=w.useRef(null),b=w.useRef(!1),S=w.useContext(Dn),_=w.useCallback((T,k,P=k==null?void 0:k.type)=>{d(T,{originalEvent:k,source:P})},[d]),j=Te((T,k)=>{n==null||n(T,k),_(!1,k,"select"),k.isPropagationStopped()||S==null||S(T,k)}),C=w.useMemo(()=>({toggle:_,placement:i,show:u,menuElement:y,toggleElement:x,setMenu:p,setToggle:h}),[_,i,u,y,x,p,h]);y&&v&&!u&&(b.current=y.contains(y.ownerDocument.activeElement));const E=Te(()=>{x&&x.focus&&x.focus()}),N=Te(()=>{const T=g.current;let k=s;if(k==null&&(k=f.current&&R0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(T))return;const P=_n(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,E())},[u,b,E,N]),w.useEffect(()=>{g.current=null});const R=(T,k)=>{if(!f.current)return null;const P=_n(f.current,o);let M=P.indexOf(T)+k;return M=Math.max(0,Math.min(M,P.length)),P[M]};return iN(w.useCallback(()=>c.document,[c]),"keydown",T=>{var k,P;const{key:M}=T,D=T.target,V=(k=f.current)==null?void 0:k.contains(D),Q=(P=m.current)==null?void 0:P.contains(D);if(/input|textarea/i.test(D.tagName)&&(M===" "||M!=="Escape"&&V||M==="Escape"&&D.type==="search")||!V&&!Q||M==="Tab"&&(!f.current||!u))return;g.current=T.type;const U={originalEvent:T,source:T.type};switch(M){case"ArrowUp":{const A=R(D,-1);A&&A.focus&&A.focus(),T.preventDefault();return}case"ArrowDown":if(T.preventDefault(),!u)d(!0,U);else{const A=R(D,1);A&&A.focus&&A.focus()}return;case"Tab":qf(D.ownerDocument,"keyup",A=>{var H;(A.key==="Tab"&&!A.target||!((H=f.current)!=null&&H.contains(A.target)))&&d(!1,U)},{once:!0});break;case"Escape":M==="Escape"&&(T.preventDefault(),T.stopPropagation()),d(!1,U);break}}),a.jsx(Dn.Provider,{value:j,children:a.jsx(Al.Provider,{value:C,children:l})})}ai.displayName="Dropdown";ai.Menu=rp;ai.Toggle=k0;ai.Item=O0;const I0=w.createContext({});I0.displayName="DropdownContext";const $0=I0,A0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=fe(t,"dropdown-divider"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));A0.displayName="DropdownDivider";const Lk=A0,M0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=fe(t,"dropdown-header"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));M0.displayName="DropdownHeader";const Uk=M0,D0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=c0,...l},c)=>{const u=fe(e,"dropdown-item"),[d,f]=T0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,{...l,...d,ref:c,className:oe(t,u,f.isActive&&"active",r&&"disabled")})});D0.displayName="DropdownItem";const Vk=D0,F0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=fe(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:oe(e,t),...r})));F0.displayName="DropdownItemText";const Bk=F0,L0=w.createContext(null);L0.displayName="InputGroupContext";const U0=L0;function V0(e,t){return e}function B0(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",s=n?"bottom-end":"bottom-start",i=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",c=n?"right-end":"left-end",u=n?"left-start":"right-start",d=n?"left-end":"right-end";let f=e?i:s;return t==="up"?f=e?o:r:t==="end"?f=e?d:u:t==="start"?f=e?c:l:t==="down-centered"?f="bottom":t==="up-centered"&&(f="top"),f}const z0=w.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:s,renderOnMount:i,as:l="div",popperConfig:c,variant:u,...d},f)=>{let p=!1;const y=w.useContext(r0),m=fe(e,"dropdown-menu"),{align:h,drop:x,isRTL:v}=w.useContext($0);n=n||h;const g=w.useContext(U0),b=[];if(n)if(typeof n=="object"){const T=Object.keys(n);if(T.length){const k=T[0],P=n[k];p=P==="start",b.push(`${m}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=B0(p,x,v),[_,{hasShown:j,popper:C,show:E,toggle:N}]=E0({flip:o,rootCloseEvent:r,show:s,usePopper:!y&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(_.ref=mn(V0(f),_.ref),Ja(()=>{E&&(C==null||C.update())},[E]),!j&&!i&&!g)return null;typeof l!="string"&&(_.show=E,_.close=()=>N==null?void 0:N(!1),_.align=n);let R=d.style;return C!=null&&C.placement&&(R={...d.style,..._.style},d["x-placement"]=C.placement),a.jsx(l,{...d,..._,style:R,...(b.length||y)&&{"data-bs-popper":"static"},className:oe(t,m,E&&"show",p&&`${m}-end`,u&&`${m}-${u}`,...b)})});z0.displayName="DropdownMenu";const zk=z0,q0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=fe(t,"btn"),[d,{tagName:f}]=Kf({tagName:e,disabled:s,...l}),p=f;return a.jsx(p,{...d,...l,ref:c,disabled:s,className:oe(i,u,o&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});q0.displayName="Button";const qk=q0,H0=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=qk,...s},i)=>{const l=fe(e,"dropdown-toggle"),c=w.useContext(Al);r!==void 0&&(s.bsPrefix=r);const[u]=N0();return u.ref=mn(u.ref,V0(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});H0.displayName="DropdownToggle";const Hk=H0,W0=w.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:s,align:i="start",onSelect:l,onToggle:c,focusFirstItemOnShow:u,as:d="div",navbar:f,autoClose:p=!0,...y}=$l(e,{show:"onToggle"}),m=w.useContext(U0),h=fe(n,"dropdown"),x=Il(),v=C=>p===!1?C==="click":p==="inside"?C!=="rootClose":p==="outside"?C!=="select":!0,g=Te((C,E)=>{var N,R;!((N=E.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&E.source==="mousedown"||(E.originalEvent.currentTarget===document&&(E.source!=="keydown"||E.originalEvent.key==="Escape")&&(E.source="rootClose"),v(E.source)&&(c==null||c(C,E)))}),S=B0(i==="end",r,x),_=w.useMemo(()=>({align:i,drop:r,isRTL:x}),[i,r,x]),j={down:h,"down-centered":`${h}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx($0.Provider,{value:_,children:a.jsx(ai,{placement:S,show:o,onSelect:l,onToggle:g,focusFirstItemOnShow:u,itemSelector:`.${h}-item:not(.disabled):not(:disabled)`,children:m?y.children:a.jsx(d,{...y,ref:t,className:oe(s,o&&"show",j[r])})})})});W0.displayName="Dropdown";const Ai=Object.assign(W0,{Toggle:Hk,Menu:zk,Item:Vk,ItemText:Bk,Divider:Lk,Header:Uk});var Mi;function Vm(e){if((!Mi&&Mi!==0||e)&&Uo){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Mi=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mi}function Wk(e){const t=w.useRef(e);return t.current=e,t}function op(e){const t=Wk(e);w.useEffect(()=>()=>t.current(),[])}function Fc(e){e===void 0&&(e=Lo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function Kk(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Bm=Vo("modal-open");class Gk{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Kk(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(Tn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Bm,""),Tn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Bm),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const sp=Gk,Lc=(e,t)=>Uo?e==null?(t||Lo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function fd(e,t){const n=Dl(),[r,o]=w.useState(()=>Lc(e,n==null?void 0:n.document));if(!r){const s=Lc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=Lc(e);s!==r&&o(s)},[e,r]),r}function Yk({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=Te(t);return Ja(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Ja(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Qk({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=Yk({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(d,f=>{throw u.in||i(!0),f})}}),c=mn(l,e.ref);return s&&!t?null:w.cloneElement(e,{ref:c})}function pd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(Qk,Object.assign({},n,{transition:t})):a.jsx(Bf,Object.assign({},n))}function K0(e){return e.code==="Escape"||e.keyCode===27}const Xk=["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 Zk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let Uc;function Jk(e){return Uc||(Uc=new sp({ownerDocument:e==null?void 0:e.document})),Uc}function eT(e){const t=Dl(),n=e||Jk(t),r=w.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:w.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:w.useCallback(o=>{r.current.backdrop=o},[])})}const G0=w.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:p,backdropTransition:y,runBackdropTransition:m,autoFocus:h=!0,enforceFocus:x=!0,restoreFocus:v=!0,restoreFocusOptions:g,renderDialog:b,renderBackdrop:S=re=>a.jsx("div",Object.assign({},re)),manager:_,container:j,onShow:C,onHide:E=()=>{},onExit:N,onExited:R,onExiting:T,onEnter:k,onEntering:P,onEntered:M}=e,D=Zk(e,Xk);const V=Dl(),Q=fd(j),O=eT(_),U=Yf(),A=a0(n),[H,B]=w.useState(!n),W=w.useRef(null);w.useImperativeHandle(t,()=>O,[O]),Uo&&!A&&n&&(W.current=Fc(V==null?void 0:V.document)),n&&H&&B(!1);const Z=Te(()=>{if(O.add(),Ae.current=En(document,"keydown",ge),Se.current=En(document,"focus",()=>setTimeout(X),!0),C&&C(),h){var re,lt;const Pt=Fc((re=(lt=O.dialog)==null?void 0:lt.ownerDocument)!=null?re:V==null?void 0:V.document);O.dialog&&Pt&&!Ws(O.dialog,Pt)&&(W.current=Pt,O.dialog.focus())}}),ee=Te(()=>{if(O.remove(),Ae.current==null||Ae.current(),Se.current==null||Se.current(),v){var re;(re=W.current)==null||re.focus==null||re.focus(g),W.current=null}});w.useEffect(()=>{!n||!Q||Z()},[n,Q,Z]),w.useEffect(()=>{H&&ee()},[H,ee]),op(()=>{ee()});const X=Te(()=>{if(!x||!U()||!O.isTopModal())return;const re=Fc(V==null?void 0:V.document);O.dialog&&re&&!Ws(O.dialog,re)&&O.dialog.focus()}),ie=Te(re=>{re.target===re.currentTarget&&(u==null||u(re),l===!0&&E())}),ge=Te(re=>{c&&K0(re)&&O.isTopModal()&&(d==null||d(re),re.defaultPrevented||E())}),Se=w.useRef(),Ae=w.useRef(),F=(...re)=>{B(!0),R==null||R(...re)};if(!Q)return null;const L=Object.assign({role:r,ref:O.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},D,{style:s,className:o,tabIndex:-1});let te=b?b(L):a.jsx("div",Object.assign({},L,{children:w.cloneElement(i,{role:"document"})}));te=pd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:T,onExited:F,onEnter:k,onEntering:P,onEntered:M,children:te});let J=null;return l&&(J=S({ref:O.setBackdropRef,onClick:ie}),J=pd(y,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:J})),a.jsx(a.Fragment,{children:Sr.createPortal(a.jsxs(a.Fragment,{children:[J,te]}),Q)})});G0.displayName="Modal";const tT=Object.assign(G0,{Manager:sp});function hd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function nT(e,t){e.classList?e.classList.add(t):hd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function zm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function rT(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=zm(e.className,t):e.setAttribute("class",zm(e.className&&e.className.baseVal||"",t))}const Hr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class oT extends sp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Tn(n,{[t]:`${parseFloat(Tn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Tn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(nT(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Hr.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),_n(n,Hr.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),_n(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();rT(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Hr.FIXED_CONTENT).forEach(s=>this.restore(r,s)),_n(n,Hr.STICKY_CONTENT).forEach(s=>this.restore(o,s)),_n(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Vc;function sT(e){return Vc||(Vc=new oT(e)),Vc}const Y0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"modal-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Y0.displayName="ModalBody";const iT=Y0,aT=w.createContext({onHide(){}}),Q0=aT,X0=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=fe(e,"modal");const d=`${e}-dialog`,f=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return a.jsx("div",{...c,ref:u,className:oe(d,t,o&&`${e}-${o}`,r&&`${d}-centered`,l&&`${d}-scrollable`,s&&f),children:a.jsx("div",{className:oe(`${e}-content`,n),children:i})})});X0.displayName="ModalDialog";const Z0=X0,J0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"modal-footer"),a.jsx(n,{ref:o,className:oe(e,t),...r})));J0.displayName="ModalFooter";const lT=J0,cT={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},ip=w.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>a.jsx("button",{ref:o,type:"button",className:oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));ip.displayName="CloseButton";ip.propTypes=cT;const uT=ip,dT=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(Q0),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(uT,{"aria-label":e,variant:t,onClick:c})]})}),fT=dT,eb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=fe(e,"modal-header"),a.jsx(fT,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));eb.displayName="ModalHeader";const pT=eb,hT=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),mT=hT("h4"),tb=w.forwardRef(({className:e,bsPrefix:t,as:n=mT,...r},o)=>(t=fe(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));tb.displayName="ModalTitle";const gT=tb;function vT(e){return a.jsx(Eo,{...e,timeout:null})}function yT(e){return a.jsx(Eo,{...e,timeout:null})}const nb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Z0,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:y=!0,keyboard:m=!0,onEscapeKeyDown:h,onShow:x,onHide:v,container:g,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:_=!0,restoreFocusOptions:j,onEntered:C,onExit:E,onExiting:N,onEnter:R,onEntering:T,onExited:k,backdropClassName:P,manager:M,...D},V)=>{const[Q,O]=w.useState({}),[U,A]=w.useState(!1),H=w.useRef(!1),B=w.useRef(!1),W=w.useRef(null),[Z,ee]=Za(),X=mn(V,ee),ie=Te(v),ge=Il();e=fe(e,"modal");const Se=w.useMemo(()=>({onHide:ie}),[ie]);function Ae(){return M||sT({isRTL:ge})}function F(le){if(!Uo)return;const vn=Ae().getScrollbarWidth()>0,zo=le.scrollHeight>Lo(le).documentElement.clientHeight;O({paddingRight:vn&&!zo?Vm():void 0,paddingLeft:!vn&&zo?Vm():void 0})}const L=Te(()=>{Z&&F(Z.dialog)});op(()=>{ld(window,"resize",L),W.current==null||W.current()});const te=()=>{H.current=!0},J=le=>{H.current&&Z&&le.target===Z.dialog&&(B.current=!0),H.current=!1},re=()=>{A(!0),W.current=Fx(Z.dialog,()=>{A(!1)})},lt=le=>{le.target===le.currentTarget&&re()},Pt=le=>{if(y==="static"){lt(le);return}if(B.current||le.target!==le.currentTarget){B.current=!1;return}v==null||v()},It=le=>{m?h==null||h(le):(le.preventDefault(),y==="static"&&re())},ct=(le,vn)=>{le&&F(le),R==null||R(le,vn)},Ce=le=>{W.current==null||W.current(),E==null||E(le)},Bn=(le,vn)=>{T==null||T(le,vn),qf(window,"resize",L)},zn=le=>{le&&(le.style.display=""),k==null||k(le),ld(window,"resize",L)},ci=w.useCallback(le=>a.jsx("div",{...le,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...Q};Vr.display="block";const ui=le=>a.jsx("div",{role:"dialog",...le,style:Vr,className:oe(t,e,U&&`${e}-static`,!p&&"show"),onClick:y?Pt:void 0,onMouseUp:J,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...D,onMouseDown:te,className:r,contentClassName:o,children:s})});return a.jsx(Q0.Provider,{value:Se,children:a.jsx(tT,{show:f,ref:X,backdrop:y,container:g,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:_,restoreFocusOptions:j,onEscapeKeyDown:It,onShow:x,onHide:v,onEnter:ct,onEntering:Bn,onEntered:C,onExit:Ce,onExiting:N,onExited:zn,manager:Ae(),transition:p?vT:void 0,backdropTransition:p?yT:void 0,renderBackdrop:ci,renderDialog:ui})})});nb.displayName="Modal";const ve=Object.assign(nb,{Body:iT,Header:pT,Title:gT,Footer:lT,Dialog:Z0,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),xT=je.forwardRef(({children:e,onClick:t},n)=>a.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:n,onClick:r=>{r.preventDefault(),t(r)},children:a.jsx("span",{className:"dropdown-toggle",children:e})}));function bT({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=at(e,t),{project:o}=Rt(t||n.grantNumber);if(!n||!o||n.error||o.error)return;const s=ne.routes.request_action_path(e,"new"),i=n.allowedActions.Renewal?Array.isArray(n.allowedActions.Renewal)?[...n.allowedActions.Renewal]:[n.allowedActions.Renewal]:[];i.sort((u,d)=>u.opportunityId<d.opportunityId?-1:1);const l=[{id:"extension",action:`${s}?action_type=Extension`,isEnabled:"Extension"in n.allowedActions,button:"Request an Extension",enabled:n.usesCredits?a.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."}):a.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:a.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",n.usesCredits?a.jsxs(a.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${s}?action_type=Supplement`,isEnabled:"Supplement"in n.allowedActions,button:"Request a Supplement",enabled:n.usesCredits?a.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",n.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[n.allocationType]," ","additional ACCESS credits."]}):a.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",n.allocationType," project is eligible for a supplement of additional units."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",n.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:i.map(u=>[u.opportunityName,`${ne.routes.renew_request_path(e)}?opportunity_id=${u.opportunityId}`,"post"]),isEnabled:"Renewal"in n.allowedActions,button:"Request a Renewal",enabled:a.jsxs("p",{children:["Your ",n.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",a.jsx("a",{href:ne.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for renewal.",n.usesCredits&&a.jsxs(a.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),n.isMaximize&&a.jsxs(a.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",ne.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:a.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",a.jsxs("em",{children:["grant number ",o.grantNumber]})," and a detailed description of the problem."]})}];l.sort((u,d)=>u.isEnabled<d.isEnabled?1:-1);const c=l.map(({id:u,action:d,isEnabled:f,button:p,enabled:y,disabled:m})=>a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(d)&&d.length?a.jsxs(Ai,{className:"d-flex flex-column",children:[a.jsx(Ai.Toggle,{as:xT,children:p}),a.jsx(Ai.Menu,{children:d.map(([h,x,v])=>a.jsx(Ai.Item,{href:x,onClick:g=>{v!=="get"&&(g.preventDefault(),g.target.dataset.method=v,$&&$.rails&&$.rails.handleMethod($(g.target)))},children:h},x))})]}):a.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${f?"":"disabled"}`,href:f?d:"",children:a.jsx("span",{children:p})})}),a.jsx("div",{className:"col-sm-8 mb-2",children:f?y:m})]},u));return a.jsxs(ve,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Manage Your Project"})}),a.jsxs(ve.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function wT({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-px(n))*100;return a.jsxs(ve,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ve.Body,{children:a.jsxs("p",{children:[a.jsxs("strong",{children:[Math.round(l),"% of your allocation is unused."]})," ","Are you sure you want to request more ",i,"? You can exchange"," ",n.usesCredits?"credits for resources or ":""," one resource for another by changing the ",a.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Return to Exchange"}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{o(),r()},children:["Request More ",i]})]})})]})}function ST({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=at(e,t);if(!o||o.error)return;const i=o.actions.find(p=>p.actionId==n);if(!i)return;const{deleteStatus:l,isRequest:c}=i,u=l==Le.pending,d=l==Le.error,f=()=>s(n);return a.jsxs(ve,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Confirm Deletion"})}),a.jsxs(ve.Body,{children:[d&&a.jsxs(be,{color:"danger",children:["Deletion of the ",c?"request":"action"," failed."]}),a.jsxs("p",{children:["Are you sure you want to delete"," ",!c&&a.jsxs(a.Fragment,{children:["action"," ",a.jsxs("strong",{children:[i.type,": ",ho(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:$f(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:f,disabled:u,children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>r(n),disabled:u,children:u?"Deleting...":"Delete"})]})})]})}function tl({color:e="primary",href:t,icon:n,onClick:r,target:o,title:s}){const i=a.jsx("i",{className:`bi bi-${n}`}),l={className:`btn btn-sm ms-1 text-${e}`,href:t,onClick:r,style:{"--bs-btn-padding-x":"0.1rem","--bs-btn-padding-y":"0.1rem","--bs-btn-line-height":"1"},target:o,title:s};return t?a.jsx("a",{...l,children:i}):a.jsx("button",{...l,children:i})}function rb({action:e,request:t,toggleDeleteModal:n}){const r=e.allowedOperations||[],o=["Exchange","Transfer"].includes(e.type),s=[];r.includes("Edit")&&!o&&s.push(a.jsx(tl,{href:e.isRequest?ne.routes.edit_request_path(t.requestId):ne.routes.edit_request_action_path(t.requestId,e.actionId),icon:"pencil",title:"Edit action"},"edit")),r.includes("Delete")&&!o&&s.push(a.jsx(tl,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${ho(e.date)}`;return a.jsxs(a.Fragment,{children:[e.detailAvailable&&!o?a.jsx("a",{href:ne.routes.request_action_path(t.requestId,e.actionId),children:i}):i,s]})}function Jn({resource:e,userGuide:t=!0}){const{full:n,short:r}=Ol(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[kn(ne.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(tl,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Oo({status:e,title:t}){const n={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[e]||"dark";return a.jsx("span",{className:`badge text-bg-${n} align-self-center`,title:t,children:e})}const _T=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function jT({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t),{project:o,setRequest:s}=Rt(t||n.grantNumber);if(!n||!o)return;const i=o.requestsList;let l=0;for(;l<i.length&&i[l].requestId!==e;)l++;const c=i[l+1],u=i[l-1],d=(h,x)=>h?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(h.requestId),children:[x=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,$f(h),x=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let h of n.actions)for(let x of h.resources)f.has(x.resourceId)||(f.add(x.resourceId),p.push(x));p.sort(Ha);const y=[{key:"action",name:"Action Details",format:(h,x)=>a.jsx(rb,{action:x,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:h=>a.jsx(Oo,{status:h})},...p.map(h=>({key:`resource${h.resourceId}`,name:h.name,icon:h.icon,class:"text-end",format:h.isBoolean?x=>x?Af(x):null:_T,formatHeader:(x,v)=>a.jsx(Jn,{resource:v,userGuide:!1})}))],m=n.actions.map(h=>{const x={...h};for(let{resourceId:v}of p)x[`resource${v}`]=0;for(let{resourceId:v,approved:g,requested:b}of h.resources)x[`resource${v}`]=g||b||0;return x});return a.jsxs("div",{className:"history",children:[a.jsx(Un,{columns:y,rows:m}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function CT({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(rb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx(Oo,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(Un,{rows:n.actions,columns:o})}function ts(...e){return e.filter(t=>t!=null).reduce((t,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?n:function(...o){t.apply(this,o),n.apply(this,o)}},null)}const ET={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function RT(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=ET[e];return r+parseInt(Tn(t,o[0]),10)+parseInt(Tn(t,o[1]),10)}const NT={[Kn]:"collapse",[Qa]:"collapsing",[Sn]:"collapsing",[Qn]:"collapse show"},kT=je.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,className:s,children:i,dimension:l="height",in:c=!1,timeout:u=300,mountOnEnter:d=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:y=RT,...m},h)=>{const x=typeof l=="function"?l():l,v=w.useMemo(()=>ts(j=>{j.style[x]="0"},e),[x,e]),g=w.useMemo(()=>ts(j=>{const C=`scroll${x[0].toUpperCase()}${x.slice(1)}`;j.style[x]=`${j[C]}px`},t),[x,t]),b=w.useMemo(()=>ts(j=>{j.style[x]=null},n),[x,n]),S=w.useMemo(()=>ts(j=>{j.style[x]=`${y(x,j)}px`,Ux(j)},r),[r,y,x]),_=w.useMemo(()=>ts(j=>{j.style[x]=null},o),[x,o]);return a.jsx(Vx,{ref:h,addEndListener:Lx,...m,"aria-expanded":m.role?c:null,onEnter:v,onEntering:g,onEntered:b,onExit:S,onExiting:_,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(j,C)=>je.cloneElement(i,{...C,className:oe(s,i.props.className,NT[j],x==="width"&&"collapse-horizontal")})})}),TT=kT;function ob(e,t){return Array.isArray(e)?e.includes(t):e===t}const sb=w.createContext({});sb.displayName="AccordionContext";const Fl=sb,ib=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Fl);return t=fe(t,"accordion-collapse"),a.jsx(TT,{ref:i,in:ob(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});ib.displayName="AccordionCollapse";const ab=ib,lb=w.createContext({eventKey:""});lb.displayName="AccordionItemContext";const ap=lb,cb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=fe(t,"accordion-body");const{eventKey:f}=w.useContext(ap);return a.jsx(ab,{eventKey:f,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,children:a.jsx(e,{ref:d,...u,className:oe(n,t)})})});cb.displayName="AccordionBody";const OT=cb;function PT(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Fl);return s=>{let i=e===n?null:e;o&&(Array.isArray(n)?n.includes(e)?i=n.filter(l=>l!==e):i=[...n,e]:i=[e]),r==null||r(i,s),t==null||t(s)}}const ub=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=fe(t,"accordion-button");const{eventKey:i}=w.useContext(ap),l=PT(i,r),{activeEventKey:c}=w.useContext(Fl);return e==="button"&&(o.type="button"),a.jsx(e,{ref:s,onClick:l,...o,"aria-expanded":Array.isArray(c)?c.includes(i):i===c,className:oe(n,t,!ob(c,i)&&"collapsed")})});ub.displayName="AccordionButton";const db=ub,fb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=fe(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:oe(n,t),children:a.jsx(db,{onClick:o,children:r})})));fb.displayName="AccordionHeader";const IT=fb,pb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=fe(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(ap.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:oe(n,t)})})});pb.displayName="AccordionItem";const $T=pb,hb=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=$l(e,{activeKey:"onSelect"}),d=fe(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Fl.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:oe(s,d,l&&`${d}-flush`)})})});hb.displayName="Accordion";const Gt=Object.assign(hb,{Button:db,Collapse:ab,Item:$T,Header:IT,Body:OT}),md=2**31-1;function mb(e,t,n){const r=n-Date.now();e.current=r<=md?setTimeout(t,r):setTimeout(()=>mb(e,t,n),md)}function AT(){const e=Yf(),t=w.useRef();return op(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=md?t.current=setTimeout(o,s):mb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const MT=()=>{};function DT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||MT;j0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{K0(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Lo(la(e));let l=(i.defaultView||window).event;const c=En(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const gb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=Za(),[f,p]=Za(),y=mn(d,t),m=fd(e.container),h=fd(e.target),[x,v]=w.useState(!e.show),g=_0(h,u,C0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&x&&v(!1);const b=(...T)=>{v(!0),e.onExited&&e.onExited(...T)},S=e.show||!x;if(DT(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:_,onExiting:j,onEnter:C,onEntering:E,onEntered:N}=e;let R=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:y}),{popper:g,placement:o,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:p})});return R=pd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:_,onExiting:j,onExited:b,onEnter:C,onEntering:E,onEntered:N}),m?Sr.createPortal(R,m):null});gb.displayName="Overlay";const FT=gb,vb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"popover-header"),a.jsx(n,{ref:o,className:oe(e,t),...r})));vb.displayName="PopoverHeader";const LT=vb,yb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"popover-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));yb.displayName="PopoverBody";const xb=yb;function bb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function wb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const UT=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,body:s,arrowProps:i,hasDoneInitialMeasure:l,popper:c,show:u,...d},f)=>{const p=fe(e,"popover"),y=Il(),[m]=(t==null?void 0:t.split("-"))||[],h=bb(m,y);let x=r;return u&&!l&&(x={...r,...wb(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:x,"x-placement":m,className:oe(n,p,m&&`bs-popover-${h}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(xb,{children:o}):o]})}),VT=Object.assign(UT,{Header:LT,Body:xb,POPPER_OFFSET:[0,8]}),Sb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=fe(e,"tooltip");const f=Il(),[p]=(t==null?void 0:t.split("-"))||[],y=bb(p,f);let m=r;return c&&!i&&(m={...r,...wb(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:m,role:"tooltip","x-placement":p,className:oe(n,e,`bs-tooltip-${y}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Sb.displayName="Tooltip";const Ll=Object.assign(Sb,{TOOLTIP_OFFSET:[0,6]});function BT(e){const t=w.useRef(null),n=fe(void 0,"popover"),r=fe(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(hd(t.current,n))return VT.POPPER_OFFSET;if(hd(t.current,r))return Ll.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function zT(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(Xa(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(Xa(o)))}const _b=w.forwardRef(({children:e,transition:t=Eo,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=BT(i.offset),y=mn(l,f),m=t===!0?Eo:t||void 0,h=Te(x=>{d(x),n==null||n.onFirstUpdate==null||n.onFirstUpdate(x)});return Ja(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(FT,{...i,ref:y,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:h},transition:m,rootClose:r,placement:o,show:s,children:(x,{arrowProps:v,popper:g,show:b})=>{var S,_;zT(x,v);const j=g==null?void 0:g.placement,C=Object.assign(c.current,{state:g==null?void 0:g.state,scheduleUpdate:g==null?void 0:g.update,placement:j,outOfBoundaries:(g==null||(S=g.state)==null||(_=S.modifiersData.hide)==null?void 0:_.isReferenceHidden)||!1,strategy:n.strategy}),E=!!u;return typeof e=="function"?e({...x,placement:j,show:b,...!t&&b&&{className:"show"},popper:C,arrowProps:v,hasDoneInitialMeasure:E}):w.cloneElement(e,{...x,placement:j,arrowProps:v,popper:C,hasDoneInitialMeasure:E,className:oe(e.props.className,!t&&b&&"show"),style:{...e.props.style,...x.style}})}})});_b.displayName="Overlay";const jb=_b;function qT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function qm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Ws(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const HT=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:o,defaultShow:s=!1,onToggle:i,delay:l,placement:c,flip:u=c&&c.indexOf("auto")!==-1,...d})=>{const f=w.useRef(null),p=mn(f,n.ref),y=AT(),m=w.useRef(""),[h,x]=Qx(o,s,i),v=qT(l),{onFocus:g,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},_=D=>{p(Xa(D))},j=w.useCallback(()=>{if(y.clear(),m.current="show",!v.show){x(!0);return}y.set(()=>{m.current==="show"&&x(!0)},v.show)},[v.show,x,y]),C=w.useCallback(()=>{if(y.clear(),m.current="hide",!v.hide){x(!1);return}y.set(()=>{m.current==="hide"&&x(!1)},v.hide)},[v.hide,x,y]),E=w.useCallback((...D)=>{j(),g==null||g(...D)},[j,g]),N=w.useCallback((...D)=>{C(),b==null||b(...D)},[C,b]),R=w.useCallback((...D)=>{x(!h),S==null||S(...D)},[S,x,h]),T=w.useCallback((...D)=>{qm(j,D,"fromElement")},[j]),k=w.useCallback((...D)=>{qm(C,D,"toElement")},[C]),P=e==null?[]:[].concat(e),M={ref:_};return P.indexOf("click")!==-1&&(M.onClick=R),P.indexOf("focus")!==-1&&(M.onFocus=E,M.onBlur=N),P.indexOf("hover")!==-1&&(M.onMouseOver=T,M.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(M):w.cloneElement(n,M),a.jsx(jb,{...d,show:h,onHide:C,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},lp=HT;function WT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r}=Rt(t||n.grantNumber),{setTab:o}=Rt(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let y of p.resourceIds)i[y]=i[y]||0,i[y]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,y)=>({...p,userCount:i[p.resourceId]||0,color:Zu[y%Zu.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,y)=>a.jsx(Jn,{resource:y})},{key:"isActive",name:"Status",format:p=>a.jsx(Oo,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,y)=>{if(y.isBoolean)return Af(y.allocated);const m=y.allocated-p,h=Math.max(m,0)*100/y.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${y.color}`,style:{width:`${Math.min(h,100)}%`}}),nt(m,{abbreviate:!0})," of"," ",nt(y.allocated,{abbreviate:!0})," ",y.unit," ","remaining (",Math.round(h),"%)"]})}},{key:"endDate",name:"End Date",format:p=>ho(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:nt}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,y)=>{const m=r.currentUser.resourceUsernames[y.resourceId];if(m)return m;if(r.currentUser.resourceAccountPendingIds.includes(y.resourceId))return a.jsx(Oo,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(y.resourceId)||!y.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:x=>{x.preventDefault(),o("users")},children:"Grant access"});const h=a.jsxs(Ll,{children:["Please contact ",Mf(r)," to request access to this resource."]});return a.jsx(lp,{overlay:h,children:a.jsx("a",{href:"#",onClick:x=>{x.preventDefault()},children:"Request access"})})}}),a.jsxs("div",{className:"overview",children:[u&&!d&&c>ne.creditAlertThreshold?a.jsxs("button",{onClick:()=>o("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[a.jsxs("span",{children:[a.jsxs("span",{className:"fs-3",children:[kn(ne.resourceTypeIcons[s.icon])," ",nt(c)]})," ",s.unit," available"]}),a.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",a.jsx("span",{className:"fs-3",children:kn("chevron-right")})]})]}):null,l.length?a.jsx(Un,{columns:f,rows:l}):null]})}const KT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[kn(ne.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${nt(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],GT=({requestId:e,grantNumber:t})=>{const{project:n}=Rt(t);if(!n)return;const r=Pl.map(({role:o,name:s})=>({role:s,users:(n.users||[]).filter(i=>i.role===o).map(i=>`${i.firstName} ${i.lastName}`)})).filter(o=>o.users.length>0);return r.length?a.jsx(Un,{rows:r,columns:KT}):null};function YT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,username:o}=Rt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(WT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(GT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(CT,{requestId:e})})]}):null]})}function Dr(e){"@babel/helpers - typeof";return Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(e)}function QT(e,t){if(Dr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cb(e){var t=QT(e,"string");return Dr(t)=="symbol"?t:String(t)}function so(e,t,n){return t=Cb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(n),!0).forEach(function(r){so(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XT(e){if(Array.isArray(e))return e}function ZT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eb(e,t){if(e){if(typeof e=="string")return gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gd(e,t)}}function JT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
60
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cp(e){return aO(e)||lO(e)||Eb(e)||cO()}function uO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fO=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dO(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=uO(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ze="-ms-",rl="-moz-",ue="-webkit-",kb="comm",up="rule",dp="decl",pO="@import",Tb="@keyframes",hO="@layer",mO=Math.abs,Ul=String.fromCharCode,gO=Object.assign;function vO(e,t){return We(e,0)^45?(((t<<2^We(e,0))<<2^We(e,1))<<2^We(e,2))<<2^We(e,3):0}function Ob(e){return e.trim()}function yO(e,t){return(e=t.exec(e))?e[0]:e}function de(e,t,n){return e.replace(t,n)}function vd(e,t){return e.indexOf(t)}function We(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function an(e){return e.length}function fp(e){return e.length}function Di(e,t){return t.push(e),e}function xO(e,t){return e.map(t).join("")}var Vl=1,Po=1,Pb=0,yt=0,Ie=0,Bo="";function Bl(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Vl,column:Po,length:i,return:""}}function ns(e,t){return gO(Bl("",null,null,"",null,null,0),e,{length:-e.length},t)}function bO(){return Ie}function wO(){return Ie=yt>0?We(Bo,--yt):0,Po--,Ie===10&&(Po=1,Vl--),Ie}function St(){return Ie=yt<Pb?We(Bo,yt++):0,Po++,Ie===10&&(Po=1,Vl++),Ie}function hn(){return We(Bo,yt)}function ca(){return yt}function li(e,t){return Ks(Bo,e,t)}function Gs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ib(e){return Vl=Po=1,Pb=an(Bo=e),yt=0,[]}function $b(e){return Bo="",e}function ua(e){return Ob(li(yt-1,yd(e===91?e+2:e===40?e+1:e)))}function SO(e){for(;(Ie=hn())&&Ie<33;)St();return Gs(e)>2||Gs(Ie)>3?"":" "}function _O(e,t){for(;--t&&St()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return li(e,ca()+(t<6&&hn()==32&&St()==32))}function yd(e){for(;St();)switch(Ie){case e:return yt;case 34:case 39:e!==34&&e!==39&&yd(Ie);break;case 40:e===41&&yd(e);break;case 92:St();break}return yt}function jO(e,t){for(;St()&&e+Ie!==57;)if(e+Ie===84&&hn()===47)break;return"/*"+li(t,yt-1)+"*"+Ul(e===47?e:St())}function CO(e){for(;!Gs(hn());)St();return li(e,yt)}function EO(e){return $b(da("",null,null,null,[""],e=Ib(e),0,[0],e))}function da(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,y=0,m=0,h=1,x=1,v=1,g=0,b="",S=o,_=s,j=r,C=b;x;)switch(m=g,g=St()){case 40:if(m!=108&&We(C,f-1)==58){vd(C+=de(ua(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=ua(g);break;case 9:case 10:case 13:case 32:C+=SO(m);break;case 92:C+=_O(ca()-1,7);continue;case 47:switch(hn()){case 42:case 47:Di(RO(jO(St(),ca()),t,n),c);break;default:C+="/"}break;case 123*h:l[u++]=an(C)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:x=0;case 59+d:v==-1&&(C=de(C,/\f/g,"")),y>0&&an(C)-f&&Di(y>32?Gm(C+";",r,n,f-1):Gm(de(C," ","")+";",r,n,f-2),c);break;case 59:C+=";";default:if(Di(j=Km(C,t,n,u,d,o,l,b,S=[],_=[],f),s),g===123)if(d===0)da(C,t,j,j,S,s,f,l,_);else switch(p===99&&We(C,3)===110?100:p){case 100:case 108:case 109:case 115:da(e,j,j,r&&Di(Km(e,j,j,0,0,o,l,b,o,S=[],f),_),o,_,f,l,r?S:_);break;default:da(C,j,j,j,[""],_,0,l,_)}}u=d=y=0,h=v=1,b=C="",f=i;break;case 58:f=1+an(C),y=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&wO()==125)continue}switch(C+=Ul(g),g*h){case 38:v=d>0?1:(C+="\f",-1);break;case 44:l[u++]=(an(C)-1)*v,v=1;break;case 64:hn()===45&&(C+=ua(St())),p=hn(),d=f=an(b=C+=CO(ca())),g++;break;case 45:m===45&&an(C)==2&&(h=0)}}return s}function Km(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],y=fp(p),m=0,h=0,x=0;m<r;++m)for(var v=0,g=Ks(e,f+1,f=mO(h=i[m])),b=e;v<y;++v)(b=Ob(h>0?p[v]+" "+g:de(g,/&\f/g,p[v])))&&(c[x++]=b);return Bl(e,t,n,o===0?up:l,c,u,d)}function RO(e,t,n){return Bl(e,t,n,kb,Ul(bO()),Ks(e,2,-2),0)}function Gm(e,t,n,r){return Bl(e,t,n,dp,Ks(e,0,r),Ks(e,r+1,-1),r)}function mo(e,t){for(var n="",r=fp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function NO(e,t,n,r){switch(e.type){case hO:if(e.children.length)break;case pO:case dp:return e.return=e.return||e.value;case kb:return"";case Tb:return e.return=e.value+"{"+mo(e.children,r)+"}";case up:e.value=e.props.join(",")}return an(n=mo(e.children,r))?e.return=e.value+"{"+n+"}":""}function kO(e){var t=fp(e);return function(n,r,o,s){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,s)||"";return i}}function TO(e){return function(t){t.root||(t=t.return)&&e(t)}}function OO(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var PO=function(t,n,r){for(var o=0,s=0;o=s,s=hn(),o===38&&s===12&&(n[r]=1),!Gs(s);)St();return li(t,yt)},IO=function(t,n){var r=-1,o=44;do switch(Gs(o)){case 0:o===38&&hn()===12&&(n[r]=1),t[r]+=PO(yt-1,n,r);break;case 2:t[r]+=ua(o);break;case 4:if(o===44){t[++r]=hn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ul(o)}while(o=St());return t},$O=function(t,n){return $b(IO(Ib(t),n))},Ym=new WeakMap,AO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ym.get(r))&&!o){Ym.set(t,!0);for(var s=[],i=$O(n,s),l=r.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},MO=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ab(e,t){switch(vO(e,t)){case 5103:return ue+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ue+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ue+e+rl+e+Ze+e+e;case 6828:case 4268:return ue+e+Ze+e+e;case 6165:return ue+e+Ze+"flex-"+e+e;case 5187:return ue+e+de(e,/(\w+).+(:[^]+)/,ue+"box-$1$2"+Ze+"flex-$1$2")+e;case 5443:return ue+e+Ze+"flex-item-"+de(e,/flex-|-self/,"")+e;case 4675:return ue+e+Ze+"flex-line-pack"+de(e,/align-content|flex-|-self/,"")+e;case 5548:return ue+e+Ze+de(e,"shrink","negative")+e;case 5292:return ue+e+Ze+de(e,"basis","preferred-size")+e;case 6060:return ue+"box-"+de(e,"-grow","")+ue+e+Ze+de(e,"grow","positive")+e;case 4554:return ue+de(e,/([^-])(transform)/g,"$1"+ue+"$2")+e;case 6187:return de(de(de(e,/(zoom-|grab)/,ue+"$1"),/(image-set)/,ue+"$1"),e,"")+e;case 5495:case 3959:return de(e,/(image-set\([^]*)/,ue+"$1$`$1");case 4968:return de(de(e,/(.+:)(flex-)?(.*)/,ue+"box-pack:$3"+Ze+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ue+e+e;case 4095:case 3583:case 4068:case 2532:return de(e,/(.+)-inline(.+)/,ue+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(an(e)-1-t>6)switch(We(e,t+1)){case 109:if(We(e,t+4)!==45)break;case 102:return de(e,/(.+:)(.+)-([^]+)/,"$1"+ue+"$2-$3$1"+rl+(We(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vd(e,"stretch")?Ab(de(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(We(e,t+1)!==115)break;case 6444:switch(We(e,an(e)-3-(~vd(e,"!important")&&10))){case 107:return de(e,":",":"+ue)+e;case 101:return de(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(We(e,14)===45?"inline-":"")+"box$3$1"+ue+"$2$3$1"+Ze+"$2box$3")+e}break;case 5936:switch(We(e,t+11)){case 114:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+Ze+e+e}return e}var DO=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case dp:t.return=Ab(t.value,t.length);break;case Tb:return mo([ns(t,{value:de(t.value,"@","@"+ue)})],o);case up:if(t.length)return xO(t.props,function(s){switch(yO(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mo([ns(t,{props:[de(s,/:(read-\w+)/,":"+rl+"$1")]})],o);case"::placeholder":return mo([ns(t,{props:[de(s,/:(plac\w+)/,":"+ue+"input-$1")]}),ns(t,{props:[de(s,/:(plac\w+)/,":"+rl+"$1")]}),ns(t,{props:[de(s,/:(plac\w+)/,Ze+"input-$1")]})],o)}return""})}},FO=[DO],LO=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var x=h.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||FO,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var x=h.getAttribute("data-emotion").split(" "),v=1;v<x.length;v++)s[x[v]]=!0;l.push(h)});var c,u=[AO,MO];{var d,f=[NO,TO(function(h){d.insert(h)})],p=kO(u.concat(o,f)),y=function(x){return mo(EO(x),p)};c=function(x,v,g,b){d=g,y(x?x+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new fO({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(l),m},Mb={exports:{}},me={};/** @license React v16.13.1
|
|
58
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var l in s)t.call(s,l)&&s[l]&&(i=o(i,l));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Bx);var IR=Bx.exports;const se=ei(IR);function Wf(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function el(e,t){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},el(e,t)}function $R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Em={disabled:!1},qx=Re.createContext(null);var MR=function(t){return t.scrollTop},ps="unmounted",Gn="exited",Sn="entering",Xn="entered",tl="exiting",zn=function(e){$R(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=Gn,s.appearStatus=Sn):c=Xn:r.unmountOnExit||r.mountOnEnter?c=ps:c=Gn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===ps?{status:Gn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Sn&&i!==Xn&&(s=Sn):(i===Sn||i===Xn)&&(s=tl)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Sn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Cr.findDOMNode(this);i&&MR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gn&&this.setState({status:ps})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[Cr.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!o&&!i||Em.disabled){this.safeSetState({status:Xn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Sn},function(){s.props.onEntering(u,d),s.onTransitionEnd(p,function(){s.safeSetState({status:Xn},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:Cr.findDOMNode(this);if(!s||Em.disabled){this.safeSetState({status:Gn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:tl},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Gn},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:Cr.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===ps)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=Wf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Re.createElement(qx.Provider,{value:null},typeof i=="function"?i(o,l):Re.cloneElement(Re.Children.only(i),l))},t}(Re.Component);zn.contextType=qx;zn.propTypes={};function Hr(){}zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Hr,onEntering:Hr,onEntered:Hr,onExit:Hr,onExiting:Hr,onExited:Hr};zn.UNMOUNTED=ps;zn.EXITED=Gn;zn.ENTERING=Sn;zn.ENTERED=Xn;zn.EXITING=tl;const AR=zn;function Uo(e){return e&&e.ownerDocument||document}function DR(e){var t=Uo(e);return t&&t.defaultView||window}function FR(e,t){return DR(e).getComputedStyle(e,t)}var LR=/([A-Z])/g;function UR(e){return e.replace(LR,"-$1").toLowerCase()}var VR=/^ms-/;function Di(e){return UR(e).replace(VR,"-ms-")}var zR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function BR(e){return!!(e&&zR.test(e))}function On(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Di(t))||FR(e).getPropertyValue(Di(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Di(o)):BR(o)?r+=o+"("+s+") ":n+=Di(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Vo=!!(typeof window<"u"&&window.document&&window.document.createElement);var ud=!1,dd=!1;try{var Vc={get passive(){return ud=!0},get once(){return dd=ud=!0}};Vo&&(window.addEventListener("test",Vc,Vc),window.removeEventListener("test",Vc,!0))}catch{}function Kf(e,t,n,r){if(r&&typeof r!="boolean"&&!dd){var o=r.once,s=r.capture,i=n;!dd&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,ud?r:s)}e.addEventListener(t,n,r)}function fd(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function En(e,t,n,r){return Kf(e,t,n,r),function(){fd(e,t,n,r)}}function qR(e,t,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function HR(e){var t=On(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function WR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||qR(e,"transitionend",!0)},t+n),s=En(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Hx(e,t,n,r){n==null&&(n=HR(e)||0);var o=WR(e,n,r),s=En(e,"transitionend",t);return function(){o(),s()}}function Rm(e,t){const n=On(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Wx(e,t){const n=Rm(e,"transitionDuration"),r=Rm(e,"transitionDelay"),o=Hx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Kx(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Cr.findDOMNode(e):e??null}const KR=Re.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},d)=>{const f=w.useRef(null),p=mn(f,c),m=j=>{p(nl(j))},g=j=>_=>{j&&f.current&&j(f.current,_)},y=w.useCallback(g(e),[e]),x=w.useCallback(g(t),[t]),h=w.useCallback(g(n),[n]),v=w.useCallback(g(r),[r]),b=w.useCallback(g(o),[o]),S=w.useCallback(g(s),[s]),C=w.useCallback(g(i),[i]);return a.jsx(AR,{ref:d,...u,onEnter:y,onEntered:h,onEntering:x,onExit:v,onExited:S,onExiting:b,addEndListener:C,nodeRef:f,children:typeof l=="function"?(j,_)=>l(j,{..._,ref:m}):Re.cloneElement(l,{ref:m})})}),Gx=KR,GR={[Sn]:"show",[Xn]:"show"},Yx=w.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=w.useCallback((c,u)=>{Kx(c),r==null||r(c,u)},[r]);return a.jsx(Gx,{ref:s,addEndListener:Wx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:se("fade",e,t.props.className,GR[c],n[c])})})});Yx.displayName="Fade";const Ro=Yx;function Gf(e){return typeof e=="boolean"?e?Ro:Hf:e}const Qx=({transition:e,...t})=>a.jsx(zx,{...t,transition:Gf(e)});Qx.displayName="TabContainer";const YR=Qx,QR=["xxl","xl","lg","md","sm","xs"],XR="xs",Xx=w.createContext({prefixes:{},breakpoints:QR,minBreakpoint:XR});function pe(e,t){const{prefixes:n}=w.useContext(Xx);return e||n[t]||t}function Ml(){const{dir:e}=w.useContext(Xx);return e==="rtl"}const Zx=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"tab-content"),a.jsx(n,{ref:o,className:se(e,t),...r})));Zx.displayName="TabContent";const Jx=Zx,e0=w.forwardRef(({bsPrefix:e,transition:t,...n},r)=>{const[{className:o,as:s="div",...i},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:g,unmountOnExit:y,transition:x=Ro}]=Lx({...n,transition:Gf(t)}),h=pe(e,"tab-pane");return a.jsx(Lo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(x,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:g,unmountOnExit:y,children:a.jsx(s,{...i,ref:r,className:se(o,h,l&&"active")})})})})});e0.displayName="TabPane";const t0=e0,ZR={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},n0=()=>{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")};n0.propTypes=ZR;const ts=Object.assign(n0,{Container:YR,Content:Jx,Pane:t0});function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function km(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function JR(e){var t=ek(e,"string");return typeof t=="symbol"?t:String(t)}function ek(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r0(e,t,n){var r=w.useRef(e!==void 0),o=w.useState(t),s=o[0],i=o[1],l=e!==void 0,c=r.current;return r.current=l,!l&&c&&s!==t&&i(t),[l?e:s,w.useCallback(function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];n&&n.apply(void 0,[u].concat(f)),i(u)},[n])]}function Al(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[km(r)],l=s[r],c=Wf(s,[km(r),r].map(JR)),u=t[r],d=r0(l,i,e[u]),f=d[0],p=d[1];return Q({},c,(o={},o[r]=f,o[u]=p,o))},e)}var Nm={exports:{}},pd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){function o(i,l,c,u,d,f){var p=u||"<<anonymous>>",m=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+m+"` was not specified "+("in `"+p+"`.")):null;for(var g=arguments.length,y=Array(g>6?g-6:0),x=6;x<g;x++)y[x-6]=arguments[x];return r.apply(void 0,[l,c,p,d,m].concat(y))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(pd,pd.exports);var tk=pd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=tk,r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(){for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];function u(){for(var d=arguments.length,f=Array(d),p=0;p<d;p++)f[p]=arguments[p];var m=null;return l.forEach(function(g){if(m==null){var y=g.apply(void 0,f);y!=null&&(m=y)}}),m}return(0,r.default)(u)}e.exports=t.default})(Nm,Nm.exports);var nk=Function.prototype.bind.call(Function.prototype.call,[].slice);function Cn(e,t){return nk(e.querySelectorAll(t))}function o0(){const[,e]=w.useReducer(t=>!t,!1);return e}const s0=w.createContext(null);s0.displayName="NavContext";const Yf=s0,rk="data-rr-ui-",ok="rrUi";function zo(e){return`${rk}${e}`}function sk(e){return`${ok}${e}`}const ik=["as","disabled"];function ak(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function lk(e){return!e||e.trim()==="#"}function Qf({tagName:e,disabled:t,href:n,target:r,rel:o,role:s,onClick:i,tabIndex:l=0,type:c}){e||(n!=null||r!=null||o!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},u];const d=p=>{if((t||e==="a"&&lk(n))&&p.preventDefault(),t){p.stopPropagation();return}i==null||i(p)},f=p=>{p.key===" "&&(p.preventDefault(),d(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:t?void 0:l,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:d,onKeyDown:f},u]}const Xf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=ak(e,ik);const[s,{tagName:i}]=Qf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Xf.displayName="Button";const ck=["as","active","eventKey"];function uk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function i0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Dn),l=w.useContext(Yf),c=w.useContext(Lo);let u=n;const d={role:o};if(l){!o&&l.role==="tablist"&&(d.role="tab");const f=l.getControllerId(e??null),p=l.getControlledId(e??null);d[zo("event-key")]=e,d.id=f||r,u=n==null&&e!=null?l.activeKey===e:n,(u||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(d["aria-controls"]=p)}return d.role==="tab"&&(d["aria-selected"]=u,u||(d.tabIndex=-1),s&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Te(f=>{s||(t==null||t(f),e!=null&&i&&!f.isPropagationStopped()&&i(e,f))}),[d,{isActive:u}]}const a0=w.forwardRef((e,t)=>{let{as:n=Xf,active:r,eventKey:o}=e,s=uk(e,ck);const[i,l]=i0(Object.assign({key:Mr(o,s.href),active:r},s));return i[zo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});a0.displayName="NavItem";const dk=a0,fk=["as","onSelect","activeKey","role","onKeyDown"];function pk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Om=()=>{},Tm=zo("event-key"),l0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=pk(e,fk);const c=o0(),u=w.useRef(!1),d=w.useContext(Dn),f=w.useContext(Lo);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const g=w.useRef(null),y=b=>{const S=g.current;if(!S)return null;const C=Cn(S,`[${Tm}]:not([aria-disabled=true])`),j=S.querySelector("[aria-selected=true]");if(!j||j!==document.activeElement)return null;const _=C.indexOf(j);if(_===-1)return null;let E=_+b;return E>=C.length&&(E=0),E<0&&(E=C.length-1),C[E]},x=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},h=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=y(-1);break;case"ArrowRight":case"ArrowDown":S=y(1);break;default:return}S&&(b.preventDefault(),x(S.dataset[sk("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(g.current&&u.current){const b=g.current.querySelector(`[${Tm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const v=mn(t,g);return a.jsx(Dn.Provider,{value:x,children:a.jsx(Yf.Provider,{value:{role:s,activeKey:Mr(o),getControlledId:p||Om,getControllerId:m||Om},children:a.jsx(n,Object.assign({},l,{onKeyDown:h,ref:v,role:s}))})})});l0.displayName="Nav";const hk=Object.assign(l0,{Item:dk}),c0=w.createContext(null);c0.displayName="NavbarContext";const u0=c0,d0=w.createContext(null);d0.displayName="CardHeaderContext";const mk=d0,f0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"nav-item"),a.jsx(n,{ref:o,className:se(e,t),...r})));f0.displayName="NavItem";const p0=f0;function rl(){return w.useState(null)}function gk(e,t,n,r=!1){const o=Te(n);w.useEffect(()=>{const s=typeof e=="function"?e():e;return s.addEventListener(t,o,r),()=>s.removeEventListener(t,o,r)},[e])}function Zf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function h0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const vk=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",yk=typeof document<"u",ol=yk||vk?w.useLayoutEffect:w.useEffect,xk=["onKeyDown"];function bk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function wk(e){return!e||e.trim()==="#"}const m0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=bk(e,xk);const[o]=Qf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return wk(r.href)||r.role==="button"?a.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:s})):a.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});m0.displayName="Anchor";const g0=m0,v0=w.forwardRef(({bsPrefix:e,className:t,as:n=g0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=pe(e,"nav-link");const[c,u]=i0({key:Mr(o,i.href),active:r,disabled:s,...i});return a.jsx(n,{...i,...c,ref:l,disabled:s,className:se(t,e,s&&"disabled",u.isActive&&"active")})});v0.displayName="NavLink";const y0=v0,x0=w.forwardRef((e,t)=>{const{as:n="div",bsPrefix:r,variant:o,fill:s=!1,justify:i=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...f}=Al(e,{activeKey:"onSelect"}),p=pe(r,"nav");let m,g,y=!1;const x=w.useContext(u0),h=w.useContext(mk);return x?(m=x.bsPrefix,y=l??!0):h&&({cardHeaderBsPrefix:g}=h),a.jsx(hk,{as:n,ref:t,activeKey:d,className:se(u,{[p]:!y,[`${m}-nav`]:y,[`${m}-nav-scroll`]:y&&c,[`${g}-${o}`]:!!g,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});x0.displayName="Nav";const Sk=Object.assign(x0,{Item:p0,Link:y0});function Pm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function Ck(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function jk(e){let t;return Ck(e,n=>{t==null&&(t=n.props.eventKey)}),t}function _k(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(p0,{as:"li",role:"presentation",children:a.jsx(y0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const b0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=jk(l),...u}=Al(e,{activeKey:"onSelect"});return a.jsxs(zx,{id:t,activeKey:c,onSelect:n,transition:Gf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(Sk,{...u,role:"tablist",as:"ul",variant:i,children:Pm(l,_k)}),a.jsx(Jx,{children:Pm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(t0,{...f})})})]})};b0.displayName="Tabs";const Ek=b0,Rk=w.createContext(null),Dl=Rk;var Im=Object.prototype.hasOwnProperty;function $m(e,t,n){for(n of e.keys())if(Cs(n,t))return n}function Cs(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Cs(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=$m(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=$m(t,o),!o)||!Cs(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Im.call(e,n)&&++r&&!Im.call(t,n)||!(n in t)||!Cs(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function kk(e){const t=Zf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var gt="top",Vt="bottom",zt="right",vt="left",Jf="auto",ci=[gt,Vt,zt,vt],ko="start",Ws="end",Nk="clippingParents",w0="viewport",ns="popper",Ok="reference",Mm=ci.reduce(function(e,t){return e.concat([t+"-"+ko,t+"-"+Ws])},[]),S0=[].concat(ci,[Jf]).reduce(function(e,t){return e.concat([t,t+"-"+ko,t+"-"+Ws])},[]),Tk="beforeRead",Pk="read",Ik="afterRead",$k="beforeMain",Mk="main",Ak="afterMain",Dk="beforeWrite",Fk="write",Lk="afterWrite",Uk=[Tk,Pk,Ik,$k,Mk,Ak,Dk,Fk,Lk];function un(e){return e.split("-")[0]}function kt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ar(e){var t=kt(e).Element;return e instanceof t||e instanceof Element}function dn(e){var t=kt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ep(e){if(typeof ShadowRoot>"u")return!1;var t=kt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Rr=Math.max,sl=Math.min,No=Math.round;function hd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function C0(){return!/^((?!chrome|android).)*safari/i.test(hd())}function Oo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&dn(e)&&(o=e.offsetWidth>0&&No(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&No(r.height)/e.offsetHeight||1);var i=Ar(e)?kt(e):window,l=i.visualViewport,c=!C0()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/s,f=r.width/o,p=r.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function tp(e){var t=Oo(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function j0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ep(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fr(e){return e?(e.nodeName||"").toLowerCase():null}function Fn(e){return kt(e).getComputedStyle(e)}function Vk(e){return["table","td","th"].indexOf(fr(e))>=0}function gr(e){return((Ar(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fl(e){return fr(e)==="html"?e:e.assignedSlot||e.parentNode||(ep(e)?e.host:null)||gr(e)}function Am(e){return!dn(e)||Fn(e).position==="fixed"?null:e.offsetParent}function zk(e){var t=/firefox/i.test(hd()),n=/Trident/i.test(hd());if(n&&dn(e)){var r=Fn(e);if(r.position==="fixed")return null}var o=Fl(e);for(ep(o)&&(o=o.host);dn(o)&&["html","body"].indexOf(fr(o))<0;){var s=Fn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ui(e){for(var t=kt(e),n=Am(e);n&&Vk(n)&&Fn(n).position==="static";)n=Am(n);return n&&(fr(n)==="html"||fr(n)==="body"&&Fn(n).position==="static")?t:n||zk(e)||t}function np(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function js(e,t,n){return Rr(e,sl(t,n))}function Bk(e,t,n){var r=js(e,t,n);return r>n?n:r}function _0(){return{top:0,right:0,bottom:0,left:0}}function E0(e){return Object.assign({},_0(),e)}function R0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var qk=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,E0(typeof t!="number"?t:R0(t,ci))};function Hk(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=un(n.placement),c=np(l),u=[vt,zt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=qk(o.padding,n),p=tp(s),m=c==="y"?gt:vt,g=c==="y"?Vt:zt,y=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],x=i[c]-n.rects.reference[c],h=ui(s),v=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,b=y/2-x/2,S=f[m],C=v-p[d]-f[g],j=v/2-p[d]/2+b,_=js(S,j,C),E=c;n.modifiersData[r]=(t={},t[E]=_,t.centerOffset=_-j,t)}}function Wk(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||j0(t.elements.popper,o)&&(t.elements.arrow=o))}const Kk={name:"arrow",enabled:!0,phase:"main",fn:Hk,effect:Wk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function To(e){return e.split("-")[1]}var Gk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yk(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:No(n*o)/o||0,y:No(r*o)/o||0}}function Dm(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=i.x,m=p===void 0?0:p,g=i.y,y=g===void 0?0:g,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var h=i.hasOwnProperty("x"),v=i.hasOwnProperty("y"),b=vt,S=gt,C=window;if(u){var j=ui(n),_="clientHeight",E="clientWidth";if(j===kt(n)&&(j=gr(n),Fn(j).position!=="static"&&l==="absolute"&&(_="scrollHeight",E="scrollWidth")),j=j,o===gt||(o===vt||o===zt)&&s===Ws){S=Vt;var k=f&&j===C&&C.visualViewport?C.visualViewport.height:j[_];y-=k-r.height,y*=c?1:-1}if(o===vt||(o===gt||o===Vt)&&s===Ws){b=zt;var R=f&&j===C&&C.visualViewport?C.visualViewport.width:j[E];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&Gk),N=d===!0?Yk({x:m,y},kt(n)):{x:m,y};if(m=N.x,y=N.y,c){var P;return Object.assign({},O,(P={},P[S]=v?"0":"",P[b]=h?"0":"",P.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",P))}return Object.assign({},O,(t={},t[S]=v?y+"px":"",t[b]=h?m+"px":"",t.transform="",t))}function Qk(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:un(t.placement),variation:To(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dm(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dm(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Xk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Qk,data:{}};var Fi={passive:!0};function Zk(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=kt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Fi)}),l&&c.addEventListener("resize",n.update,Fi),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Fi)}),l&&c.removeEventListener("resize",n.update,Fi)}}const Jk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zk,data:{}};var eN={left:"right",right:"left",bottom:"top",top:"bottom"};function da(e){return e.replace(/left|right|bottom|top/g,function(t){return eN[t]})}var tN={start:"end",end:"start"};function Fm(e){return e.replace(/start|end/g,function(t){return tN[t]})}function rp(e){var t=kt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function op(e){return Oo(gr(e)).left+rp(e).scrollLeft}function nN(e,t){var n=kt(e),r=gr(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;var u=C0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+op(e),y:c}}function rN(e){var t,n=gr(e),r=rp(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Rr(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Rr(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+op(e),c=-r.scrollTop;return Fn(o||n).direction==="rtl"&&(l+=Rr(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function sp(e){var t=Fn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function k0(e){return["html","body","#document"].indexOf(fr(e))>=0?e.ownerDocument.body:dn(e)&&sp(e)?e:k0(Fl(e))}function _s(e,t){var n;t===void 0&&(t=[]);var r=k0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=kt(r),i=o?[s].concat(s.visualViewport||[],sp(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(_s(Fl(i)))}function md(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oN(e,t){var n=Oo(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Lm(e,t,n){return t===w0?md(nN(e,n)):Ar(t)?oN(t,n):md(rN(gr(e)))}function sN(e){var t=_s(Fl(e)),n=["absolute","fixed"].indexOf(Fn(e).position)>=0,r=n&&dn(e)?ui(e):e;return Ar(r)?t.filter(function(o){return Ar(o)&&j0(o,r)&&fr(o)!=="body"}):[]}function iN(e,t,n,r){var o=t==="clippingParents"?sN(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Lm(e,u,r);return c.top=Rr(d.top,c.top),c.right=sl(d.right,c.right),c.bottom=sl(d.bottom,c.bottom),c.left=Rr(d.left,c.left),c},Lm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function N0(e){var t=e.reference,n=e.element,r=e.placement,o=r?un(r):null,s=r?To(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case gt:c={x:i,y:t.y-n.height};break;case Vt:c={x:i,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:l};break;case vt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?np(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case ko:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Ws:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ks(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?Nk:l,u=n.rootBoundary,d=u===void 0?w0:u,f=n.elementContext,p=f===void 0?ns:f,m=n.altBoundary,g=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,h=E0(typeof x!="number"?x:R0(x,ci)),v=p===ns?Ok:ns,b=e.rects.popper,S=e.elements[g?v:p],C=iN(Ar(S)?S:S.contextElement||gr(e.elements.popper),c,d,i),j=Oo(e.elements.reference),_=N0({reference:j,element:b,strategy:"absolute",placement:o}),E=md(Object.assign({},b,_)),k=p===ns?E:j,R={top:C.top-k.top+h.top,bottom:k.bottom-C.bottom+h.bottom,left:C.left-k.left+h.left,right:k.right-C.right+h.right},O=e.modifiersData.offset;if(p===ns&&O){var N=O[o];Object.keys(R).forEach(function(P){var A=[zt,Vt].indexOf(P)>=0?1:-1,D=[gt,Vt].indexOf(P)>=0?"y":"x";R[P]+=N[D]*A})}return R}function aN(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?S0:c,d=To(r),f=d?l?Mm:Mm.filter(function(g){return To(g)===d}):ci,p=f.filter(function(g){return u.indexOf(g)>=0});p.length===0&&(p=f);var m=p.reduce(function(g,y){return g[y]=Ks(e,{placement:y,boundary:o,rootBoundary:s,padding:i})[un(y)],g},{});return Object.keys(m).sort(function(g,y){return m[g]-m[y]})}function lN(e){if(un(e)===Jf)return[];var t=da(e);return[Fm(e),t,Fm(t)]}function cN(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,h=un(x),v=h===x,b=c||(v||!g?[da(x)]:lN(x)),S=[x].concat(b).reduce(function(J,te){return J.concat(un(te)===Jf?aN(t,{placement:te,boundary:d,rootBoundary:f,padding:u,flipVariations:g,allowedAutoPlacements:y}):te)},[]),C=t.rects.reference,j=t.rects.popper,_=new Map,E=!0,k=S[0],R=0;R<S.length;R++){var O=S[R],N=un(O),P=To(O)===ko,A=[gt,Vt].indexOf(N)>=0,D=A?"width":"height",V=Ks(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),X=A?P?zt:vt:P?Vt:gt;C[D]>j[D]&&(X=da(X));var T=da(X),U=[];if(s&&U.push(V[N]<=0),l&&U.push(V[X]<=0,V[T]<=0),U.every(function(J){return J})){k=O,E=!1;break}_.set(O,U)}if(E)for(var M=g?3:1,H=function(te){var Z=S.find(function(ae){var ve=_.get(ae);if(ve)return ve.slice(0,te).every(function(Se){return Se})});if(Z)return k=Z,"break"},z=M;z>0;z--){var W=H(z);if(W==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const uN={name:"flip",enabled:!0,phase:"main",fn:cN,requiresIfExists:["offset"],data:{_skip:!1}};function Um(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Vm(e){return[gt,zt,Vt,vt].some(function(t){return e[t]>=0})}function dN(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ks(t,{elementContext:"reference"}),l=Ks(t,{altBoundary:!0}),c=Um(i,r),u=Um(l,o,s),d=Vm(c),f=Vm(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const fN={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dN};function pN(e,t,n){var r=un(e),o=[vt,gt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[vt,zt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function hN(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=S0.reduce(function(d,f){return d[f]=pN(f,t.rects,s),d},{}),l=i[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const mN={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hN};function gN(e){var t=e.state,n=e.name;t.modifiersData[n]=N0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const vN={name:"popperOffsets",enabled:!0,phase:"read",fn:gN,data:{}};function yN(e){return e==="x"?"y":"x"}function xN(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,g=n.tetherOffset,y=g===void 0?0:g,x=Ks(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),h=un(t.placement),v=To(t.placement),b=!v,S=np(h),C=yN(S),j=t.modifiersData.popperOffsets,_=t.rects.reference,E=t.rects.popper,k=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(j){if(s){var P,A=S==="y"?gt:vt,D=S==="y"?Vt:zt,V=S==="y"?"height":"width",X=j[S],T=X+x[A],U=X-x[D],M=m?-E[V]/2:0,H=v===ko?_[V]:E[V],z=v===ko?-E[V]:-_[V],W=t.elements.arrow,J=m&&W?tp(W):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_0(),Z=te[A],ae=te[D],ve=js(0,_[V],J[V]),Se=b?_[V]/2-M-ve-Z-R.mainAxis:H-ve-Z-R.mainAxis,Ae=b?-_[V]/2+M+ve+ae+R.mainAxis:z+ve+ae+R.mainAxis,F=t.elements.arrow&&ui(t.elements.arrow),L=F?S==="y"?F.clientTop||0:F.clientLeft||0:0,ne=(P=O==null?void 0:O[S])!=null?P:0,ee=X+Se-ne-L,oe=X+Ae-ne,lt=js(m?sl(T,ee):T,X,m?Rr(U,oe):U);j[S]=lt,N[S]=lt-X}if(l){var Pt,It=S==="x"?gt:vt,ct=S==="x"?Vt:zt,_e=j[C],Bn=C==="y"?"height":"width",qn=_e+x[It],hi=_e-x[ct],zr=[gt,vt].indexOf(h)!==-1,mi=(Pt=O==null?void 0:O[C])!=null?Pt:0,ce=zr?qn:_e-_[Bn]-E[Bn]-mi+R.altAxis,vn=zr?_e+_[Bn]+E[Bn]-mi-R.altAxis:hi,qo=m&&zr?Bk(ce,_e,vn):js(m?ce:qn,_e,m?vn:hi);j[C]=qo,N[C]=qo-_e}t.modifiersData[r]=N}}const bN={name:"preventOverflow",enabled:!0,phase:"main",fn:xN,requiresIfExists:["offset"]};function wN(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function SN(e){return e===kt(e)||!dn(e)?rp(e):wN(e)}function CN(e){var t=e.getBoundingClientRect(),n=No(t.width)/e.offsetWidth||1,r=No(t.height)/e.offsetHeight||1;return n!==1||r!==1}function jN(e,t,n){n===void 0&&(n=!1);var r=dn(t),o=dn(t)&&CN(t),s=gr(t),i=Oo(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((fr(t)!=="body"||sp(s))&&(l=SN(t)),dn(t)?(c=Oo(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=op(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function _N(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function EN(e){var t=_N(e);return Uk.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function RN(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function kN(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var zm={placement:"bottom",modifiers:[],strategy:"absolute"};function Bm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function NN(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?zm:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},zm,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,m={state:d,setOptions:function(h){var v=typeof h=="function"?h(d.options):h;y(),d.options=Object.assign({},s,d.options,v),d.scrollParents={reference:Ar(l)?_s(l):l.contextElement?_s(l.contextElement):[],popper:_s(c)};var b=EN(kN([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),g(),m.update()},forceUpdate:function(){if(!p){var h=d.elements,v=h.reference,b=h.popper;if(Bm(v,b)){d.rects={reference:jN(v,ui(b),d.options.strategy==="fixed"),popper:tp(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var C=d.orderedModifiers[S],j=C.fn,_=C.options,E=_===void 0?{}:_,k=C.name;typeof j=="function"&&(d=j({state:d,options:E,name:k,instance:m})||d)}}}},update:RN(function(){return new Promise(function(x){m.forceUpdate(),x(d)})}),destroy:function(){y(),p=!0}};if(!Bm(l,c))return m;m.setOptions(u).then(function(x){!p&&u.onFirstUpdate&&u.onFirstUpdate(x)});function g(){d.orderedModifiers.forEach(function(x){var h=x.name,v=x.options,b=v===void 0?{}:v,S=x.effect;if(typeof S=="function"){var C=S({state:d,name:h,instance:m,options:b}),j=function(){};f.push(C||j)}})}function y(){f.forEach(function(x){return x()}),f=[]}return m}}const ON=NN({defaultModifiers:[fN,vN,Xk,Jk,mN,uN,bN,Kk]}),TN=["enabled","placement","strategy","modifiers"];function PN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const IN={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},$N={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const s=r.getAttribute("aria-describedby");if(s&&s.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",s?`${s},${n.id}`:n.id)}}},MN=[];function O0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=MN}=n,l=PN(n,TN);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var x;(x=u.current)==null||x.update()},[]),f=w.useCallback(()=>{var x;(x=u.current)==null||x.forceUpdate()},[]),[p,m]=kk(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),g=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:x})=>{const h={},v={};Object.keys(x.elements).forEach(b=>{h[b]=x.styles[b],v[b]=x.attributes[b]}),m({state:x,styles:h,attributes:v,update:d,forceUpdate:f,placement:x.placement})}}),[d,f,m]),y=w.useMemo(()=>(Cs(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...y,g,IN]})},[s,o,g,r,y]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=ON(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...y,$N,g]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(x=>Object.assign({},x,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Gs(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var AN=function(){},DN=AN;const FN=ei(DN),qm=()=>{};function LN(e){return e.button===0}function UN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const fa=e=>e&&("current"in e?e.current:e),Hm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function T0(e,t=qm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=fa(e);FN(!!d,"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"),o.current=!d||UN(u)||!LN(u)||!!Gs(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=fa(e);d&&Gs(d,u.target)&&(s.current=!0)}),c=Te(u=>{o.current||t(u)});w.useEffect(()=>{var u,d;if(n||e==null)return;const f=Uo(fa(e)),p=f.defaultView||window;let m=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,g=null;Hm[r]&&(g=En(f,Hm[r],l,!0));const y=En(f,r,i,!0),x=En(f,r,v=>{if(v===m){m=void 0;return}c(v)});let h=[];return"ontouchstart"in f.documentElement&&(h=[].slice.call(f.body.children).map(v=>En(v,"mousemove",qm))),()=>{g==null||g(),y(),x(),h.forEach(v=>v())}},[e,n,r,i,l,c])}function VN(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function zN(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function P0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,m;const g=VN(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:zN(Object.assign({},g,{eventListeners:{enabled:t,options:(u=g.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},g.preventOverflow,{options:i?Object.assign({padding:i},(d=g.preventOverflow)==null?void 0:d.options):(f=g.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=g.offset)==null?void 0:p.options)},arrow:Object.assign({},g.arrow,{enabled:!!l,options:Object.assign({},(m=g.arrow)==null?void 0:m.options,{element:l})}),flip:Object.assign({enabled:!!r},g.flip)}))})}const BN=["children"];function qN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const HN=()=>{};function I0(e={}){const t=w.useContext(Dl),[n,r]=rl(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=(t==null?void 0:t.show)==null?!!e.show:t.show;m&&!o.current&&(o.current=!0);const g=j=>{t==null||t.toggle(!1,j)},{placement:y,setMenu:x,menuElement:h,toggleElement:v}=t||{},b=O0(v,h,P0({placement:u||y||"bottom-start",enabled:p,enableEvents:f??m,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:x||HN,"aria-labelledby":v==null?void 0:v.id},b.attributes.popper,{style:b.styles.popper}),C={show:m,placement:y,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?b:null,arrowProps:p?Object.assign({ref:r},b.attributes.arrow,{style:b.styles.arrow}):{}};return T0(h,g,{clickTrigger:l,disabled:!m}),[S,C]}const WN={usePopper:!0};function ip(e){let{children:t}=e,n=qN(e,BN);const[r,o]=I0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ip.displayName="DropdownMenu";ip.defaultProps=WN;const $0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Wm=()=>{};function M0(){const e=Fx(),{show:t=!1,toggle:n=Wm,setToggle:r,menuElement:o}=w.useContext(Dl)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Wm,onClick:s,"aria-expanded":!!t};return o&&$0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function A0({children:e}){const[t,n]=M0();return a.jsx(a.Fragment,{children:e(t,n)})}A0.displayName="DropdownToggle";const KN=["eventKey","disabled","onClick","active","as"];function GN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function D0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Dn),i=w.useContext(Yf),{activeKey:l}=i||{},c=Mr(e,t),u=n==null&&e!=null?Mr(l)===c:n;return[{onClick:Te(f=>{r||(o==null||o(f),s&&!f.isPropagationStopped()&&s(c,f))}),"aria-disabled":r||void 0,"aria-selected":u,[zo("dropdown-item")]:""},{isActive:u}]}const F0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Xf}=e,l=GN(e,KN);const[c]=D0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});F0.displayName="DropdownItem";const L0=w.createContext(Vo?window:void 0);L0.Provider;function Ll(){return w.useContext(L0)}function Km(){const e=o0(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function di({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${zo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Ll(),[u,d]=Ax(t,e,r),[f,p]=Km(),m=f.current,[g,y]=Km(),x=g.current,h=h0(u),v=w.useRef(null),b=w.useRef(!1),S=w.useContext(Dn),C=w.useCallback((O,N,P=N==null?void 0:N.type)=>{d(O,{originalEvent:N,source:P})},[d]),j=Te((O,N)=>{n==null||n(O,N),C(!1,N,"select"),N.isPropagationStopped()||S==null||S(O,N)}),_=w.useMemo(()=>({toggle:C,placement:i,show:u,menuElement:m,toggleElement:x,setMenu:p,setToggle:y}),[C,i,u,m,x,p,y]);m&&h&&!u&&(b.current=m.contains(m.ownerDocument.activeElement));const E=Te(()=>{x&&x.focus&&x.focus()}),k=Te(()=>{const O=v.current;let N=s;if(N==null&&(N=f.current&&$0(f.current)?"keyboard":!1),N===!1||N==="keyboard"&&!/^key.+$/.test(O))return;const P=Cn(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?k():b.current&&(b.current=!1,E())},[u,b,E,k]),w.useEffect(()=>{v.current=null});const R=(O,N)=>{if(!f.current)return null;const P=Cn(f.current,o);let A=P.indexOf(O)+N;return A=Math.max(0,Math.min(A,P.length)),P[A]};return gk(w.useCallback(()=>c.document,[c]),"keydown",O=>{var N,P;const{key:A}=O,D=O.target,V=(N=f.current)==null?void 0:N.contains(D),X=(P=g.current)==null?void 0:P.contains(D);if(/input|textarea/i.test(D.tagName)&&(A===" "||A!=="Escape"&&V||A==="Escape"&&D.type==="search")||!V&&!X||A==="Tab"&&(!f.current||!u))return;v.current=O.type;const U={originalEvent:O,source:O.type};switch(A){case"ArrowUp":{const M=R(D,-1);M&&M.focus&&M.focus(),O.preventDefault();return}case"ArrowDown":if(O.preventDefault(),!u)d(!0,U);else{const M=R(D,1);M&&M.focus&&M.focus()}return;case"Tab":Kf(D.ownerDocument,"keyup",M=>{var H;(M.key==="Tab"&&!M.target||!((H=f.current)!=null&&H.contains(M.target)))&&d(!1,U)},{once:!0});break;case"Escape":A==="Escape"&&(O.preventDefault(),O.stopPropagation()),d(!1,U);break}}),a.jsx(Dn.Provider,{value:j,children:a.jsx(Dl.Provider,{value:_,children:l})})}di.displayName="Dropdown";di.Menu=ip;di.Toggle=A0;di.Item=F0;const U0=w.createContext({});U0.displayName="DropdownContext";const V0=U0,z0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=pe(t,"dropdown-divider"),a.jsx(n,{ref:s,className:se(e,t),role:r,...o})));z0.displayName="DropdownDivider";const YN=z0,B0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=pe(t,"dropdown-header"),a.jsx(n,{ref:s,className:se(e,t),role:r,...o})));B0.displayName="DropdownHeader";const QN=B0,q0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=g0,...l},c)=>{const u=pe(e,"dropdown-item"),[d,f]=D0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,{...l,...d,ref:c,className:se(t,u,f.isActive&&"active",r&&"disabled")})});q0.displayName="DropdownItem";const XN=q0,H0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=pe(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:se(e,t),...r})));H0.displayName="DropdownItemText";const ZN=H0,W0=w.createContext(null);W0.displayName="InputGroupContext";const K0=W0;function G0(e,t){return e}function Y0(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",s=n?"bottom-end":"bottom-start",i=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",c=n?"right-end":"left-end",u=n?"left-start":"right-start",d=n?"left-end":"right-end";let f=e?i:s;return t==="up"?f=e?o:r:t==="end"?f=e?d:u:t==="start"?f=e?c:l:t==="down-centered"?f="bottom":t==="up-centered"&&(f="top"),f}const Q0=w.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:s,renderOnMount:i,as:l="div",popperConfig:c,variant:u,...d},f)=>{let p=!1;const m=w.useContext(u0),g=pe(e,"dropdown-menu"),{align:y,drop:x,isRTL:h}=w.useContext(V0);n=n||y;const v=w.useContext(K0),b=[];if(n)if(typeof n=="object"){const O=Object.keys(n);if(O.length){const N=O[0],P=n[N];p=P==="start",b.push(`${g}-${N}-${P}`)}}else n==="end"&&(p=!0);const S=Y0(p,x,h),[C,{hasShown:j,popper:_,show:E,toggle:k}]=I0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(C.ref=mn(G0(f),C.ref),ol(()=>{E&&(_==null||_.update())},[E]),!j&&!i&&!v)return null;typeof l!="string"&&(C.show=E,C.close=()=>k==null?void 0:k(!1),C.align=n);let R=d.style;return _!=null&&_.placement&&(R={...d.style,...C.style},d["x-placement"]=_.placement),a.jsx(l,{...d,...C,style:R,...(b.length||m)&&{"data-bs-popper":"static"},className:se(t,g,E&&"show",p&&`${g}-end`,u&&`${g}-${u}`,...b)})});Q0.displayName="DropdownMenu";const JN=Q0,X0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=pe(t,"btn"),[d,{tagName:f}]=Qf({tagName:e,disabled:s,...l}),p=f;return a.jsx(p,{...d,...l,ref:c,disabled:s,className:se(i,u,o&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});X0.displayName="Button";const eO=X0,Z0=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=eO,...s},i)=>{const l=pe(e,"dropdown-toggle"),c=w.useContext(Dl);r!==void 0&&(s.bsPrefix=r);const[u]=M0();return u.ref=mn(u.ref,G0(i)),a.jsx(o,{className:se(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});Z0.displayName="DropdownToggle";const tO=Z0,J0=w.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:s,align:i="start",onSelect:l,onToggle:c,focusFirstItemOnShow:u,as:d="div",navbar:f,autoClose:p=!0,...m}=Al(e,{show:"onToggle"}),g=w.useContext(K0),y=pe(n,"dropdown"),x=Ml(),h=_=>p===!1?_==="click":p==="inside"?_!=="rootClose":p==="outside"?_!=="select":!0,v=Te((_,E)=>{var k,R;!((k=E.originalEvent)==null||(R=k.target)==null)&&R.classList.contains("dropdown-toggle")&&E.source==="mousedown"||(E.originalEvent.currentTarget===document&&(E.source!=="keydown"||E.originalEvent.key==="Escape")&&(E.source="rootClose"),h(E.source)&&(c==null||c(_,E)))}),S=Y0(i==="end",r,x),C=w.useMemo(()=>({align:i,drop:r,isRTL:x}),[i,r,x]),j={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(V0.Provider,{value:C,children:a.jsx(di,{placement:S,show:o,onSelect:l,onToggle:v,focusFirstItemOnShow:u,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:g?m.children:a.jsx(d,{...m,ref:t,className:se(s,o&&"show",j[r])})})})});J0.displayName="Dropdown";const Li=Object.assign(J0,{Toggle:tO,Menu:JN,Item:XN,ItemText:ZN,Divider:YN,Header:QN});var Ui;function Gm(e){if((!Ui&&Ui!==0||e)&&Vo){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ui=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ui}function nO(e){const t=w.useRef(e);return t.current=e,t}function ap(e){const t=nO(e);w.useEffect(()=>()=>t.current(),[])}function zc(e){e===void 0&&(e=Uo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function rO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Ym=zo("modal-open");class oO{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return rO(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(On(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Ym,""),On(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Ym),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const lp=oO,Bc=(e,t)=>Vo?e==null?(t||Uo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function gd(e,t){const n=Ll(),[r,o]=w.useState(()=>Bc(e,n==null?void 0:n.document));if(!r){const s=Bc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=Bc(e);s!==r&&o(s)},[e,r]),r}function sO({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=Te(t);return ol(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),ol(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function iO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=sO({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(d,f=>{throw u.in||i(!0),f})}}),c=mn(l,e.ref);return s&&!t?null:w.cloneElement(e,{ref:c})}function vd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(iO,Object.assign({},n,{transition:t})):a.jsx(Hf,Object.assign({},n))}function eb(e){return e.code==="Escape"||e.keyCode===27}const aO=["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 lO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let qc;function cO(e){return qc||(qc=new lp({ownerDocument:e==null?void 0:e.document})),qc}function uO(e){const t=Ll(),n=e||cO(t),r=w.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:w.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:w.useCallback(o=>{r.current.backdrop=o},[])})}const tb=w.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:p,backdropTransition:m,runBackdropTransition:g,autoFocus:y=!0,enforceFocus:x=!0,restoreFocus:h=!0,restoreFocusOptions:v,renderDialog:b,renderBackdrop:S=oe=>a.jsx("div",Object.assign({},oe)),manager:C,container:j,onShow:_,onHide:E=()=>{},onExit:k,onExited:R,onExiting:O,onEnter:N,onEntering:P,onEntered:A}=e,D=lO(e,aO);const V=Ll(),X=gd(j),T=uO(C),U=Zf(),M=h0(n),[H,z]=w.useState(!n),W=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),Vo&&!M&&n&&(W.current=zc(V==null?void 0:V.document)),n&&H&&z(!1);const J=Te(()=>{if(T.add(),Ae.current=En(document,"keydown",ve),Se.current=En(document,"focus",()=>setTimeout(Z),!0),_&&_(),y){var oe,lt;const Pt=zc((oe=(lt=T.dialog)==null?void 0:lt.ownerDocument)!=null?oe:V==null?void 0:V.document);T.dialog&&Pt&&!Gs(T.dialog,Pt)&&(W.current=Pt,T.dialog.focus())}}),te=Te(()=>{if(T.remove(),Ae.current==null||Ae.current(),Se.current==null||Se.current(),h){var oe;(oe=W.current)==null||oe.focus==null||oe.focus(v),W.current=null}});w.useEffect(()=>{!n||!X||J()},[n,X,J]),w.useEffect(()=>{H&&te()},[H,te]),ap(()=>{te()});const Z=Te(()=>{if(!x||!U()||!T.isTopModal())return;const oe=zc(V==null?void 0:V.document);T.dialog&&oe&&!Gs(T.dialog,oe)&&T.dialog.focus()}),ae=Te(oe=>{oe.target===oe.currentTarget&&(u==null||u(oe),l===!0&&E())}),ve=Te(oe=>{c&&eb(oe)&&T.isTopModal()&&(d==null||d(oe),oe.defaultPrevented||E())}),Se=w.useRef(),Ae=w.useRef(),F=(...oe)=>{z(!0),R==null||R(...oe)};if(!X)return null;const L=Object.assign({role:r,ref:T.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},D,{style:s,className:o,tabIndex:-1});let ne=b?b(L):a.jsx("div",Object.assign({},L,{children:w.cloneElement(i,{role:"document"})}));ne=vd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:O,onExited:F,onEnter:N,onEntering:P,onEntered:A,children:ne});let ee=null;return l&&(ee=S({ref:T.setBackdropRef,onClick:ae}),ee=vd(m,g,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ee})),a.jsx(a.Fragment,{children:Cr.createPortal(a.jsxs(a.Fragment,{children:[ee,ne]}),X)})});tb.displayName="Modal";const dO=Object.assign(tb,{Manager:lp});function yd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function fO(e,t){e.classList?e.classList.add(t):yd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Qm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function pO(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Qm(e.className,t):e.setAttribute("class",Qm(e.className&&e.className.baseVal||"",t))}const Wr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class hO extends lp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,On(n,{[t]:`${parseFloat(On(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],On(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(fO(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Cn(n,Wr.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),Cn(n,Wr.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),Cn(n,Wr.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();pO(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Cn(n,Wr.FIXED_CONTENT).forEach(s=>this.restore(r,s)),Cn(n,Wr.STICKY_CONTENT).forEach(s=>this.restore(o,s)),Cn(n,Wr.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Hc;function mO(e){return Hc||(Hc=new hO(e)),Hc}const nb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"modal-body"),a.jsx(n,{ref:o,className:se(e,t),...r})));nb.displayName="ModalBody";const gO=nb,vO=w.createContext({onHide(){}}),rb=vO,ob=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=pe(e,"modal");const d=`${e}-dialog`,f=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return a.jsx("div",{...c,ref:u,className:se(d,t,o&&`${e}-${o}`,r&&`${d}-centered`,l&&`${d}-scrollable`,s&&f),children:a.jsx("div",{className:se(`${e}-content`,n),children:i})})});ob.displayName="ModalDialog";const sb=ob,ib=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"modal-footer"),a.jsx(n,{ref:o,className:se(e,t),...r})));ib.displayName="ModalFooter";const yO=ib,xO={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},cp=w.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>a.jsx("button",{ref:o,type:"button",className:se("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));cp.displayName="CloseButton";cp.propTypes=xO;const bO=cp,wO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(rb),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(bO,{"aria-label":e,variant:t,onClick:c})]})}),SO=wO,ab=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=pe(e,"modal-header"),a.jsx(SO,{ref:s,...o,className:se(t,e),closeLabel:n,closeButton:r})));ab.displayName="ModalHeader";const CO=ab,jO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:se(t.className,e)})),_O=jO("h4"),lb=w.forwardRef(({className:e,bsPrefix:t,as:n=_O,...r},o)=>(t=pe(t,"modal-title"),a.jsx(n,{ref:o,className:se(e,t),...r})));lb.displayName="ModalTitle";const EO=lb;function RO(e){return a.jsx(Ro,{...e,timeout:null})}function kO(e){return a.jsx(Ro,{...e,timeout:null})}const cb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=sb,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:m=!0,keyboard:g=!0,onEscapeKeyDown:y,onShow:x,onHide:h,container:v,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:C=!0,restoreFocusOptions:j,onEntered:_,onExit:E,onExiting:k,onEnter:R,onEntering:O,onExited:N,backdropClassName:P,manager:A,...D},V)=>{const[X,T]=w.useState({}),[U,M]=w.useState(!1),H=w.useRef(!1),z=w.useRef(!1),W=w.useRef(null),[J,te]=rl(),Z=mn(V,te),ae=Te(h),ve=Ml();e=pe(e,"modal");const Se=w.useMemo(()=>({onHide:ae}),[ae]);function Ae(){return A||mO({isRTL:ve})}function F(ce){if(!Vo)return;const vn=Ae().getScrollbarWidth()>0,qo=ce.scrollHeight>Uo(ce).documentElement.clientHeight;T({paddingRight:vn&&!qo?Gm():void 0,paddingLeft:!vn&&qo?Gm():void 0})}const L=Te(()=>{J&&F(J.dialog)});ap(()=>{fd(window,"resize",L),W.current==null||W.current()});const ne=()=>{H.current=!0},ee=ce=>{H.current&&J&&ce.target===J.dialog&&(z.current=!0),H.current=!1},oe=()=>{M(!0),W.current=Hx(J.dialog,()=>{M(!1)})},lt=ce=>{ce.target===ce.currentTarget&&oe()},Pt=ce=>{if(m==="static"){lt(ce);return}if(z.current||ce.target!==ce.currentTarget){z.current=!1;return}h==null||h()},It=ce=>{g?y==null||y(ce):(ce.preventDefault(),m==="static"&&oe())},ct=(ce,vn)=>{ce&&F(ce),R==null||R(ce,vn)},_e=ce=>{W.current==null||W.current(),E==null||E(ce)},Bn=(ce,vn)=>{O==null||O(ce,vn),Kf(window,"resize",L)},qn=ce=>{ce&&(ce.style.display=""),N==null||N(ce),fd(window,"resize",L)},hi=w.useCallback(ce=>a.jsx("div",{...ce,className:se(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),zr={...n,...X};zr.display="block";const mi=ce=>a.jsx("div",{role:"dialog",...ce,style:zr,className:se(t,e,U&&`${e}-static`,!p&&"show"),onClick:m?Pt:void 0,onMouseUp:ee,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...D,onMouseDown:ne,className:r,contentClassName:o,children:s})});return a.jsx(rb.Provider,{value:Se,children:a.jsx(dO,{show:f,ref:Z,backdrop:m,container:v,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:C,restoreFocusOptions:j,onEscapeKeyDown:It,onShow:x,onHide:h,onEnter:ct,onEntering:Bn,onEntered:_,onExit:_e,onExiting:k,onExited:qn,manager:Ae(),transition:p?RO:void 0,backdropTransition:p?kO:void 0,renderBackdrop:hi,renderDialog:mi})})});cb.displayName="Modal";const ye=Object.assign(cb,{Body:gO,Header:CO,Title:EO,Footer:yO,Dialog:sb,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),NO=Re.forwardRef(({children:e,onClick:t},n)=>a.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:n,onClick:r=>{r.preventDefault(),t(r)},children:a.jsx("span",{className:"dropdown-toggle",children:e})}));function OO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=at(e,t),{project:o}=Rt(t||n.grantNumber);if(!n||!o||n.error||o.error)return;const s=re.routes.request_action_path(e,"new"),i=n.allowedActions.Renewal?Array.isArray(n.allowedActions.Renewal)?[...n.allowedActions.Renewal]:[n.allowedActions.Renewal]:[];i.sort((u,d)=>u.opportunityId<d.opportunityId?-1:1);const l=[{id:"extension",action:`${s}?action_type=Extension`,isEnabled:"Extension"in n.allowedActions,button:"Request an Extension",enabled:n.usesCredits?a.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."}):a.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:a.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",n.usesCredits?a.jsxs(a.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${s}?action_type=Supplement`,isEnabled:"Supplement"in n.allowedActions,button:"Request a Supplement",enabled:n.usesCredits?a.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",n.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[n.allocationType]," ","additional ACCESS credits."]}):a.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",n.allocationType," project is eligible for a supplement of additional units."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",n.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:i.map(u=>[u.opportunityName,`${re.routes.renew_request_path(e)}?opportunity_id=${u.opportunityId}`,"post"]),isEnabled:"Renewal"in n.allowedActions,button:"Request a Renewal",enabled:a.jsxs("p",{children:["Your ",n.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",a.jsx("a",{href:re.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for renewal.",n.usesCredits&&a.jsxs(a.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),n.isMaximize&&a.jsxs(a.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",re.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:a.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",a.jsxs("em",{children:["grant number ",o.grantNumber]})," and a detailed description of the problem."]})}];l.sort((u,d)=>u.isEnabled<d.isEnabled?1:-1);const c=l.map(({id:u,action:d,isEnabled:f,button:p,enabled:m,disabled:g})=>a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(d)&&d.length?a.jsxs(Li,{className:"d-flex flex-column",children:[a.jsx(Li.Toggle,{as:NO,children:p}),a.jsx(Li.Menu,{children:d.map(([y,x,h])=>a.jsx(Li.Item,{href:x,onClick:v=>{h!=="get"&&(v.preventDefault(),v.target.dataset.method=h,$&&$.rails&&$.rails.handleMethod($(v.target)))},children:y},x))})]}):a.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${f?"":"disabled"}`,href:f?d:"",children:a.jsx("span",{children:p})})}),a.jsx("div",{className:"col-sm-8 mb-2",children:f?m:g})]},u));return a.jsxs(ye,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsx(ye.Title,{children:"Manage Your Project"})}),a.jsxs(ye.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function TO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-bx(n))*100;return a.jsxs(ye,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsx(ye.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ye.Body,{children:a.jsxs("p",{children:[a.jsxs("strong",{children:[Math.round(l),"% of your allocation is unused."]})," ","Are you sure you want to request more ",i,"? You can exchange"," ",n.usesCredits?"credits for resources or ":""," one resource for another by changing the ",a.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),a.jsx(ye.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Return to Exchange"}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{o(),r()},children:["Request More ",i]})]})})]})}function PO({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=at(e,t);if(!o||o.error)return;const i=o.actions.find(p=>p.actionId==n);if(!i)return;const{deleteStatus:l,isRequest:c}=i,u=l==Ue.pending,d=l==Ue.error,f=()=>s(n);return a.jsxs(ye,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsx(ye.Title,{children:"Confirm Deletion"})}),a.jsxs(ye.Body,{children:[d&&a.jsxs(je,{color:"danger",children:["Deletion of the ",c?"request":"action"," failed."]}),a.jsxs("p",{children:["Are you sure you want to delete"," ",!c&&a.jsxs(a.Fragment,{children:["action"," ",a.jsxs("strong",{children:[i.type,": ",mo(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:Ff(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ye.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:f,disabled:u,children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>r(n),disabled:u,children:u?"Deleting...":"Delete"})]})})]})}function Po({color:e="primary",href:t,icon:n,onClick:r,target:o,title:s}){const i=a.jsx("i",{className:`bi bi-${n}`}),l={className:`btn btn-sm ms-1 text-${e}`,href:t,onClick:r,style:{"--bs-btn-padding-x":"0.1rem","--bs-btn-padding-y":"0.1rem","--bs-btn-line-height":"1"},target:o,title:s};return t?a.jsx("a",{...l,children:i}):a.jsx("button",{...l,children:i})}function ub({action:e,request:t,toggleDeleteModal:n}){const r=e.allowedOperations||[],o=["Exchange","Transfer"].includes(e.type),s=[];r.includes("Edit")&&!o&&s.push(a.jsx(Po,{href:e.isRequest?re.routes.edit_request_path(t.requestId):re.routes.edit_request_action_path(t.requestId,e.actionId),icon:"pencil",title:"Edit action"},"edit")),r.includes("Delete")&&!o&&s.push(a.jsx(Po,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${mo(e.date)}`;return a.jsxs(a.Fragment,{children:[e.detailAvailable&&!o?a.jsx("a",{href:re.routes.request_action_path(t.requestId,e.actionId),children:i}):i,s]})}function er({resource:e,userGuide:t=!0}){const{full:n,short:r}=ai(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[Nn(re.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(Po,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Io({status:e,title:t}){const n={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[e]||"dark";return a.jsx("span",{className:`badge text-bg-${n} align-self-center`,title:t,children:e})}const IO=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function $O({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t),{project:o,setRequest:s}=Rt(t||n.grantNumber);if(!n||!o)return;const i=o.requestsList;let l=0;for(;l<i.length&&i[l].requestId!==e;)l++;const c=i[l+1],u=i[l-1],d=(y,x)=>y?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(y.requestId),children:[x=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Ff(y),x=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let y of n.actions)for(let x of y.resources)f.has(x.resourceId)||(f.add(x.resourceId),p.push(x));p.sort(Qa);const m=[{key:"action",name:"Action Details",format:(y,x)=>a.jsx(ub,{action:x,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:y=>a.jsx(Io,{status:y})},...p.map(y=>({key:`resource${y.resourceId}`,name:y.name,icon:y.icon,class:"text-end",format:y.isBoolean?x=>x?Lf(x):null:IO,formatHeader:(x,h)=>a.jsx(er,{resource:h,userGuide:!1})}))],g=n.actions.map(y=>{const x={...y};for(let{resourceId:h}of p)x[`resource${h}`]=0;for(let{resourceId:h,approved:v,requested:b}of y.resources)x[`resource${h}`]=v||b||0;return x});return a.jsxs("div",{className:"history",children:[a.jsx(hn,{columns:m,rows:g}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function MO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(ub,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx(Io,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(hn,{rows:n.actions,columns:o})}function rs(...e){return e.filter(t=>t!=null).reduce((t,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?n:function(...o){t.apply(this,o),n.apply(this,o)}},null)}const AO={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function DO(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=AO[e];return r+parseInt(On(t,o[0]),10)+parseInt(On(t,o[1]),10)}const FO={[Gn]:"collapse",[tl]:"collapsing",[Sn]:"collapsing",[Xn]:"collapse show"},LO=Re.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,className:s,children:i,dimension:l="height",in:c=!1,timeout:u=300,mountOnEnter:d=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:m=DO,...g},y)=>{const x=typeof l=="function"?l():l,h=w.useMemo(()=>rs(j=>{j.style[x]="0"},e),[x,e]),v=w.useMemo(()=>rs(j=>{const _=`scroll${x[0].toUpperCase()}${x.slice(1)}`;j.style[x]=`${j[_]}px`},t),[x,t]),b=w.useMemo(()=>rs(j=>{j.style[x]=null},n),[x,n]),S=w.useMemo(()=>rs(j=>{j.style[x]=`${m(x,j)}px`,Kx(j)},r),[r,m,x]),C=w.useMemo(()=>rs(j=>{j.style[x]=null},o),[x,o]);return a.jsx(Gx,{ref:y,addEndListener:Wx,...g,"aria-expanded":g.role?c:null,onEnter:h,onEntering:v,onEntered:b,onExit:S,onExiting:C,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(j,_)=>Re.cloneElement(i,{..._,className:se(s,i.props.className,FO[j],x==="width"&&"collapse-horizontal")})})}),UO=LO;function db(e,t){return Array.isArray(e)?e.includes(t):e===t}const fb=w.createContext({});fb.displayName="AccordionContext";const Ul=fb,pb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Ul);return t=pe(t,"accordion-collapse"),a.jsx(UO,{ref:i,in:db(l,o),...s,className:se(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});pb.displayName="AccordionCollapse";const hb=pb,mb=w.createContext({eventKey:""});mb.displayName="AccordionItemContext";const up=mb,gb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=pe(t,"accordion-body");const{eventKey:f}=w.useContext(up);return a.jsx(hb,{eventKey:f,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,children:a.jsx(e,{ref:d,...u,className:se(n,t)})})});gb.displayName="AccordionBody";const VO=gb;function zO(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Ul);return s=>{let i=e===n?null:e;o&&(Array.isArray(n)?n.includes(e)?i=n.filter(l=>l!==e):i=[...n,e]:i=[e]),r==null||r(i,s),t==null||t(s)}}const vb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=pe(t,"accordion-button");const{eventKey:i}=w.useContext(up),l=zO(i,r),{activeEventKey:c}=w.useContext(Ul);return e==="button"&&(o.type="button"),a.jsx(e,{ref:s,onClick:l,...o,"aria-expanded":Array.isArray(c)?c.includes(i):i===c,className:se(n,t,!db(c,i)&&"collapsed")})});vb.displayName="AccordionButton";const yb=vb,xb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=pe(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:se(n,t),children:a.jsx(yb,{onClick:o,children:r})})));xb.displayName="AccordionHeader";const BO=xb,bb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=pe(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(up.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:se(n,t)})})});bb.displayName="AccordionItem";const qO=bb,wb=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=Al(e,{activeKey:"onSelect"}),d=pe(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Ul.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:se(s,d,l&&`${d}-flush`)})})});wb.displayName="Accordion";const Kt=Object.assign(wb,{Button:yb,Collapse:hb,Item:qO,Header:BO,Body:VO}),xd=2**31-1;function Sb(e,t,n){const r=n-Date.now();e.current=r<=xd?setTimeout(t,r):setTimeout(()=>Sb(e,t,n),xd)}function HO(){const e=Zf(),t=w.useRef();return ap(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=xd?t.current=setTimeout(o,s):Sb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const WO=()=>{};function KO(e,t,{disabled:n,clickTrigger:r}={}){const o=t||WO;T0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{eb(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Uo(fa(e));let l=(i.defaultView||window).event;const c=En(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const Cb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=rl(),[f,p]=rl(),m=mn(d,t),g=gd(e.container),y=gd(e.target),[x,h]=w.useState(!e.show),v=O0(y,u,P0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&x&&h(!1);const b=(...O)=>{h(!0),e.onExited&&e.onExited(...O)},S=e.show||!x;if(KO(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:C,onExiting:j,onEnter:_,onEntering:E,onEntered:k}=e;let R=e.children(Object.assign({},v.attributes.popper,{style:v.styles.popper,ref:m}),{popper:v,placement:o,show:!!e.show,arrowProps:Object.assign({},v.attributes.arrow,{style:v.styles.arrow,ref:p})});return R=vd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:C,onExiting:j,onExited:b,onEnter:_,onEntering:E,onEntered:k}),g?Cr.createPortal(R,g):null});Cb.displayName="Overlay";const GO=Cb,jb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"popover-header"),a.jsx(n,{ref:o,className:se(e,t),...r})));jb.displayName="PopoverHeader";const YO=jb,_b=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=pe(t,"popover-body"),a.jsx(n,{ref:o,className:se(e,t),...r})));_b.displayName="PopoverBody";const Eb=_b;function Rb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function kb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const QO=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,body:s,arrowProps:i,hasDoneInitialMeasure:l,popper:c,show:u,...d},f)=>{const p=pe(e,"popover"),m=Ml(),[g]=(t==null?void 0:t.split("-"))||[],y=Rb(g,m);let x=r;return u&&!l&&(x={...r,...kb(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:x,"x-placement":g,className:se(n,p,g&&`bs-popover-${y}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(Eb,{children:o}):o]})}),XO=Object.assign(QO,{Header:YO,Body:Eb,POPPER_OFFSET:[0,8]}),Nb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=pe(e,"tooltip");const f=Ml(),[p]=(t==null?void 0:t.split("-"))||[],m=Rb(p,f);let g=r;return c&&!i&&(g={...r,...kb(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:g,role:"tooltip","x-placement":p,className:se(n,e,`bs-tooltip-${m}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Nb.displayName="Tooltip";const Vl=Object.assign(Nb,{TOOLTIP_OFFSET:[0,6]});function ZO(e){const t=w.useRef(null),n=pe(void 0,"popover"),r=pe(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(yd(t.current,n))return XO.POPPER_OFFSET;if(yd(t.current,r))return Vl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function JO(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(nl(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(nl(o)))}const Ob=w.forwardRef(({children:e,transition:t=Ro,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=ZO(i.offset),m=mn(l,f),g=t===!0?Ro:t||void 0,y=Te(x=>{d(x),n==null||n.onFirstUpdate==null||n.onFirstUpdate(x)});return ol(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(GO,{...i,ref:m,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:y},transition:g,rootClose:r,placement:o,show:s,children:(x,{arrowProps:h,popper:v,show:b})=>{var S,C;JO(x,h);const j=v==null?void 0:v.placement,_=Object.assign(c.current,{state:v==null?void 0:v.state,scheduleUpdate:v==null?void 0:v.update,placement:j,outOfBoundaries:(v==null||(S=v.state)==null||(C=S.modifiersData.hide)==null?void 0:C.isReferenceHidden)||!1,strategy:n.strategy}),E=!!u;return typeof e=="function"?e({...x,placement:j,show:b,...!t&&b&&{className:"show"},popper:_,arrowProps:h,hasDoneInitialMeasure:E}):w.cloneElement(e,{...x,placement:j,arrowProps:h,popper:_,hasDoneInitialMeasure:E,className:se(e.props.className,!t&&b&&"show"),style:{...e.props.style,...x.style}})}})});Ob.displayName="Overlay";const Tb=Ob;function eT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Xm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Gs(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const tT=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:o,defaultShow:s=!1,onToggle:i,delay:l,placement:c,flip:u=c&&c.indexOf("auto")!==-1,...d})=>{const f=w.useRef(null),p=mn(f,n.ref),m=HO(),g=w.useRef(""),[y,x]=r0(o,s,i),h=eT(l),{onFocus:v,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},C=D=>{p(nl(D))},j=w.useCallback(()=>{if(m.clear(),g.current="show",!h.show){x(!0);return}m.set(()=>{g.current==="show"&&x(!0)},h.show)},[h.show,x,m]),_=w.useCallback(()=>{if(m.clear(),g.current="hide",!h.hide){x(!1);return}m.set(()=>{g.current==="hide"&&x(!1)},h.hide)},[h.hide,x,m]),E=w.useCallback((...D)=>{j(),v==null||v(...D)},[j,v]),k=w.useCallback((...D)=>{_(),b==null||b(...D)},[_,b]),R=w.useCallback((...D)=>{x(!y),S==null||S(...D)},[S,x,y]),O=w.useCallback((...D)=>{Xm(j,D,"fromElement")},[j]),N=w.useCallback((...D)=>{Xm(_,D,"toElement")},[_]),P=e==null?[]:[].concat(e),A={ref:C};return P.indexOf("click")!==-1&&(A.onClick=R),P.indexOf("focus")!==-1&&(A.onFocus=E,A.onBlur=k),P.indexOf("hover")!==-1&&(A.onMouseOver=O,A.onMouseOut=N),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(A):w.cloneElement(n,A),a.jsx(Tb,{...d,show:y,onHide:_,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},dp=tT;function nT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r}=Rt(t||n.grantNumber),{setTab:o}=Rt(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let m of p.resourceIds)i[m]=i[m]||0,i[m]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,m)=>({...p,userCount:i[p.resourceId]||0,color:nd[m%nd.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,m)=>a.jsx(er,{resource:m})},{key:"isActive",name:"Status",format:p=>a.jsx(Io,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,m)=>{if(m.isBoolean)return Lf(m.allocated);const g=m.allocated-p,y=Math.max(g,0)*100/m.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${m.color}`,style:{width:`${Math.min(y,100)}%`}}),rt(g,{abbreviate:!0})," of"," ",rt(m.allocated,{abbreviate:!0})," ",m.unit," ","remaining (",Math.round(y),"%)"]})}},{key:"endDate",name:"End Date",format:p=>mo(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:rt}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,m)=>{const g=r.currentUser.resourceUsernames[m.resourceId];if(g)return g;if(r.currentUser.resourceAccountPendingIds.includes(m.resourceId))return a.jsx(Io,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(m.resourceId)||!m.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:x=>{x.preventDefault(),o("users")},children:"Grant access"});const y=a.jsxs(Vl,{children:["Please contact ",Uf(r)," to request access to this resource."]});return a.jsx(dp,{overlay:y,children:a.jsx("a",{href:"#",onClick:x=>{x.preventDefault()},children:"Request access"})})}}),a.jsxs("div",{className:"overview",children:[u&&!d&&c>re.creditAlertThreshold?a.jsxs("button",{onClick:()=>o("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[a.jsxs("span",{children:[a.jsxs("span",{className:"fs-3",children:[Nn(re.resourceTypeIcons[s.icon])," ",rt(c)]})," ",s.unit," available"]}),a.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",a.jsx("span",{className:"fs-3",children:Nn("chevron-right")})]})]}):null,l.length?a.jsx(hn,{columns:f,rows:l}):null]})}const rT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[Nn(re.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${rt(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],oT=({requestId:e,grantNumber:t})=>{const{project:n}=Rt(t);if(!n)return;const r=$l.map(({role:o,name:s})=>({role:s,users:(n.users||[]).filter(i=>i.role===o).map(i=>`${i.firstName} ${i.lastName}`)})).filter(o=>o.users.length>0);return r.length?a.jsx(hn,{rows:r,columns:rT}):null};function sT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,username:o}=Rt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(nT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(oT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(MO,{requestId:e})})]}):null]})}function Dr(e){"@babel/helpers - typeof";return Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(e)}function iT(e,t){if(Dr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pb(e){var t=iT(e,"string");return Dr(t)=="symbol"?t:String(t)}function io(e,t,n){return t=Pb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aT(e){if(Array.isArray(e))return e}function lT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function bd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ib(e,t){if(e){if(typeof e=="string")return bd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bd(e,t)}}function cT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(e,t){return aT(e)||lT(e,t)||Ib(e,t)||cT()}function gn(e,t){if(e==null)return{};var n=Wf(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var uT=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function $b(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,i=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,m=e.value,g=gn(e,uT),y=w.useState(l!==void 0?l:n),x=Ve(y,2),h=x[0],v=x[1],b=w.useState(c!==void 0?c:o),S=Ve(b,2),C=S[0],j=S[1],_=w.useState(m!==void 0?m:i),E=Ve(_,2),k=E[0],R=E[1],O=w.useCallback(function(T,U){typeof u=="function"&&u(T,U),R(T)},[u]),N=w.useCallback(function(T,U){var M;typeof d=="function"&&(M=d(T,U)),v(M!==void 0?M:T)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),j(!0)},[p]),A=w.useCallback(function(){typeof f=="function"&&f(),j(!1)},[f]),D=l!==void 0?l:h,V=c!==void 0?c:C,X=m!==void 0?m:k;return K(K({},g),{},{inputValue:D,menuIsOpen:V,onChange:O,onInputChange:N,onMenuClose:A,onMenuOpen:P,value:X})}function dT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pb(r.key),r)}}function fT(e,t,n){return t&&Jm(e.prototype,t),n&&Jm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&el(e,t)}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},il(e)}function Mb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mb=function(){return!!e})()}function hT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mT(e,t){if(t&&(Dr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hT(e)}function gT(e){var t=Mb();return function(){var r=il(e),o;if(t){var s=il(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return mT(this,o)}}function vT(e){if(Array.isArray(e))return bd(e)}function yT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
60
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fp(e){return vT(e)||yT(e)||Ib(e)||xT()}function bT(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function wT(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ST=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(wT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=bT(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ze="-ms-",al="-moz-",de="-webkit-",Ab="comm",pp="rule",hp="decl",CT="@import",Db="@keyframes",jT="@layer",_T=Math.abs,zl=String.fromCharCode,ET=Object.assign;function RT(e,t){return Ke(e,0)^45?(((t<<2^Ke(e,0))<<2^Ke(e,1))<<2^Ke(e,2))<<2^Ke(e,3):0}function Fb(e){return e.trim()}function kT(e,t){return(e=t.exec(e))?e[0]:e}function fe(e,t,n){return e.replace(t,n)}function wd(e,t){return e.indexOf(t)}function Ke(e,t){return e.charCodeAt(t)|0}function Ys(e,t,n){return e.slice(t,n)}function on(e){return e.length}function mp(e){return e.length}function Vi(e,t){return t.push(e),e}function NT(e,t){return e.map(t).join("")}var Bl=1,$o=1,Lb=0,xt=0,$e=0,Bo="";function ql(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Bl,column:$o,length:i,return:""}}function os(e,t){return ET(ql("",null,null,"",null,null,0),e,{length:-e.length},t)}function OT(){return $e}function TT(){return $e=xt>0?Ke(Bo,--xt):0,$o--,$e===10&&($o=1,Bl--),$e}function Ct(){return $e=xt<Lb?Ke(Bo,xt++):0,$o++,$e===10&&($o=1,Bl++),$e}function fn(){return Ke(Bo,xt)}function pa(){return xt}function fi(e,t){return Ys(Bo,e,t)}function Qs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ub(e){return Bl=$o=1,Lb=on(Bo=e),xt=0,[]}function Vb(e){return Bo="",e}function ha(e){return Fb(fi(xt-1,Sd(e===91?e+2:e===40?e+1:e)))}function PT(e){for(;($e=fn())&&$e<33;)Ct();return Qs(e)>2||Qs($e)>3?"":" "}function IT(e,t){for(;--t&&Ct()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return fi(e,pa()+(t<6&&fn()==32&&Ct()==32))}function Sd(e){for(;Ct();)switch($e){case e:return xt;case 34:case 39:e!==34&&e!==39&&Sd($e);break;case 40:e===41&&Sd(e);break;case 92:Ct();break}return xt}function $T(e,t){for(;Ct()&&e+$e!==57;)if(e+$e===84&&fn()===47)break;return"/*"+fi(t,xt-1)+"*"+zl(e===47?e:Ct())}function MT(e){for(;!Qs(fn());)Ct();return fi(e,xt)}function AT(e){return Vb(ma("",null,null,null,[""],e=Ub(e),0,[0],e))}function ma(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,m=0,g=0,y=1,x=1,h=1,v=0,b="",S=o,C=s,j=r,_=b;x;)switch(g=v,v=Ct()){case 40:if(g!=108&&Ke(_,f-1)==58){wd(_+=fe(ha(v),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:_+=ha(v);break;case 9:case 10:case 13:case 32:_+=PT(g);break;case 92:_+=IT(pa()-1,7);continue;case 47:switch(fn()){case 42:case 47:Vi(DT($T(Ct(),pa()),t,n),c);break;default:_+="/"}break;case 123*y:l[u++]=on(_)*h;case 125*y:case 59:case 0:switch(v){case 0:case 125:x=0;case 59+d:h==-1&&(_=fe(_,/\f/g,"")),m>0&&on(_)-f&&Vi(m>32?tg(_+";",r,n,f-1):tg(fe(_," ","")+";",r,n,f-2),c);break;case 59:_+=";";default:if(Vi(j=eg(_,t,n,u,d,o,l,b,S=[],C=[],f),s),v===123)if(d===0)ma(_,t,j,j,S,s,f,l,C);else switch(p===99&&Ke(_,3)===110?100:p){case 100:case 108:case 109:case 115:ma(e,j,j,r&&Vi(eg(e,j,j,0,0,o,l,b,o,S=[],f),C),o,C,f,l,r?S:C);break;default:ma(_,j,j,j,[""],C,0,l,C)}}u=d=m=0,y=h=1,b=_="",f=i;break;case 58:f=1+on(_),m=g;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&TT()==125)continue}switch(_+=zl(v),v*y){case 38:h=d>0?1:(_+="\f",-1);break;case 44:l[u++]=(on(_)-1)*h,h=1;break;case 64:fn()===45&&(_+=ha(Ct())),p=fn(),d=f=on(b=_+=MT(pa())),v++;break;case 45:g===45&&on(_)==2&&(y=0)}}return s}function eg(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],m=mp(p),g=0,y=0,x=0;g<r;++g)for(var h=0,v=Ys(e,f+1,f=_T(y=i[g])),b=e;h<m;++h)(b=Fb(y>0?p[h]+" "+v:fe(v,/&\f/g,p[h])))&&(c[x++]=b);return ql(e,t,n,o===0?pp:l,c,u,d)}function DT(e,t,n){return ql(e,t,n,Ab,zl(OT()),Ys(e,2,-2),0)}function tg(e,t,n,r){return ql(e,t,n,hp,Ys(e,0,r),Ys(e,r+1,-1),r)}function go(e,t){for(var n="",r=mp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function FT(e,t,n,r){switch(e.type){case jT:if(e.children.length)break;case CT:case hp:return e.return=e.return||e.value;case Ab:return"";case Db:return e.return=e.value+"{"+go(e.children,r)+"}";case pp:e.value=e.props.join(",")}return on(n=go(e.children,r))?e.return=e.value+"{"+n+"}":""}function LT(e){var t=mp(e);return function(n,r,o,s){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,s)||"";return i}}function UT(e){return function(t){t.root||(t=t.return)&&e(t)}}function VT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var zT=function(t,n,r){for(var o=0,s=0;o=s,s=fn(),o===38&&s===12&&(n[r]=1),!Qs(s);)Ct();return fi(t,xt)},BT=function(t,n){var r=-1,o=44;do switch(Qs(o)){case 0:o===38&&fn()===12&&(n[r]=1),t[r]+=zT(xt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=fn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=zl(o)}while(o=Ct());return t},qT=function(t,n){return Vb(BT(Ub(t),n))},ng=new WeakMap,HT=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ng.get(r))&&!o){ng.set(t,!0);for(var s=[],i=qT(n,s),l=r.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},WT=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function zb(e,t){switch(RT(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return de+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+al+e+Ze+e+e;case 6828:case 4268:return de+e+Ze+e+e;case 6165:return de+e+Ze+"flex-"+e+e;case 5187:return de+e+fe(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+Ze+"flex-$1$2")+e;case 5443:return de+e+Ze+"flex-item-"+fe(e,/flex-|-self/,"")+e;case 4675:return de+e+Ze+"flex-line-pack"+fe(e,/align-content|flex-|-self/,"")+e;case 5548:return de+e+Ze+fe(e,"shrink","negative")+e;case 5292:return de+e+Ze+fe(e,"basis","preferred-size")+e;case 6060:return de+"box-"+fe(e,"-grow","")+de+e+Ze+fe(e,"grow","positive")+e;case 4554:return de+fe(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return fe(fe(fe(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return fe(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return fe(fe(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+Ze+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+de+e+e;case 4095:case 3583:case 4068:case 2532:return fe(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(on(e)-1-t>6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return fe(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+al+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wd(e,"stretch")?zb(fe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,on(e)-3-(~wd(e,"!important")&&10))){case 107:return fe(e,":",":"+de)+e;case 101:return fe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+de+(Ke(e,14)===45?"inline-":"")+"box$3$1"+de+"$2$3$1"+Ze+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return de+e+Ze+fe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+Ze+fe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+Ze+fe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return de+e+Ze+e+e}return e}var KT=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hp:t.return=zb(t.value,t.length);break;case Db:return go([os(t,{value:fe(t.value,"@","@"+de)})],o);case pp:if(t.length)return NT(t.props,function(s){switch(kT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return go([os(t,{props:[fe(s,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return go([os(t,{props:[fe(s,/:(plac\w+)/,":"+de+"input-$1")]}),os(t,{props:[fe(s,/:(plac\w+)/,":"+al+"$1")]}),os(t,{props:[fe(s,/:(plac\w+)/,Ze+"input-$1")]})],o)}return""})}},GT=[KT],YT=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var x=y.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||GT,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var x=y.getAttribute("data-emotion").split(" "),h=1;h<x.length;h++)s[x[h]]=!0;l.push(y)});var c,u=[HT,WT];{var d,f=[FT,UT(function(y){d.insert(y)})],p=LT(u.concat(o,f)),m=function(x){return go(AT(x),p)};c=function(x,h,v,b){d=v,m(x?x+"{"+h.styles+"}":h.styles),b&&(g.inserted[h.name]=!0)}}var g={key:n,sheet:new ST({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return g.sheet.hydrate(l),g},Bb={exports:{}},ge={};/** @license React v16.13.1
|
|
61
61
|
* react-is.production.min.js
|
|
62
62
|
*
|
|
63
63
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the MIT license found in the
|
|
66
66
|
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/var ze=typeof Symbol=="function"&&Symbol.for,pp=ze?Symbol.for("react.element"):60103,hp=ze?Symbol.for("react.portal"):60106,zl=ze?Symbol.for("react.fragment"):60107,ql=ze?Symbol.for("react.strict_mode"):60108,Hl=ze?Symbol.for("react.profiler"):60114,Wl=ze?Symbol.for("react.provider"):60109,Kl=ze?Symbol.for("react.context"):60110,mp=ze?Symbol.for("react.async_mode"):60111,Gl=ze?Symbol.for("react.concurrent_mode"):60111,Yl=ze?Symbol.for("react.forward_ref"):60112,Ql=ze?Symbol.for("react.suspense"):60113,UO=ze?Symbol.for("react.suspense_list"):60120,Xl=ze?Symbol.for("react.memo"):60115,Zl=ze?Symbol.for("react.lazy"):60116,VO=ze?Symbol.for("react.block"):60121,BO=ze?Symbol.for("react.fundamental"):60117,zO=ze?Symbol.for("react.responder"):60118,qO=ze?Symbol.for("react.scope"):60119;function Ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pp:switch(e=e.type,e){case mp:case Gl:case zl:case Hl:case ql:case Ql:return e;default:switch(e=e&&e.$$typeof,e){case Kl:case Yl:case Zl:case Xl:case Wl:return e;default:return t}}case hp:return t}}}function Db(e){return Ot(e)===Gl}me.AsyncMode=mp;me.ConcurrentMode=Gl;me.ContextConsumer=Kl;me.ContextProvider=Wl;me.Element=pp;me.ForwardRef=Yl;me.Fragment=zl;me.Lazy=Zl;me.Memo=Xl;me.Portal=hp;me.Profiler=Hl;me.StrictMode=ql;me.Suspense=Ql;me.isAsyncMode=function(e){return Db(e)||Ot(e)===mp};me.isConcurrentMode=Db;me.isContextConsumer=function(e){return Ot(e)===Kl};me.isContextProvider=function(e){return Ot(e)===Wl};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pp};me.isForwardRef=function(e){return Ot(e)===Yl};me.isFragment=function(e){return Ot(e)===zl};me.isLazy=function(e){return Ot(e)===Zl};me.isMemo=function(e){return Ot(e)===Xl};me.isPortal=function(e){return Ot(e)===hp};me.isProfiler=function(e){return Ot(e)===Hl};me.isStrictMode=function(e){return Ot(e)===ql};me.isSuspense=function(e){return Ot(e)===Ql};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zl||e===Gl||e===Hl||e===ql||e===Ql||e===UO||typeof e=="object"&&e!==null&&(e.$$typeof===Zl||e.$$typeof===Xl||e.$$typeof===Wl||e.$$typeof===Kl||e.$$typeof===Yl||e.$$typeof===BO||e.$$typeof===zO||e.$$typeof===qO||e.$$typeof===VO)};me.typeOf=Ot;Mb.exports=me;var HO=Mb.exports,Fb=HO,WO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},KO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lb={};Lb[Fb.ForwardRef]=WO;Lb[Fb.Memo]=KO;var GO=!0;function YO(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Ub=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||GO===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},QO=function(t,n,r){Ub(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function XO(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ZO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JO=/[A-Z]|^ms/g,eP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vb=function(t){return t.charCodeAt(1)===45},Qm=function(t){return t!=null&&typeof t!="boolean"},Bc=OO(function(e){return Vb(e)?e:e.replace(JO,"-$&").toLowerCase()}),Xm=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(eP,function(r,o,s){return ln={name:o,styles:s,next:ln},o})}return ZO[t]!==1&&!Vb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ys(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ln={name:n.name,styles:n.styles,next:ln},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ln={name:r.name,styles:r.styles,next:ln},r=r.next;var o=n.styles+";";return o}return tP(e,t,n)}case"function":{if(e!==void 0){var s=ln,i=n(e);return ln=s,Ys(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function tP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ys(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=s+"{"+t[i]+"}":Qm(i)&&(r+=Bc(s)+":"+Xm(s,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)Qm(i[l])&&(r+=Bc(s)+":"+Xm(s,i[l])+";");else{var c=Ys(e,t,i);switch(s){case"animation":case"animationName":{r+=Bc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Zm=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ln,Bb=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,s="";ln=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Ys(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Ys(r,n,t[l]),o&&(s+=i[l]);Zm.lastIndex=0;for(var c="",u;(u=Zm.exec(s))!==null;)c+="-"+u[1];var d=XO(s)+c;return{name:d,styles:s,next:ln}},nP=function(t){return t()},rP=ma.useInsertionEffect?ma.useInsertionEffect:!1,oP=rP||nP,gp={}.hasOwnProperty,zb=w.createContext(typeof HTMLElement<"u"?LO({key:"css"}):null);zb.Provider;var sP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(zb);return t(n,o,r)})},iP=w.createContext({}),xd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",aP=function(t,n){var r={};for(var o in n)gp.call(n,o)&&(r[o]=n[o]);return r[xd]=t,r},lP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Ub(n,r,o),oP(function(){return QO(n,r,o)}),null},cP=sP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[xd],s=[r],i="";typeof e.className=="string"?i=YO(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Bb(s,void 0,w.useContext(iP));i+=t.key+"-"+l.name;var c={};for(var u in e)gp.call(e,u)&&u!=="css"&&u!==xd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(lP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),uP=cP,G=function(t,n){var r=arguments;if(n==null||!gp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=uP,s[1]=aP(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function vp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bb(t)}var dP=function(){var t=vp.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function fP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const pP=Math.min,hP=Math.max,ol=Math.round,Fi=Math.floor,sl=e=>({x:e,y:e});function mP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function qb(e){return Wb(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hb(e){var t;return(t=(Wb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wb(e){return e instanceof Node||e instanceof Jt(e).Node}function bd(e){return e instanceof Element||e instanceof Jt(e).Element}function yp(e){return e instanceof HTMLElement||e instanceof Jt(e).HTMLElement}function Jm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function Kb(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vP(e){return["html","body","#document"].includes(qb(e))}function xp(e){return Jt(e).getComputedStyle(e)}function yP(e){if(qb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jm(e)&&e.host||Hb(e);return Jm(t)?t.host:t}function Gb(e){const t=yP(e);return vP(t)?e.ownerDocument?e.ownerDocument.body:e.body:yp(t)&&Kb(t)?t:Gb(t)}function il(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Gb(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Jt(o);return s?t.concat(i,i.visualViewport||[],Kb(o)?o:[],i.frameElement&&n?il(i.frameElement):[]):t.concat(o,il(o,[],n))}function xP(e){const t=xp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ol(n)!==s||ol(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function bp(e){return bd(e)?e:e.contextElement}function zc(e){const t=bp(e);if(!yp(t))return sl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=xP(t);let i=(s?ol(n.width):n.width)/r,l=(s?ol(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const bP=sl(0);function wP(e){const t=Jt(e);return!gP()||!t.visualViewport?bP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function eg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=bp(e);let i=sl(1);t&&(r?bd(r)&&(i=zc(r)):i=zc(e));const l=SP(s,n,r)?wP(s):sl(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Jt(s),y=r&&bd(r)?Jt(r):r;let m=p.frameElement;for(;m&&r&&y!==p;){const h=zc(m),x=m.getBoundingClientRect(),v=xp(m),g=x.left+(m.clientLeft+parseFloat(v.paddingLeft))*h.x,b=x.top+(m.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,u*=h.y,d*=h.x,f*=h.y,c+=g,u+=b,m=Jt(m).frameElement}}return mP({width:d,height:f,x:c,y:u})}function _P(e,t){let n=null,r;const o=Hb(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const y=Fi(d),m=Fi(o.clientWidth-(u+f)),h=Fi(o.clientHeight-(d+p)),x=Fi(u),g={rootMargin:-y+"px "+-m+"px "+-h+"px "+-x+"px",threshold:hP(0,pP(1,c))||1};let b=!0;function S(_){const j=_[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return i(!0),s}function jP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=bp(e),d=o||s?[...u?il(u):[],...il(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&l?_P(u,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=y)==null||b.observe(t)})),n()}),u&&!c&&y.observe(u),y.observe(t));let m,h=c?eg(e):null;c&&x();function x(){const v=eg(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),f==null||f(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(m)}}var wd=w.useLayoutEffect,CP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],al=function(){};function EP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function RP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(EP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var tg=function(t){return DP(t)?t.filter(Boolean):Dr(t)==="object"&&t!==null?[t]:[]},Yb=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=gn(t,CP);return K({},n)},Oe=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,l=t.className;return{css:s(n,t),className:o(r??{},i(n,t),l)}};function NP(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function Jl(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function kP(e){return Jl(e)?window.innerHeight:e.clientHeight}function Qb(e){return Jl(e)?window.pageYOffset:e.scrollTop}function ll(e,t){if(Jl(e)){window.scrollTo(0,t);return}e.scrollTop=t}function TP(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function OP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Li(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:al,o=Qb(e),s=t-o,i=10,l=0;function c(){l+=i;var u=OP(l,o,s,n);ll(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function ng(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?ll(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&ll(e,Math.max(t.offsetTop-o,0))}function PP(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function rg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function IP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Xb=!1,$P={get passive(){return Xb=!0}},Ui=typeof window<"u"?window:{};Ui.addEventListener&&Ui.removeEventListener&&(Ui.addEventListener("p",al,$P),Ui.removeEventListener("p",al,!1));var AP=Xb;function MP(e){return e!=null}function DP(e){return Array.isArray(e)}function Vi(e,t,n){return e?t:n}var FP=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(i){var l=Ue(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=Ue(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},LP=["children","innerProps"],UP=["children","innerProps"];function VP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=TP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),y=p.bottom,m=p.height,h=p.top,x=n.offsetParent.getBoundingClientRect(),v=x.top,g=i?window.innerHeight:kP(c),b=Qb(c),S=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),j=v-_,C=g-h,E=j+b,N=f-b-h,R=y-g+b+S,T=b+h-_,k=160;switch(o){case"auto":case"bottom":if(C>=m)return{placement:"bottom",maxHeight:t};if(N>=m&&!i)return s&&Li(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&C>=r){s&&Li(c,R,k);var P=i?C-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var M=t,D=i?j:E;return D>=r&&(M=Math.min(D-S-l,t)),{placement:"top",maxHeight:M}}if(o==="bottom")return s&&ll(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(j>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return s&&Li(c,T,k),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&j>=r){var V=t;return(!i&&E>=r||i&&j>=r)&&(V=i?j-_:E-_),s&&Li(c,T,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function BP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Zb=function(t){return t==="auto"?"bottom":t},zP=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return K((r={label:"menu"},so(r,BP(o),"100%"),so(r,"position","absolute"),so(r,"width","100%"),so(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Jb=w.createContext(null),qP=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=w.useContext(Jb)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),y=Ue(p,2),m=y[0],h=y[1],x=w.useState(null),v=Ue(x,2),g=v[0],b=v[1],S=c.spacing.controlHeight;return wd(function(){var _=f.current;if(_){var j=i==="fixed",C=l&&!j,E=VP({maxHeight:o,menuEl:_,minHeight:r,placement:s,shouldScroll:C,isFixedPosition:j,controlHeight:S});h(E.maxHeight),b(E.placement),d==null||d(E.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:K(K({},t),{},{placement:g||Zb(s),maxHeight:m})})},HP=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return G("div",Y({},Oe(t,"menu",{menu:!0}),{ref:r},o),n)},WP=HP,KP=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return K({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},GP=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return G("div",Y({},Oe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},ew=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return K({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},YP=ew,QP=ew,XP=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=gn(t,LP);return G("div",Y({},Oe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},ZP=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=gn(t,UP);return G("div",Y({},Oe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},JP=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},eI=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,l=t.menuPosition,c=w.useRef(null),u=w.useRef(null),d=w.useState(Zb(i)),f=Ue(d,2),p=f[0],y=f[1],m=w.useMemo(function(){return{setPortalPlacement:y}},[]),h=w.useState(null),x=Ue(h,2),v=x[0],g=x[1],b=w.useCallback(function(){if(o){var C=PP(o),E=l==="fixed"?0:window.pageYOffset,N=C[p]+E;(N!==(v==null?void 0:v.offset)||C.left!==(v==null?void 0:v.rect.left)||C.width!==(v==null?void 0:v.rect.width))&&g({offset:N,rect:C})}},[o,l,p,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);wd(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=jP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);wd(function(){S()},[S]);var _=w.useCallback(function(C){c.current=C,S()},[S]);if(!n&&l!=="fixed"||!v)return null;var j=G("div",Y({ref:_},Oe(K(K({},t),{},{offset:v.offset,position:l,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),r);return G(Jb.Provider,{value:m},n?Cf.createPortal(j,n):j)},tI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},nI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return G("div",Y({},Oe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},rI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return K({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},oI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return G("div",Y({},Oe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},sI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"indicatorsContainer",{indicators:!0}),r),n)},og,aI=["size"],lI=["innerProps","isRtl","size"],cI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},tw=function(t){var n=t.size,r=gn(t,aI);return G("svg",Y({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cI},r))},wp=function(t){return G(tw,Y({size:20},t),G("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"}))},nw=function(t){return G(tw,Y({size:20},t),G("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"}))},rw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},uI=rw,dI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(nw,null))},fI=rw,pI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||G(wp,null))},hI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},mI=function(t){var n=t.innerProps;return G("span",Y({},n,Oe(t,"indicatorSeparator",{"indicator-separator":!0})))},gI=dP(og||(og=fP([`
|
|
67
|
+
*/var qe=typeof Symbol=="function"&&Symbol.for,gp=qe?Symbol.for("react.element"):60103,vp=qe?Symbol.for("react.portal"):60106,Hl=qe?Symbol.for("react.fragment"):60107,Wl=qe?Symbol.for("react.strict_mode"):60108,Kl=qe?Symbol.for("react.profiler"):60114,Gl=qe?Symbol.for("react.provider"):60109,Yl=qe?Symbol.for("react.context"):60110,yp=qe?Symbol.for("react.async_mode"):60111,Ql=qe?Symbol.for("react.concurrent_mode"):60111,Xl=qe?Symbol.for("react.forward_ref"):60112,Zl=qe?Symbol.for("react.suspense"):60113,QT=qe?Symbol.for("react.suspense_list"):60120,Jl=qe?Symbol.for("react.memo"):60115,ec=qe?Symbol.for("react.lazy"):60116,XT=qe?Symbol.for("react.block"):60121,ZT=qe?Symbol.for("react.fundamental"):60117,JT=qe?Symbol.for("react.responder"):60118,eP=qe?Symbol.for("react.scope"):60119;function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case gp:switch(e=e.type,e){case yp:case Ql:case Hl:case Kl:case Wl:case Zl:return e;default:switch(e=e&&e.$$typeof,e){case Yl:case Xl:case ec:case Jl:case Gl:return e;default:return t}}case vp:return t}}}function qb(e){return Tt(e)===Ql}ge.AsyncMode=yp;ge.ConcurrentMode=Ql;ge.ContextConsumer=Yl;ge.ContextProvider=Gl;ge.Element=gp;ge.ForwardRef=Xl;ge.Fragment=Hl;ge.Lazy=ec;ge.Memo=Jl;ge.Portal=vp;ge.Profiler=Kl;ge.StrictMode=Wl;ge.Suspense=Zl;ge.isAsyncMode=function(e){return qb(e)||Tt(e)===yp};ge.isConcurrentMode=qb;ge.isContextConsumer=function(e){return Tt(e)===Yl};ge.isContextProvider=function(e){return Tt(e)===Gl};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gp};ge.isForwardRef=function(e){return Tt(e)===Xl};ge.isFragment=function(e){return Tt(e)===Hl};ge.isLazy=function(e){return Tt(e)===ec};ge.isMemo=function(e){return Tt(e)===Jl};ge.isPortal=function(e){return Tt(e)===vp};ge.isProfiler=function(e){return Tt(e)===Kl};ge.isStrictMode=function(e){return Tt(e)===Wl};ge.isSuspense=function(e){return Tt(e)===Zl};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hl||e===Ql||e===Kl||e===Wl||e===Zl||e===QT||typeof e=="object"&&e!==null&&(e.$$typeof===ec||e.$$typeof===Jl||e.$$typeof===Gl||e.$$typeof===Yl||e.$$typeof===Xl||e.$$typeof===ZT||e.$$typeof===JT||e.$$typeof===eP||e.$$typeof===XT)};ge.typeOf=Tt;Bb.exports=ge;var tP=Bb.exports,Hb=tP,nP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},rP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Wb={};Wb[Hb.ForwardRef]=nP;Wb[Hb.Memo]=rP;var oP=!0;function sP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Kb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||oP===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},iP=function(t,n,r){Kb(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function aP(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lP={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},cP=/[A-Z]|^ms/g,uP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Gb=function(t){return t.charCodeAt(1)===45},rg=function(t){return t!=null&&typeof t!="boolean"},Wc=VT(function(e){return Gb(e)?e:e.replace(cP,"-$&").toLowerCase()}),og=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(uP,function(r,o,s){return sn={name:o,styles:s,next:sn},o})}return lP[t]!==1&&!Gb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Xs(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return sn={name:n.name,styles:n.styles,next:sn},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)sn={name:r.name,styles:r.styles,next:sn},r=r.next;var o=n.styles+";";return o}return dP(e,t,n)}case"function":{if(e!==void 0){var s=sn,i=n(e);return sn=s,Xs(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function dP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Xs(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=s+"{"+t[i]+"}":rg(i)&&(r+=Wc(s)+":"+og(s,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)rg(i[l])&&(r+=Wc(s)+":"+og(s,i[l])+";");else{var c=Xs(e,t,i);switch(s){case"animation":case"animationName":{r+=Wc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var sg=/label:\s*([^\s;\n{]+)\s*(;|$)/g,sn,Yb=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,s="";sn=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Xs(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Xs(r,n,t[l]),o&&(s+=i[l]);sg.lastIndex=0;for(var c="",u;(u=sg.exec(s))!==null;)c+="-"+u[1];var d=aP(s)+c;return{name:d,styles:s,next:sn}},fP=function(t){return t()},pP=ba.useInsertionEffect?ba.useInsertionEffect:!1,hP=pP||fP,xp={}.hasOwnProperty,Qb=w.createContext(typeof HTMLElement<"u"?YT({key:"css"}):null);Qb.Provider;var mP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Qb);return t(n,o,r)})},gP=w.createContext({}),Cd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vP=function(t,n){var r={};for(var o in n)xp.call(n,o)&&(r[o]=n[o]);return r[Cd]=t,r},yP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Kb(n,r,o),hP(function(){return iP(n,r,o)}),null},xP=mP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Cd],s=[r],i="";typeof e.className=="string"?i=sP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Yb(s,void 0,w.useContext(gP));i+=t.key+"-"+l.name;var c={};for(var u in e)xp.call(e,u)&&u!=="css"&&u!==Cd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(yP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),bP=xP,G=function(t,n){var r=arguments;if(n==null||!xp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=bP,s[1]=vP(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function bp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Yb(t)}var wP=function(){var t=bp.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function SP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const CP=Math.min,jP=Math.max,ll=Math.round,zi=Math.floor,cl=e=>({x:e,y:e});function _P(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Xb(e){return Jb(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zb(e){var t;return(t=(Jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jb(e){return e instanceof Node||e instanceof Zt(e).Node}function jd(e){return e instanceof Element||e instanceof Zt(e).Element}function wp(e){return e instanceof HTMLElement||e instanceof Zt(e).HTMLElement}function ig(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function ew(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function EP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function RP(e){return["html","body","#document"].includes(Xb(e))}function Sp(e){return Zt(e).getComputedStyle(e)}function kP(e){if(Xb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ig(e)&&e.host||Zb(e);return ig(t)?t.host:t}function tw(e){const t=kP(e);return RP(t)?e.ownerDocument?e.ownerDocument.body:e.body:wp(t)&&ew(t)?t:tw(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=tw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Zt(o);return s?t.concat(i,i.visualViewport||[],ew(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function NP(e){const t=Sp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ll(n)!==s||ll(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Cp(e){return jd(e)?e:e.contextElement}function Kc(e){const t=Cp(e);if(!wp(t))return cl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=NP(t);let i=(s?ll(n.width):n.width)/r,l=(s?ll(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const OP=cl(0);function TP(e){const t=Zt(e);return!EP()||!t.visualViewport?OP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function ag(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Cp(e);let i=cl(1);t&&(r?jd(r)&&(i=Kc(r)):i=Kc(e));const l=PP(s,n,r)?TP(s):cl(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Zt(s),m=r&&jd(r)?Zt(r):r;let g=p.frameElement;for(;g&&r&&m!==p;){const y=Kc(g),x=g.getBoundingClientRect(),h=Sp(g),v=x.left+(g.clientLeft+parseFloat(h.paddingLeft))*y.x,b=x.top+(g.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=b,g=Zt(g).frameElement}}return _P({width:d,height:f,x:c,y:u})}function IP(e,t){let n=null,r;const o=Zb(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const m=zi(d),g=zi(o.clientWidth-(u+f)),y=zi(o.clientHeight-(d+p)),x=zi(u),v={rootMargin:-m+"px "+-g+"px "+-y+"px "+-x+"px",threshold:jP(0,CP(1,c))||1};let b=!0;function S(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return i(!0),s}function $P(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Cp(e),d=o||s?[...u?ul(u):[],...ul(t)]:[];d.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const f=u&&l?IP(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let g,y=c?ag(e):null;c&&x();function x(){const h=ag(e);y&&(h.x!==y.x||h.y!==y.y||h.width!==y.width||h.height!==y.height)&&n(),y=h,g=requestAnimationFrame(x)}return n(),()=>{var h;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,c&&cancelAnimationFrame(g)}}var _d=w.useLayoutEffect,MP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function AP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function DP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(AP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var lg=function(t){return KP(t)?t.filter(Boolean):Dr(t)==="object"&&t!==null?[t]:[]},nw=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=gn(t,MP);return K({},n)},Pe=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,l=t.className;return{css:s(n,t),className:o(r??{},i(n,t),l)}};function FP(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function tc(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function LP(e){return tc(e)?window.innerHeight:e.clientHeight}function rw(e){return tc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(tc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function UP(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function VP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Bi(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dl,o=rw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=VP(l,o,s,n);fl(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function cg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fl(e,Math.max(t.offsetTop-o,0))}function zP(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function ug(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function BP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var ow=!1,qP={get passive(){return ow=!0}},qi=typeof window<"u"?window:{};qi.addEventListener&&qi.removeEventListener&&(qi.addEventListener("p",dl,qP),qi.removeEventListener("p",dl,!1));var HP=ow;function WP(e){return e!=null}function KP(e){return Array.isArray(e)}function Hi(e,t,n){return e?t:n}var GP=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(i){var l=Ve(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=Ve(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},YP=["children","innerProps"],QP=["children","innerProps"];function XP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=UP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),m=p.bottom,g=p.height,y=p.top,x=n.offsetParent.getBoundingClientRect(),h=x.top,v=i?window.innerHeight:LP(c),b=rw(c),S=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),j=h-C,_=v-y,E=j+b,k=f-b-y,R=m-v+b+S,O=b+y-C,N=160;switch(o){case"auto":case"bottom":if(_>=g)return{placement:"bottom",maxHeight:t};if(k>=g&&!i)return s&&Bi(c,R,N),{placement:"bottom",maxHeight:t};if(!i&&k>=r||i&&_>=r){s&&Bi(c,R,N);var P=i?_-S:k-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var A=t,D=i?j:E;return D>=r&&(A=Math.min(D-S-l,t)),{placement:"top",maxHeight:A}}if(o==="bottom")return s&&fl(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(j>=g)return{placement:"top",maxHeight:t};if(E>=g&&!i)return s&&Bi(c,O,N),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&j>=r){var V=t;return(!i&&E>=r||i&&j>=r)&&(V=i?j-C:E-C),s&&Bi(c,O,N),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function ZP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var sw=function(t){return t==="auto"?"bottom":t},JP=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return K((r={label:"menu"},io(r,ZP(o),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},iw=w.createContext(null),eI=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=w.useContext(iw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=Ve(p,2),g=m[0],y=m[1],x=w.useState(null),h=Ve(x,2),v=h[0],b=h[1],S=c.spacing.controlHeight;return _d(function(){var C=f.current;if(C){var j=i==="fixed",_=l&&!j,E=XP({maxHeight:o,menuEl:C,minHeight:r,placement:s,shouldScroll:_,isFixedPosition:j,controlHeight:S});y(E.maxHeight),b(E.placement),d==null||d(E.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:K(K({},t),{},{placement:v||sw(s),maxHeight:g})})},tI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return G("div",Q({},Pe(t,"menu",{menu:!0}),{ref:r},o),n)},nI=tI,rI=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return K({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},oI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return G("div",Q({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},aw=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return K({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},sI=aw,iI=aw,aI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=gn(t,YP);return G("div",Q({},Pe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},lI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=gn(t,QP);return G("div",Q({},Pe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},cI=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},uI=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,l=t.menuPosition,c=w.useRef(null),u=w.useRef(null),d=w.useState(sw(i)),f=Ve(d,2),p=f[0],m=f[1],g=w.useMemo(function(){return{setPortalPlacement:m}},[]),y=w.useState(null),x=Ve(y,2),h=x[0],v=x[1],b=w.useCallback(function(){if(o){var _=zP(o),E=l==="fixed"?0:window.pageYOffset,k=_[p]+E;(k!==(h==null?void 0:h.offset)||_.left!==(h==null?void 0:h.rect.left)||_.width!==(h==null?void 0:h.rect.width))&&v({offset:k,rect:_})}},[o,l,p,h==null?void 0:h.offset,h==null?void 0:h.rect.left,h==null?void 0:h.rect.width]);_d(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=$P(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);_d(function(){S()},[S]);var C=w.useCallback(function(_){c.current=_,S()},[S]);if(!n&&l!=="fixed"||!h)return null;var j=G("div",Q({ref:C},Pe(K(K({},t),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return G(iw.Provider,{value:g},n?Nf.createPortal(j,n):j)},dI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},fI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return G("div",Q({},Pe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},pI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return K({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},hI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return G("div",Q({},Pe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},mI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},gI=function(t){var n=t.children,r=t.innerProps;return G("div",Q({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},dg,vI=["size"],yI=["innerProps","isRtl","size"],xI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},lw=function(t){var n=t.size,r=gn(t,vI);return G("svg",Q({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:xI},r))},jp=function(t){return G(lw,Q({size:20},t),G("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"}))},cw=function(t){return G(lw,Q({size:20},t),G("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"}))},uw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},bI=uw,wI=function(t){var n=t.children,r=t.innerProps;return G("div",Q({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(cw,null))},SI=uw,CI=function(t){var n=t.children,r=t.innerProps;return G("div",Q({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||G(jp,null))},jI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},_I=function(t){var n=t.innerProps;return G("span",Q({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},EI=wP(dg||(dg=SP([`
|
|
68
68
|
0%, 80%, 100% { opacity: 0; }
|
|
69
69
|
40% { opacity: 1; }
|
|
70
|
-
`]))),vI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return K({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},qc=function(t){var n=t.delay,r=t.offset;return G("span",{css:vp({animation:"".concat(gI," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},yI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=gn(t,lI);return G("div",Y({},Oe(K(K({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),G(qc,{delay:0,offset:r}),G(qc,{delay:160,offset:!0}),G(qc,{delay:320,offset:!r}))},xI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return K({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},bI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return G("div",Y({ref:s},Oe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},wI=bI,SI=["data"],_I=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},jI=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return G("div",Y({},Oe(t,"group",{group:!0}),c),G(i,Y({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),G("div",null,n))},CI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return K({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},EI=function(t){var n=Yb(t);n.data;var r=gn(n,SI);return G("div",Y({},Oe(t,"groupHeading",{"group-heading":!0}),r))},RI=jI,NI=["innerRef","isDisabled","isHidden","inputClassName"],kI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return K(K({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},TI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},ow={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},TI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":K({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ow)},OI=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},ow)},PI=function(t){var n=t.cx,r=t.value,o=Yb(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=gn(o,NI);return G("div",Y({},Oe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Y({className:n({input:!0},c),ref:s,style:OI(l),disabled:i},u)))},II=PI,$I=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return K({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},AI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return K({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},MI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return K({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},sw=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},DI=sw,FI=sw;function LI(e){var t=e.children,n=e.innerProps;return G("div",Y({role:"button"},n),t||G(wp,{size:14}))}var UI=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,l=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return G(u,{data:o,innerProps:K(K({},Oe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},G(d,{data:o,innerProps:K({},Oe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),G(f,{data:o,innerProps:K(K({},Oe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},VI=UI,BI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return K({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},zI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return G("div",Y({},Oe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},qI=zI,HI=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return K({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},WI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"placeholder",{placeholder:!0}),r),n)},KI=WI,GI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return K({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},YI=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return G("div",Y({},Oe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},QI=YI,XI={ClearIndicator:pI,Control:wI,DropdownIndicator:dI,DownChevron:nw,CrossIcon:wp,Group:RI,GroupHeading:EI,IndicatorsContainer:iI,IndicatorSeparator:mI,Input:II,LoadingIndicator:yI,Menu:WP,MenuList:GP,MenuPortal:eI,LoadingMessage:ZP,NoOptionsMessage:XP,MultiValue:VI,MultiValueContainer:DI,MultiValueLabel:FI,MultiValueRemove:LI,Option:qI,Placeholder:KI,SelectContainer:nI,SingleValue:QI,ValueContainer:oI},ZI=function(t){return K(K({},XI),t.components)},sg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function JI(e,t){return!!(e===t||sg(e)&&sg(t))}function e$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!JI(e[n],t[n]))return!1;return!0}function t$(e,t){t===void 0&&(t=e$);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}var n$={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"},r$=function(t){return G("span",Y({css:n$},t))},ig=r$,o$={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" 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(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,i=s===void 0?"":s,l=t.selectValue,c=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(h,x){return h&&h.length?"".concat(h.indexOf(x)+1," of ").concat(h.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",y="".concat(u?" selected":"").concat(p);return"".concat(i).concat(y,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},s$=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,l=t.selectValue,c=t.selectProps,u=t.id,d=t.isAppleDevice,f=c.ariaLiveMessages,p=c.getOptionLabel,y=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,x=c.isSearchable,v=c.menuIsOpen,g=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,_=c.isLoading,j=c["aria-label"],C=c["aria-live"],E=w.useMemo(function(){return K(K({},o$),f||{})},[f]),N=w.useMemo(function(){var D="";if(n&&E.onChange){var V=n.option,Q=n.options,O=n.removedValue,U=n.removedValues,A=n.value,H=function(ge){return Array.isArray(ge)?null:ge},B=O||V||H(A),W=B?p(B):"",Z=Q||U||void 0,ee=Z?Z.map(p):[],X=K({isDisabled:B&&h(B,l),label:W,labels:ee},n);D=E.onChange(X)}return D},[n,E,h,l,p]),R=w.useMemo(function(){var D="",V=r||o,Q=!!(r&&l&&l.includes(r));if(V&&E.onFocus){var O={focused:V,label:p(V),isDisabled:h(V,l),isSelected:Q,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};D=E.onFocus(O)}return D},[r,o,p,h,E,s,l,d]),T=w.useMemo(function(){var D="";if(v&&g.length&&!_&&E.onFilter){var V=b({count:s.length});D=E.onFilter({inputValue:y,resultsMessage:V})}return D},[s,y,v,E,g,b,_]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var D="";if(E.guidance){var V=o?"value":v?"menu":"input";D=E.guidance({"aria-label":j,context:V,isDisabled:r&&h(r,l),isMulti:m,isSearchable:x,tabSelectsValue:S,isInitialFocus:k})}return D},[j,r,o,m,h,x,v,E,l,S,k]),M=G(w.Fragment,null,G("span",{id:"aria-selection"},N),G("span",{id:"aria-focused"},R),G("span",{id:"aria-results"},T),G("span",{id:"aria-guidance"},P));return G(w.Fragment,null,G(ig,{id:u},k&&M),G(ig,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&M))},i$=s$,Sd=[{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źẑżžẓẕƶȥɀⱬꝣ"}],a$=new RegExp("["+Sd.map(function(e){return e.letters}).join("")+"]","g"),iw={};for(var Hc=0;Hc<Sd.length;Hc++)for(var Wc=Sd[Hc],Kc=0;Kc<Wc.letters.length;Kc++)iw[Wc.letters[Kc]]=Wc.base;var aw=function(t){return t.replace(a$,function(n){return iw[n]})},l$=t$(aw),ag=function(t){return t.replace(/^\s+|\s+$/g,"")},c$=function(t){return"".concat(t.label," ").concat(t.value)},u$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:c$,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?ag(r):r,f=c?ag(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=l$(d),f=aw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},d$=["innerRef"];function f$(e){var t=e.innerRef,n=gn(e,d$),r=FP(n,"onExited","in","enter","exit","appear");return G("input",Y({ref:t},r,{css:vp({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)"},"","")}))}var p$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function h$(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=w.useRef(!1),l=w.useRef(!1),c=w.useRef(0),u=w.useRef(null),d=w.useCallback(function(x,v){if(u.current!==null){var g=u.current,b=g.scrollTop,S=g.scrollHeight,_=g.clientHeight,j=u.current,C=v>0,E=S-_-b,N=!1;E>v&&i.current&&(r&&r(x),i.current=!1),C&&l.current&&(s&&s(x),l.current=!1),C&&v>E?(n&&!i.current&&n(x),j.scrollTop=S,N=!0,i.current=!0):!C&&-v>b&&(o&&!l.current&&o(x),j.scrollTop=0,N=!0,l.current=!0),N&&p$(x)}},[n,r,o,s]),f=w.useCallback(function(x){d(x,x.deltaY)},[d]),p=w.useCallback(function(x){c.current=x.changedTouches[0].clientY},[]),y=w.useCallback(function(x){var v=c.current-x.changedTouches[0].clientY;d(x,v)},[d]),m=w.useCallback(function(x){if(x){var v=AP?{passive:!1}:!1;x.addEventListener("wheel",f,v),x.addEventListener("touchstart",p,v),x.addEventListener("touchmove",y,v)}},[y,p,f]),h=w.useCallback(function(x){x&&(x.removeEventListener("wheel",f,!1),x.removeEventListener("touchstart",p,!1),x.removeEventListener("touchmove",y,!1))},[y,p,f]);return w.useEffect(function(){if(t){var x=u.current;return m(x),function(){h(x)}}},[t,m,h]),function(x){u.current=x}}var lg=["boxSizing","height","overflow","paddingRight","position"],cg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ug(e){e.preventDefault()}function dg(e){e.stopPropagation()}function fg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function pg(){return"ontouchstart"in window||navigator.maxTouchPoints}var hg=!!(typeof window<"u"&&window.document&&window.document.createElement),rs=0,Wr={capture:!1,passive:!1};function m$(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),i=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;if(r&&lg.forEach(function(m){var h=d&&d[m];o.current[m]=h}),r&&rs<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,y=window.innerWidth-p+f||0;Object.keys(cg).forEach(function(m){var h=cg[m];d&&(d[m]=h)}),d&&(d.paddingRight="".concat(y,"px"))}u&&pg()&&(u.addEventListener("touchmove",ug,Wr),c&&(c.addEventListener("touchstart",fg,Wr),c.addEventListener("touchmove",dg,Wr))),rs+=1}},[r]),l=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;rs=Math.max(rs-1,0),r&&rs<1&&lg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&pg()&&(u.removeEventListener("touchmove",ug,Wr),c&&(c.removeEventListener("touchstart",fg,Wr),c.removeEventListener("touchmove",dg,Wr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return i(c),function(){l(c)}}},[t,i,l]),function(c){s.current=c}}var g$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},v$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function y$(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,c=e.onTopLeave,u=h$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=m$({isEnabled:n}),f=function(y){u(y),d(y)};return G(w.Fragment,null,n&&G("div",{onClick:g$,css:v$}),t(f))}var x$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},b$=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:x$,value:"",onChange:function(){}})},w$=b$;function Sp(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function S$(){return Sp(/^iPhone/i)}function lw(){return Sp(/^Mac/i)}function _$(){return Sp(/^iPad/i)||lw()&&navigator.maxTouchPoints>1}function j$(){return S$()||_$()}function C$(){return lw()||j$()}var E$=function(t){return t.label},R$=function(t){return t.label},N$=function(t){return t.value},k$=function(t){return!!t.isDisabled},T$={clearIndicator:fI,container:tI,control:xI,dropdownIndicator:uI,group:_I,groupHeading:CI,indicatorsContainer:sI,indicatorSeparator:hI,input:kI,loadingIndicator:vI,loadingMessage:QP,menu:zP,menuList:KP,menuPortal:JP,multiValue:$I,multiValueLabel:AI,multiValueRemove:MI,noOptionsMessage:YP,option:BI,placeholder:HI,singleValue:GI,valueContainer:rI},O$={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%)"},P$=4,cw=4,I$=38,$$=cw*2,A$={baseUnit:cw,controlHeight:I$,menuGutter:$$},Gc={borderRadius:P$,colors:O$,spacing:A$},M$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:rg(),captureMenuScroll:!rg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:u$(),formatGroupLabel:E$,getOptionLabel:R$,getOptionValue:N$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:k$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!IP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function mg(e,t,n,r){var o=fw(e,t,n),s=pw(e,t,n),i=dw(e,t),l=cl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function fa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return mg(e,i,t,l)}).filter(function(i){return vg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=mg(e,n,t,r);return vg(e,s)?s:void 0}).filter(MP)}function uw(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,cp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function gg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,cp(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function D$(e,t){return uw(fa(e,t))}function vg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!mw(e)||!s)&&hw(e,{label:i,value:l,data:o},r)}function F$(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function L$(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Yc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},dw=function(t,n){return t.getOptionLabel(n)},cl=function(t,n){return t.getOptionValue(n)};function fw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function pw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cl(e,t);return n.some(function(o){return cl(e,o)===r})}function hw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var mw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},U$=1,_p=function(e){rO(n,e);var t=iO(n);function n(r){var o;if(tO(this,n),o=t.call(this,r),o.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:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=C$(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,u){var d=o.props,f=d.onChange,p=d.name;u.name=p,o.ariaOnChange(c,u),f(c,u)},o.setValue=function(c,u,d){var f=o.props,p=f.closeMenuOnSelect,y=f.isMulti,m=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),p&&(o.setState({inputIsHiddenAfterUpdate:!y}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:u,option:d})},o.selectOption=function(c){var u=o.props,d=u.blurInputOnSelect,f=u.isMulti,p=u.name,y=o.state.selectValue,m=f&&o.isOptionSelected(c,y),h=o.isOptionDisabled(c,y);if(m){var x=o.getOptionValue(c);o.setValue(y.filter(function(v){return o.getOptionValue(v)!==x}),"deselect-option",c)}else if(!h)f?o.setValue([].concat(cp(y),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:p});return}d&&o.blurInput()},o.removeValue=function(c){var u=o.props.isMulti,d=o.state.selectValue,f=o.getOptionValue(c),p=d.filter(function(m){return o.getOptionValue(m)!==f}),y=Vi(u,p,p[0]||null);o.onChange(y,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Vi(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,u=o.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),p=Vi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Yc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return gg(fa(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return RP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return dw(o.props,c)},o.getOptionValue=function(c){return cl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=T$[c](u,d);f.boxSizing="border-box";var p=o.props.styles[c];return p?p(f,u):f},o.getClassNames=function(c,u){var d,f;return(d=(f=o.props.classNames)[c])===null||d===void 0?void 0:d.call(f,u)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return ZI(o.props)},o.buildCategorizedOptions=function(){return fa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return uw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:K({value:c},u)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var u=o.props,d=u.isMulti,f=u.menuIsOpen;o.focusInput(),f?(o.setState({inputIsHiddenAfterUpdate:!d}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&Jl(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var u=c.touches,d=u&&u.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var u=c.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-o.initialTouchX),p=Math.abs(d.clientY-o.initialTouchY),y=5;o.userIsDragging=f>y||p>y}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var u=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var u=o.getFocusableOptions(),d=u.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return mw(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var u=o.props,d=u.isMulti,f=u.backspaceRemovesValue,p=u.escapeClearsValue,y=u.inputValue,m=u.isClearable,h=u.isDisabled,x=u.menuIsOpen,v=u.onKeyDown,g=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,_=S.focusedOption,j=S.focusedValue,C=S.selectValue;if(!h&&!(typeof v=="function"&&(v(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||y)return;o.focusValue("previous");break;case"ArrowRight":if(!d||y)return;o.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(j)o.removeValue(j);else{if(!f)return;d?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!x||!g||!_||b&&o.isOptionSelected(_,C))return;o.selectOption(_);break;case"Enter":if(c.keyCode===229)break;if(x){if(!_||o.isComposing)return;o.selectOption(_);break}return;case"Escape":x?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:y}),o.onMenuClose()):m&&p&&o.clearValue();break;case" ":if(y)return;if(!x){o.openMenu("first");break}if(!_)return;o.selectOption(_);break;case"ArrowUp":x?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":x?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!x)return;o.focusOption("pageup");break;case"PageDown":if(!x)return;o.focusOption("pagedown");break;case"Home":if(!x)return;o.focusOption("first");break;case"End":if(!x)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++U$),o.state.selectValue=tg(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),l=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[l],o.state.focusedOptionId=Yc(s,i[l])}return o}return nO(n,[{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&&ng(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!i&&o.isDisabled||c&&l&&!o.menuIsOpen)&&this.focusInput(),c&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(ng(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(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,i=this.state,l=i.selectValue,c=i.isFocused,u=this.buildFocusableOptions(),d=o==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=i.indexOf(l);l||(c=-1);var u=i.length-1,d=-1;if(i.length){switch(o){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var c=0,u=l.indexOf(i);i||(u=-1),o==="up"?c=u>0?u-1:l.length-1:o==="down"?c=(u+1)%l.length:o==="pageup"?(c=u-s,c<0&&(c=0)):o==="pagedown"?(c=u+s,c>l.length-1&&(c=l.length-1)):o==="last"&&(c=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Gc):K(K({},Gc),this.props.theme):Gc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,l=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,y=f.isRtl,m=f.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:h,isMulti:p,isRtl:y,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return fw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return pw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return hw(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{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 o=this.props,s=o.isDisabled,i=o.isSearchable,l=o.inputId,c=o.inputValue,u=o.tabIndex,d=o.form,f=o.menuIsOpen,p=o.required,y=this.getComponents(),m=y.Input,h=this.state,x=h.inputIsHidden,v=h.ariaSelection,g=this.commonProps,b=l||this.getElementId("input"),S=K(K(K({"aria-autocomplete":"list","aria-expanded":f,"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":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(m,Y({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:x,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(f$,Y({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:al,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:d,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,u=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,y=this.props,m=y.controlShouldRenderValue,h=y.isDisabled,x=y.isMulti,v=y.inputValue,g=y.placeholder,b=this.state,S=b.selectValue,_=b.focusedValue,j=b.isFocused;if(!this.hasValue()||!m)return v?null:w.createElement(f,Y({},p,{key:"placeholder",isDisabled:h,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),g);if(x)return S.map(function(E,N){var R=E===_,T="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return w.createElement(i,Y({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:h,key:T,index:N,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(P){P.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(v)return null;var C=S[0];return w.createElement(d,Y({},p,{data:C,isDisabled:h}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:f,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var l=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return w.createElement(i,Y({},l,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,l=s.GroupHeading,c=s.Menu,u=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,y=s.Option,m=this.commonProps,h=this.state.focusedOption,x=this.props,v=x.captureMenuScroll,g=x.inputValue,b=x.isLoading,S=x.loadingMessage,_=x.minMenuHeight,j=x.maxMenuHeight,C=x.menuIsOpen,E=x.menuPlacement,N=x.menuPosition,R=x.menuPortalTarget,T=x.menuShouldBlockScroll,k=x.menuShouldScrollIntoView,P=x.noOptionsMessage,M=x.onMenuScrollToTop,D=x.onMenuScrollToBottom;if(!C)return null;var V=function(W,Z){var ee=W.type,X=W.data,ie=W.isDisabled,ge=W.isSelected,Se=W.label,Ae=W.value,F=h===X,L=ie?void 0:function(){return o.onOptionHover(X)},te=ie?void 0:function(){return o.selectOption(X)},J="".concat(o.getElementId("option"),"-").concat(Z),re={id:J,onClick:te,onMouseMove:L,onMouseOver:L,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ge};return w.createElement(y,Y({},m,{innerProps:re,data:X,isDisabled:ie,isSelected:ge,key:J,label:Se,type:ee,value:Ae,isFocused:F,innerRef:F?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var W=B.data,Z=B.options,ee=B.index,X="".concat(o.getElementId("group"),"-").concat(ee),ie="".concat(X,"-heading");return w.createElement(i,Y({},m,{key:X,data:W,options:Z,Heading:l,headingProps:{id:ie,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(ge){return V(ge,"".concat(ee,"-").concat(ge.index))}))}else if(B.type==="option")return V(B,"".concat(B.index))});else if(b){var O=S({inputValue:g});if(O===null)return null;Q=w.createElement(f,m,O)}else{var U=P({inputValue:g});if(U===null)return null;Q=w.createElement(p,m,U)}var A={minMenuHeight:_,maxMenuHeight:j,menuPlacement:E,menuPosition:N,menuShouldScrollIntoView:k},H=w.createElement(qP,Y({},m,A),function(B){var W=B.ref,Z=B.placerProps,ee=Z.placement,X=Z.maxHeight;return w.createElement(c,Y({},m,A,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:ee}),w.createElement(y$,{captureEnabled:v,onTopArrive:M,onBottomArrive:D,lockEnabled:T},function(ie){return w.createElement(u,Y({},m,{innerRef:function(Se){o.getMenuListRef(Se),ie(Se)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:X,focusedOption:h}),Q)}))});return R||N==="fixed"?w.createElement(d,Y({},m,{appendTo:R,controlElement:this.controlRef,menuPlacement:E,menuPosition:N}),H):H}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,l=s.isDisabled,c=s.isMulti,u=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return w.createElement(w$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(h){return o.getOptionValue(h)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var y=f.length>0?f.map(function(h,x){return w.createElement("input",{key:"i-".concat(x),name:u,type:"hidden",value:o.getOptionValue(h)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,y)}else{var m=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,l=s.focusedOption,c=s.focusedValue,u=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return w.createElement(i$,Y({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,c=o.ValueContainer,u=this.props,d=u.className,f=u.id,p=u.isDisabled,y=u.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return w.createElement(l,Y({},h,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:m}),this.renderLiveRegion(),w.createElement(s,Y({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:m,menuIsOpen:y}),w.createElement(c,Y({},h,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Y({},h,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,l=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,y=o.options,m=o.value,h=o.menuIsOpen,x=o.inputValue,v=o.isMulti,g=tg(m),b={};if(i&&(m!==i.value||y!==i.options||h!==i.menuIsOpen||x!==i.inputValue)){var S=h?D$(o,g):[],_=h?gg(fa(o,g),"".concat(p,"-option")):[],j=l?F$(s,g):null,C=L$(s,S),E=Yc(_,C);b={selectValue:g,focusedOption:C,focusedOptionId:E,focusableOptionsWithIds:_,focusedValue:j,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,T=d&&f;return d&&!T&&(R={value:Vi(v,g,g[0]||null),options:g,action:"initial-input-focus"},T=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),K(K(K({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:T})}}]),n}(w.Component);_p.defaultProps=M$;var V$=w.forwardRef(function(e,t){var n=Rb(e);return w.createElement(_p,Y({ref:t},n))}),jp=V$;function go({bg:e="dark",children:t,color:n="light",fontWeight:r="bold",icon:o="info-circle-fill",initial:s=!1,maxWidth:i="200px",padding:l="10px",placement:c,target:u,trigger:d="click",visible:f=!0}){const p=typeof s=="string"||s instanceof String,[y,m]=w.useState(p?localStorage.getItem(s)!="true":s),[h,x]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>x(!0),100)},[]);const v=()=>{p&&localStorage.setItem(s,"true")},g=a.jsxs(Ll,{style:{"--bs-tooltip-bg":`var(--bs-${e})`,"--bs-tooltip-color":`var(--bs-${n})`,"--bs-tooltip-max-width":i,"--bs-tooltip-padding-x":l,"--bs-tooltip-padding-y":l,fontWeight:r},children:[a.jsx("button",{"aria-label":"Close",onClick:()=>{v(),m(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:a.jsx("i",{className:"bi bi-x-lg"})}),t]});return u&&u.current?a.jsx(jb,{target:u.current,placement:c,show:y&&f&&h,children:g}):a.jsx(lp,{placement:c,onToggle:b=>{v(),m(b)},overlay:g,show:y&&f&&h,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const B$="_items_c2dbg_1",z$="_item_c2dbg_1",q$="_details_c2dbg_14",H$="_text_c2dbg_20",W$="_number_c2dbg_35",K$="_outer_c2dbg_50",G$="_inner_c2dbg_61",xn={items:B$,item:z$,details:q$,text:H$,number:W$,outer:K$,inner:G$},os=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function Y$({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=Zu}){const{request:o}=at(e,t);if(!o)return;let s=0,i;const l=[];for(let p of o.resources)p.isBoolean||(p.isCredit?i=p:l.push(p),s+=Ju(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,y)=>{if(!p)return null;const m=y+1,x=Ju(p)/s,v=p.requested-p.used,g=Math.max(0,v),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*g/b,j=`var(--bs-${p.isCredit?n:r[y%r.length]})`;if(x>0){const C=d,E=d+x/2,N=d+=x,R=x>.5?1:0,T=[`M ${os(C,100)}`,`A 100 100 0 ${R} 1 ${os(N,100)}`,`L ${os(N,50)}`,`A 50 50 0 ${R} 0 ${os(C,50)}`].join(" "),[k,P]=os(E,75).split(" ").map(M=>parseFloat(M));c.push(a.jsx("path",{d:T,style:{fill:j}},p.resourceId)),u.push(a.jsx("circle",{cx:k,cy:P,r:"8",fill:"black"},`${p.resourceId}-circle`),a.jsx("text",{x:k-4,y:P+4,fill:"white",className:xn.number,children:m},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:xn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:nt(g,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:xn.item,children:[a.jsx("span",{className:xn.number,children:m}),a.jsx("span",{className:`${xn.outer} ms-2 me-2`,style:{borderColor:j},children:a.jsx("span",{className:xn.inner,style:{backgroundColor:j,width:`${S}%`}})}),a.jsxs("strong",{className:xn.name,children:[a.jsx(Jn,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:xn.details,children:[nt(v,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",nt(b,{abbreviate:!0})," "]}),p.unit," ",p.isCredit?"available":"remaining"," (",Math.round(S),"%)"]})]},p.resourceId)});return a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:a.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[c,u]})}),a.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:a.jsx("ul",{className:xn.items,children:f})})]})}const yg=e=>e;function Q$({classes:e,clean:t=yg,format:n=yg,label:r,setValue:o,style:s,value:i}){const l=n(i),[c,u]=w.useState(l);return w.useEffect(()=>{u(l)},[l]),a.jsx("input",{type:"text","aria-label":r,className:`form-control ${e}`,value:c,style:s,onChange:d=>u(d.target.value),onBlur:d=>{const f=t(d.target.value);u(n(f)),o(f)},onKeyDown:d=>{d.code=="Enter"&&(d.preventDefault(),d.target.blur())}})}function X$({requestId:e,grantNumber:t}){const{request:n,addResource:r,openUsageDetailModal:o,resetResources:s,setResourceRequest:i,setResourcesReason:l,statuses:c,toggleActionsModal:u,toggleConfirmModal:d,toggleResourcesModal:f}=at(e,t),{project:p}=Rt(t||n&&n.grantNumber),y=w.useRef(null),m=w.useRef(null);if(!n||!p)return;const h="Exchange"in n.allowedActions,x="Renewal"in n.allowedActions,v="Supplement"in n.allowedActions,g=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,_=n.exchangeErrors,j=n.exchangeActionId!==null,C=n.exchangeActionEditable,E=n.resources,N=n.resourcesReason,R={};for(let F of E)R[F.resourceId]=F;const T=()=>{px(n)>=.75?u():d()},k=[];for(let F of E){let L=[];if(F.requested>0){for(let te of F.requires||[]){let J=R[te];if(J){if(J.requested>0){L=[];break}L.push(J)}}L.length&&k.push(a.jsxs("span",{children:[a.jsx(Jn,{resource:F,userGuide:!1})," requires"," ",fx(L.map(te=>a.jsx(Jn,{resource:te,userGuide:!1},te.resourceId)),"or"),"."]},F.resourceId))}}const P=k.length>0;let M;b?M=a.jsx(be,{color:"info",children:"Your exchange request has been submitted."}):S&&_.length>0&&_[0].includes("PI")&&_[0].includes("person status Unknown")?M=a.jsx(be,{color:"danger",children:p.currentUser.role==="pi"?a.jsxs(a.Fragment,{children:["Please"," ",a.jsx("a",{href:ne.routes.profile_path(),children:"update your academic status"})," ","before making an exchange request."]}):a.jsxs(a.Fragment,{children:["The primary investigator for this project has an unknown academic status. Please ask"," ",p.users.filter(F=>F.role==="pi").map(F=>`${F.firstName} ${F.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?M=a.jsxs(be,{color:"danger",children:["Sorry, something went wrong: ",_.join(", "),". For assistance, please"," ",a.jsx("a",{href:"https://support.access-ci.org/open-a-ticket",children:"open a help ticket"})," ","and include this message."]}):j?M=a.jsx(be,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?M=a.jsxs(be,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Mf(p)," to request a change."]}):P&&(M=a.jsxs(be,{color:"warning",children:[k," Please adjust your balance values."]}));const D=N.length>0;let V=!1,Q=!1;for(let F of E)if(F.isNew&&(V=!0),F.allocated!=F.requested&&(Q=!0),V&&Q)break;const O=E.map(F=>F.resourceId),U={},A={},H=[];if(h&&C){n.allowedActions.Exchange.resources.filter(F=>!O.includes(F.resourceId)).map(F=>{U[F.resourceId]=F;const L=`${F.type} Resources (${F.unit})`;A[L]=A[L]||[],A[L].push(F)});for(const[F,L]of Object.entries(A))H.push({label:F,options:L.sort((te,J)=>te.exchangeRates.current.unitCost<J.exchangeRates.current.unitCost||te.exchangeRates.current.unitCost==J.exchangeRates.current.unitCost&&te.name<J.name?-1:1).map(te=>{const J=Ol(te.name),re=J.short?`${J.short} (${J.full.replace(/ \([^(]+\)/,"")})`:J.full;return{value:te.resourceId,label:re}})}),H.sort((te,J)=>te.label<J.label?-1:1)}const B=h?n.allowedActions.Exchange.resources.map(F=>F.resourceId):[];let W;const Z=[],ee=[];for(let F of E)F.isCredit?W=F:(Z.push(F),ee.push(C&&(F.isNew||F.allocated!=F.requested)?Cr.edited:B.includes(F.resourceId)?"":Cr.disabled));const X=`Add ${Z.length?"another":"a"} resource to your exchange...`,ie=F=>F.requested-F.used,ge=(F,L)=>{const te=L.allocated-L.used,J=po(Number(F.replace(/[^0-9-.]/g,"")),L.decimalPlaces),re=Math.min(0,te);if(J<re)return re;let lt=W.requested*W.exchangeRates.base.unitCost;const Pt=(L.allocated-L.requested)*L.exchangeRates.base.unitCost,It=Math.min(lt,Pt);lt-=It;let ct=L.requested-L.used+It/L.exchangeRates.base.unitCost;return lt>0&&(ct+=lt/L.exchangeRates.current.unitCost),J>ct?po(ct,L.decimalPlaces,"floor"):J},Se=F=>F.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[kn(ne.resourceTypeIcons[W.icon]),a.jsx("span",{className:"ms-2",children:CC(F.unit,F.exchangeRates.current.unitCost,W.name)})]}),Ae=[{key:"name",name:"Resource",format:(F,L)=>a.jsxs(a.Fragment,{children:[a.jsx(Jn,{resource:L}),(p.currentUser.resourceIds.includes(L.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(L.resourceId))&&a.jsx(tl,{icon:"table",onClick:()=>o(L.resourceRepositoryKey),target:"_blank",title:`${L.name} Usage Details`})," ",a.jsx(Oo,{status:L.isActive?"Active":L.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(F,L)=>Se(L)}];return h&&Ae.push({key:"requested",name:"Balance",class:"text-end",rowClass:F=>C&&B.includes(F.resourceId)?Cr.input:"",format:(F,L)=>{const te=C&&B.includes(L.resourceId);return L.isBoolean?a.jsxs("span",{className:"d-flex",children:[a.jsx("span",{className:"w-100",children:a.jsx("input",{className:"form-check-input",type:"checkbox",checked:F==1,disabled:!te,onChange:J=>i(L.resourceId,J.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[te?a.jsx(Q$,{classes:"text-end w-100",clean:J=>ge(J,L),format:nt,label:`Balance for ${L.name}`,setValue:J=>{i(L.resourceId,J+L.used)},style:{padding:"0.1rem 0.5rem"},value:ie(L)}):a.jsx("span",{children:nt(ie(L))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:L.unit})]})},formatHeader:F=>a.jsxs(a.Fragment,{children:[F,C?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:p.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]})},{key:"change",name:"Credit Change",format:(F,L)=>{const J=-1*(L.requested-L.allocated)*L.exchangeRates.current.unitCost;return J!==0?a.jsxs("span",{className:`badge bg-${J>0?"primary":"danger"} rounded-pill`,children:[J>0?"+":"",nt(J,W)," ",W.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[M,E.length?a.jsx(Y$,{requestId:e}):null,W&&(h||x||v)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[kn(ne.resourceTypeIcons.credit)," ",nt(W.requested,W)," ",W.unit," available to exchange"]}),x||v?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:T,children:[kn(ne.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,Z.length?a.jsx(Un,{columns:Ae,rows:Z,rowClasses:ee,classes:H.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):a.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),H.length?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:y,children:a.jsx(jp,{classNames:{control:()=>"react-select mb-1"},options:H,onChange:F=>r(F.value),placeholder:X,value:null,"aria-label":X,formatOptionLabel:({value:F,label:L})=>{const te=U[F];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(Jn,{resource:te,userGuide:!1},L)}),a.jsx("span",{children:Se(te)})]})}})}),Z.length?null:a.jsx(go,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:y,children:"Ready to get started? Search for a resource to add it to your project."}),a.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",a.jsx("a",{href:ne.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,h&&C?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),a.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:N,onChange:F=>l(F.target.value),style:{minHeight:"3rem"}})]}),a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:g||!Q&&!D&&!V,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:m,type:"button",className:"btn btn-secondary",disabled:g||!Q||!D||P,onClick:f,children:g?"Submitting...":"Submit for Approval"})]}),Q&&!P?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:m,visible:p.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 Z$({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=at(t,n),s=w.useId();if(!e||!r||r.error)return;const{attributeSetId:i,attributes:l,fieldType:c,label:u,resourceId:d,values:f}=e,p=l[0],y=p.required?"required":"",m=b=>o(d,i,b.target.value?[b.target.value]:[]),h=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},x=b=>{const S=parseInt(b.target.value,10),_=b.target.checked?[...f,S]:f.filter(j=>j!=S);o(d,i,_)},v=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let g;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];g=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?v:m})}else if(c=="textarea")g=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:m});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";g=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?h:v,value:b?f:f[0]||"",children:[b?null:a.jsx("option",{}),l.map(S=>a.jsx("option",{value:S.resourceAttributeId,children:S.label},S.resourceAttributeId))]})}else g=a.jsx("div",{id:s,children:l.map(b=>{const S=`resource-attribute-${b.resourceAttributeId}`;return a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:c=="single_sel"?"radio":"checkbox",id:S,value:b.resourceAttributeId,checked:f.includes(b.resourceAttributeId),onChange:c=="single_sel"?v:x}),a.jsx("label",{className:"form-check-label",htmlFor:S,children:b.label})]},b.resourceAttributeId)})});return a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:s,className:`form-label ${y}`,children:u}),g]})}function J$({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=[],l=n.resources.filter(u=>u.allocated!=u.requested).map(u=>{const d=u.requested-u.allocated;return u.questions&&i.push(...u.questions),a.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[u.name,a.jsx("span",{className:`badge bg-${d>0?"primary":"danger"} rounded-pill`,children:u.isBoolean?Af(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",nt(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ve,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Complete Your Exchange"})}),a.jsxs(ve.Body,{children:[a.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."}),a.jsx("ul",{className:"list-group mb-3",children:l}),i.length?a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Questions"}),a.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),i.map(u=>a.jsx(Z$,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Continue Editing"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,disabled:c,children:"Submit"})]})})]})}function gw({user:e}){const t=`${e.lastName}, ${e.firstName}`;let n=t,r=[e.organization,e.email].filter(o=>o).join(", ");return r&&(n+=`: ${r}`),a.jsx("abbr",{title:n,children:t})}function eA({requestId:e,grantNumber:t}){const{project:n}=Rt(t),{request:r,closeUsageDetailModal:o}=at(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Le.pending)s=a.jsx(Do,{});else if(r.usageDetailStatus==Le.error)s=a.jsx(be,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:l,resourceDisplayName:c,resourceRepositoryKey:u,users:d}=r.usageDetail,{full:f,short:p}=Ol(c),y=r.resources.find(v=>v.resourceRepositoryKey==u),m=v=>nt(v,{decimalPlaces:y?y.decimalPlaces:void 0}),h={};for(let v of n.users)h[v.username]=v;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const x=[{key:"name",name:"Name",format:(v,{lastName:g,firstName:b,portalUsername:S})=>{const _=h[S];return _?a.jsx(gw,{user:_}):`${g}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:v=>{const g=h[v],b=g?g.resourceUsernames[y.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:v=>hx[v].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:m},{key:"lastMonth",name:"Last Month",class:"text-end",format:m},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:m},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:m},{key:"total",name:"All Time",class:"text-end",format:m}];s=d.length?a.jsx(Un,{rows:d,columns:x}):a.jsx(be,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ve,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:i})}),a.jsx(ve.Body,{children:s})]})}var tA=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function nA(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var i=e.isLoading,l=i===void 0?!1:i,c=e.onInputChange,u=e.filterOption,d=u===void 0?null:u,f=gn(e,tA),p=f.inputValue,y=w.useRef(void 0),m=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),x=Ue(h,2),v=x[0],g=x[1],b=w.useState(typeof p<"u"?p:""),S=Ue(b,2),_=S[0],j=S[1],C=w.useState(n===!0),E=Ue(C,2),N=E[0],R=E[1],T=w.useState(void 0),k=Ue(T,2),P=k[0],M=k[1],D=w.useState([]),V=Ue(D,2),Q=V[0],O=V[1],U=w.useState(!1),A=Ue(U,2),H=A[0],B=A[1],W=w.useState({}),Z=Ue(W,2),ee=Z[0],X=Z[1],ie=w.useState(void 0),ge=Ue(ie,2),Se=ge[0],Ae=ge[1],F=w.useState(void 0),L=Ue(F,2),te=L[0],J=L[1];o!==te&&(X({}),J(o)),n!==Se&&(g(Array.isArray(n)?n:void 0),Ae(n)),w.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var re=w.useCallback(function(It,ct){if(!s)return ct();var Ce=s(It,ct);Ce&&typeof Ce.then=="function"&&Ce.then(ct,function(){return ct()})},[s]);w.useEffect(function(){n===!0&&re(_,function(It){m.current&&(g(It||[]),R(!!y.current))})},[]);var lt=w.useCallback(function(It,ct){var Ce=NP(It,ct,c);if(!Ce){y.current=void 0,j(""),M(""),O([]),R(!1),B(!1);return}if(o&&ee[Ce])j(Ce),M(Ce),O(ee[Ce]),R(!1),B(!1);else{var Bn=y.current={};j(Ce),R(!0),B(!P),re(Ce,function(zn){m&&Bn===y.current&&(y.current=void 0,R(!1),M(Ce),O(zn||[]),B(!1),X(zn?K(K({},ee),{},so({},Ce,zn)):ee))})}},[o,re,P,ee,c]),Pt=H?[]:_&&P?Q:v||[];return K(K({},f),{},{options:Pt,isLoading:N||l,onInputChange:lt,filterOption:d})}var rA=w.forwardRef(function(e,t){var n=nA(e),r=Rb(n);return w.createElement(_p,Y({ref:t},r))}),oA=rA;const xg=({description:e,disabled:t=!1,onChange:n,selectedLength:r,totalLength:o})=>{const s=w.useRef(),i=w.useId();let l=r==o,c=r>0&&!l;return w.useEffect(()=>{s.current&&(s.current.checked=l,s.current.indeterminate=c)},[l,c]),a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"custom-checkbox form-check-input",disabled:t,id:i,onChange:u=>n(u.target.checked),ref:s,type:"checkbox"}),a.jsx("label",{className:"form-check-label",htmlFor:i,"aria-description":`${l?"Deselect":"Select"} ${e}`})]})};function sA({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=Rt(e),{request:d}=n?at(t||n.currentRequestId,e):{request:null};if(!n||!n.currentRequestId||!d||n.error||d.error)return;const f=n.isManager,p="Exchange"in d.allowedActions,y=n.usersStatus==c.pending,m=n.usersStatus==c.success,h=n.usersStatus==c.error,x=n.users,v=d.resources.filter(od),g=v.length==0,b=x.find(R=>R.hasChanges)!==void 0,S=x.find(R=>R.role!="pi")!==void 0;let _;m&&!b?_=a.jsx(be,{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."}):h?_=a.jsx(be,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?v.length?g&&(_=a.jsx(be,{color:"warning",children:"This project does not have any active resources."})):_=a.jsxs(be,{color:"warning",children:["This project does not have any resources."," ",p?a.jsx("a",{href:ne.routes.request_action_path(d.requestId,"new?action_type=Exchange"),onClick:R=>{R.preventDefault(),i("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):_=a.jsxs(be,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Mf(n)," to request a change."]});const j=(R,T)=>{let k,P,M,D;if(T.key=="all"){k="all resources for all users",P=V=>u(V),M=0;for(let V of x)M+=V.resourceIds.length;D=x.length*v.length}else k=`all users for ${T.name}`,P=V=>u(V,null,T.key),M=x.filter(({resourceIds:V})=>V.includes(T.key)).length,D=x.length;return a.jsxs(a.Fragment,{children:[T.key=="all"?R:a.jsx(Jn,{resource:T,userGuide:!1}),a.jsx("br",{}),a.jsx(xg,{description:k,disabled:T.disabled,onChange:P,selectedLength:M,totalLength:D})]})},C=Pl.map(({role:R,name:T})=>a.jsx("option",{value:R,children:T},R)),E=[{key:"name",name:"Name",width:200,format:(R,T)=>a.jsx(gw,{user:T})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,T)=>a.jsx("select",{className:"form-select",value:R,onChange:k=>l(T.username,k.target.value),disabled:!f||R=="pi"||R=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:C.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];v.length&&E.push({key:"all",name:"All Resources",class:`text-center ${Cr.important}`,disabled:!f||g,width:100,format:(R,T)=>a.jsx(xg,{description:`all users for ${T.name}`,disabled:!f||g,onChange:k=>u(k,T.username),selectedLength:T.resourceIds.length,totalLength:v.length}),formatHeader:j});for(let R of v)E.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(T,k)=>a.jsx(a.Fragment,{children:a.jsx("input",{className:"form-check-input",disabled:!f||!R.isActive,onChange:P=>u(P.target.checked,k.username,R.resourceId),type:"checkbox",checked:k.resourceIds.includes(R.resourceId)})}),formatHeader:j});const N=x.map(R=>R.hasChanges?Cr.edited:"");return a.jsxs(a.Fragment,{children:[_,a.jsx(Un,{rows:x,columns:E,frozenColumns:v.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&v.length&&!g?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(oA,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await PE(R)).map(k=>({isDisabled:k.eligibility==="no",label:a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsxs("span",{className:k.eligibility==="no"?"text-decoration-line-through":"",style:{color:k.eligibility==="no"?"#707070":void 0},children:[k.username," (",k.firstName," ",k.lastName,","," ",k.organization,k.email?`, ${k.email}`:""]}),k.eligibility==="no"&&k.eligibilityReason&&a.jsxs("span",{className:"text-danger ms-2",children:[a.jsx("i",{className:"bi bi-exclamation-octagon"})," ",k.eligibilityReason]})]}),value:k})),onChange:R=>r(R.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,f&&(v.length&&!g||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:y||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:y||!b,onClick:s,children:y?"Saving...":"Save Changes"})]}):null]})}function iA({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,setRequest:o,setTab:s}=Rt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(be,{color:"danger",children:n.error});const i=n.timeStatus||n.actions[0].status.toLowerCase(),l=n.actions.find(({showDeleteModal:d})=>d),c=[];n.resources.length||c.push("resources"),e!=r.currentRequestId&&c.push("users");const u=(r.users||[]).filter(d=>d.eligibility==="no"&&d.role!=="user");return a.jsxs("div",{className:"request",children:[n.returnedForCorrections?a.jsxs(be,{color:"warning",children:[a.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),a.jsx("div",{className:iR.returnedForCorrectionsNotes,children:n.returnedForCorrectionsNotes}),a.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",n.timeStatus!="current"&&!n.returnedForCorrections?a.jsxs(be,{color:"warning",children:["You are viewing ","aeiou".includes(i[0])?"an":"a"," ",i," request."," ",c.length?`You cannot manage ${c.join(" or ")} for this request.`:""," ",r.currentRequestId?a.jsx("a",{href:ne.routes.request_path(r.currentRequestId),onClick:d=>{d.preventDefault(),o(r.currentRequestId)},children:"Go to the current request."}):null]}):null,r.isManager&&u.length>0&&a.jsxs(be,{color:"danger",children:["Some project personnel need to update their profiles. You will be unable to submit exchanges, renewals, and other actions until these issues are resolved:",a.jsx("br",{}),a.jsx("ul",{className:"fs-6 mb-0",children:u.map(d=>a.jsxs("li",{children:[a.jsxs("strong",{children:[d.firstName," ",d.lastName," (",d.username,"):"]})," ",d.eligibilityReason]},d.username))})]}),a.jsxs(gN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(Ii,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(YT,{requestId:e,grantNumber:t})}),a.jsx(Ii,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(X$,{requestId:e})}),a.jsx(Ii,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(sA,{grantNumber:t})}),a.jsx(Ii,{eventKey:"history",title:"History",children:a.jsx(jT,{requestId:e})})]}),a.jsx(bT,{grantNumber:t,requestId:e}),a.jsx(wT,{grantNumber:t,requestId:e}),a.jsx(ST,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(J$,{grantNumber:t,requestId:e}),a.jsx(eA,{grantNumber:t,requestId:e})]})}function aA({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=at(e,t);if(!n)return;const{actions:s,allowedActions:i}=n,l=[];i&&(("Extension"in i||"Renewal"in i)&&l.push(["Extend End Date",u=>{u.preventDefault(),r()},"calendar-plus"]),"Final Report"in i&&l.push(["Submit Final Report",`${ne.routes.request_action_path(e,"new")}?action_type=Final+Report`,"file-earmark-check"]));const c=s.find(u=>u.isRequest);if(c){const u=c.allowedOperations||[];u.includes("Edit")&&l.push(["Edit",ne.routes.edit_request_path(n.requestId),"pencil"]),u.includes("Delete")&&l.push(["Delete",d=>{d.preventDefault(),o(c.actionId)},"trash","danger"])}return l.map(([u,d,f,p])=>{const y=a.jsxs(a.Fragment,{children:[" ",f&&a.jsx("i",{className:`bi bi-${f} me-1`}),u]});return typeof d=="function"?a.jsx("button",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,onClick:d,children:y},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:y},u)})}function lA({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=Rt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(be,{color:"danger",children:i.error});else{let d;const f=i.requestsList.map(p=>(p.requestId==i.selectedRequestId&&(d=p),a.jsx("option",{value:p.requestId,children:$f(p)},p.requestId)));u=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"d-flex",children:[a.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:p=>l(parseInt(p.target.value,10)),value:i.selectedRequestId,disabled:f.length<2,children:f}),a.jsx(aA,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(iA,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${vm.project} card mb-3`,children:[a.jsxs("div",{className:`card-header d-flex justify-content-between ${o?"":"border-bottom-0"}`,children:[a.jsx("button",{"aria-expanded":o,"aria-controls":c,className:vm.expand,onClick:()=>s(!o),children:a.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[a.jsx("i",{className:`bi bi-caret-${o?"down":"right"}-fill`})," ",/^[A-Z]/.test(t)?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"grant-number",children:[t,":"]})," "]}):null,n||i.title]})}),a.jsx(Oo,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function cA({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=nR(e);if(r)return a.jsx(Do,{});if(n)return a.jsxs(be,{color:"danger",children:[n," ",a.jsx("a",{href:"#",onClick:i=>{i.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]});if(!o.length)return a.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[a.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),a.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[a.jsxs("a",{className:"btn btn-primary w-25",href:ne.routes.project_types_path(),children:[a.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),a.jsxs("a",{className:"btn btn-secondary w-25",href:ne.routes.get_your_first_project_path(),children:[a.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",a.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),a.jsxs("a",{className:"btn btn-primary w-25",href:ne.routes.how_to_path(),children:[a.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]});const s=new URLSearchParams(window.location.hash.slice(1)).get("grantNumber");return o.map((i,l)=>a.jsx(lA,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const vw={apiUrl:null,listIsFiltered:!1,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,singleEntry:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:"",requestNumber:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},uA=Ye("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Cd({name:"requestNumber",value:o.get("_requestNumber")})),n(xw(!0))),await n(_d()),await n(Rr()),n(dA())}),dA=Ye("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(yw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),_d=Ye("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(yw(i.filters))}),Rr=Ye("projectsBrowser/getProjects",async(e,{getState:t,dispatch:n})=>{const r=t().projectsBrowser,o=r.filters,s=r.typeLists,i=s.fosTypes.filter(d=>d.checked);let l=`${r.apiUrl}?page=${r.pageData.current_page}`;return o.requestNumber!=""?(l+=`&request_number=${o.requestNumber}`,n(bg(!0))):(n(bg(!1)),i.length!=s.fosTypes.length&&(l+=`&fos=${i.map(d=>d.fosTypeId).join(",")}`),o.org!=""&&o.org!="-- ALL --"&&(l+=`&org=${encodeURIComponent(o.org)}`),o.allocationType!=""&&(l+=`&allocation_type=${o.allocationType}`),o.resource!=""&&(l+=`&resources=${o.resource}`)),await(await fetch(l)).json()}),Cp=ri({name:"projectsBrowser",initialState:vw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Cp.caseReducers.toggleAllFos(e)},setApiUrl:(e,{payload:t})=>{e.apiUrl=t},setShowPagination:(e,{payload:t})=>{e.showPagination=t},setTypeLists:(e,{payload:t})=>{e.typeLists=t},toggleAllFos:e=>{e.typeLists.fosTypes.forEach(t=>t.checked=!e.filters.allFosToggled),e.filters.allFosToggled=!e.filters.allFosToggled},toggleFos:(e,{payload:t})=>{e.typeLists.fosTypes.forEach(n=>{n.fosTypeId==t.fosTypeId&&(n.checked=!n.checked)}),e.typeLists.fosTypes.filter(n=>n.checked).length!=e.typeLists.fosTypes.length?e.filters.allFosToggled=!1:e.filters.allFosToggled=!0},toggleListFiltered:(e,{payload:t})=>{e.listIsFiltered=t},toggleSingleEntry:(e,{payload:t})=>{e.singleEntry=t},updateFilter:(e,{payload:t})=>{e.filters[t.name]=t.value},updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)}},extraReducers:e=>{e.addCase(Rr.pending,t=>{t.projectsLoaded=!1}).addCase(Rr.fulfilled,(t,n)=>{const r=n.payload;t.projectsLoaded=!0,t.projects=r.projects,r.pages!=t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,t.pageData.last_page=r.pages}).addCase(Rr.rejected,(t,n)=>{console.log(n.error)}).addCase(_d.pending,t=>{t.filtersLoaded=!1}).addCase(_d.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:fA,setApiUrl:fD,setShowPagination:jd,setTypeLists:yw,toggleAllFos:pA,toggleFos:hA,toggleListFiltered:xw,toggleSingleEntry:bg,updateFilter:Cd,updatePageData:ul}=Cp.actions,mA=e=>e.projectsBrowser.filters,gA=e=>e.projectsBrowser.filtersLoaded,vA=e=>e.projectsBrowser.listIsFiltered,yA=e=>e.projectsBrowser.singleEntry,xA=e=>e.projectsBrowser.projectsLoaded,bA=e=>e.projectsBrowser.pageData,wA=e=>e.projectsBrowser.projects,SA=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,_A=e=>e.projectsBrowser.typeLists,jA=Cp.reducer;const CA=()=>{const e=it(),t=pe(mA),n=pe(_A),r=pe(vA),o=n.orgs.map(h=>({label:h,value:h})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=h=>{e(Cd({name:h.target.name,value:h.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(jd(!1)),e(ul({current_page:1})),e(Rr())},f=()=>{l(null),e(jd(!1)),e(ul({current_page:1})),e(fA()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=h=>{e(xw(h))},y=h=>{l(h),e(Cd({name:"org",value:h.value}))},m=()=>t.org==""&&t.allocationType==""&&t.allFosToggled&&t.resource==""&&t.requestNumber=="";return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{className:"mb-1",children:"Field of Science"}),a.jsxs("div",{className:"border mb-3",style:c,children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:t.allFosToggled,onChange:()=>{e(pA())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(h=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:h.fosTypeId,id:`fos_${h.fosTypeId}`,checked:h.checked,onChange:()=>e(hA(h))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${h.fosTypeId}`,children:h.fosName})]},`fos_${h.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(jp,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:y,value:i,"aria-labelledby":"org_select_label"},"org_select")}),a.jsx("h5",{id:"project_type_label",className:"mb-1",children:a.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"allocationType",id:"project_type_select",value:t.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((h,x)=>a.jsx("option",{value:h,children:h},`allocation_type_${x}`))]})}),a.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"resource",id:"resource_select",value:t.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((h,x)=>a.jsx("option",{value:h.resourceId,children:h.resourceName},`resource_${x}`))]})}),a.jsx("h5",{id:"request_number_label",className:"mb-1",children:"Request Number"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:t.requestNumber,name:"requestNumber",id:"requestNumber","aria-labelledby":"request_number_label",onChange:h=>u(h)})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:d,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",disabled:m(),onClick:f,children:"Reset"})]})]})})};const EA=({project:e})=>{const t=e.resources,[n,r]=w.useState(!1),o=pe(yA);let s={flush:!0,className:"mt-3 mb-1",alwaysOpen:!0};const i=g=>{let b=g.units?g.units:g.resourceUnits;const S=g.allocation?g.allocation:g.amount;if(b=="[Yes = 1, No = 0]"||b=="Yes / No")return S=="1.0"?"Yes":"No";{let _="0";return parseInt(S)&&(_=parseInt(S).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),b=="ACCESS Credits"&&(b=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),b=="Dollars"?`$${_}`:a.jsxs(a.Fragment,{children:[_," ",b]})}},l=()=>{const{origin:g,pathname:b}=window.location,S=`${g}${b}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(S),setTimeout(()=>r(!1),2e3)},c=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",u=a.jsx(Ll,{id:"link-tooltip",children:"Link Copied!"}),d=()=>{if(c()){const g={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(lp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:u,children:a.jsx("button",{onClick:l,style:g,children:a.jsx("i",{className:"bi bi-link-45deg",children:a.jsx("div",{className:"d-none",children:"Direct link to project"})})})})}return a.jsx(a.Fragment,{})},f=()=>{const g=e.pi.split(",");return`${g[1]} ${g[0]}`},p=()=>!e.coPis||e.coPis.length<=0?"":a.jsxs(a.Fragment,{children:[a.jsx("br",{}),a.jsxs("small",{className:"fst-italic",children:["CoPI(s): ",e.coPis.map(g=>`${g.name} (${g.organization})`).join(";")]})]}),y=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),m=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[c()," Start-Up: ",f(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[c()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),p()]}),h=a.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0",children:"Resource"})}),a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),a.jsx("tbody",{children:t.map((g,b)=>a.jsxs("tr",{children:[a.jsx("td",{children:g.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:i(g)})]},`resource_${e.requestId}_${b}`))})]}),x=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Resources"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:h})})]}),v=()=>e.allocationType==="NAIRR Start-Up"?x:o?a.jsxs(a.Fragment,{children:[x,a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Abstract"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})})]}):a.jsxs(Gt,{...s,children:[a.jsxs(Gt.Item,{eventKey:"0",children:[a.jsx(Gt.Header,{children:"Resources"}),a.jsx(Gt.Body,{children:h})]}),a.jsxs(Gt.Item,{eventKey:"1",children:[a.jsx(Gt.Header,{children:"Abstract"}),a.jsx(Gt.Body,{children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})]})]});return a.jsxs("div",{className:"card mb-4",children:[a.jsx("div",{className:"card-header bg-primary text-white",children:a.jsxs("div",{className:"d-flex justify-content-between",children:[a.jsx("div",{children:m()}),a.jsx("div",{children:d()})]})}),a.jsxs("div",{className:"card-body",children:[a.jsxs("div",{className:"row fw-bold border-bottom",children:[a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:e.fos}),a.jsx("div",{className:"col",children:e.allocationType}),a.jsx("div",{className:"col",children:y()})]}),v()]})]})},RA=()=>{const e=pe(wA);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(EA,{project:t},`project_${n}`))})};const wg=()=>{const e=it(),t=pe(bA),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(ul({current_page:m})),e(Rr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h="";return typeof m=="object"?[m,h]=m:h=m,m=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):m=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:h})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(m),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(je.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},NA=({api_url:e})=>{const t=it(),n=pe(xA),r=pe(gA),o=pe(SA),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(uA())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(CA,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(wg,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(RA,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(wg,{scroll:"projects_browser_app"}):""})})]})]})})},kA=e=>e.publications_store.publication,TA=e=>e.publications_store.publication.doi,OA=e=>e.publications_store.publication_types,bw=e=>e.publications_store.publication.authors,PA=e=>e.publications_store.tag_categories,IA=e=>e.publications_store.projects,$A=e=>e.publications_store.publication.tags,AA=e=>e.publications_store.errors,ww=e=>e.publications_store.data_loaded,Sw=e=>e.publications_store.show_saved,Ep=e=>e.publications_store.saving,MA=e=>e.publications_store.modal,_w=e=>e.publications_store.form_valid,jw=e=>!Ep(e)&&ww(e)&&_w(e)&&Cw(e)&&e.publications_store.projects.filter(t=>t.selected).length>0,Cw=e=>{const t=bw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},Ew=e=>({type:"UPDATE_PUBLICATION",payload:e}),DA=e=>({type:"UPDATE_FIELD",payload:e}),Ed=e=>({type:"CHANGE_PUB_TYPE",payload:e}),FA=e=>({type:"SET_PUBLICATION",payload:e}),LA=()=>({type:"ADD_AUTHOR"}),UA=e=>({type:"UPDATE_AUTHOR",payload:e}),VA=e=>({type:"TOGGLE_REQUEST",payload:e}),Qs=e=>({type:"UPDATE_ERRORS",payload:e}),Rw=e=>({type:"HIDE_ERROR",payload:e}),BA=e=>({type:"UPDATE_SELECTED_TAGS",payload:e}),zA=e=>({type:"DELETE_AUTHOR",payload:e}),qA=e=>({type:"DATA_LOADED",payload:e}),Nw=e=>({type:"UPDATE_SHOW_SAVED",payload:e}),HA=()=>({type:"RESET_STATE"}),Qc=e=>({type:"UPDATE_SAVING",payload:e}),WA=e=>({type:"SET_FORM_VALID",payload:e}),kw=e=>({type:"SET_GRANT_NUMBER",payload:e}),KA=e=>({type:"ADD_PROJECT",payload:e}),GA=(e,t,n)=>{let r=!0;const o=[];for(const i of t)e[i]||(r=!1,o.push(i));const s=e.authors||[];for(const i of s)for(const l of n)i[l]||(r=!1,o.includes(l)||o.push(l));return{formValid:r,missingFields:o}},YA=e=>e.length>0?a.jsxs("div",{role:"alert",children:[a.jsx("p",{children:"Please provide the following information before submitting:"}),a.jsx("ul",{children:e.map(t=>a.jsx("li",{children:QA(t)},t))})]}):null;function QA(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const XA=()=>async(e,t)=>{const n=t().publications_store.publication.doi,r=encodeURIComponent(n).replaceAll(".","%2E"),o="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(`/publications/lookup?doi=${r}`).then(s=>s.json()).then(s=>{if(s.title!=""){let i=t().publications_store.publication_types.find(l=>l.citation_style_type==s.type);e(Ed(i?i.publication_type:"Other")),e(FA(s))}else e(Qs(o))},s=>{e(Qs(o))})},ZA=()=>async(e,t)=>{const n=t().publications_store.grant_number,r=ne.routes.publications_find_project_path();await fetch(`${r}?grant_number=${n}`).then(o=>o.json()).then(o=>{e(KA(o)),e(kw(""))},()=>{e(Qs("Unable to find a project with this grant number."))})},Tw=()=>async e=>{const t=/^\/requests/.test(window.location.pathname)?ne.routes.publication_path("new.json"):window.location.href+".json";await fetch(t).then(n=>n.json()).then(n=>{e(qA(n))})},Ow=()=>async(e,t)=>{const n=t().publications_store,r=n.projects.filter(p=>p.selected),o=Object.keys(n.selected_tags).map(p=>n.selected_tags[p]).flat(),s={...n.publication},i=n.errors,{formValid:l,missingFields:c}=GA(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(y=>{e(Rw(y.id))});const p=YA(c);e(Qs(p));return}const u={authenticity_token:document.getElementsByName("authenticity_token")[0].value,publication:s,authors:s.authors.map(p=>({...p,order:0})),tags:o,projects:r};let d,f;s.publication_id?(d=ne.routes.publication_path(s.publication_id),f="PATCH"):(d=ne.routes.publications_path(),f="POST"),e(Qc(!0)),await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(p=>{n.redirect?window.location.href=ne.routes.publications_path():(s.publication_id||(e(HA()),e(Tw())),e(Nw(!0)),e(Qc(!1)))},()=>{e(Qc(!1)),e(Qs("There was an error saving this publication."))})},JA=({doi:e,updatePublication:t,doiLookup:n})=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),a.jsxs("div",{className:"input-group",children:[a.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:e,onChange:r=>t(r.target.value)}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>n(),children:"Lookup Publication"})]})]})}),e2=e=>({doi:TA(e)}),t2=e=>({updatePublication:t=>e(Ew({key:"doi",value:t})),doiLookup:()=>e(XA())}),n2=tn(e2,t2)(JA),r2=({author:e,authorKey:t,updateAuthor:n,deleteAuthor:r})=>{const o=l=>{n({key:l.target.name,value:l.target.value,idx:t})},s=l=>a.jsx("td",{children:a.jsx("input",{type:"text",className:"form-control",name:l,id:l,value:e[l],onChange:c=>o(c)})},`field_${l}`),i=["first_name","last_name","affiliation"];return a.jsxs("tr",{children:[i.map(l=>s(l)),a.jsx("td",{children:t!==0&&a.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>r(t),children:a.jsx("i",{className:"bi bi-trash"})})})]})},o2=e=>({updateAuthor:t=>e(UA(t)),deleteAuthor:t=>e(zA(t))}),Sg=tn(null,o2)(r2),s2=({authors:e,addAuthor:t,authors_exist:n})=>{const r=e.length===0,o=()=>n?"":a.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 a.jsxs("div",{children:[o(),a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"First Name"}),a.jsx("th",{children:"Last Name"}),a.jsx("th",{children:"Affiliation"}),a.jsx("th",{})]})}),a.jsxs("tbody",{children:[e.map((s,i)=>a.jsx(Sg,{author:s,authorKey:i},`author_${i}`)),r&&a.jsx(Sg,{author:t()})]})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>t(),children:"Add Author"})]})},i2=e=>({authors:bw(e),authors_exist:Cw(e)}),a2=e=>({addAuthor:()=>e(LA())}),l2=tn(i2,a2)(s2),c2=({category:e,publication_tags:t,updateSelectedTags:n,index:r})=>{const o=w.useRef(null),s=()=>{const l=t.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n({category:e.label,tags:l})};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fw-bold mb-1",children:e.label}),a.jsx("div",{className:"mb-3",children:a.jsx(jp,{classNames:{control:l=>l.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:s(),options:e.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${r}`,inputId:`tags_${r}`,ref:o,closeMenuOnSelect:!1,onChange:i})})]})},u2=e=>({updateSelectedTags:t=>e(BA(t))}),d2=e=>({publication_tags:$A(e)}),f2=tn(d2,u2)(c2),p2=({projects:e,toggleProject:t})=>{const n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>e.filter(o=>o.selected).length>0;return a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[r()?"":a.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),a.jsx("div",{className:"list-group",children:e.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>t(s),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})},h2=e=>({projects:IA(e)}),m2=e=>({toggleProject:t=>e(VA(t))}),g2=tn(h2,m2)(p2),v2=({grant_number:e,setGrantNumber:t,grantSearch:n})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",a.jsxs("div",{className:"input-group mt-1",children:[a.jsx("input",{type:"text",className:"form-control",value:e,onChange:r=>t(r.target.value),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>n(),children:"Find Project"})]})]})}),y2=e=>({setGrantNumber:t=>e(kw(t)),grantSearch:()=>e(ZA())}),x2=e=>({grant_number:e.publications_store.grant_number}),b2=tn(x2,y2)(v2),w2=({publication:e,updateField:t,publication_types:n,changePubType:r,updatePublication:o,tag_categories:s,savePublication:i,modal:l,save_enabled:c,setFormValid:u,form_valid:d})=>{const f=g=>{g.target.value.trim()==""?u(!1):u(!0),o({key:"title",value:g.target.value})},p=()=>e.fields.map((g,b)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${g.csl_field_name}`,className:"form-label",children:g.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${g.csl_field_name}`,id:`field_${g.csl_field_name}`,value:g.field_value,onChange:S=>t({index:b,value:S.target.value})})]})},`field_${g.csl_field_name}`)),y=()=>{const g=new Date().getFullYear()+2;let b=1980;const S=[];for(;b<=g;)S.push(b++);const _=["January","February","March","April","May","June","July","August","September","October","November","December"],j=a.jsx("i",{className:"bi bi-asterisk text-danger"});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",j]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${d?"":"is-invalid"}`,value:e.title,onChange:C=>f(C)})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),a.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:e.publication_year,onChange:C=>{o({key:"publication_year",value:C.target.value})},children:S.map(C=>a.jsx("option",{value:C,children:C},`year_${C}`))})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),a.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:e.publication_month,onChange:C=>{o({key:"publication_month",value:C.target.value})},children:_.map((C,E)=>a.jsx("option",{value:E+1,children:C},`month_${E}`))})]})})]})},m=a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"card-header",children:a.jsx("h2",{children:"Publication Information"})}),a.jsxs("div",{className:"card-body",children:[a.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.'}),a.jsx(n2,{}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),a.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:e.publication_type,onChange:g=>r(g.target.value),children:n.map(g=>a.jsx("option",{value:g.publication_type,children:g.publication_type},`pub_type_${g.type_id}`))})]})}),y(),p()]})]}),h=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(go,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,a.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),a.jsx("div",{className:"card-body",children:a.jsx(l2,{})})]}),x=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Tags"}),a.jsx(go,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),a.jsx("div",{className:"card-body",children:s.map((g,b)=>a.jsx(f2,{index:b,category:g},`tc_${b}`))})]}),v=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Associated Projects"}),a.jsx(go,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(g2,{}),a.jsx("hr",{}),a.jsx(b2,{})]})]});return a.jsxs(a.Fragment,{children:[m,h,x,v,l?null:a.jsx("p",{className:"mt-3",children:a.jsx("button",{onClick:()=>i(),className:"btn btn-success",disabled:!c,children:"Save Publication"})})]})},S2=e=>({publication:kA(e),publication_types:OA(e),tag_categories:PA(e),saving:Ep(e),modal:MA(e),save_enabled:jw(e),form_valid:_w(e)}),_2=e=>({updateField:t=>e(DA(t)),changePubType:t=>e(Ed(t)),updatePublication:t=>e(Ew(t)),savePublication:()=>e(Ow()),setFormValid:t=>e(WA(t))}),j2=tn(S2,_2)(w2),C2=({errors:e,hideError:t})=>a.jsx(a.Fragment,{children:e.map(n=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[n.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(n.id)})]},`err_${n.id}`))}),E2=e=>({errors:AA(e)}),R2=e=>({hideError:t=>e(Rw(t))}),N2=tn(E2,R2)(C2),k2=({show_saved:e,updateShowSaved:t})=>{const n=a.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(!1)})]});return e?n:a.jsx(a.Fragment,{})},T2=e=>({show_saved:Sw(e)}),O2=e=>({updateShowSaved:t=>e(Nw(t))}),P2=tn(T2,O2)(k2),I2=({getData:e,data_loaded:t})=>(w.useEffect(()=>{e()},[]),a.jsxs(a.Fragment,{children:[a.jsx(P2,{}),a.jsx(N2,{}),t?a.jsx(j2,{}):a.jsx(Do,{})]})),$2=e=>({data_loaded:ww(e)}),A2=e=>({getData:()=>e(Tw())}),Pw=tn($2,A2)(I2),M2=({saving:e,savePublication:t,showSaved:n,updatePublications:r,save_enabled:o})=>{const[s,i]=w.useState(!1);return w.useEffect(()=>{!e&&n&&r()},[e,n]),a.jsxs(a.Fragment,{children:[a.jsxs(ve,{size:"xl",show:s,onHide:()=>i(!1),scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Add Publication"})}),a.jsx(ve.Body,{children:a.jsx(Pw,{})}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{t(),i(!1)},children:"Save Publication"})]})})]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>i(!0),children:"Add a New Publication"})]})},D2=e=>({saving:Ep(e),showSaved:Sw(e),save_enabled:jw(e)}),F2=e=>({savePublication:()=>e(Ow())}),L2=tn(D2,F2)(M2),U2=({usernames:e=[],publication_ids:t=[]})=>{const[n,r]=w.useState(e),[o,s]=w.useState(t),[i,l]=w.useState([]),c=w.useRef(n),u=h=>{c.current=h,r(h)},d=async()=>{const x=await(await fetch(ne.routes.search_publications_path({usernames:n}))).json();l(x)};w.useEffect(()=>{d()},[n]),w.useEffect(()=>{addEventListener("requestAddRole",h=>u([...c.current,h.detail.username])),addEventListener("requestRemoveRole",h=>u(c.current.filter(x=>x!=h.detail.username)))},[]);let f=!1,p=!1;const y=i.map(h=>{const x=o.includes(h.publication_id);f=f||x,p=p||!x;const v=new Date(h.publication_year,h.publication_month-1);return a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:h.publication_id,checked:x,onChange:()=>s(x?o.filter(g=>g!=h.publication_id):[...o,h.publication_id])})}),a.jsx("td",{children:h.title}),a.jsx("td",{children:h.authors.map(g=>`${g.first_name} ${g.last_name}`).join(", ")}),a.jsx("td",{children:h.publication_type}),a.jsxs("td",{children:[v.toLocaleString("default",{month:"short"})," ",h.publication_year]})]},h.publication_id)}),m=`${p?"Select":"Deselect"} all`;return a.jsxs("div",{className:"publications-select",children:[a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:a.jsx("input",{type:"checkbox",value:"","aria-label":m,title:m,checked:f&&!p,onChange:()=>s(p?i.map(h=>h.publication_id):[]),ref:h=>{h&&(h.indeterminate=f&&p)}})}),a.jsx("th",{children:"Title"}),a.jsx("th",{children:"Authors"}),a.jsx("th",{children:"Type"}),a.jsx("th",{children:"Date"})]})}),a.jsx("tbody",{children:y})]}),a.jsx(L2,{updatePublications:d})]})},V2=()=>`${Math.random().toString(36).slice(2)}`,Rd=document.querySelector("#publications-react"),B2=Rd?Rd.dataset:{},_g={publication_types:[],tag_categories:[],publication:{},projects:[],errors:[],selected_tags:{},data_loaded:!1,saving:!1,show_saved:!1,redirect:B2.redirect||!1,modal:Rd==null,form_valid:!1,grant_number:""},z2=(e=_g,t)=>{const{type:n,payload:r}=t;switch(n){case"UPDATE_FIELD":return $t(e,s=>(s.publication.fields[r.index].field_value=r.value,s));case"CHANGE_PUB_TYPE":return $t(e,s=>{let i=s.publication_types.find(l=>l.publication_type==r).fields;return i.forEach(l=>{const c=s.publication.fields.find(u=>u.csl_field_name==l.csl_field_name);c&&(l.value=c.value)}),s.publication.publication_type=r,s.publication.fields=i,s});case"UPDATE_PUBLICATION":return{...e,publication:{...e.publication,[r.key]:r.value}};case"SET_PUBLICATION":return $t(e,s=>(s.publication.fields.forEach(i=>{i.field_value=r[i.csl_field_name]}),Object.keys(s.publication).forEach(i=>{r[i]&&(s.publication[i]=r[i])}),s.form_valid=r.title.trim()!="",s));case"ADD_AUTHOR":{const o={portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}};return $t(e,i=>{i.publication.authors.push(o)})}case"UPDATE_AUTHOR":return $t(e,s=>{s.publication.authors[r.idx][r.key]=r.value});case"TOGGLE_TAG":return $t(e,s=>{let i=s.tag_categories.find(l=>l.publication_tags_category_id==r.publication_tags_category_id);i.tags[r.idx].selected=!i.tags[r.idx].selected});case"TOGGLE_REQUEST":return $t(e,s=>(s.projects[r].selected=!s.projects[r].selected,s));case"UPDATE_ERRORS":{const o={id:V2(),message:r};return{...e,errors:[...e.errors,o]}}case"HIDE_ERROR":{const o=e.errors.filter(s=>s.id!=r);return{...e,errors:o}}case"UPDATE_SELECTED_TAGS":return $t(e,s=>{const i=r.tags.map(l=>l.value);return s.selected_tags[r.category]=i,s});case"DELETE_AUTHOR":return $t(e,s=>(s.publication.authors.splice(r,1),s));case"DATA_LOADED":return $t(e,s=>(s.publication=r.publication,s.form_valid=r.publication.title.trim()!="",s.publication.authors.forEach(i=>{i.affiliation||(i.affiliation="")}),s.publication_types=r.publication_types,s.tag_categories=r.tag_categories,s.projects=r.publication.projects,r.publication.tags.forEach(i=>s.selected_tags[i.label]=i.options.map(l=>l.value)),s.data_loaded=!0,s));case"UPDATE_SHOW_SAVED":return{...e,show_saved:r};case"UPDATE_SAVING":return{...e,saving:r};case"RESET_STATE":return _g;case"SET_FORM_VALID":return{...e,form_valid:r};case"SET_GRANT_NUMBER":return{...e,grant_number:r};case"ADD_PROJECT":return{...e,projects:[...e.projects,r]};default:return e}},q2={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}},pa=Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(jg(!1));let n=[];e.catalogSources?n=e.catalogSources:n.push({...e,catalogLabel:"Default"}),e.onRamps&&n.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const r=await Promise.all(n.map(async o=>{const i=await(await fetch(o.apiUrl)).json();return{...o,data:i}}));t(G2({data:r,params:e})),t(jg(!0))});Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(Q2(e)),t($w())});const H2=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},W2=e=>{const t={},n={};let r={};return e.forEach(s=>{t[s.catalogLabel]={...s,resourceIds:[],selected:!1,catalogId:s.catalogLabel.replace(/[^(A-z)]/,"")},delete t[s.catalogLabel].data,s.data.forEach(i=>{if(Nd(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=K2(s,i,r);n[i.resourceId]=c,t[s.catalogLabel].resourceIds.push(i.resourceId),r=l}})}),{resources:Object.keys(n).map(s=>n[s]),catalogs:t,categories:r}},Nd=(e,t,n)=>!e&&!t||e&&e.length==0&&t&&t.length==0?!0:e&&e.length>0?e.find(r=>r==n):t&&t.length>0?!t.find(r=>r==n):!0,K2=(e,t,n)=>{const r=[];let o="";t.featureCategories.filter(l=>l.categoryIsFilter).forEach(l=>{const c=l.categoryId;l.categoryName=="ACCESS Resource Grouping"?o=l.features[0].name:(!n[c]&&Nd(e.allowedCategories,e.excludedCategories,l.categoryName)&&(n[c]={categoryId:c,categoryName:l.categoryName,categoryDescription:l.categoryDescription,features:{}}),l.features.forEach(u=>{const d={featureId:u.featureId,name:u.name,description:u.description,categoryId:c,selected:!1},f=Nd(e.allowedFilters,e.excludedFilters,d.name);f&&r.push(d),n[c]&&f&&!n[c].features[u.featureId]&&(n[c].features[u.featureId]=d)}))});const s=r.map(l=>l.name).sort((l,c)=>l>c);return{formattedResource:{...t,resourceName:t.resourceName.trim(),features:s,featureIds:r.map(l=>l.featureId),sortCategory:o},categories:n}},Iw=ri({name:"resourceCatalog",initialState:q2,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=W2(n);e.catalogs=o,e.onRamps=t.params.onRamps;for(const i in s){const l=s[i],c=[];for(const u in l.features)c.push(l.features[u]);e.filters.push({...l,features:c.sort((u,d)=>u.name>d.name)})}e.filters=e.filters.sort((i,l)=>i.categoryName.localeCompare(l.categoryName)),e.resources=r.sort((i,l)=>i.resourceName.localeCompare(l.resourceName)).sort((i,l)=>e.resourceSorting[i.sortCategory]>e.resourceSorting[l.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},setResourcesLoaded:(e,{payload:t})=>{e.resourcesLoaded=t},toggleCatalog:(e,{payload:t})=>{const{catalog:n,selected:r}=t;e.catalogs[n.catalogLabel].selected=r},toggleFilter:(e,{payload:t})=>{if(t){const i=t,c=e.filters.find(u=>u.categoryId==i.categoryId).features.find(u=>u.featureId==i.featureId);c.selected=!c.selected}const n=H2(e.filters);let r=[];if(n.length>0){const i=n.map(l=>l.features.map(c=>c.featureId));e.resources.forEach(l=>{let c=0;i.forEach(u=>{let d=!1;l.featureIds.forEach(f=>{u.indexOf(f)>=0&&(d=!0)}),d&&(c+=1)}),c>=i.length&&r.push(l)})}else r=e.resources;const o=Object.keys(e.catalogs).map(i=>e.catalogs[i]),s=o.filter(i=>i.selected);if(s.length>0&&s.length<o.length){const i=s.map(l=>l.resourceIds).flat();r=r.filter(l=>i.indexOf(l.resourceId)>=0)}e.filteredResources=r}},extraReducers:e=>{e.addCase(pa.pending,t=>{}).addCase(pa.fulfilled,(t,n)=>{}).addCase(pa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:G2,processData:pD,resetFilters:Y2,setResourcesLoaded:jg,toggleCatalog:Q2,toggleFilter:$w}=Iw.actions,Aw=e=>e.resourceCatalog.catalogs,X2=e=>e.resourceCatalog.filters,Z2=e=>e.resourceCatalog.hasErrors,J2=e=>e.resourceCatalog.resourcesLoaded,eM=e=>e.resourceCatalog.filteredResources,tM=Iw.reducer,nM="_access_1yrq0_2",rM="_resourceName_1yrq0_6",oM="_description_1yrq0_11",sM="_filterBar_1yrq0_15",iM="_cardBg_1yrq0_20",aM="_active_1yrq0_25",lM="_plainButton_1yrq0_30",cM="_btnSecondary_1yrq0_40",uM="_filtersHidden_1yrq0_51",dM="_filtersVisible_1yrq0_57",Dt={access:nM,resourceName:rM,description:oM,filterBar:sM,cardBg:iM,active:aM,plainButton:lM,btnSecondary:cM,filtersHidden:uM,filtersVisible:dM},fM=({resource:e})=>{const[t,n]=w.useState(!0),r=u=>{const d={"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 d[u]?a.jsx("i",{title:u,className:`bi bi-${d[u]} me-2 `},`${e.resourceId}_${d[u]}`):""},o=()=>a.jsxs("span",{className:"float-end",children:[e.features.map(u=>r(u)),e.resourceType]}),s=u=>u.length==0?"":a.jsx(a.Fragment,{children:u.map((d,f)=>a.jsx("span",{className:"badge text-bg-secondary me-2",children:d},`feature_${e.resourceId}_${f}`))}),i=()=>{let u=e.resourceDescription;return u&&u!=""?(Dt.plainButton,a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col fw-bold",children:["About ",e.resourceName]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col ",children:[a.jsx("div",{className:Dt.description,dangerouslySetInnerHTML:{__html:u}}),""]})})]})):""},l=()=>e.recommendedUse&&e.recommendedUse!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:a.jsx("div",{className:Dt.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",c=()=>Dt.cardBg;return a.jsx(a.Fragment,{children:a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"card mb-3",children:[a.jsxs("div",{className:`card-header ${c()}`,children:[a.jsx("span",{className:"",children:e.resourceName}),o()]}),a.jsxs("div",{className:"card-body",children:[a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:s(e.features)})}),l(),i()]}),a.jsx("div",{className:"card-footer",children:a.jsxs("a",{target:"_blank",href:e.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},pM=({filter:e})=>{const t=it(),n=()=>{t($w(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},hM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(pM,{filter:t},t.featureId))]})}),mM=({onReset:e})=>{const t=it(),n=pe(Aw),r=pe(X2),o=r.filter(s=>s.features.filter(i=>i.selected).length>0);return Object.keys(n).map(s=>n[s]),a.jsxs(a.Fragment,{children:[r.map(s=>a.jsx(hM,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(Y2()),disabled:o.length==0,children:"Reset Filters"}),a.jsx("button",{className:"btn btn-outline-primary ms-3 mt-2 mb-2",onClick:e,children:"Close Menu"})]})},gM=()=>{const[e,t]=w.useState(!1),n=w.useRef(null),r=()=>{const o=n.current;e?(o.style.height="0px",o.classList.remove(Dt.filtersVisible),o.classList.add(Dt.filtersHidden)):(o.style.height=o.scrollHeight+"px",o.classList.remove(Dt.filtersHidden),o.classList.add(Dt.filtersVisible)),t(!e)};return a.jsx("div",{className:Dt.filterBar,children:a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col pt-2 pb-2",children:a.jsxs("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:[a.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:r,children:[a.jsx("i",{className:"bi bi-filter"})," Filters"]}),a.jsx("div",{className:`${Dt.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:n,children:a.jsx(mM,{onReset:r})})]})})})})},vM=()=>{const e=pe(eM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsx("div",{className:"card shadow",children:a.jsxs("div",{className:"card-body",children:[a.jsx(gM,{}),e.map(t=>a.jsx(fM,{resource:t},t.resourceId))]})})},yM=({baseUrl:e})=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col d-flex",children:a.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${e}/access_logo.png`})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),a.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."}),a.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."}),a.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."}),a.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),a.jsx("p",{children:a.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${Dt.btnSecondary}`,children:["Get Your First Project ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),a.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",a.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",a.jsx("br",{}),"If you have questions, please",a.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),xM=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=it(),o=pe(J2),s=pe(Z2),i=pe(Aw),l=Object.keys(i).map(u=>i[u]);w.useEffect(()=>{r(pa({catalogSources:e,onRamps:t}))},[]);const c=()=>t&&l.length>1?a.jsx(a.Fragment,{children:l.filter(u=>u.catalogLabel!="ACCESS").map((u,d)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("h4",{className:"border-bottom",children:["About ",u.catalogLabel]}),a.jsx("div",{dangerouslySetInnerHTML:{__html:u.description}})]})},`catalog_${d}`))}):"";return s?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):o?a.jsxs("div",{className:`container mt-3 ${Dt.access}`,children:[t?a.jsx(yM,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(vM,{})})})]}):a.jsx(Do,{})},bM={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}},ha=Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(SM({data:r,params:e}))}),wM=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Cg=(e,t,n)=>{if(e.length==0&&t.length==0)return!0;if(e.length>0)return e.find(r=>r==n);if(t.length>0)return!t.find(r=>r==n)},Mw=ri({name:"resourceCatalog",initialState:bM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.params.excludedCategories,o=t.params.excludedFilters,s=t.params.excludedResources,i=t.params.allowedCategories,l=t.params.allowedFilters,c=[],u={};n.filter(d=>!s.includes(d.resourceName)).forEach(d=>{const f=[];let p="";d.featureCategories.filter(m=>m.categoryIsFilter).forEach(m=>{const h=m.categoryId;m.categoryName=="ACCESS Resource Grouping"?p=m.features[0].name:(!u[h]&&Cg(i,r,m.categoryName)&&(u[h]={categoryId:h,categoryName:m.categoryName,categoryDescription:m.categoryDescription,features:{}}),m.features.forEach(x=>{const v={featureId:x.featureId,name:x.name,description:x.description,categoryId:h,selected:!1},g=Cg(l,o,v.name);g&&f.push(v),u[h]&&g&&!u[h].features[x.featureId]&&(u[h].features[x.featureId]=v)}))});const y={resourceName:d.resourceName,resourceId:d.resourceId,resourceType:d.resourceType,organization:d.organization,units:d.units,userGuideUrl:d.userGuideUrl,resourceDescription:d.resourceDescription,description:d.description,recommendedUse:d.recommendedUse,features:f.map(m=>m.name).sort((m,h)=>m>h),featureIds:f.map(m=>m.featureId),sortCategory:p};c.push(y)});for(const d in u){const f=u[d],p=[];for(const y in f.features)p.push(f.features[y]);e.filters.push({...f,features:p.sort((y,m)=>y.name>m.name)})}i.length>0?e.filters=e.filters.sort((d,f)=>i.indexOf(d.categoryName)>i.indexOf(f.categoryName)):e.filters=e.filters.sort((d,f)=>d.categoryName.localeCompare(f.categoryName)),e.resources=c.sort((d,f)=>d.resourceName.localeCompare(f.resourceName)).sort((d,f)=>e.resourceSorting[d.sortCategory]>e.resourceSorting[f.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},toggleFilter:(e,{payload:t})=>{const n=t,o=e.filters.find(i=>i.categoryId==n.categoryId).features.find(i=>i.featureId==n.featureId);o.selected=!o.selected;const s=wM(e.filters);if(s.length>0){const i=[],l=s.map(c=>c.features.map(u=>u.featureId));e.resources.forEach(c=>{let u=0;l.forEach(d=>{let f=!1;c.featureIds.forEach(p=>{d.indexOf(p)>=0&&(f=!0)}),f&&(u+=1)}),u>=l.length&&i.push(c)}),e.filteredResources=i}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(ha.pending,t=>{}).addCase(ha.fulfilled,(t,n)=>{}).addCase(ha.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:SM,processData:hD,resetFilters:_M,toggleFilter:jM}=Mw.actions,CM=e=>e.resourceCatalog.hasErrors,EM=e=>e.resourceCatalog.resourcesLoaded,RM=e=>e.resourceCatalog.filters,NM=e=>e.resourceCatalog.filteredResources,kM=Mw.reducer,TM=({resource:e})=>{const t=r=>r.length==0?"":a.jsx("ul",{children:r.map((o,s)=>a.jsx("li",{children:o},`feature_${e.resourceId}_${s}`))}),n=(r,o)=>o&&o!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:r})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:o}})})]}):"";return a.jsxs(Gt.Item,{eventKey:e.resourceId,children:[a.jsx(Gt.Header,{children:e.resourceName}),a.jsxs(Gt.Body,{children:[a.jsx("table",{className:"table",children:a.jsxs("tbody",{children:[a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Resource Type:"}),a.jsx("td",{children:e.resourceType})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Organization:"}),a.jsx("td",{children:e.organization})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Units:"}),a.jsx("td",{children:e.units})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"User Guide:"}),a.jsx("td",{children:e.userGuideUrl==""?"":a.jsx("a",{href:e.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Features Available:"}),a.jsx("td",{children:t(e.features)})]})]})}),n("Resource Description",e.resourceDescription),n("Allocations Description",e.description),n("Recommended Use",e.recommendedUse)]})]})},OM=()=>{const e=pe(NM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Resources"}),a.jsx(Gt,{children:e.map(t=>a.jsx(TM,{resource:t},t.resourceId))})]})},PM=({filter:e})=>{const t=it(),n=()=>{t(jM(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},IM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(PM,{filter:t},t.featureId))]})}),$M=()=>{const e=it(),t=pe(RM),n=t.filter(r=>r.features.filter(o=>o.selected).length>0);return a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Filters"}),t.map(r=>a.jsx(IM,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(_M()),disabled:n.length==0,children:"Reset Filters"})]})},AM=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=it(),l=pe(EM),c=pe(CM);return w.useEffect(()=>{i(ha({apiUrl:e,excludedCategories:t,excludedFilters:n,excludedResources:r,allowedCategories:o,allowedFilters:s}))},[]),c?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):l?a.jsx(a.Fragment,{children:a.jsxs("div",{className:"row mt-3",children:[a.jsx("div",{className:"col-sm-4",children:a.jsx($M,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(OM,{})})]})}):a.jsx(Do,{})},Dw={apiUrl:null,pages:1,publications:[],publicationsLoaded:!0,showPagination:!1,filterSelections:{allJournalsToggled:!1,doi:"",journal:"",authorName:"",publicationType:""},pageData:{current_page:1,last_page:1},filterOptions:{journals:[],publication_types:[]}},MM=Ye("publicationsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{await n(Nr()),await n(Fw())}),Nr=Ye("publicationsBrowser/getPublications",async(e,{getState:t})=>{const n=t().publicationsBrowser;let r=`${n.apiUrl}?page=${n.pageData.current_page}`;if(n.filterSelections.doi!==""&&(r+=`&doi=${encodeURIComponent(n.filterSelections.doi)}`),n.filterSelections.authorName!==""&&(r+=`&author_name=${encodeURIComponent(n.filterSelections.authorName)}`),n.filterSelections.journal!==""){const i=n.filterSelections.journal;n.filterOptions.journals.includes(i)&&(r+=`&journal=${encodeURIComponent(n.filterSelections.journal)}`)}return n.filterSelections.publicationType!==""&&(r+=`&publication_type=${encodeURIComponent(n.filterSelections.publicationType)}`),await(await fetch(r)).json()}),Fw=Ye("publicationsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().publicationsBrowser.apiUrl}?filters=1`;return(await(await fetch(o)).json()).filters||[]}),Lw=ri({name:"publicationsBrowser",initialState:Dw,reducers:{updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={doi:"",allJournalsToggled:!1,journal:"",authorName:"",publicationType:""}}},extraReducers:e=>{e.addCase(Nr.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(Nr.fulfilled,(t,n)=>{t.publicationsLoaded=!0,t.publications=n.payload.publications||[],n.payload.pagination&&n.payload.pagination.last_page!==t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,n.payload.pagination&&(t.pageData.last_page=n.payload.pagination.last_page)}).addCase(Nr.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(Fw.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{updatePageData:DM,updateFilterSelection:Eg,resetFilters:FM}=Lw.actions,LM=e=>e.publicationsBrowser.filterSelections,UM=e=>e.publicationsBrowser.publicationsLoaded,VM=e=>e.publicationsBrowser.publications,BM=e=>e.publicationsBrowser.filterOptions,zM=e=>e.publicationsBrowser.pageData,qM=Lw.reducer,kd=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),HM=({publication:e,index:t})=>{const n=e.authors.map(f=>`${f.last_name}, ${f.first_name.substr(0,1)}.`).join(", "),r=e.projects.map(f=>f.grant_number),o=e.publication_type==="Other"?"Publication":e.publication_type,s=e.projects,i=t%2==0?"bg-light":"",l={textIndent:"-50px",marginLeft:"50px"},c=e.publication_datas,u=f=>{switch(f){case"Publication Type":return e.publication_type;case"Publication Year":return e.publication_year?e.publication_year:"N/A";case"DOI":return e.doi?a.jsx("a",{href:`https://doi.org/${kd(e.doi)}`,target:"_blank",className:"fw-normal",children:kd(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return c["Volume/Issue"]?c["Volume/Issue"]:!1;case"Pages":return c.Pages?c.Pages:!1;case"Publisher":return c.Publisher?c.Publisher:!1}},d=()=>{const f=u("Publication Year");let p=e.title;const y=u("Journal"),m=u("DOI"),h=u("Volume/Issue"),x=u("Pages"),v=u("Publisher");return p[p.length-1]!="."&&(p+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,","]}):"",x?a.jsxs("span",{className:"ms-1",children:[x,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p})," [Dataset]. ",v||"",".",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),". [Doctoral dissertation",v?", "+v:"","].",m?a.jsx("span",{className:"ms-1",children:m}):""]}):""};return a.jsx("div",{className:"col-12 mb-2 border-bottom",children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:`card-body pt-2 mb-2 ${i}`,children:[a.jsx("p",{style:l,children:d()}),s.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",o]}),a.jsx("ul",{style:{...l,listStyleType:"none"},children:r.map((f,p)=>a.jsx("li",{id:`project_${p}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${f}`,id:`grant_link${p}`,target:"_blank",style:{fontWeight:"600"},children:f})},`grant_${p}`))})]})]})})})},WM=()=>{const e=pe(VM);return e.length===0?a.jsx("div",{children:"No Publications Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(HM,{publication:t,index:n},`publication_${n}`))})},KM=()=>{const e=it(),t=pe(BM),n=pe(LM),r=()=>{window.scrollTo(0,0),e(jd(!1)),e(ul({current_page:1})),e(Nr())},o=()=>{e(FM()),window.scrollTo(0,0),e(Nr())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Eg({name:l.target.name,value:l.target.value}))},i=l=>{e(Eg({name:l.target.name,value:l.target.value}))};return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{id:"journals_filter_label",className:"mb-1",children:"Journals"}),a.jsxs("div",{className:"mb-3",children:[a.jsx("input",{placeholder:"Type to search...",list:"journal_list",name:"journal",id:"journal_select",value:n.journal,className:"form-control","aria-labelledby":"journal_filter_label",onChange:l=>s(l),onInput:l=>i(l)}),a.jsx("datalist",{id:"journal_list",children:t.journals.map((l,c)=>a.jsx("option",{value:l,children:l},`journal_${c}`))})]}),a.jsx("h5",{id:"author_name_label",className:"mb-1",children:"Author Name"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{placeholder:"Last Name, First Initial",type:"text",className:"form-control",value:n.authorName,name:"authorName",id:"authorName","aria-labelledby":"author_name",onChange:s})}),a.jsx("h5",{id:"doi_number_label",className:"mb-1",children:"DOI"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:kd(n.doi),name:"doi",id:"doiNumber","aria-labelledby":"doi_number_label",onChange:s})}),a.jsx("h5",{id:"publication_type_label",className:"mb-1",children:"Publication Type"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"publicationType",id:"publication_type_select",value:n.publicationType,className:"form-control","aria-labelledby":"publication_type_label",onChange:l=>s(l),children:[a.jsx("option",{value:"",children:"-- All --"}),t.publication_types.map((l,c)=>a.jsx("option",{value:l,children:l},`publication_type_${c}`))]})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:r,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",onClick:o,children:"Reset"})]})]})})},Rg=()=>{const e=it(),t=pe(zM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(DM({current_page:m})),e(Nr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h=m,x="";return typeof m=="object"?[h,x]=m:x=m,h=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):h=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:x})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(h),children:x})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(je.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},GM=({apiUrl:e})=>{const t=it(),n=pe(UM),r=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(MM())},[t]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(KM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Rg,{})})}),a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:n?a.jsx(WM,{}):r})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Rg,{})})})]})]})})},Uw=({id:e,type:t,checked:n,onChange:r})=>a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:e,className:"checkbox",children:[a.jsx("input",{onChange:()=>r(t.allocation_type_id),type:"checkbox",checked:n,id:e}),t.display_allocation_type]})})}),YM=({types:e,createData:t})=>{const[n,r]=w.useState(""),[o,s]=w.useState([]),i=async(u,d)=>{t(u,d),r(""),s([])};function l(u){let d=o;d.includes(u)?d=d.filter(f=>f!==u):d=[...d,u],s(d)}function c(){s(o.length===e.length?[]:[...e.map(d=>d.allocation_type_id)])}return a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Type"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:a.jsxs("tr",{children:[a.jsx("td",{style:{width:"150px"},children:a.jsx("input",{type:"text",value:n,className:"form-control",onChange:u=>r(u.target.value)})}),a.jsx("td",{children:a.jsxs("div",{className:"form-inline",children:[a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:"select-all-checkbox",className:"checkbox",children:[a.jsx("input",{onChange:()=>c(),type:"checkbox",checked:o.length===e.length,id:"select-all-checkbox"}),"Select All"]})})}),e.map(u=>a.jsx(Uw,{id:`id_create_alloc_type_${u.allocation_type_id}`,type:u,checked:o.includes(u.allocation_type_id),onChange:l},`create_keyword_alloc_t_${u.allocation_type_id}`))]})}),a.jsx("td",{style:{width:"50px"},children:a.jsx("button",{className:"btn btn-primary",type:"button",onClick:async()=>i(n,o),children:"Add"})})]})})]})},QM=({keyword:e,keywordAllocationTypeIds:t,types:n,saveData:r,deleteData:o})=>{const[s,i]=w.useState(!1),[l,c]=w.useState(e.keyword),[u,d]=w.useState(t),f=()=>{i(!1),r(e.keyword_id,l,u)},p=h=>{let x=u;x.includes(h)?x=x.filter(v=>v!==h):x=[...x,h],d(x)};let y="",m=e.keyword.toString();return s?(m=a.jsx("input",{type:"text",id:e.keyword_id,value:l,onChange:h=>c(h.target.value)}),y=n.map(h=>a.jsx(Uw,{checked:u.includes(h.allocation_type_id),id:`keyword_${e.keyword}_alloc_type_${h.allocation_type_id}`,onChange:p,type:h},`keyword_${e.keyword}_alloc_t_${h.allocation_type_id}`))):y=n.filter(h=>t.includes(h.allocation_type_id)).map(h=>h.display_allocation_type).join(", "),a.jsxs("tr",{children:[a.jsxs("td",{children:[" ",m," "]}),a.jsxs("td",{children:[" ",y," "]}),s?a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-warning btn-sm",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{className:"btn btn-success btn-sm",onClick:async()=>{f()},children:"Save"})]}):a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-primary btn-sm",onClick:()=>i(!0),children:"Edit"}),a.jsx("button",{className:"btn btn-danger btn-sm",onClick:async()=>o(e.keyword_id),children:"Delete"})]})]})};function XM({allocationTypes:e}){const[t,n]=w.useState([]),[r,o]=w.useState([]),[s,i]=w.useState(""),[l,c]=w.useState(!0),u=async h=>{const v=(await h.json()).message??"Error: Changes not saved";h.ok&&await f(),i(v),c(h.ok)},d=async(h,x)=>{const v=await fetch("/keywords",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({value:h,allocation_types:x})});await u(v)},f=async()=>{r.length===0&&o(e);const x=await(await fetch("/keywords",{headers:{"Content-Type":"application/json",Accept:"application/json"}})).json();n(x)},p=async(h,x,v)=>{const g=await fetch(`/keywords/${h}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({id:h,keyword:x,allocation_types:v})});await u(g)},y=async h=>{const x=await fetch(`/keywords/${h}`,{headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},method:"DELETE"});await u(x)};w.useEffect(()=>{f()},[]);let m=null;return s.length!==0&&(m=a.jsx(be,{color:l?"success":"warning",children:s})),a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"Type new keywords separated by semicolons, select the desired allocation types, and then submit."}),a.jsx(a.Fragment,{children:m}),a.jsx(YM,{types:r,createData:d},"add-keywords"),a.jsx("h3",{children:"Current Keywords"}),a.jsxs("table",{className:"table table-bordered",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Types"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:t.map(h=>a.jsx(QM,{keyword:h,keywordAllocationTypeIds:h.allocation_type_keywords.map(x=>x.allocation_type_id),types:r,saveData:p,deleteData:y},h.keyword_id))})]})]})}function ZM(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,access:r=!1,baseUrl:o=null}={}){const s=e.attachShadow({mode:"open"}),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("div"),d=document.createElement("link"),f=document.createElement("link"),p=document.createElement("link");return o=o??(typeof document>"u"?require("url").pathToFileURL(__filename).href:Rp&&Rp.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),d.rel="stylesheet",d.href=`${o}/bootstrap.css`,f.rel="stylesheet",f.href=`${o}/xras-ui.css`,p.rel="stylesheet",p.href=`${o}/access.css`,c.appendChild(u),l.appendChild(c),i.appendChild(l),s.appendChild(d),s.appendChild(f),s.appendChild(p),s.appendChild(i),i.classList.add("bootstrap"),n&&l.classList.add("bootstrap-variables"),t&&(c.classList.add("bootstrap-fonts"),c.setAttribute("data-bs-theme","light")),u}function JM({target:e}){_t.createRoot(e).render(a.jsx(QC,{}))}function eD({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){_t.createRoot(o).render(a.jsx(mE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function tD({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){_t.createRoot(t).render(a.jsx(_x,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function nD({target:e,username:t,routes:n}){Df(n);const r=Mo({reducer:{api:tR}});_t.createRoot(e).render(a.jsx(Ur,{store:r,children:a.jsx(cA,{username:t})}))}function rD({target:e,apiUrl:t}){const n=Mo({reducer:{projectsBrowser:jA},preloadedState:{projectsBrowser:{...vw,apiUrl:t}}});_t.createRoot(e).render(a.jsx(Ur,{store:n,children:a.jsx(NA,{})}))}function oD({target:e,apiUrl:t}){const n=Mo({reducer:{publicationsBrowser:qM},preloadedState:{publicationsBrowser:{...Dw,apiUrl:t}}});_t.createRoot(e).render(a.jsx(Ur,{store:n,children:a.jsx(GM,{apiUrl:t})}))}function Vw(){return Mo({reducer:{publications_store:z2}})}function sD({target:e,routes:t}){Df(t),_t.createRoot(e).render(a.jsx(Ur,{store:Vw(),children:a.jsx(Pw,{})}))}function iD({target:e,routes:t}){Df(t),_t.createRoot(e).render(a.jsx(Ur,{store:Vw(),children:a.jsx(U2,{...JSON.parse(e.dataset.publicationsSelectProps)})}))}function aD({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=Mo({reducer:{resourceCatalog:tM}});_t.createRoot(e).render(a.jsx(Ur,{store:o,children:a.jsx(xM,{catalogSources:t,onRamps:n,baseUrl:r})}))}function lD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Mo({reducer:{resourceCatalog:kM}});_t.createRoot(e).render(a.jsx(Ur,{store:l,children:a.jsx(AM,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function cD({allocationTypes:e,target:t}){_t.createRoot(t).render(a.jsx(XM,{allocationTypes:e}))}exports.allocationsMap=JM;exports.editResource=tD;exports.keywords=cD;exports.onRampsResourceCatalog=aD;exports.projects=nD;exports.projectsBrowser=rD;exports.publications=sD;exports.publicationsBrowser=oD;exports.publicationsSelect=iD;exports.resourceCatalog=lD;exports.resources=eD;exports.shadowTarget=ZM;
|
|
70
|
+
`]))),RI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return K({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},Gc=function(t){var n=t.delay,r=t.offset;return G("span",{css:bp({animation:"".concat(EI," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},kI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=gn(t,yI);return G("div",Q({},Pe(K(K({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),G(Gc,{delay:0,offset:r}),G(Gc,{delay:160,offset:!0}),G(Gc,{delay:320,offset:!r}))},NI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return K({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},OI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return G("div",Q({ref:s},Pe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},TI=OI,PI=["data"],II=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},$I=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return G("div",Q({},Pe(t,"group",{group:!0}),c),G(i,Q({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),G("div",null,n))},MI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return K({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},AI=function(t){var n=nw(t);n.data;var r=gn(n,PI);return G("div",Q({},Pe(t,"groupHeading",{"group-heading":!0}),r))},DI=$I,FI=["innerRef","isDisabled","isHidden","inputClassName"],LI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return K(K({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},UI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},dw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},UI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":K({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},dw)},VI=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},dw)},zI=function(t){var n=t.cx,r=t.value,o=nw(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=gn(o,FI);return G("div",Q({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Q({className:n({input:!0},c),ref:s,style:VI(l),disabled:i},u)))},BI=zI,qI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return K({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},HI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return K({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},WI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return K({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},fw=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},KI=fw,GI=fw;function YI(e){var t=e.children,n=e.innerProps;return G("div",Q({role:"button"},n),t||G(jp,{size:14}))}var QI=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,l=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return G(u,{data:o,innerProps:K(K({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},G(d,{data:o,innerProps:K({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),G(f,{data:o,innerProps:K(K({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},XI=QI,ZI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return K({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},JI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return G("div",Q({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},e$=JI,t$=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return K({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},n$=function(t){var n=t.children,r=t.innerProps;return G("div",Q({},Pe(t,"placeholder",{placeholder:!0}),r),n)},r$=n$,o$=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return K({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},s$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return G("div",Q({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},i$=s$,a$={ClearIndicator:CI,Control:TI,DropdownIndicator:wI,DownChevron:cw,CrossIcon:jp,Group:DI,GroupHeading:AI,IndicatorsContainer:gI,IndicatorSeparator:_I,Input:BI,LoadingIndicator:kI,Menu:nI,MenuList:oI,MenuPortal:uI,LoadingMessage:lI,NoOptionsMessage:aI,MultiValue:XI,MultiValueContainer:KI,MultiValueLabel:GI,MultiValueRemove:YI,Option:e$,Placeholder:r$,SelectContainer:fI,SingleValue:i$,ValueContainer:hI},l$=function(t){return K(K({},a$),t.components)},fg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function c$(e,t){return!!(e===t||fg(e)&&fg(t))}function u$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!c$(e[n],t[n]))return!1;return!0}function d$(e,t){t===void 0&&(t=u$);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}var f$={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"},p$=function(t){return G("span",Q({css:f$},t))},pg=p$,h$={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" 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(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,i=s===void 0?"":s,l=t.selectValue,c=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(y,x){return y&&y.length?"".concat(y.indexOf(x)+1," of ").concat(y.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",m="".concat(u?" selected":"").concat(p);return"".concat(i).concat(m,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},m$=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,l=t.selectValue,c=t.selectProps,u=t.id,d=t.isAppleDevice,f=c.ariaLiveMessages,p=c.getOptionLabel,m=c.inputValue,g=c.isMulti,y=c.isOptionDisabled,x=c.isSearchable,h=c.menuIsOpen,v=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,C=c.isLoading,j=c["aria-label"],_=c["aria-live"],E=w.useMemo(function(){return K(K({},h$),f||{})},[f]),k=w.useMemo(function(){var D="";if(n&&E.onChange){var V=n.option,X=n.options,T=n.removedValue,U=n.removedValues,M=n.value,H=function(ve){return Array.isArray(ve)?null:ve},z=T||V||H(M),W=z?p(z):"",J=X||U||void 0,te=J?J.map(p):[],Z=K({isDisabled:z&&y(z,l),label:W,labels:te},n);D=E.onChange(Z)}return D},[n,E,y,l,p]),R=w.useMemo(function(){var D="",V=r||o,X=!!(r&&l&&l.includes(r));if(V&&E.onFocus){var T={focused:V,label:p(V),isDisabled:y(V,l),isSelected:X,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};D=E.onFocus(T)}return D},[r,o,p,y,E,s,l,d]),O=w.useMemo(function(){var D="";if(h&&v.length&&!C&&E.onFilter){var V=b({count:s.length});D=E.onFilter({inputValue:m,resultsMessage:V})}return D},[s,m,h,E,v,b,C]),N=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var D="";if(E.guidance){var V=o?"value":h?"menu":"input";D=E.guidance({"aria-label":j,context:V,isDisabled:r&&y(r,l),isMulti:g,isSearchable:x,tabSelectsValue:S,isInitialFocus:N})}return D},[j,r,o,g,y,x,h,E,l,S,N]),A=G(w.Fragment,null,G("span",{id:"aria-selection"},k),G("span",{id:"aria-focused"},R),G("span",{id:"aria-results"},O),G("span",{id:"aria-guidance"},P));return G(w.Fragment,null,G(pg,{id:u},N&&A),G(pg,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&A))},g$=m$,Ed=[{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źẑżžẓẕƶȥɀⱬꝣ"}],v$=new RegExp("["+Ed.map(function(e){return e.letters}).join("")+"]","g"),pw={};for(var Yc=0;Yc<Ed.length;Yc++)for(var Qc=Ed[Yc],Xc=0;Xc<Qc.letters.length;Xc++)pw[Qc.letters[Xc]]=Qc.base;var hw=function(t){return t.replace(v$,function(n){return pw[n]})},y$=d$(hw),hg=function(t){return t.replace(/^\s+|\s+$/g,"")},x$=function(t){return"".concat(t.label," ").concat(t.value)},b$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:x$,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?hg(r):r,f=c?hg(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=y$(d),f=hw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},w$=["innerRef"];function S$(e){var t=e.innerRef,n=gn(e,w$),r=GP(n,"onExited","in","enter","exit","appear");return G("input",Q({ref:t},r,{css:bp({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)"},"","")}))}var C$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function j$(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=w.useRef(!1),l=w.useRef(!1),c=w.useRef(0),u=w.useRef(null),d=w.useCallback(function(x,h){if(u.current!==null){var v=u.current,b=v.scrollTop,S=v.scrollHeight,C=v.clientHeight,j=u.current,_=h>0,E=S-C-b,k=!1;E>h&&i.current&&(r&&r(x),i.current=!1),_&&l.current&&(s&&s(x),l.current=!1),_&&h>E?(n&&!i.current&&n(x),j.scrollTop=S,k=!0,i.current=!0):!_&&-h>b&&(o&&!l.current&&o(x),j.scrollTop=0,k=!0,l.current=!0),k&&C$(x)}},[n,r,o,s]),f=w.useCallback(function(x){d(x,x.deltaY)},[d]),p=w.useCallback(function(x){c.current=x.changedTouches[0].clientY},[]),m=w.useCallback(function(x){var h=c.current-x.changedTouches[0].clientY;d(x,h)},[d]),g=w.useCallback(function(x){if(x){var h=HP?{passive:!1}:!1;x.addEventListener("wheel",f,h),x.addEventListener("touchstart",p,h),x.addEventListener("touchmove",m,h)}},[m,p,f]),y=w.useCallback(function(x){x&&(x.removeEventListener("wheel",f,!1),x.removeEventListener("touchstart",p,!1),x.removeEventListener("touchmove",m,!1))},[m,p,f]);return w.useEffect(function(){if(t){var x=u.current;return g(x),function(){y(x)}}},[t,g,y]),function(x){u.current=x}}var mg=["boxSizing","height","overflow","paddingRight","position"],gg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function vg(e){e.preventDefault()}function yg(e){e.stopPropagation()}function xg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function bg(){return"ontouchstart"in window||navigator.maxTouchPoints}var wg=!!(typeof window<"u"&&window.document&&window.document.createElement),ss=0,Kr={capture:!1,passive:!1};function _$(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),i=w.useCallback(function(c){if(wg){var u=document.body,d=u&&u.style;if(r&&mg.forEach(function(g){var y=d&&d[g];o.current[g]=y}),r&&ss<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,m=window.innerWidth-p+f||0;Object.keys(gg).forEach(function(g){var y=gg[g];d&&(d[g]=y)}),d&&(d.paddingRight="".concat(m,"px"))}u&&bg()&&(u.addEventListener("touchmove",vg,Kr),c&&(c.addEventListener("touchstart",xg,Kr),c.addEventListener("touchmove",yg,Kr))),ss+=1}},[r]),l=w.useCallback(function(c){if(wg){var u=document.body,d=u&&u.style;ss=Math.max(ss-1,0),r&&ss<1&&mg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&bg()&&(u.removeEventListener("touchmove",vg,Kr),c&&(c.removeEventListener("touchstart",xg,Kr),c.removeEventListener("touchmove",yg,Kr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return i(c),function(){l(c)}}},[t,i,l]),function(c){s.current=c}}var E$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},R$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function k$(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,c=e.onTopLeave,u=j$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=_$({isEnabled:n}),f=function(m){u(m),d(m)};return G(w.Fragment,null,n&&G("div",{onClick:E$,css:R$}),t(f))}var N$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},O$=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:N$,value:"",onChange:function(){}})},T$=O$;function _p(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function P$(){return _p(/^iPhone/i)}function mw(){return _p(/^Mac/i)}function I$(){return _p(/^iPad/i)||mw()&&navigator.maxTouchPoints>1}function $$(){return P$()||I$()}function M$(){return mw()||$$()}var A$=function(t){return t.label},D$=function(t){return t.label},F$=function(t){return t.value},L$=function(t){return!!t.isDisabled},U$={clearIndicator:SI,container:dI,control:NI,dropdownIndicator:bI,group:II,groupHeading:MI,indicatorsContainer:mI,indicatorSeparator:jI,input:LI,loadingIndicator:RI,loadingMessage:iI,menu:JP,menuList:rI,menuPortal:cI,multiValue:qI,multiValueLabel:HI,multiValueRemove:WI,noOptionsMessage:sI,option:ZI,placeholder:t$,singleValue:o$,valueContainer:pI},V$={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%)"},z$=4,gw=4,B$=38,q$=gw*2,H$={baseUnit:gw,controlHeight:B$,menuGutter:q$},Zc={borderRadius:z$,colors:V$,spacing:H$},W$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ug(),captureMenuScroll:!ug(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:b$(),formatGroupLabel:A$,getOptionLabel:D$,getOptionValue:F$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:L$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!BP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Sg(e,t,n,r){var o=xw(e,t,n),s=bw(e,t,n),i=yw(e,t),l=pl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return Sg(e,i,t,l)}).filter(function(i){return jg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Sg(e,n,t,r);return jg(e,s)?s:void 0}).filter(WP)}function vw(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,fp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Cg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,fp(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function K$(e,t){return vw(ga(e,t))}function jg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Sw(e)||!s)&&ww(e,{label:i,value:l,data:o},r)}function G$(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function Y$(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Jc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},yw=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function xw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function bw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=pl(e,t);return n.some(function(o){return pl(e,o)===r})}function ww(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Sw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Q$=1,Ep=function(e){pT(n,e);var t=gT(n);function n(r){var o;if(dT(this,n),o=t.call(this,r),o.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:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=M$(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,u){var d=o.props,f=d.onChange,p=d.name;u.name=p,o.ariaOnChange(c,u),f(c,u)},o.setValue=function(c,u,d){var f=o.props,p=f.closeMenuOnSelect,m=f.isMulti,g=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:g}),p&&(o.setState({inputIsHiddenAfterUpdate:!m}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:u,option:d})},o.selectOption=function(c){var u=o.props,d=u.blurInputOnSelect,f=u.isMulti,p=u.name,m=o.state.selectValue,g=f&&o.isOptionSelected(c,m),y=o.isOptionDisabled(c,m);if(g){var x=o.getOptionValue(c);o.setValue(m.filter(function(h){return o.getOptionValue(h)!==x}),"deselect-option",c)}else if(!y)f?o.setValue([].concat(fp(m),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:p});return}d&&o.blurInput()},o.removeValue=function(c){var u=o.props.isMulti,d=o.state.selectValue,f=o.getOptionValue(c),p=d.filter(function(g){return o.getOptionValue(g)!==f}),m=Hi(u,p,p[0]||null);o.onChange(m,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Hi(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,u=o.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),p=Hi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Jc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return Cg(ga(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return DP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return yw(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=U$[c](u,d);f.boxSizing="border-box";var p=o.props.styles[c];return p?p(f,u):f},o.getClassNames=function(c,u){var d,f;return(d=(f=o.props.classNames)[c])===null||d===void 0?void 0:d.call(f,u)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return l$(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return vw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:K({value:c},u)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var u=o.props,d=u.isMulti,f=u.menuIsOpen;o.focusInput(),f?(o.setState({inputIsHiddenAfterUpdate:!d}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&tc(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var u=c.touches,d=u&&u.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var u=c.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-o.initialTouchX),p=Math.abs(d.clientY-o.initialTouchY),m=5;o.userIsDragging=f>m||p>m}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var u=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var u=o.getFocusableOptions(),d=u.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return Sw(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var u=o.props,d=u.isMulti,f=u.backspaceRemovesValue,p=u.escapeClearsValue,m=u.inputValue,g=u.isClearable,y=u.isDisabled,x=u.menuIsOpen,h=u.onKeyDown,v=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,C=S.focusedOption,j=S.focusedValue,_=S.selectValue;if(!y&&!(typeof h=="function"&&(h(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||m)return;o.focusValue("previous");break;case"ArrowRight":if(!d||m)return;o.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(j)o.removeValue(j);else{if(!f)return;d?o.popValue():g&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!x||!v||!C||b&&o.isOptionSelected(C,_))return;o.selectOption(C);break;case"Enter":if(c.keyCode===229)break;if(x){if(!C||o.isComposing)return;o.selectOption(C);break}return;case"Escape":x?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:m}),o.onMenuClose()):g&&p&&o.clearValue();break;case" ":if(m)return;if(!x){o.openMenu("first");break}if(!C)return;o.selectOption(C);break;case"ArrowUp":x?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":x?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!x)return;o.focusOption("pageup");break;case"PageDown":if(!x)return;o.focusOption("pagedown");break;case"Home":if(!x)return;o.focusOption("first");break;case"End":if(!x)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Q$),o.state.selectValue=lg(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),l=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[l],o.state.focusedOptionId=Jc(s,i[l])}return o}return fT(n,[{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&&cg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!i&&o.isDisabled||c&&l&&!o.menuIsOpen)&&this.focusInput(),c&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(cg(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(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,i=this.state,l=i.selectValue,c=i.isFocused,u=this.buildFocusableOptions(),d=o==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=i.indexOf(l);l||(c=-1);var u=i.length-1,d=-1;if(i.length){switch(o){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var c=0,u=l.indexOf(i);i||(u=-1),o==="up"?c=u>0?u-1:l.length-1:o==="down"?c=(u+1)%l.length:o==="pageup"?(c=u-s,c<0&&(c=0)):o==="pagedown"?(c=u+s,c>l.length-1&&(c=l.length-1)):o==="last"&&(c=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Zc):K(K({},Zc),this.props.theme):Zc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,l=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,m=f.isRtl,g=f.options,y=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:y,isMulti:p,isRtl:m,options:g,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return xw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return bw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return ww(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{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 o=this.props,s=o.isDisabled,i=o.isSearchable,l=o.inputId,c=o.inputValue,u=o.tabIndex,d=o.form,f=o.menuIsOpen,p=o.required,m=this.getComponents(),g=m.Input,y=this.state,x=y.inputIsHidden,h=y.ariaSelection,v=this.commonProps,b=l||this.getElementId("input"),S=K(K(K({"aria-autocomplete":"list","aria-expanded":f,"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":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(h==null?void 0:h.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(g,Q({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:x,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(S$,Q({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dl,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:d,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,u=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,m=this.props,g=m.controlShouldRenderValue,y=m.isDisabled,x=m.isMulti,h=m.inputValue,v=m.placeholder,b=this.state,S=b.selectValue,C=b.focusedValue,j=b.isFocused;if(!this.hasValue()||!g)return h?null:w.createElement(f,Q({},p,{key:"placeholder",isDisabled:y,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),v);if(x)return S.map(function(E,k){var R=E===C,O="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return w.createElement(i,Q({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:y,key:O,index:k,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(P){P.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(h)return null;var _=S[0];return w.createElement(d,Q({},p,{data:_,isDisabled:y}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Q({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return w.createElement(s,Q({},i,{innerProps:f,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var l=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return w.createElement(i,Q({},l,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Q({},i,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,l=s.GroupHeading,c=s.Menu,u=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,m=s.Option,g=this.commonProps,y=this.state.focusedOption,x=this.props,h=x.captureMenuScroll,v=x.inputValue,b=x.isLoading,S=x.loadingMessage,C=x.minMenuHeight,j=x.maxMenuHeight,_=x.menuIsOpen,E=x.menuPlacement,k=x.menuPosition,R=x.menuPortalTarget,O=x.menuShouldBlockScroll,N=x.menuShouldScrollIntoView,P=x.noOptionsMessage,A=x.onMenuScrollToTop,D=x.onMenuScrollToBottom;if(!_)return null;var V=function(W,J){var te=W.type,Z=W.data,ae=W.isDisabled,ve=W.isSelected,Se=W.label,Ae=W.value,F=y===Z,L=ae?void 0:function(){return o.onOptionHover(Z)},ne=ae?void 0:function(){return o.selectOption(Z)},ee="".concat(o.getElementId("option"),"-").concat(J),oe={id:ee,onClick:ne,onMouseMove:L,onMouseOver:L,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ve};return w.createElement(m,Q({},g,{innerProps:oe,data:Z,isDisabled:ae,isSelected:ve,key:ee,label:Se,type:te,value:Ae,isFocused:F,innerRef:F?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(z){if(z.type==="group"){var W=z.data,J=z.options,te=z.index,Z="".concat(o.getElementId("group"),"-").concat(te),ae="".concat(Z,"-heading");return w.createElement(i,Q({},g,{key:Z,data:W,options:J,Heading:l,headingProps:{id:ae,data:z.data},label:o.formatGroupLabel(z.data)}),z.options.map(function(ve){return V(ve,"".concat(te,"-").concat(ve.index))}))}else if(z.type==="option")return V(z,"".concat(z.index))});else if(b){var T=S({inputValue:v});if(T===null)return null;X=w.createElement(f,g,T)}else{var U=P({inputValue:v});if(U===null)return null;X=w.createElement(p,g,U)}var M={minMenuHeight:C,maxMenuHeight:j,menuPlacement:E,menuPosition:k,menuShouldScrollIntoView:N},H=w.createElement(eI,Q({},g,M),function(z){var W=z.ref,J=z.placerProps,te=J.placement,Z=J.maxHeight;return w.createElement(c,Q({},g,M,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:te}),w.createElement(k$,{captureEnabled:h,onTopArrive:A,onBottomArrive:D,lockEnabled:O},function(ae){return w.createElement(u,Q({},g,{innerRef:function(Se){o.getMenuListRef(Se),ae(Se)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:Z,focusedOption:y}),X)}))});return R||k==="fixed"?w.createElement(d,Q({},g,{appendTo:R,controlElement:this.controlRef,menuPlacement:E,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,l=s.isDisabled,c=s.isMulti,u=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return w.createElement(T$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(y){return o.getOptionValue(y)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var m=f.length>0?f.map(function(y,x){return w.createElement("input",{key:"i-".concat(x),name:u,type:"hidden",value:o.getOptionValue(y)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,m)}else{var g=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,l=s.focusedOption,c=s.focusedValue,u=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return w.createElement(g$,Q({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,c=o.ValueContainer,u=this.props,d=u.className,f=u.id,p=u.isDisabled,m=u.menuIsOpen,g=this.state.isFocused,y=this.commonProps=this.getCommonProps();return w.createElement(l,Q({},y,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:g}),this.renderLiveRegion(),w.createElement(s,Q({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:g,menuIsOpen:m}),w.createElement(c,Q({},y,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Q({},y,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,l=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,m=o.options,g=o.value,y=o.menuIsOpen,x=o.inputValue,h=o.isMulti,v=lg(g),b={};if(i&&(g!==i.value||m!==i.options||y!==i.menuIsOpen||x!==i.inputValue)){var S=y?K$(o,v):[],C=y?Cg(ga(o,v),"".concat(p,"-option")):[],j=l?G$(s,v):null,_=Y$(s,S),E=Jc(C,_);b={selectValue:v,focusedOption:_,focusedOptionId:E,focusableOptionsWithIds:C,focusedValue:j,clearFocusValueOnUpdate:!1}}var k=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,O=d&&f;return d&&!O&&(R={value:Hi(h,v,v[0]||null),options:v,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),K(K(K({},b),k),{},{prevProps:o,ariaSelection:R,prevWasFocused:O})}}]),n}(w.Component);Ep.defaultProps=W$;var X$=w.forwardRef(function(e,t){var n=$b(e);return w.createElement(Ep,Q({ref:t},n))}),Rp=X$;function vo({bg:e="dark",children:t,color:n="light",fontWeight:r="bold",icon:o="info-circle-fill",initial:s=!1,maxWidth:i="200px",padding:l="10px",placement:c,target:u,trigger:d="click",visible:f=!0}){const p=typeof s=="string"||s instanceof String,[m,g]=w.useState(p?localStorage.getItem(s)!="true":s),[y,x]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>x(!0),100)},[]);const h=()=>{p&&localStorage.setItem(s,"true")},v=a.jsxs(Vl,{style:{"--bs-tooltip-bg":`var(--bs-${e})`,"--bs-tooltip-color":`var(--bs-${n})`,"--bs-tooltip-max-width":i,"--bs-tooltip-padding-x":l,"--bs-tooltip-padding-y":l,fontWeight:r},children:[a.jsx("button",{"aria-label":"Close",onClick:()=>{h(),g(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:a.jsx("i",{className:"bi bi-x-lg"})}),t]});return u&&u.current?a.jsx(Tb,{target:u.current,placement:c,show:m&&f&&y,children:v}):a.jsx(dp,{placement:c,onToggle:b=>{h(),g(b)},overlay:v,show:m&&f&&y,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const Z$="_items_c2dbg_1",J$="_item_c2dbg_1",e2="_details_c2dbg_14",t2="_text_c2dbg_20",n2="_number_c2dbg_35",r2="_outer_c2dbg_50",o2="_inner_c2dbg_61",xn={items:Z$,item:J$,details:e2,text:t2,number:n2,outer:r2,inner:o2},is=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function s2({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=nd}){const{request:o}=at(e,t);if(!o)return;let s=0,i;const l=[];for(let p of o.resources)p.isBoolean||(p.isCredit?i=p:l.push(p),s+=rd(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,m)=>{if(!p)return null;const g=m+1,x=rd(p)/s,h=p.requested-p.used,v=Math.max(0,h),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*v/b,j=`var(--bs-${p.isCredit?n:r[m%r.length]})`;if(x>0){const _=d,E=d+x/2,k=d+=x,R=x>.5?1:0,O=[`M ${is(_,100)}`,`A 100 100 0 ${R} 1 ${is(k,100)}`,`L ${is(k,50)}`,`A 50 50 0 ${R} 0 ${is(_,50)}`].join(" "),[N,P]=is(E,75).split(" ").map(A=>parseFloat(A));c.push(a.jsx("path",{d:O,style:{fill:j}},p.resourceId)),u.push(a.jsx("circle",{cx:N,cy:P,r:"8",fill:"black"},`${p.resourceId}-circle`),a.jsx("text",{x:N-4,y:P+4,fill:"white",className:xn.number,children:g},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:xn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:rt(v,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:xn.item,children:[a.jsx("span",{className:xn.number,children:g}),a.jsx("span",{className:`${xn.outer} ms-2 me-2`,style:{borderColor:j},children:a.jsx("span",{className:xn.inner,style:{backgroundColor:j,width:`${S}%`}})}),a.jsxs("strong",{className:xn.name,children:[a.jsx(er,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:xn.details,children:[rt(h,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",rt(b,{abbreviate:!0})," "]}),p.unit," ",p.isCredit?"available":"remaining"," (",Math.round(S),"%)"]})]},p.resourceId)});return a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:a.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[c,u]})}),a.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:a.jsx("ul",{className:xn.items,children:f})})]})}const _g=e=>e;function i2({classes:e,clean:t=_g,format:n=_g,label:r,setValue:o,style:s,value:i}){const l=n(i),[c,u]=w.useState(l);return w.useEffect(()=>{u(l)},[l]),a.jsx("input",{type:"text","aria-label":r,className:`form-control ${e}`,value:c,style:s,onChange:d=>u(d.target.value),onBlur:d=>{const f=t(d.target.value);u(n(f)),o(f)},onKeyDown:d=>{d.code=="Enter"&&(d.preventDefault(),d.target.blur())}})}function a2({requestId:e,grantNumber:t}){const{request:n,addResource:r,openUsageDetailModal:o,resetResources:s,setResourceRequest:i,setResourcesReason:l,statuses:c,toggleActionsModal:u,toggleConfirmModal:d,toggleResourcesModal:f}=at(e,t),{project:p}=Rt(t||n&&n.grantNumber),m=w.useRef(null),g=w.useRef(null);if(!n||!p)return;const y="Exchange"in n.allowedActions,x="Renewal"in n.allowedActions,h="Supplement"in n.allowedActions,v=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,C=n.exchangeErrors,j=n.exchangeActionId!==null,_=n.exchangeActionEditable,E=n.resources,k=n.resourcesReason,R={};for(let F of E)R[F.resourceId]=F;const O=()=>{bx(n)>=.75?u():d()},N=[];for(let F of E){let L=[];if(F.requested>0){for(let ne of F.requires||[]){let ee=R[ne];if(ee){if(ee.requested>0){L=[];break}L.push(ee)}}L.length&&N.push(a.jsxs("span",{children:[a.jsx(er,{resource:F,userGuide:!1})," requires"," ",xx(L.map(ne=>a.jsx(er,{resource:ne,userGuide:!1},ne.resourceId)),"or"),"."]},F.resourceId))}}const P=N.length>0;let A;b?A=a.jsx(je,{color:"info",children:"Your exchange request has been submitted."}):S&&C.length>0&&C[0].includes("PI")&&C[0].includes("person status Unknown")?A=a.jsx(je,{color:"danger",children:p.currentUser.role==="pi"?a.jsxs(a.Fragment,{children:["Please"," ",a.jsx("a",{href:re.routes.profile_path(),children:"update your academic status"})," ","before making an exchange request."]}):a.jsxs(a.Fragment,{children:["The primary investigator for this project has an unknown academic status. Please ask"," ",p.users.filter(F=>F.role==="pi").map(F=>`${F.firstName} ${F.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?A=a.jsxs(je,{color:"danger",children:["Sorry, something went wrong: ",C.join(", "),". For assistance, please"," ",a.jsx("a",{href:"https://support.access-ci.org/open-a-ticket",children:"open a help ticket"})," ","and include this message."]}):j?A=a.jsx(je,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?A=a.jsxs(je,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Uf(p)," to request a change."]}):P&&(A=a.jsxs(je,{color:"warning",children:[N," Please adjust your balance values."]}));const D=k.length>0;let V=!1,X=!1;for(let F of E)if(F.isNew&&(V=!0),F.allocated!=F.requested&&(X=!0),V&&X)break;const T=E.map(F=>F.resourceId),U={},M={},H=[];if(y&&_){n.allowedActions.Exchange.resources.filter(F=>!T.includes(F.resourceId)).map(F=>{U[F.resourceId]=F;const L=`${F.type} Resources (${F.unit})`;M[L]=M[L]||[],M[L].push(F)});for(const[F,L]of Object.entries(M))H.push({label:F,options:L.sort((ne,ee)=>ne.exchangeRates.current.unitCost<ee.exchangeRates.current.unitCost||ne.exchangeRates.current.unitCost==ee.exchangeRates.current.unitCost&&ne.name<ee.name?-1:1).map(ne=>{const ee=ai(ne.name),oe=ee.short?`${ee.short} (${ee.full.replace(/ \([^(]+\)/,"")})`:ee.full;return{value:ne.resourceId,label:oe}})}),H.sort((ne,ee)=>ne.label<ee.label?-1:1)}const z=y?n.allowedActions.Exchange.resources.map(F=>F.resourceId):[];let W;const J=[],te=[];for(let F of E)F.isCredit?W=F:(J.push(F),te.push(_&&(F.isNew||F.allocated!=F.requested)?Er.edited:z.includes(F.resourceId)?"":Er.disabled));const Z=`Add ${J.length?"another":"a"} resource to your exchange...`,ae=F=>F.requested-F.used,ve=(F,L)=>{const ne=L.allocated-L.used,ee=ho(Number(F.replace(/[^0-9-.]/g,"")),L.decimalPlaces),oe=Math.min(0,ne);if(ee<oe)return oe;let lt=W.requested*W.exchangeRates.base.unitCost;const Pt=(L.allocated-L.requested)*L.exchangeRates.base.unitCost,It=Math.min(lt,Pt);lt-=It;let ct=L.requested-L.used+It/L.exchangeRates.base.unitCost;return lt>0&&(ct+=lt/L.exchangeRates.current.unitCost),ee>ct?ho(ct,L.decimalPlaces,"floor"):ee},Se=F=>F.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[Nn(re.resourceTypeIcons[W.icon]),a.jsx("span",{className:"ms-2",children:M_(F.unit,F.exchangeRates.current.unitCost,W.name)})]}),Ae=[{key:"name",name:"Resource",format:(F,L)=>a.jsxs(a.Fragment,{children:[a.jsx(er,{resource:L}),(p.currentUser.resourceIds.includes(L.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(L.resourceId))&&a.jsx(Po,{icon:"table",onClick:()=>o(L.resourceRepositoryKey),target:"_blank",title:`${L.name} Usage Details`})," ",a.jsx(Io,{status:L.isActive?"Active":L.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(F,L)=>Se(L)}];return y&&Ae.push({key:"requested",name:"Balance",class:"text-end",rowClass:F=>_&&z.includes(F.resourceId)?Er.input:"",format:(F,L)=>{const ne=_&&z.includes(L.resourceId);return L.isBoolean?a.jsxs("span",{className:"d-flex",children:[a.jsx("span",{className:"w-100",children:a.jsx("input",{className:"form-check-input",type:"checkbox",checked:F==1,disabled:!ne,onChange:ee=>i(L.resourceId,ee.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[ne?a.jsx(i2,{classes:"text-end w-100",clean:ee=>ve(ee,L),format:rt,label:`Balance for ${L.name}`,setValue:ee=>{i(L.resourceId,ee+L.used)},style:{padding:"0.1rem 0.5rem"},value:ae(L)}):a.jsx("span",{children:rt(ae(L))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:L.unit})]})},formatHeader:F=>a.jsxs(a.Fragment,{children:[F,_?a.jsx(vo,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:p.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]})},{key:"change",name:"Credit Change",format:(F,L)=>{const ee=-1*(L.requested-L.allocated)*L.exchangeRates.current.unitCost;return ee!==0?a.jsxs("span",{className:`badge bg-${ee>0?"primary":"danger"} rounded-pill`,children:[ee>0?"+":"",rt(ee,W)," ",W.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[A,E.length?a.jsx(s2,{requestId:e}):null,W&&(y||x||h)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[Nn(re.resourceTypeIcons.credit)," ",rt(W.requested,W)," ",W.unit," available to exchange"]}),x||h?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:O,children:[Nn(re.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,J.length?a.jsx(hn,{columns:Ae,rows:J,rowClasses:te,classes:H.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):a.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),H.length?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:m,children:a.jsx(Rp,{classNames:{control:()=>"react-select mb-1"},options:H,onChange:F=>r(F.value),placeholder:Z,value:null,"aria-label":Z,formatOptionLabel:({value:F,label:L})=>{const ne=U[F];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(er,{resource:ne,userGuide:!1},L)}),a.jsx("span",{children:Se(ne)})]})}})}),J.length?null:a.jsx(vo,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:m,children:"Ready to get started? Search for a resource to add it to your project."}),a.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",a.jsx("a",{href:re.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,y&&_?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),a.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:k,onChange:F=>l(F.target.value),style:{minHeight:"3rem"}})]}),a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:v||!X&&!D&&!V,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:g,type:"button",className:"btn btn-secondary",disabled:v||!X||!D||P,onClick:f,children:v?"Submitting...":"Submit for Approval"})]}),X&&!P?a.jsx(vo,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:g,visible:p.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 l2({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=at(t,n),s=w.useId();if(!e||!r||r.error)return;const{attributeSetId:i,attributes:l,fieldType:c,label:u,resourceId:d,values:f}=e,p=l[0],m=p.required?"required":"",g=b=>o(d,i,b.target.value?[b.target.value]:[]),y=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},x=b=>{const S=parseInt(b.target.value,10),C=b.target.checked?[...f,S]:f.filter(j=>j!=S);o(d,i,C)},h=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let v;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];v=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?h:g})}else if(c=="textarea")v=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:g});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";v=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?y:h,value:b?f:f[0]||"",children:[b?null:a.jsx("option",{}),l.map(S=>a.jsx("option",{value:S.resourceAttributeId,children:S.label},S.resourceAttributeId))]})}else v=a.jsx("div",{id:s,children:l.map(b=>{const S=`resource-attribute-${b.resourceAttributeId}`;return a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:c=="single_sel"?"radio":"checkbox",id:S,value:b.resourceAttributeId,checked:f.includes(b.resourceAttributeId),onChange:c=="single_sel"?h:x}),a.jsx("label",{className:"form-check-label",htmlFor:S,children:b.label})]},b.resourceAttributeId)})});return a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:s,className:`form-label ${m}`,children:u}),v]})}function c2({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=[],l=n.resources.filter(u=>u.allocated!=u.requested).map(u=>{const d=u.requested-u.allocated;return u.questions&&i.push(...u.questions),a.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[u.name,a.jsx("span",{className:`badge bg-${d>0?"primary":"danger"} rounded-pill`,children:u.isBoolean?Lf(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",rt(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ye,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsx(ye.Title,{children:"Complete Your Exchange"})}),a.jsxs(ye.Body,{children:[a.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."}),a.jsx("ul",{className:"list-group mb-3",children:l}),i.length?a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Questions"}),a.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),i.map(u=>a.jsx(l2,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ye.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Continue Editing"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,disabled:c,children:"Submit"})]})})]})}function Cw({user:e}){const t=`${e.lastName}, ${e.firstName}`;let n=t,r=[e.organization,e.email].filter(o=>o).join(", ");return r&&(n+=`: ${r}`),a.jsx("abbr",{title:n,children:t})}function u2({requestId:e,grantNumber:t}){const{project:n}=Rt(t),{request:r,closeUsageDetailModal:o}=at(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Ue.pending)s=a.jsx(Vr,{});else if(r.usageDetailStatus==Ue.error)s=a.jsx(je,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:l,resourceDisplayName:c,resourceRepositoryKey:u,users:d}=r.usageDetail,{full:f,short:p}=ai(c),m=r.resources.find(h=>h.resourceRepositoryKey==u),g=h=>rt(h,{decimalPlaces:m?m.decimalPlaces:void 0}),y={};for(let h of n.users)y[h.username]=h;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const x=[{key:"name",name:"Name",format:(h,{lastName:v,firstName:b,portalUsername:S})=>{const C=y[S];return C?a.jsx(Cw,{user:C}):`${v}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:h=>{const v=y[h],b=v?v.resourceUsernames[m.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:h=>wx[h].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:g},{key:"lastMonth",name:"Last Month",class:"text-end",format:g},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:g},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:g},{key:"total",name:"All Time",class:"text-end",format:g}];s=d.length?a.jsx(hn,{rows:d,columns:x}):a.jsx(je,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ye,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsx(ye.Title,{children:i})}),a.jsx(ye.Body,{children:s})]})}var d2=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function f2(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var i=e.isLoading,l=i===void 0?!1:i,c=e.onInputChange,u=e.filterOption,d=u===void 0?null:u,f=gn(e,d2),p=f.inputValue,m=w.useRef(void 0),g=w.useRef(!1),y=w.useState(Array.isArray(n)?n:void 0),x=Ve(y,2),h=x[0],v=x[1],b=w.useState(typeof p<"u"?p:""),S=Ve(b,2),C=S[0],j=S[1],_=w.useState(n===!0),E=Ve(_,2),k=E[0],R=E[1],O=w.useState(void 0),N=Ve(O,2),P=N[0],A=N[1],D=w.useState([]),V=Ve(D,2),X=V[0],T=V[1],U=w.useState(!1),M=Ve(U,2),H=M[0],z=M[1],W=w.useState({}),J=Ve(W,2),te=J[0],Z=J[1],ae=w.useState(void 0),ve=Ve(ae,2),Se=ve[0],Ae=ve[1],F=w.useState(void 0),L=Ve(F,2),ne=L[0],ee=L[1];o!==ne&&(Z({}),ee(o)),n!==Se&&(v(Array.isArray(n)?n:void 0),Ae(n)),w.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var oe=w.useCallback(function(It,ct){if(!s)return ct();var _e=s(It,ct);_e&&typeof _e.then=="function"&&_e.then(ct,function(){return ct()})},[s]);w.useEffect(function(){n===!0&&oe(C,function(It){g.current&&(v(It||[]),R(!!m.current))})},[]);var lt=w.useCallback(function(It,ct){var _e=FP(It,ct,c);if(!_e){m.current=void 0,j(""),A(""),T([]),R(!1),z(!1);return}if(o&&te[_e])j(_e),A(_e),T(te[_e]),R(!1),z(!1);else{var Bn=m.current={};j(_e),R(!0),z(!P),oe(_e,function(qn){g&&Bn===m.current&&(m.current=void 0,R(!1),A(_e),T(qn||[]),z(!1),Z(qn?K(K({},te),{},io({},_e,qn)):te))})}},[o,oe,P,te,c]),Pt=H?[]:C&&P?X:h||[];return K(K({},f),{},{options:Pt,isLoading:k||l,onInputChange:lt,filterOption:d})}var p2=w.forwardRef(function(e,t){var n=f2(e),r=$b(n);return w.createElement(Ep,Q({ref:t},r))}),h2=p2;const Rd=({description:e,disabled:t=!1,onChange:n,selectedLength:r,totalLength:o})=>{const s=w.useRef(),i=w.useId();let l=r==o,c=r>0&&!l;return w.useEffect(()=>{s.current&&(s.current.checked=l,s.current.indeterminate=c)},[l,c]),a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"custom-checkbox form-check-input",disabled:t,id:i,onChange:u=>n(u.target.checked),ref:s,type:"checkbox"}),a.jsx("label",{className:"form-check-label",htmlFor:i,"aria-description":`${l?"Deselect":"Select"} ${e}`})]})};function m2({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=Rt(e),{request:d}=n?at(t||n.currentRequestId,e):{request:null};if(!n||!n.currentRequestId||!d||n.error||d.error)return;const f=n.isManager,p="Exchange"in d.allowedActions,m=n.usersStatus==c.pending,g=n.usersStatus==c.success,y=n.usersStatus==c.error,x=n.users,h=d.resources.filter(ld),v=h.length==0,b=x.find(R=>R.hasChanges)!==void 0,S=x.find(R=>R.role!="pi")!==void 0;let C;g&&!b?C=a.jsx(je,{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."}):y?C=a.jsx(je,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?h.length?v&&(C=a.jsx(je,{color:"warning",children:"This project does not have any active resources."})):C=a.jsxs(je,{color:"warning",children:["This project does not have any resources."," ",p?a.jsx("a",{href:re.routes.request_action_path(d.requestId,"new?action_type=Exchange"),onClick:R=>{R.preventDefault(),i("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):C=a.jsxs(je,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Uf(n)," to request a change."]});const j=(R,O)=>{let N,P,A,D;if(O.key=="all"){N="all resources for all users",P=V=>u(V),A=0;for(let V of x)A+=V.resourceIds.length;D=x.length*h.length}else N=`all users for ${O.name}`,P=V=>u(V,null,O.key),A=x.filter(({resourceIds:V})=>V.includes(O.key)).length,D=x.length;return a.jsxs(a.Fragment,{children:[O.key=="all"?R:a.jsx(er,{resource:O,userGuide:!1}),a.jsx("br",{}),a.jsx(Rd,{description:N,disabled:O.disabled,onChange:P,selectedLength:A,totalLength:D})]})},_=$l.map(({role:R,name:O})=>a.jsx("option",{value:R,children:O},R)),E=[{key:"name",name:"Name",width:200,format:(R,O)=>a.jsx(Cw,{user:O})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,O)=>a.jsx("select",{className:"form-select",value:R,onChange:N=>l(O.username,N.target.value),disabled:!f||R=="pi"||R=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:_.filter(N=>N.key==R||!["pi","co_pi"].includes(N.key))})}];h.length&&E.push({key:"all",name:"All Resources",class:`text-center ${Er.important}`,disabled:!f||v,width:100,format:(R,O)=>a.jsx(Rd,{description:`all users for ${O.name}`,disabled:!f||v,onChange:N=>u(N,O.username),selectedLength:O.resourceIds.length,totalLength:h.length}),formatHeader:j});for(let R of h)E.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(O,N)=>a.jsx(a.Fragment,{children:a.jsx("input",{className:"form-check-input",disabled:!f||!R.isActive,onChange:P=>u(P.target.checked,N.username,R.resourceId),type:"checkbox",checked:N.resourceIds.includes(R.resourceId)})}),formatHeader:j});const k=x.map(R=>R.hasChanges?Er.edited:"");return a.jsxs(a.Fragment,{children:[C,a.jsx(hn,{rows:x,columns:E,frozenColumns:h.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:k,scrollRowIndex:n.usersNewRowIndex}),f&&h.length&&!v?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(h2,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await zE(R)).map(N=>({isDisabled:N.eligibility==="no",label:a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsxs("span",{className:N.eligibility==="no"?"text-decoration-line-through":"",style:{color:N.eligibility==="no"?"#707070":void 0},children:[N.username," (",N.firstName," ",N.lastName,","," ",N.organization,N.email?`, ${N.email}`:""]}),N.eligibility==="no"&&N.eligibilityReason&&a.jsxs("span",{className:"text-danger ms-2",children:[a.jsx("i",{className:"bi bi-exclamation-octagon"})," ",N.eligibilityReason]})]}),value:N})),onChange:R=>r(R.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,f&&(h.length&&!v||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:m||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:m||!b,onClick:s,children:m?"Saving...":"Save Changes"})]}):null]})}const g2=(e,t,n)=>{let r=!0;const o=[];for(const i of t)e[i]||(r=!1,o.push(i));const s=e.authors||[];for(const i of s)for(const l of n)i[l]||(r=!1,o.includes(l)||o.push(l));return{formValid:r,missingFields:o}},v2=e=>e.length>0?a.jsxs("div",{role:"alert",children:[a.jsx("p",{children:"Please provide the following information before submitting:"}),a.jsx("ul",{children:e.map(t=>a.jsx("li",{children:y2(t)},t))})]}):null;function y2(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const Mo={authenticityToken:null,data_loaded:!1,errors:[],form_valid:!1,grant_number:"",projects:[],publication:{},publicationId:null,publication_types:[],saving:!1,selected_tags:{},show_saved:!1,showEditModal:!1,tag_categories:[]},jw=Ur({name:"publicationEdit",initialState:Mo,reducers:{addAuthor:e=>{e.publication.authors.push({portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}})},addProject:(e,{payload:t})=>{e.projects.push(t)},changePublicationType:(e,{payload:t})=>{let n=e.publication_types.find(r=>r.publication_type==t).fields;n.forEach(r=>{const o=e.publication.fields.find(s=>s.csl_field_name==r.csl_field_name);o&&(r.value=o.value)}),e.publication.publication_type=t,e.publication.fields=n},dataLoaded:(e,{payload:t})=>{e.publication=t.publication,e.form_valid=t.publication.title.trim()!="",e.publication.authors.forEach(n=>{n.affiliation||(n.affiliation="")}),e.publication_types=t.publication_types,e.tag_categories=t.tag_categories,e.projects=t.publication.projects,t.publication.tags.forEach(n=>e.selected_tags[n.label]=n.options.map(r=>r.value)),e.data_loaded=!0},deleteAuthor:(e,{payload:t})=>{e.publication.authors.splice(t,1)},hideError:(e,{payload:t})=>{e.errors=e.errors.filter(n=>n.id!=t)},setFormValid:(e,{payload:t})=>{e.form_valid=t},setGrantNumber:(e,{payload:t})=>{e.grant_number=t},setPublication:(e,{payload:t})=>{e.publication.fields.forEach(n=>{n.field_value=t[n.csl_field_name]||""}),Object.keys(e.publication).forEach(n=>{t[n]&&(e.publication[n]=t[n])}),e.form_valid=t.title.trim()!=""},setPublicationId:(e,{payload:t})=>{e.publicationId=t},setShowEditModal:(e,{payload:t})=>{e.showEditModal=t},resetState:e=>{for(const[t,n]of Object.entries(Mo))e[t]=n},toggleRequest:(e,{payload:t})=>{e.projects[t].selected=!e.projects[t].selected},toggleTag:(e,{payload:t})=>{let n=e.tag_categories.find(r=>r.publication_tags_category_id==t.publication_tags_category_id);n.tags[t.idx].selected=!n.tags[t.idx].selected},updateAuthor:(e,{payload:t})=>{e.publication.authors[t.idx][t.key]=t.value},updateErrors:(e,{payload:t})=>{e.errors.push({id:`${Math.random().toString(36).slice(2)}`,message:t})},updateField:(e,{payload:t})=>{e.publication.fields[t.index].field_value=t.value},updatePublication:(e,{payload:t})=>{e.publication[t.key]=t.value},updateSaving:(e,{payload:t})=>{e.saving=t},updateSelectedTags:(e,{payload:t})=>{e.selected_tags[t.category]=t.tags.map(n=>n.value)},updateShowSaved:(e,{payload:t})=>{e.show_saved=t}}}),{addAuthor:Eg,addProject:x2,changePublicationType:kd,dataLoaded:b2,deleteAuthor:w2,hideError:_w,setFormValid:S2,setGrantNumber:Ew,setPublication:C2,setPublicationId:j2,setShowEditModal:Rw,resetState:_2,toggleRequest:E2,toggleTag:JA,updateAuthor:R2,updateErrors:Zs,updateField:k2,updatePublication:va,updateSaving:eu,updateSelectedTags:N2,updateShowSaved:kw}=jw.actions,O2=e=>e.publicationEdit.publication,T2=e=>e.publicationEdit.publication.doi,P2=e=>e.publicationEdit.publication_types,Nw=e=>e.publicationEdit.publication.authors,I2=e=>e.publicationEdit.tag_categories,$2=e=>e.publicationEdit.projects,M2=e=>e.publicationEdit.publication.tags,A2=e=>e.publicationEdit.errors,Ow=e=>e.publicationEdit.data_loaded,Tw=e=>e.publicationEdit.publicationId,D2=e=>e.publicationEdit.showEditModal,F2=e=>e.publicationEdit.show_saved,nc=e=>e.publicationEdit.saving,Pw=e=>e.publicationEdit.form_valid,L2=e=>e.publicationEdit.grant_number,U2=e=>!nc(e)&&Ow(e)&&Pw(e)&&Iw(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0,Iw=e=>{const t=Nw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},V2=()=>async(e,t)=>{const n=t().publicationEdit.publication.doi,r="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(re.routes.publications_lookup_path({doi:n})).then(o=>o.json()).then(o=>{if(o.title!=""){let s=t().publicationEdit.publication_types.find(i=>i.citation_style_type==o.type);e(kd(s?s.publication_type:"Other")),e(C2(o))}else e(Zs(r))},()=>{e(Zs(r))})},z2=()=>async(e,t)=>{const n=t().publicationEdit.grant_number;await fetch(re.routes.publications_find_project_path({grant_number:n})).then(r=>r.json()).then(r=>{e(x2(r)),e(Ew(""))},()=>{e(Zs("Unable to find a project with this grant number."))})},kp=e=>async t=>{t(j2(e)),t(Rw(!0))},$w=e=>async t=>{const n=e?`${re.routes.edit_publication_path(e)}.json`:re.routes.publication_path("new.json");await fetch(n,{headers:{accept:"application/json"}}).then(r=>r.json()).then(r=>{t(b2(r))})},B2=()=>async(e,t)=>{const n=t().publicationEdit,r=n.projects.filter(m=>m.selected),o=Object.keys(n.selected_tags).map(m=>n.selected_tags[m]).flat(),s={...n.publication},i=n.errors,{formValid:l,missingFields:c}=g2(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(g=>{e(_w(g.id))});const m=v2(c);e(Zs(m));return}const d={authenticity_token:n.authenticityToken||document.querySelector("meta[name=csrf-token]").content,publication:s,authors:s.authors.map(m=>({...m,order:0})),tags:o,projects:r};let f,p;s.publication_id?(f=re.routes.publication_path(s.publication_id),p="PATCH"):(f=re.routes.publications_path(),p="POST"),e(eu(!0)),await fetch(f,{method:p,headers:{"Content-Type":"application/json"},body:JSON.stringify(d)}).then(()=>{s.publication_id||(e(_2()),e($w())),e(kw(!0)),e(eu(!1))},()=>{e(eu(!1)),e(Zs("There was an error saving this publication."))})},pi=jw.reducer,pn=tt("publicationsSearch/getPublications",async(e,{getState:t})=>{const n=t().publicationsSearch,r={},{authorName:o,createdBy:s,doi:i,grantNumber:l,journal:c,publicationType:u}=n.filterSelections;return i&&(r.doi=i),o&&(r.author_name=o),c&&n.filterOptions.journals.includes(c)&&(r.journal=c),u&&(r.publication_type=u),s.length&&(r.created_by=s),l&&(r.grant_number=l),n.usePagination?r.page=n.page.current+1:r.per_page=9999,await(await fetch(re.routes.search_publications_path(r),{headers:{Accept:"application/json"}})).json()}),Np=tt("publicationsSearch/getFilters",async()=>(await(await fetch(re.routes.search_publications_filters_path())).json()).filters||[]),Js={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},Mw=Ur({name:"publicationsSearch",initialState:Js,reducers:{addCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy.push(t)},removeCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy=e.filterSelections.createdBy.filter(n=>n!==t)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={createdBy:[],doi:"",journal:"",authorName:"",publicationType:""}},resetPublications:e=>{e.publications=[]},setUsePagination:(e,{payload:t})=>{e.usePagination=t}},extraReducers:e=>{e.addCase(pn.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(pn.fulfilled,(t,n)=>{var r,o,s,i;t.publicationsLoaded=!0,t.usePagination?(t.publications=[...t.publications,...n.payload.publications||[]],t.page.current=((o=(r=n.payload)==null?void 0:r.pagination)==null?void 0:o.current_page)||0,t.page.last=((i=(s=n.payload)==null?void 0:s.pagination)==null?void 0:i.last_page)||1):t.publications=n.payload.publications||[]}).addCase(pn.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(Np.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{addCreatedByUsername:q2,removeCreatedByUsername:H2,resetFilters:W2,resetPublications:Rg,setUsePagination:Op,updateFilterSelection:Nd}=Mw.actions,K2=e=>e.publicationsSearch.filterSelections,G2=e=>e.publicationsSearch.publicationsLoaded,Aw=e=>e.publicationsSearch.publications,Y2=e=>e.publicationsSearch.filterOptions,Q2=e=>e.publicationsSearch.page,X2=e=>e.publicationsSearch.usePagination,rc=Mw.reducer;function Z2({children:e,hasMore:t,loadMore:n,isLoading:r}){const o=w.useRef(null),s=w.useRef(r);return w.useEffect(()=>{s.current=r},[r]),w.useEffect(()=>{const i=o.current;if(i&&t){const l=new IntersectionObserver(c=>{!s.current&&c[0].isIntersecting&&n()});return l.observe(o.current),()=>l.unobserve(i)}},[o,n,t]),a.jsxs(a.Fragment,{children:[e,a.jsx("div",{ref:o}),r&&a.jsx(Vr,{})]})}const J2="_citation_ru41y_1",eM="_tags_ru41y_7",kg={citation:J2,tags:eM},tM=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Dw=e=>{const t=(e||"").match(tM);return t?t[0]:null};function Fw({publication:e}){const{authors:t,doi:n,fields:r,publication_type:o,publication_year:s,title:i}=e,{"Journal name":l,Pages:c,Publisher:u,"Volume/Issue":d}=r,f=t.map(x=>`${x.last_name}, ${x.first_name.substr(0,1)}.`).join(", "),p=s||"N/A",m=i.endsWith(".")?i:`${i}.`,g=Dw(n),y=g?a.jsx("a",{href:`https://doi.org/${g}`,target:"_blank",rel:"noreferrer",children:g}):null;if(["Journal Paper","Other"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",d&&a.jsxs(a.Fragment,{children:[d,","]})," ",c&&a.jsxs(a.Fragment,{children:[c,"."]})," ",y]});if(["Conference Paper","Software"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",y]});if(["Book","Book Chapter"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m})," ",u&&a.jsxs("em",{children:[u,"."]})," ",y]});if(o==="Dataset")return a.jsxs(a.Fragment,{children:[f," (",p,").",a.jsx("em",{children:m})," [Dataset]. ",u,". ",y]});if(o==="Dissertation")return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m}),". [Doctoral dissertation",u&&a.jsxs(a.Fragment,{children:[", ",u]}),"]. ",y]})}function nM({allowEdit:e=!0,last:t=!1,publication:n}){const r=he(),{projects:o,publication_type:s,tags:i}=n,l=o.map(c=>c.grant_number);return a.jsx("div",{className:`col-12 mb-2 ${t||"border-bottom"}`,children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:"card-body pt-2",children:[a.jsxs("div",{className:kg.citation,children:[a.jsx(Fw,{publication:n}),e&&n.can_edit&&a.jsx(Po,{onClick:()=>r(kp(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:kg.tags,children:[a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-file-earmark"}),s==="Other"?"Publication":s]},"project-type"),l.map((c,u)=>a.jsx("li",{id:`project_${u}`,children:a.jsxs("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${c}`,id:`grant_link${u}`,target:"_blank",rel:"noreferrer",title:`Supported by project ${c}`,children:[a.jsx("i",{className:"bi bi-link-45deg"}),c]})},`grant_${u}`)),i.map(c=>{const{full:u,short:d}=ai(c);return a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-tag"})," ",d?a.jsx("abbr",{title:u,children:d}):u]},c)})]})]})})})}function Tp({allowEdit:e=!0,emptyMessage:t="No matching publications."}){const n=he(),{current:r,last:o}=Y(Q2),s=Y(G2),i=Y(X2),l=Y(Aw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(Z2,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(pn()),children:l.map((c,u)=>a.jsx(nM,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function rM(){const e=he(),t=Y(T2);return a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),a.jsxs("div",{className:"input-group",children:[a.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:t,onChange:n=>e(va({key:"doi",value:n.target.value}))}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>e(V2()),children:"Lookup Publication"})]})]})})}const oM=({author:e,authorKey:t,updateAuthor:n,deleteAuthor:r})=>{const o=l=>{n({key:l.target.name,value:l.target.value,idx:t})},s=l=>a.jsx("td",{children:a.jsx("input",{type:"text",className:"form-control",name:l,id:l,value:e[l],onChange:c=>o(c)})},`field_${l}`),i=["first_name","last_name","affiliation"];return a.jsxs("tr",{children:[i.map(l=>s(l)),a.jsx("td",{children:t!==0&&a.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>r(t),children:a.jsx("i",{className:"bi bi-trash"})})})]})},sM=e=>({updateAuthor:t=>e(R2(t)),deleteAuthor:t=>e(w2(t))}),iM=N_(null,sM)(oM);function aM(){const e=he(),t=Y(Nw),n=Y(Iw),r=t.length===0;w.useEffect(()=>{r&&e(Eg())},[r,e]);const o=()=>n?"":a.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 a.jsxs("div",{children:[o(),a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"First Name"}),a.jsx("th",{children:"Last Name"}),a.jsx("th",{children:"Affiliation"}),a.jsx("th",{})]})}),a.jsx("tbody",{children:t.map((s,i)=>a.jsx(iM,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Eg()),children:"Add Author"})]})}function lM({category:e,index:t}){const n=he(),r=Y(M2),o=w.useRef(null),s=()=>{const l=r.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n(N2({category:e.label,tags:l}))};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fw-bold mb-1",children:e.label}),a.jsx("div",{className:"mb-3",children:a.jsx(Rp,{classNames:{control:l=>l.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:s(),options:e.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${t}`,inputId:`tags_${t}`,ref:o,closeMenuOnSelect:!1,onChange:i})})]})}function cM(){const e=he(),t=Y($2),n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>t.filter(o=>o.selected).length>0;return a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[r()?"":a.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),a.jsx("div",{className:"list-group",children:t.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>e(E2(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function uM(){const e=he(),t=Y(L2);return a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",a.jsxs("div",{className:"input-group mt-1",children:[a.jsx("input",{type:"text",className:"form-control",value:t,onChange:n=>e(Ew(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(z2()),children:"Find Project"})]})]})})}function dM(){const e=he(),t=Y(O2),n=Y(P2),r=Y(I2);Y(U2);const o=Y(Pw),s=p=>{e(S2(p.target.value.trim()!=="")),e(va({key:"title",value:p.target.value}))},i=()=>t.fields.map((p,m)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${p.csl_field_name}`,className:"form-label",children:p.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${p.csl_field_name}`,id:`field_${p.csl_field_name}`,value:p.field_value||"",onChange:g=>e(k2({index:m,value:g.target.value}))})]})},`field_${p.csl_field_name}`)),l=()=>{const p=new Date().getFullYear()+2;let m=1980;const g=[];for(;m<=p;)g.push(m++);const y=["January","February","March","April","May","June","July","August","September","October","November","December"],x=a.jsx("i",{className:"bi bi-asterisk text-danger"});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",x]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${o?"":"is-invalid"}`,value:t.title||"",onChange:h=>s(h)})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),a.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:t.publication_year||"",onChange:h=>{va({key:"publication_year",value:h.target.value})},children:g.map(h=>a.jsx("option",{value:h,children:h},`year_${h}`))})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),a.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:t.publication_month||"",onChange:h=>{va({key:"publication_month",value:h.target.value})},children:y.map((h,v)=>a.jsx("option",{value:v+1,children:h},`month_${v}`))})]})})]})},c=a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"card-header",children:a.jsx("h2",{children:"Publication Information"})}),a.jsxs("div",{className:"card-body",children:[a.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.'}),a.jsx(rM,{}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),a.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:t.publication_type||"",onChange:p=>e(kd(p.target.value)),children:n.map(p=>a.jsx("option",{value:p.publication_type,children:p.publication_type},`pub_type_${p.type_id}`))})]})}),l(),i()]})]}),u=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(vo,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,a.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),a.jsx("div",{className:"card-body",children:a.jsx(aM,{})})]}),d=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Tags"}),a.jsx(vo,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),a.jsx("div",{className:"card-body",children:r.map((p,m)=>a.jsx(lM,{index:m,category:p},`tc_${m}`))})]}),f=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Associated Projects"}),a.jsx(vo,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(cM,{}),a.jsx("hr",{}),a.jsx(uM,{})]})]});return a.jsxs(a.Fragment,{children:[c,u,d,f]})}function Lw(){const e=he(),t=Y(Ow),n=Y(Tw);return w.useEffect(()=>{e($w(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(dM,{}):a.jsx(Vr,{})})}function Pp(){const e=he(),t=Y(D2),n=Y(Tw),r=o=>{o&&e(B2()),e(Rw(!1))};return a.jsx(a.Fragment,{children:a.jsxs(ye,{size:"xl",show:t,onHide:()=>r(!1),scrollable:!0,children:[a.jsx(ye.Header,{closeButton:!0,children:a.jsxs(ye.Title,{children:[n?"Edit":"Add"," Publication"]})}),a.jsx(ye.Body,{children:a.jsx(Lw,{})}),a.jsx(ye.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>r(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>r(!0),children:"Save Publication"})]})})]})})}function fM({grantNumber:e}){const t=he(),n=Y(nc);return w.useEffect(()=>{n||(t(Nd({name:"grantNumber",value:e})),t(Op(!1)),t(pn()))},[e,n,t]),a.jsxs(a.Fragment,{children:[a.jsx(Tp,{grantNumber:e,emptyMessage:"No publications are associated with this project."}),a.jsx(Pp,{})]})}function pM({grantNumber:e}){const t=w.useRef(Un({reducer:{publicationEdit:pi,publicationsSearch:rc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Vn,{store:t.current,children:a.jsx(fM,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:re.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function hM({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,setRequest:o,setTab:s}=Rt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(je,{color:"danger",children:n.error});const i=n.timeStatus||n.actions[0].status.toLowerCase(),l=n.actions.find(({showDeleteModal:d})=>d),c=[];n.resources.length||c.push("resources"),e!=r.currentRequestId&&c.push("users");const u=(r.users||[]).filter(d=>d.eligibility==="no"&&d.role!=="user");return a.jsxs("div",{className:"request",children:[n.returnedForCorrections?a.jsxs(je,{color:"warning",children:[a.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),a.jsx("div",{className:gR.returnedForCorrectionsNotes,children:n.returnedForCorrectionsNotes}),a.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",n.timeStatus!="current"&&!n.returnedForCorrections?a.jsxs(je,{color:"warning",children:["You are viewing ","aeiou".includes(i[0])?"an":"a"," ",i," request."," ",c.length?`You cannot manage ${c.join(" or ")} for this request.`:""," ",r.currentRequestId?a.jsx("a",{href:re.routes.request_path(r.currentRequestId),onClick:d=>{d.preventDefault(),o(r.currentRequestId)},children:"Go to the current request."}):null]}):null,r.isManager&&u.length>0&&a.jsxs(je,{color:"danger",children:["Some project personnel need to update their profiles. You will be unable to submit exchanges, renewals, and other actions until these issues are resolved:",a.jsx("br",{}),a.jsx("ul",{className:"fs-6 mb-0",children:u.map(d=>a.jsxs("li",{children:[a.jsxs("strong",{children:[d.firstName," ",d.lastName," (",d.username,"):"]})," ",d.eligibilityReason]},d.username))})]}),a.jsxs(Ek,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(ts,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(sT,{requestId:e,grantNumber:t})}),a.jsx(ts,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(a2,{requestId:e})}),a.jsx(ts,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(m2,{grantNumber:t})}),a.jsx(ts,{eventKey:"publications",title:"Publications",children:a.jsx(pM,{grantNumber:t,requestId:e})}),a.jsx(ts,{eventKey:"history",title:"History",children:a.jsx($O,{requestId:e})})]}),a.jsx(OO,{grantNumber:t,requestId:e}),a.jsx(TO,{grantNumber:t,requestId:e}),a.jsx(PO,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(c2,{grantNumber:t,requestId:e}),a.jsx(u2,{grantNumber:t,requestId:e})]})}function mM({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=at(e,t);if(!n)return;const{actions:s,allowedActions:i}=n,l=[];i&&(("Extension"in i||"Renewal"in i)&&l.push(["Extend End Date",u=>{u.preventDefault(),r()},"calendar-plus"]),"Final Report"in i&&l.push(["Submit Final Report",`${re.routes.request_action_path(e,"new")}?action_type=Final+Report`,"file-earmark-check"]));const c=s.find(u=>u.isRequest);if(c){const u=c.allowedOperations||[];u.includes("Edit")&&l.push(["Edit",re.routes.edit_request_path(n.requestId),"pencil"]),u.includes("Delete")&&l.push(["Delete",d=>{d.preventDefault(),o(c.actionId)},"trash","danger"])}return l.map(([u,d,f,p])=>{const m=a.jsxs(a.Fragment,{children:[" ",f&&a.jsx("i",{className:`bi bi-${f} me-1`}),u]});return typeof d=="function"?a.jsx("button",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,onClick:d,children:m},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:m},u)})}function gM({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=Rt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(je,{color:"danger",children:i.error});else{let d;const f=i.requestsList.map(p=>(p.requestId==i.selectedRequestId&&(d=p),a.jsx("option",{value:p.requestId,children:Ff(p)},p.requestId)));u=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"d-flex",children:[a.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:p=>l(parseInt(p.target.value,10)),value:i.selectedRequestId,disabled:f.length<2,children:f}),a.jsx(mM,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(hM,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${jm.project} card mb-3`,children:[a.jsxs("div",{className:`card-header d-flex justify-content-between ${o?"":"border-bottom-0"}`,children:[a.jsx("button",{"aria-expanded":o,"aria-controls":c,className:jm.expand,onClick:()=>s(!o),children:a.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[a.jsx("i",{className:`bi bi-caret-${o?"down":"right"}-fill`})," ",/^[A-Z]/.test(t)?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"grant-number",children:[t,":"]})," "]}):null,n||i.title]})}),a.jsx(Io,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function vM({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=fR(e);if(r)return a.jsx(Vr,{});if(n)return a.jsxs(je,{color:"danger",children:[n," ",a.jsx("a",{href:"#",onClick:i=>{i.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]});if(!o.length)return a.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[a.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),a.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[a.jsxs("a",{className:"btn btn-primary w-25",href:re.routes.project_types_path(),children:[a.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),a.jsxs("a",{className:"btn btn-secondary w-25",href:re.routes.get_your_first_project_path(),children:[a.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",a.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),a.jsxs("a",{className:"btn btn-primary w-25",href:re.routes.how_to_path(),children:[a.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]});const s=new URLSearchParams(window.location.hash.slice(1)).get("grantNumber");return o.map((i,l)=>a.jsx(gM,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const Uw={apiUrl:null,listIsFiltered:!1,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,singleEntry:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:"",requestNumber:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},yM=tt("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Td({name:"requestNumber",value:o.get("_requestNumber")})),n(zw(!0))),await n(Od()),await n(kr()),n(xM())}),xM=tt("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(Vw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),Od=tt("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(Vw(i.filters))}),kr=tt("projectsBrowser/getProjects",async(e,{getState:t,dispatch:n})=>{const r=t().projectsBrowser,o=r.filters,s=r.typeLists,i=s.fosTypes.filter(d=>d.checked);let l=`${r.apiUrl}?page=${r.pageData.current_page}`;return o.requestNumber!=""?(l+=`&request_number=${o.requestNumber}`,n(Og(!0))):(n(Og(!1)),i.length!=s.fosTypes.length&&(l+=`&fos=${i.map(d=>d.fosTypeId).join(",")}`),o.org!=""&&o.org!="-- ALL --"&&(l+=`&org=${encodeURIComponent(o.org)}`),o.allocationType!=""&&(l+=`&allocation_type=${o.allocationType}`),o.resource!=""&&(l+=`&resources=${o.resource}`)),await(await fetch(l)).json()}),Ip=Ur({name:"projectsBrowser",initialState:Uw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Ip.caseReducers.toggleAllFos(e)},setApiUrl:(e,{payload:t})=>{e.apiUrl=t},setShowPagination:(e,{payload:t})=>{e.showPagination=t},setTypeLists:(e,{payload:t})=>{e.typeLists=t},toggleAllFos:e=>{e.typeLists.fosTypes.forEach(t=>t.checked=!e.filters.allFosToggled),e.filters.allFosToggled=!e.filters.allFosToggled},toggleFos:(e,{payload:t})=>{e.typeLists.fosTypes.forEach(n=>{n.fosTypeId==t.fosTypeId&&(n.checked=!n.checked)}),e.typeLists.fosTypes.filter(n=>n.checked).length!=e.typeLists.fosTypes.length?e.filters.allFosToggled=!1:e.filters.allFosToggled=!0},toggleListFiltered:(e,{payload:t})=>{e.listIsFiltered=t},toggleSingleEntry:(e,{payload:t})=>{e.singleEntry=t},updateFilter:(e,{payload:t})=>{e.filters[t.name]=t.value},updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)}},extraReducers:e=>{e.addCase(kr.pending,t=>{t.projectsLoaded=!1}).addCase(kr.fulfilled,(t,n)=>{const r=n.payload;t.projectsLoaded=!0,t.projects=r.projects,r.pages!=t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,t.pageData.last_page=r.pages}).addCase(kr.rejected,(t,n)=>{console.log(n.error)}).addCase(Od.pending,t=>{t.filtersLoaded=!1}).addCase(Od.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:bM,setApiUrl:eD,setShowPagination:Ng,setTypeLists:Vw,toggleAllFos:wM,toggleFos:SM,toggleListFiltered:zw,toggleSingleEntry:Og,updateFilter:Td,updatePageData:Pd}=Ip.actions,CM=e=>e.projectsBrowser.filters,jM=e=>e.projectsBrowser.filtersLoaded,_M=e=>e.projectsBrowser.listIsFiltered,EM=e=>e.projectsBrowser.singleEntry,RM=e=>e.projectsBrowser.projectsLoaded,kM=e=>e.projectsBrowser.pageData,NM=e=>e.projectsBrowser.projects,OM=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,TM=e=>e.projectsBrowser.typeLists,PM=Ip.reducer;const IM=()=>{const e=he(),t=Y(CM),n=Y(TM),r=Y(_M),o=n.orgs.map(y=>({label:y,value:y})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=y=>{e(Td({name:y.target.name,value:y.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(Ng(!1)),e(Pd({current_page:1})),e(kr())},f=()=>{l(null),e(Ng(!1)),e(Pd({current_page:1})),e(bM()),r&&(window.scrollTo(0,0),e(kr()),p(!1))},p=y=>{e(zw(y))},m=y=>{l(y),e(Td({name:"org",value:y.value}))},g=()=>t.org==""&&t.allocationType==""&&t.allFosToggled&&t.resource==""&&t.requestNumber=="";return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{className:"mb-1",children:"Field of Science"}),a.jsxs("div",{className:"border mb-3",style:c,children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:t.allFosToggled,onChange:()=>{e(wM())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(y=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:y.fosTypeId,id:`fos_${y.fosTypeId}`,checked:y.checked,onChange:()=>e(SM(y))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${y.fosTypeId}`,children:y.fosName})]},`fos_${y.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(Rp,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:m,value:i,"aria-labelledby":"org_select_label"},"org_select")}),a.jsx("h5",{id:"project_type_label",className:"mb-1",children:a.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"allocationType",id:"project_type_select",value:t.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((y,x)=>a.jsx("option",{value:y,children:y},`allocation_type_${x}`))]})}),a.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"resource",id:"resource_select",value:t.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((y,x)=>a.jsx("option",{value:y.resourceId,children:y.resourceName},`resource_${x}`))]})}),a.jsx("h5",{id:"request_number_label",className:"mb-1",children:"Request Number"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:t.requestNumber,name:"requestNumber",id:"requestNumber","aria-labelledby":"request_number_label",onChange:y=>u(y)})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:d,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",disabled:g(),onClick:f,children:"Reset"})]})]})})};const $M=({project:e})=>{const t=e.resources,[n,r]=w.useState(!1),o=Y(EM);let s={flush:!0,className:"mt-3 mb-1",alwaysOpen:!0};const i=v=>{let b=v.units?v.units:v.resourceUnits;const S=v.allocation?v.allocation:v.amount;if(b=="[Yes = 1, No = 0]"||b=="Yes / No")return S=="1.0"?"Yes":"No";{let C="0";return parseInt(S)&&(C=parseInt(S).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),b=="ACCESS Credits"&&(b=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),b=="Dollars"?`$${C}`:a.jsxs(a.Fragment,{children:[C," ",b]})}},l=()=>{const{origin:v,pathname:b}=window.location,S=`${v}${b}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(S),setTimeout(()=>r(!1),2e3)},c=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",u=a.jsx(Vl,{id:"link-tooltip",children:"Link Copied!"}),d=()=>{if(c()){const v={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(dp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:u,children:a.jsx("button",{onClick:l,style:v,children:a.jsx("i",{className:"bi bi-link-45deg",children:a.jsx("div",{className:"d-none",children:"Direct link to project"})})})})}return a.jsx(a.Fragment,{})},f=()=>{const v=e.pi.split(",");return`${v[1]} ${v[0]}`},p=()=>!e.coPis||e.coPis.length<=0?"":a.jsxs(a.Fragment,{children:[a.jsx("br",{}),a.jsxs("small",{className:"fst-italic",children:["CoPI(s): ",e.coPis.map(v=>`${v.name} (${v.organization})`).join(";")]})]}),m=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),g=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[c()," Start-Up: ",f(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[c()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),p()]}),y=a.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0",children:"Resource"})}),a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),a.jsx("tbody",{children:t.map((v,b)=>a.jsxs("tr",{children:[a.jsx("td",{children:v.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:i(v)})]},`resource_${e.requestId}_${b}`))})]}),x=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Resources"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:y})})]}),h=()=>e.allocationType==="NAIRR Start-Up"?x:o?a.jsxs(a.Fragment,{children:[x,a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Abstract"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})})]}):a.jsxs(Kt,{...s,children:[a.jsxs(Kt.Item,{eventKey:"0",children:[a.jsx(Kt.Header,{children:"Resources"}),a.jsx(Kt.Body,{children:y})]}),a.jsxs(Kt.Item,{eventKey:"1",children:[a.jsx(Kt.Header,{children:"Abstract"}),a.jsx(Kt.Body,{children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})]})]});return a.jsxs("div",{className:"card mb-4",children:[a.jsx("div",{className:"card-header bg-primary text-white",children:a.jsxs("div",{className:"d-flex justify-content-between",children:[a.jsx("div",{children:g()}),a.jsx("div",{children:d()})]})}),a.jsxs("div",{className:"card-body",children:[a.jsxs("div",{className:"row fw-bold border-bottom",children:[a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:e.fos}),a.jsx("div",{className:"col",children:e.allocationType}),a.jsx("div",{className:"col",children:m()})]}),h()]})]})},MM=()=>{const e=Y(NM);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx($M,{project:t},`project_${n}`))})};const Tg=()=>{const e=he(),t=Y(kM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(g,y)=>y),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=g=>{const y=parseInt(g);e(Pd({current_page:g})),e(kr(y))},d=g=>(event.preventDefault(),s("0"),u(g),!1),f=()=>{const g=[];if(t.last_page>l)if(t.current_page>4){g.push(1),g.push("spacer");for(var y=1;y>0;y--)t.current_page-y>1&&g.push(t.current_page-y);g.push(["current",t.current_page]);for(var y=1;y<2;y++)t.current_page+y<=t.last_page&&g.push(t.current_page+y);t.last_page-t.current_page>1&&(g.push("spacer"),g.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?g.push(["current",x]):g.push(x)}),g.push("spacer"),g.push(t.last_page);else for(var y=1;y<=t.last_page;y++)y==t.current_page?g.push(["current",y]):g.push(y);r(g)},p=g=>{let y="";return typeof g=="object"?[g,y]=g:y=g,g=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):g=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:y})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(g),children:y})})},m=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:g=>d(g.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(g=>a.jsx("option",{value:g+1,children:g+1},`page_option_${g}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((g,y)=>a.jsx(Re.Fragment,{children:p(g)},`page_${y}`)),t.last_page>l?m():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},AM=({api_url:e})=>{const t=he(),n=Y(RM),r=Y(jM),o=Y(OM),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(yM())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(IM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Tg,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(MM,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Tg,{scroll:"projects_browser_app"}):""})})]})]})})};function Bw(){const e=he();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(kp(null)),children:"Add a New Publication"})}function qw(){const e=he(),t=Y(A2),n=Y(F2);return a.jsxs(a.Fragment,{children:[n&&a.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(kw(!1))})]}),t.map(r=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[r.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(_w(r.id))})]},`err_${r.id}`))]})}function DM(){const e=he(),t=Y(nc);return w.useEffect(()=>{t||(e(Op(!1)),e(pn()),e(Np()))},[e,t]),a.jsxs(a.Fragment,{children:[a.jsx(qw,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsx(Bw,{})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const FM=()=>{const e=he(),t=Y(Y2),n=Y(K2),r=()=>{e(Rg()),window.scrollTo(0,0),e(pn())},o=()=>{e(Rg()),e(W2()),window.scrollTo(0,0),e(pn())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Nd({name:l.target.name,value:l.target.value}))},i=l=>{e(Nd({name:l.target.name,value:l.target.value}))};return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{id:"journals_filter_label",className:"mb-1",children:"Journals"}),a.jsxs("div",{className:"mb-3",children:[a.jsx("input",{placeholder:"Type to search...",list:"journal_list",name:"journal",id:"journal_select",value:n.journal,className:"form-control","aria-labelledby":"journal_filter_label",onChange:l=>s(l),onInput:l=>i(l)}),a.jsx("datalist",{id:"journal_list",children:t.journals.map((l,c)=>a.jsx("option",{value:l,children:l},`journal_${c}`))})]}),a.jsx("h5",{id:"author_name_label",className:"mb-1",children:"Author Name"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{placeholder:"Last Name, First Initial",type:"text",className:"form-control",value:n.authorName,name:"authorName",id:"authorName","aria-labelledby":"author_name",onChange:s})}),a.jsx("h5",{id:"doi_number_label",className:"mb-1",children:"DOI"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:Dw(n.doi)||"",name:"doi",id:"doiNumber","aria-labelledby":"doi_number_label",onChange:s})}),a.jsx("h5",{id:"publication_type_label",className:"mb-1",children:"Publication Type"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"publicationType",id:"publication_type_select",value:n.publicationType,className:"form-control","aria-labelledby":"publication_type_label",onChange:l=>s(l),children:[a.jsx("option",{value:"",children:"-- All --"}),t.publication_types.map((l,c)=>a.jsx("option",{value:l,children:l},`publication_type_${c}`))]})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:r,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",onClick:o,children:"Reset"})]})]})})},LM=()=>{const e=he();return w.useEffect(()=>{e(pn()),e(Np())},[e]),a.jsx(a.Fragment,{children:a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(FM,{})}),a.jsx("div",{className:"col-sm-9",children:a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:a.jsx(Tp,{allowEdit:!1})})})})]})})})},Hw={selected:[]},Ww=Ur({name:"publicationsSelect",initialState:Hw,reducers:{setSelected:(e,{payload:t})=>{e.selected=t},toggleSelected:(e,{payload:t})=>{e.selected.includes(t)?e.selected=e.selected.filter(r=>r!==t):e.selected.push(t)},clearSelected:e=>{e.selected=[]}}}),{setSelected:UM,toggleSelected:VM,clearSelected:tD}=Ww.actions,zM=e=>e.publicationsSelect.selected,BM=Ww.reducer;function qM({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=he(),o=Y(nc),s=Y(zM),i=Y(Aw);w.useEffect(()=>{o||(r(Op(!1)),r(pn()))},[o,r]);const l=[{key:"publication",name:"Publication",format:(c,u)=>a.jsxs(a.Fragment,{children:[a.jsx(Fw,{publication:u}),t&&u.can_edit&&a.jsx(Po,{onClick:()=>r(kp(u.publication_id)),icon:"pencil",title:"Edit publication"},"edit")]})},{key:"created_by",name:"Entered By",headerClass:"text-nowrap"}];return n&&l.splice(0,0,{key:"publication_id",format:c=>{const u=s.includes(c);return a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:c,checked:u,onChange:()=>r(VM(c))})},formatHeader:()=>a.jsx(Rd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(UM(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(hn,{columns:l,rows:i}),e&&a.jsx(Bw,{}),a.jsx(Pp,{})]})}function HM(){const e=he();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(q2(t.detail.username))),addEventListener("requestRemoveRole",t=>e(H2(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(qw,{}),a.jsx(qM,{allowSelect:!0})]})}const WM={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}},ya=tt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(Pg(!1));let n=[];e.catalogSources?n=e.catalogSources:n.push({...e,catalogLabel:"Default"}),e.onRamps&&n.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const r=await Promise.all(n.map(async o=>{const i=await(await fetch(o.apiUrl)).json();return{...o,data:i}}));t(QM({data:r,params:e})),t(Pg(!0))});tt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(ZM(e)),t(Gw())});const KM=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},GM=e=>{const t={},n={};let r={};return e.forEach(s=>{t[s.catalogLabel]={...s,resourceIds:[],selected:!1,catalogId:s.catalogLabel.replace(/[^(A-z)]/,"")},delete t[s.catalogLabel].data,s.data.forEach(i=>{if(Id(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=YM(s,i,r);n[i.resourceId]=c,t[s.catalogLabel].resourceIds.push(i.resourceId),r=l}})}),{resources:Object.keys(n).map(s=>n[s]),catalogs:t,categories:r}},Id=(e,t,n)=>!e&&!t||e&&e.length==0&&t&&t.length==0?!0:e&&e.length>0?e.find(r=>r==n):t&&t.length>0?!t.find(r=>r==n):!0,YM=(e,t,n)=>{const r=[];let o="";t.featureCategories.filter(l=>l.categoryIsFilter).forEach(l=>{const c=l.categoryId;l.categoryName=="ACCESS Resource Grouping"?o=l.features[0].name:(!n[c]&&Id(e.allowedCategories,e.excludedCategories,l.categoryName)&&(n[c]={categoryId:c,categoryName:l.categoryName,categoryDescription:l.categoryDescription,features:{}}),l.features.forEach(u=>{const d={featureId:u.featureId,name:u.name,description:u.description,categoryId:c,selected:!1},f=Id(e.allowedFilters,e.excludedFilters,d.name);f&&r.push(d),n[c]&&f&&!n[c].features[u.featureId]&&(n[c].features[u.featureId]=d)}))});const s=r.map(l=>l.name).sort((l,c)=>l>c);return{formattedResource:{...t,resourceName:t.resourceName.trim(),features:s,featureIds:r.map(l=>l.featureId),sortCategory:o},categories:n}},Kw=Ur({name:"resourceCatalog",initialState:WM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=GM(n);e.catalogs=o,e.onRamps=t.params.onRamps;for(const i in s){const l=s[i],c=[];for(const u in l.features)c.push(l.features[u]);e.filters.push({...l,features:c.sort((u,d)=>u.name>d.name)})}e.filters=e.filters.sort((i,l)=>i.categoryName.localeCompare(l.categoryName)),e.resources=r.sort((i,l)=>i.resourceName.localeCompare(l.resourceName)).sort((i,l)=>e.resourceSorting[i.sortCategory]>e.resourceSorting[l.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},setResourcesLoaded:(e,{payload:t})=>{e.resourcesLoaded=t},toggleCatalog:(e,{payload:t})=>{const{catalog:n,selected:r}=t;e.catalogs[n.catalogLabel].selected=r},toggleFilter:(e,{payload:t})=>{if(t){const i=t,c=e.filters.find(u=>u.categoryId==i.categoryId).features.find(u=>u.featureId==i.featureId);c.selected=!c.selected}const n=KM(e.filters);let r=[];if(n.length>0){const i=n.map(l=>l.features.map(c=>c.featureId));e.resources.forEach(l=>{let c=0;i.forEach(u=>{let d=!1;l.featureIds.forEach(f=>{u.indexOf(f)>=0&&(d=!0)}),d&&(c+=1)}),c>=i.length&&r.push(l)})}else r=e.resources;const o=Object.keys(e.catalogs).map(i=>e.catalogs[i]),s=o.filter(i=>i.selected);if(s.length>0&&s.length<o.length){const i=s.map(l=>l.resourceIds).flat();r=r.filter(l=>i.indexOf(l.resourceId)>=0)}e.filteredResources=r}},extraReducers:e=>{e.addCase(ya.pending,t=>{}).addCase(ya.fulfilled,(t,n)=>{}).addCase(ya.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:QM,processData:nD,resetFilters:XM,setResourcesLoaded:Pg,toggleCatalog:ZM,toggleFilter:Gw}=Kw.actions,Yw=e=>e.resourceCatalog.catalogs,JM=e=>e.resourceCatalog.filters,eA=e=>e.resourceCatalog.hasErrors,tA=e=>e.resourceCatalog.resourcesLoaded,nA=e=>e.resourceCatalog.filteredResources,rA=Kw.reducer,oA="_access_1yrq0_2",sA="_resourceName_1yrq0_6",iA="_description_1yrq0_11",aA="_filterBar_1yrq0_15",lA="_cardBg_1yrq0_20",cA="_active_1yrq0_25",uA="_plainButton_1yrq0_30",dA="_btnSecondary_1yrq0_40",fA="_filtersHidden_1yrq0_51",pA="_filtersVisible_1yrq0_57",At={access:oA,resourceName:sA,description:iA,filterBar:aA,cardBg:lA,active:cA,plainButton:uA,btnSecondary:dA,filtersHidden:fA,filtersVisible:pA},hA=({resource:e})=>{const[t,n]=w.useState(!0),r=u=>{const d={"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 d[u]?a.jsx("i",{title:u,className:`bi bi-${d[u]} me-2 `},`${e.resourceId}_${d[u]}`):""},o=()=>a.jsxs("span",{className:"float-end",children:[e.features.map(u=>r(u)),e.resourceType]}),s=u=>u.length==0?"":a.jsx(a.Fragment,{children:u.map((d,f)=>a.jsx("span",{className:"badge text-bg-secondary me-2",children:d},`feature_${e.resourceId}_${f}`))}),i=()=>{let u=e.resourceDescription;return u&&u!=""?(At.plainButton,a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col fw-bold",children:["About ",e.resourceName]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col ",children:[a.jsx("div",{className:At.description,dangerouslySetInnerHTML:{__html:u}}),""]})})]})):""},l=()=>e.recommendedUse&&e.recommendedUse!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:a.jsx("div",{className:At.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",c=()=>At.cardBg;return a.jsx(a.Fragment,{children:a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"card mb-3",children:[a.jsxs("div",{className:`card-header ${c()}`,children:[a.jsx("span",{className:"",children:e.resourceName}),o()]}),a.jsxs("div",{className:"card-body",children:[a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:s(e.features)})}),l(),i()]}),a.jsx("div",{className:"card-footer",children:a.jsxs("a",{target:"_blank",href:e.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},mA=({filter:e})=>{const t=he(),n=()=>{t(Gw(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},gA=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(mA,{filter:t},t.featureId))]})}),vA=({onReset:e})=>{const t=he(),n=Y(Yw),r=Y(JM),o=r.filter(s=>s.features.filter(i=>i.selected).length>0);return Object.keys(n).map(s=>n[s]),a.jsxs(a.Fragment,{children:[r.map(s=>a.jsx(gA,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(XM()),disabled:o.length==0,children:"Reset Filters"}),a.jsx("button",{className:"btn btn-outline-primary ms-3 mt-2 mb-2",onClick:e,children:"Close Menu"})]})},yA=()=>{const[e,t]=w.useState(!1),n=w.useRef(null),r=()=>{const o=n.current;e?(o.style.height="0px",o.classList.remove(At.filtersVisible),o.classList.add(At.filtersHidden)):(o.style.height=o.scrollHeight+"px",o.classList.remove(At.filtersHidden),o.classList.add(At.filtersVisible)),t(!e)};return a.jsx("div",{className:At.filterBar,children:a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col pt-2 pb-2",children:a.jsxs("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:[a.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:r,children:[a.jsx("i",{className:"bi bi-filter"})," Filters"]}),a.jsx("div",{className:`${At.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:n,children:a.jsx(vA,{onReset:r})})]})})})})},xA=()=>{const e=Y(nA);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsx("div",{className:"card shadow",children:a.jsxs("div",{className:"card-body",children:[a.jsx(yA,{}),e.map(t=>a.jsx(hA,{resource:t},t.resourceId))]})})},bA=({baseUrl:e})=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col d-flex",children:a.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${e}/access_logo.png`})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),a.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."}),a.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."}),a.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."}),a.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),a.jsx("p",{children:a.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${At.btnSecondary}`,children:["Get Your First Project ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),a.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",a.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",a.jsx("br",{}),"If you have questions, please",a.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),wA=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=he(),o=Y(tA),s=Y(eA),i=Y(Yw),l=Object.keys(i).map(u=>i[u]);w.useEffect(()=>{r(ya({catalogSources:e,onRamps:t}))},[]);const c=()=>t&&l.length>1?a.jsx(a.Fragment,{children:l.filter(u=>u.catalogLabel!="ACCESS").map((u,d)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("h4",{className:"border-bottom",children:["About ",u.catalogLabel]}),a.jsx("div",{dangerouslySetInnerHTML:{__html:u.description}})]})},`catalog_${d}`))}):"";return s?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):o?a.jsxs("div",{className:`container mt-3 ${At.access}`,children:[t?a.jsx(bA,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(xA,{})})})]}):a.jsx(Vr,{})},SA={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}},xa=tt("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(jA({data:r,params:e}))}),CA=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Ig=(e,t,n)=>{if(e.length==0&&t.length==0)return!0;if(e.length>0)return e.find(r=>r==n);if(t.length>0)return!t.find(r=>r==n)},Qw=Ur({name:"resourceCatalog",initialState:SA,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.params.excludedCategories,o=t.params.excludedFilters,s=t.params.excludedResources,i=t.params.allowedCategories,l=t.params.allowedFilters,c=[],u={};n.filter(d=>!s.includes(d.resourceName)).forEach(d=>{const f=[];let p="";d.featureCategories.filter(g=>g.categoryIsFilter).forEach(g=>{const y=g.categoryId;g.categoryName=="ACCESS Resource Grouping"?p=g.features[0].name:(!u[y]&&Ig(i,r,g.categoryName)&&(u[y]={categoryId:y,categoryName:g.categoryName,categoryDescription:g.categoryDescription,features:{}}),g.features.forEach(x=>{const h={featureId:x.featureId,name:x.name,description:x.description,categoryId:y,selected:!1},v=Ig(l,o,h.name);v&&f.push(h),u[y]&&v&&!u[y].features[x.featureId]&&(u[y].features[x.featureId]=h)}))});const m={resourceName:d.resourceName,resourceId:d.resourceId,resourceType:d.resourceType,organization:d.organization,units:d.units,userGuideUrl:d.userGuideUrl,resourceDescription:d.resourceDescription,description:d.description,recommendedUse:d.recommendedUse,features:f.map(g=>g.name).sort((g,y)=>g>y),featureIds:f.map(g=>g.featureId),sortCategory:p};c.push(m)});for(const d in u){const f=u[d],p=[];for(const m in f.features)p.push(f.features[m]);e.filters.push({...f,features:p.sort((m,g)=>m.name>g.name)})}i.length>0?e.filters=e.filters.sort((d,f)=>i.indexOf(d.categoryName)>i.indexOf(f.categoryName)):e.filters=e.filters.sort((d,f)=>d.categoryName.localeCompare(f.categoryName)),e.resources=c.sort((d,f)=>d.resourceName.localeCompare(f.resourceName)).sort((d,f)=>e.resourceSorting[d.sortCategory]>e.resourceSorting[f.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},toggleFilter:(e,{payload:t})=>{const n=t,o=e.filters.find(i=>i.categoryId==n.categoryId).features.find(i=>i.featureId==n.featureId);o.selected=!o.selected;const s=CA(e.filters);if(s.length>0){const i=[],l=s.map(c=>c.features.map(u=>u.featureId));e.resources.forEach(c=>{let u=0;l.forEach(d=>{let f=!1;c.featureIds.forEach(p=>{d.indexOf(p)>=0&&(f=!0)}),f&&(u+=1)}),u>=l.length&&i.push(c)}),e.filteredResources=i}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(xa.pending,t=>{}).addCase(xa.fulfilled,(t,n)=>{}).addCase(xa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:jA,processData:rD,resetFilters:_A,toggleFilter:EA}=Qw.actions,RA=e=>e.resourceCatalog.hasErrors,kA=e=>e.resourceCatalog.resourcesLoaded,NA=e=>e.resourceCatalog.filters,OA=e=>e.resourceCatalog.filteredResources,TA=Qw.reducer,PA=({resource:e})=>{const t=r=>r.length==0?"":a.jsx("ul",{children:r.map((o,s)=>a.jsx("li",{children:o},`feature_${e.resourceId}_${s}`))}),n=(r,o)=>o&&o!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:r})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:o}})})]}):"";return a.jsxs(Kt.Item,{eventKey:e.resourceId,children:[a.jsx(Kt.Header,{children:e.resourceName}),a.jsxs(Kt.Body,{children:[a.jsx("table",{className:"table",children:a.jsxs("tbody",{children:[a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Resource Type:"}),a.jsx("td",{children:e.resourceType})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Organization:"}),a.jsx("td",{children:e.organization})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Units:"}),a.jsx("td",{children:e.units})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"User Guide:"}),a.jsx("td",{children:e.userGuideUrl==""?"":a.jsx("a",{href:e.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Features Available:"}),a.jsx("td",{children:t(e.features)})]})]})}),n("Resource Description",e.resourceDescription),n("Allocations Description",e.description),n("Recommended Use",e.recommendedUse)]})]})},IA=()=>{const e=Y(OA);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Resources"}),a.jsx(Kt,{children:e.map(t=>a.jsx(PA,{resource:t},t.resourceId))})]})},$A=({filter:e})=>{const t=he(),n=()=>{t(EA(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},MA=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx($A,{filter:t},t.featureId))]})}),AA=()=>{const e=he(),t=Y(NA),n=t.filter(r=>r.features.filter(o=>o.selected).length>0);return a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Filters"}),t.map(r=>a.jsx(MA,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(_A()),disabled:n.length==0,children:"Reset Filters"})]})},DA=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=he(),l=Y(kA),c=Y(RA);return w.useEffect(()=>{i(xa({apiUrl:e,excludedCategories:t,excludedFilters:n,excludedResources:r,allowedCategories:o,allowedFilters:s}))},[]),c?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):l?a.jsx(a.Fragment,{children:a.jsxs("div",{className:"row mt-3",children:[a.jsx("div",{className:"col-sm-4",children:a.jsx(AA,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(IA,{})})]})}):a.jsx(Vr,{})};function FA(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,baseUrl:r=null}={}){const o=e.attachShadow({mode:"open"}),s=document.createElement("div"),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("link"),d=document.createElement("link"),f=document.createElement("link");return r=r??(typeof document>"u"?require("url").pathToFileURL(__filename).href:$p&&$p.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),u.rel="stylesheet",u.href=`${r}/bootstrap.css`,d.rel="stylesheet",d.href=`${r}/xras-ui.css`,f.rel="stylesheet",f.href=`${r}/access.css`,l.appendChild(c),i.appendChild(l),s.appendChild(i),o.appendChild(u),o.appendChild(d),o.appendChild(f),o.appendChild(s),s.classList.add("bootstrap"),n&&i.classList.add("bootstrap-variables"),t&&(l.classList.add("bootstrap-fonts"),l.setAttribute("data-bs-theme","light")),c}function LA({target:e}){yt.createRoot(e).render(a.jsx(iE,{}))}function UA({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){yt.createRoot(o).render(a.jsx(_E,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function VA({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){yt.createRoot(t).render(a.jsx(Ox,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function zA({target:e,username:t,routes:n}){li(n);const r=Un({reducer:{api:dR}});yt.createRoot(e).render(a.jsx(Vn,{store:r,children:a.jsx(vM,{username:t})}))}function BA({target:e,apiUrl:t}){const n=Un({reducer:{projectsBrowser:PM},preloadedState:{projectsBrowser:{...Uw,apiUrl:t}}});yt.createRoot(e).render(a.jsx(Vn,{store:n,children:a.jsx(AM,{})}))}function qA({target:e,routes:t,authenticityToken:n}){li(t);const r=Un({reducer:{publicationsSearch:rc,publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:n}}});yt.createRoot(e).render(a.jsx(Vn,{store:r,children:a.jsx(LM,{})}))}function HA({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=Un({reducer:{publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:r}}});li(n),yt.createRoot(t).render(a.jsx(Vn,{store:o,children:a.jsx(Lw,{publicationId:e})}))}function WA({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=Un({reducer:{publicationEdit:pi,publicationsSearch:rc,publicationsSelect:BM},preloadedState:{publicationsSearch:{...Js,filterSelections:{...Js.filterSelections,createdBy:o}},publicationEdit:{...Mo,authenticityToken:e},publicationsSelect:{...Hw,selected:n}}});li(t),yt.createRoot(r).render(a.jsx(Vn,{store:s,children:a.jsx(HM,{})}))}function KA({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=Un({reducer:{resourceCatalog:rA}});yt.createRoot(e).render(a.jsx(Vn,{store:o,children:a.jsx(wA,{catalogSources:t,onRamps:n,baseUrl:r})}))}function GA({authenticityToken:e,routes:t,target:n,username:r}){li(t);const o=Un({reducer:{publicationEdit:pi,publicationsSearch:rc},preloadedState:{publicationsSearch:{...Js,filterSelections:{...Js.filterSelections,createdBy:[r]}},publicationEdit:{...Mo,authenticityToken:e}}});yt.createRoot(n).render(a.jsx(Vn,{store:o,children:a.jsx(DM,{})}))}function YA({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Un({reducer:{resourceCatalog:TA}});yt.createRoot(e).render(a.jsx(Vn,{store:l,children:a.jsx(DA,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function QA({allocationTypes:e,target:t}){yt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=LA;exports.editResource=VA;exports.keywords=QA;exports.myPublications=GA;exports.onRampsResourceCatalog=KA;exports.projects=zA;exports.projectsBrowser=BA;exports.publicationEdit=HA;exports.publicationsBrowser=qA;exports.publicationsSelect=WA;exports.resourceCatalog=YA;exports.resources=UA;exports.shadowTarget=FA;
|