@xras/ui 0.22.0 → 0.26.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.
Files changed (3) hide show
  1. package/dist/xras-ui.cjs +17 -17
  2. package/dist/xras-ui.js +3689 -3654
  3. package/package.json +1 -1
package/dist/xras-ui.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Jw=Object.defineProperty;var e1=(e,t,n)=>t in e?Jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oc=(e,t,n)=>(e1(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $p=typeof document<"u"?document.currentScript:null;function t1(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 Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ag={exports:{}},hl={},Dg={exports:{}},ie={};/**
1
+ "use strict";var Jw=Object.defineProperty;var e1=(e,t,n)=>t in e?Jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oc=(e,t,n)=>(e1(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $p=typeof document<"u"?document.currentScript:null;function t1(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 Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ag={exports:{}},hl={},Dg={exports:{}},se={};/**
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 ei=Symbol.for("react.element"),n1=Symbol.for("react.portal"),r1=Symbol.for("react.fragment"),o1=Symbol.for("react.strict_mode"),s1=Symbol.for("react.profiler"),i1=Symbol.for("react.provider"),a1=Symbol.for("react.context"),l1=Symbol.for("react.forward_ref"),c1=Symbol.for("react.suspense"),u1=Symbol.for("react.memo"),d1=Symbol.for("react.lazy"),Mp=Symbol.iterator;function f1(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Fg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lg=Object.assign,Ug={};function Mo(e,t,n){this.props=e,this.context=t,this.refs=Ug,this.updater=n||Fg}Mo.prototype.isReactComponent={};Mo.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")};Mo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Vg(){}Vg.prototype=Mo.prototype;function $d(e,t,n){this.props=e,this.context=t,this.refs=Ug,this.updater=n||Fg}var Md=$d.prototype=new Vg;Md.constructor=$d;Lg(Md,Mo.prototype);Md.isPureReactComponent=!0;var Ap=Array.isArray,zg=Object.prototype.hasOwnProperty,Ad={current:null},Bg={key:!0,ref:!0,__self:!0,__source:!0};function qg(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)zg.call(t,r)&&!Bg.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:ei,type:e,key:s,ref:i,props:o,_owner:Ad.current}}function p1(e,t){return{$$typeof:ei,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===ei}function h1(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?h1(""+e.key):t.toString(36)}function Hi(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 ei:case n1: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,"$&/")+"/"),Hi(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=p1(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+=Hi(s,t,n,c,o)}else if(c=f1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+sc(s,l++),i+=Hi(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 mi(e,t,n){if(e==null)return e;var r=[],o=0;return Hi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function m1(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},Wi={transition:null},g1={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Wi,ReactCurrentOwner:Ad};ie.Children={map:mi,forEach:function(e,t,n){mi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return mi(e,function(){t++}),t},toArray:function(e){return mi(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=Mo;ie.Fragment=r1;ie.Profiler=s1;ie.PureComponent=$d;ie.StrictMode=o1;ie.Suspense=c1;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;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=Lg({},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)zg.call(t,c)&&!Bg.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:ei,type:e.type,key:o,ref:s,props:r,_owner:i}};ie.createContext=function(e){return e={$$typeof:a1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:i1,_context:e},e.Consumer=e};ie.createElement=qg;ie.createFactory=function(e){var t=qg.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:l1,render:e}};ie.isValidElement=Dd;ie.lazy=function(e){return{$$typeof:d1,_payload:{_status:-1,_result:e},_init:m1}};ie.memo=function(e,t){return{$$typeof:u1,type:e,compare:t===void 0?null:t}};ie.startTransition=function(e){var t=Wi.transition;Wi.transition={};try{e()}finally{Wi.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";Dg.exports=ie;var w=Dg.exports;const Re=Js(w),ba=t1({__proto__:null,default:Re},[w]);/**
9
+ */var ei=Symbol.for("react.element"),n1=Symbol.for("react.portal"),r1=Symbol.for("react.fragment"),o1=Symbol.for("react.strict_mode"),s1=Symbol.for("react.profiler"),i1=Symbol.for("react.provider"),a1=Symbol.for("react.context"),l1=Symbol.for("react.forward_ref"),c1=Symbol.for("react.suspense"),u1=Symbol.for("react.memo"),d1=Symbol.for("react.lazy"),Mp=Symbol.iterator;function f1(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Fg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lg=Object.assign,Ug={};function Do(e,t,n){this.props=e,this.context=t,this.refs=Ug,this.updater=n||Fg}Do.prototype.isReactComponent={};Do.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")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Vg(){}Vg.prototype=Do.prototype;function $d(e,t,n){this.props=e,this.context=t,this.refs=Ug,this.updater=n||Fg}var Md=$d.prototype=new Vg;Md.constructor=$d;Lg(Md,Do.prototype);Md.isPureReactComponent=!0;var Ap=Array.isArray,zg=Object.prototype.hasOwnProperty,Ad={current:null},Bg={key:!0,ref:!0,__self:!0,__source:!0};function qg(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)zg.call(t,r)&&!Bg.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:ei,type:e,key:s,ref:i,props:o,_owner:Ad.current}}function p1(e,t){return{$$typeof:ei,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===ei}function h1(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?h1(""+e.key):t.toString(36)}function Hi(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 ei:case n1: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,"$&/")+"/"),Hi(o,t,n,"",function(u){return u})):o!=null&&(Dd(o)&&(o=p1(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+=Hi(s,t,n,c,o)}else if(c=f1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+sc(s,l++),i+=Hi(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 mi(e,t,n){if(e==null)return e;var r=[],o=0;return Hi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function m1(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 lt={current:null},Wi={transition:null},g1={ReactCurrentDispatcher:lt,ReactCurrentBatchConfig:Wi,ReactCurrentOwner:Ad};se.Children={map:mi,forEach:function(e,t,n){mi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return mi(e,function(){t++}),t},toArray:function(e){return mi(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}};se.Component=Do;se.Fragment=r1;se.Profiler=s1;se.PureComponent=$d;se.StrictMode=o1;se.Suspense=c1;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;se.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=Lg({},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)zg.call(t,c)&&!Bg.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:ei,type:e.type,key:o,ref:s,props:r,_owner:i}};se.createContext=function(e){return e={$$typeof:a1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:i1,_context:e},e.Consumer=e};se.createElement=qg;se.createFactory=function(e){var t=qg.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:l1,render:e}};se.isValidElement=Dd;se.lazy=function(e){return{$$typeof:d1,_payload:{_status:-1,_result:e},_init:m1}};se.memo=function(e,t){return{$$typeof:u1,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=Wi.transition;Wi.transition={};try{e()}finally{Wi.transition=t}};se.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};se.useCallback=function(e,t){return lt.current.useCallback(e,t)};se.useContext=function(e){return lt.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return lt.current.useDeferredValue(e)};se.useEffect=function(e,t){return lt.current.useEffect(e,t)};se.useId=function(){return lt.current.useId()};se.useImperativeHandle=function(e,t,n){return lt.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return lt.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return lt.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return lt.current.useMemo(e,t)};se.useReducer=function(e,t,n){return lt.current.useReducer(e,t,n)};se.useRef=function(e){return lt.current.useRef(e)};se.useState=function(e){return lt.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return lt.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return lt.current.useTransition()};se.version="18.2.0";Dg.exports=se;var w=Dg.exports;const Re=Js(w),ba=t1({__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 v1=w,y1=Symbol.for("react.element"),x1=Symbol.for("react.fragment"),b1=Object.prototype.hasOwnProperty,w1=v1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S1={key:!0,ref:!0,__self:!0,__source:!0};function Hg(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)b1.call(t,r)&&!S1.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:y1,type:e,key:s,ref:i,props:o,_owner:w1.current}}hl.Fragment=x1;hl.jsx=Hg;hl.jsxs=Hg;Ag.exports=hl;var a=Ag.exports,yt={},Wg={exports:{}},kt={},Kg={exports:{}},Yg={};/**
17
+ */var v1=w,y1=Symbol.for("react.element"),x1=Symbol.for("react.fragment"),b1=Object.prototype.hasOwnProperty,w1=v1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S1={key:!0,ref:!0,__self:!0,__source:!0};function Hg(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)b1.call(t,r)&&!S1.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:y1,type:e,key:s,ref:i,props:o,_owner:w1.current}}hl.Fragment=x1;hl.jsx=Hg;hl.jsxs=Hg;Ag.exports=hl;var a=Ag.exports,bt={},Wg={exports:{}},Tt={},Kg={exports:{}},Yg={};/**
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(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,v=!1,x=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,y=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(v=!1,b(T),!g)if(n(c)!==null)g=!0,V(j);else{var U=n(u);U!==null&&X(S,U.startTime-T)}}function j(T,U){g=!1,v&&(v=!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 C=!1,_=null,E=-1,N=5,R=-1;function O(){return!(e.unstable_now()-R<N)}function k(){if(_!==null){var T=e.unstable_now();R=T;var U=!0;try{U=_(!0,T)}finally{U?P():(C=!1,_=null)}}else C=!1}var P;if(typeof y=="function")P=function(){y(k)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,D=A.port2;A.port1.onmessage=k,P=function(){D.postMessage(null)}}else P=function(){x(k,0)};function V(T){_=T,C||(C=!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(j))},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"):N=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)&&(v?(h(E),E=-1):v=!0,X(S,M-H))):(T.sortIndex=z,t(c,T),g||m||(g=!0,V(j))),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}}}})(Yg);Kg.exports=Yg;var j1=Kg.exports;/**
25
+ */(function(e){function t(T,L){var A=T.length;T.push(L);e:for(;0<A;){var H=A-1>>>1,B=T[H];if(0<o(B,L))T[H]=L,T[A]=B,A=H;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],A=T.pop();if(A!==L){T[0]=A;e:for(var H=0,B=T.length,X=B>>>1;H<X;){var J=2*(H+1)-1,ee=T[J],Q=J+1,te=T[Q];if(0>o(ee,A))Q<B&&0>o(te,ee)?(T[H]=te,T[Q]=A,H=Q):(T[H]=ee,T[J]=A,H=J);else if(Q<B&&0>o(te,A))T[H]=te,T[Q]=A,H=Q;else break e}}return L}function o(T,L){var A=T.sortIndex-L.sortIndex;return A!==0?A:T.id-L.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,x=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=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 L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=T)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function S(T){if(y=!1,b(T),!x)if(n(c)!==null)x=!0,V(j);else{var L=n(u);L!==null&&Z(S,L.startTime-T)}}function j(T,L){x=!1,y&&(y=!1,h(_),_=-1),m=!0;var A=p;try{for(b(L),f=n(c);f!==null&&(!(f.expirationTime>L)||T&&!O());){var H=f.callback;if(typeof H=="function"){f.callback=null,p=f.priorityLevel;var B=H(f.expirationTime<=L);L=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(L)}else r(c);f=n(c)}if(f!==null)var X=!0;else{var J=n(u);J!==null&&Z(S,J.startTime-L),X=!1}return X}finally{f=null,p=A,m=!1}}var C=!1,E=null,_=-1,N=5,R=-1;function O(){return!(e.unstable_now()-R<N)}function k(){if(E!==null){var T=e.unstable_now();R=T;var L=!0;try{L=E(!0,T)}finally{L?P():(C=!1,E=null)}}else C=!1}var P;if(typeof g=="function")P=function(){g(k)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,F=U.port2;U.port1.onmessage=k,P=function(){F.postMessage(null)}}else P=function(){v(k,0)};function V(T){E=T,C||(C=!0,P())}function Z(T,L){_=v(function(){T(e.unstable_now())},L)}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(){x||m||(x=!0,V(j))},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"):N=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 L=3;break;default:L=p}var A=p;p=L;try{return T()}finally{p=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var A=p;p=T;try{return L()}finally{p=A}},e.unstable_scheduleCallback=function(T,L,A){var H=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?H+A:H):A=H,T){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=A+B,T={id:d++,callback:L,priorityLevel:T,startTime:A,expirationTime:B,sortIndex:-1},A>H?(T.sortIndex=A,t(u,T),n(c)===null&&T===n(u)&&(y?(h(_),_=-1):y=!0,Z(S,A-H))):(T.sortIndex=B,t(c,T),x||m||(x=!0,V(j))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var L=p;return function(){var A=p;p=L;try{return T.apply(this,arguments)}finally{p=A}}}})(Yg);Kg.exports=Yg;var j1=Kg.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 Gg=w,Ct=j1;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 Qg=new Set,_s={};function Dr(e,t){vo(e,t),vo(e+"Capture",t)}function vo(e,t){for(_s[e]=t,e=0;e<t.length;e++)Qg.add(t[e])}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,C1=/^[: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 _1(e){return tu.call(Lp,e)?!0:tu.call(Fp,e)?!1:C1.test(e)?Lp[e]=!0:(Fp[e]=!0,!1)}function E1(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 R1(e,t,n,r){if(t===null||typeof t>"u"||E1(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 Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[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];Ge[t]=new it(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new it(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[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){Ge[e]=new it(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new it(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new it(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new it(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[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);Ge[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);Ge[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);Ge[t]=new it(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new it(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new it("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new it(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ud(e,t,n,r){var o=Ge.hasOwnProperty(t)?Ge[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R1(t,n,o,r)&&(n=null),r||o===null?_1(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 Fn=Gg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gi=Symbol.for("react.element"),Kr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),Vd=Symbol.for("react.strict_mode"),nu=Symbol.for("react.profiler"),Xg=Symbol.for("react.provider"),Zg=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"),Hn=Symbol.for("react.lazy"),Jg=Symbol.for("react.offscreen"),Up=Symbol.iterator;function qo(e){return e===null||typeof e!="object"?null:(e=Up&&e[Up]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,ic;function is(e){if(ic===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ic=t&&t[1]||""}return`
33
+ */var Gg=w,Et=j1;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 Qg=new Set,_s={};function Dr(e,t){xo(e,t),xo(e+"Capture",t)}function xo(e,t){for(_s[e]=t,e=0;e<t.length;e++)Qg.add(t[e])}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,C1=/^[: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 _1(e){return tu.call(Lp,e)?!0:tu.call(Fp,e)?!1:C1.test(e)?Lp[e]=!0:(Fp[e]=!0,!1)}function E1(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 R1(e,t,n,r){if(t===null||typeof t>"u"||E1(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 ct(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 Qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qe[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qe[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qe[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qe[e]=new ct(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){Qe[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qe[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qe[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qe[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qe[e]=new ct(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);Qe[t]=new ct(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);Qe[t]=new ct(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);Qe[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qe[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Qe.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qe[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ud(e,t,n,r){var o=Qe.hasOwnProperty(t)?Qe[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R1(t,n,o,r)&&(n=null),r||o===null?_1(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 Vn=Gg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gi=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Qr=Symbol.for("react.fragment"),Vd=Symbol.for("react.strict_mode"),nu=Symbol.for("react.profiler"),Xg=Symbol.for("react.provider"),Zg=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"),Jg=Symbol.for("react.offscreen"),Up=Symbol.iterator;function Wo(e){return e===null||typeof e!="object"?null:(e=Up&&e[Up]||e["@@iterator"],typeof e=="function"?e:null)}var ke=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
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{ac=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?is(e):""}function N1(e){switch(e.tag){case 5:return is(e.type);case 16:return is("Lazy");case 13:return is("Suspense");case 19:return is("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 Kr: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 Zg:return(e.displayName||"Context")+".Consumer";case Xg: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 Hn:t=e._payload,e=e._init;try{return su(e(t))}catch{}}return null}function k1(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 lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ev(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O1(e){var t=ev(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 vi(e){e._valueTracker||(e._valueTracker=O1(e))}function tv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ev(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 ke({},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=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 nv(e,t){t=t.checked,t!=null&&Ud(e,"checked",t,!1)}function au(e,t){nv(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")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(e,t.type,lr(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 as=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 cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return ke({},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(as(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 rv(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 qp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ov(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"?ov(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yi,sv=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(yi=yi||document.createElement("div"),yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ps={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},T1=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(e){T1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ps[t]=ps[e]})});function iv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ps.hasOwnProperty(e)&&ps[e]?(""+t).trim():t+"px"}function av(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=iv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var P1=ke({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(P1[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,ao=null,lo=null;function Hp(e){if(e=ri(e)){if(typeof hu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=xl(t),hu(e.stateNode,e.type,t))}}function lv(e){ao?lo?lo.push(e):lo=[e]:ao=e}function cv(){if(ao){var e=ao,t=lo;if(lo=ao=null,Hp(e),t)for(e=0;e<t.length;e++)Hp(t[e])}}function uv(e,t){return e(t)}function dv(){}var cc=!1;function fv(e,t,n){if(cc)return e(t,n);cc=!0;try{return uv(e,t,n)}finally{cc=!1,(ao!==null||lo!==null)&&(dv(),cv())}}function Rs(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(On)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{mu=!1}function I1(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 hs=!1,Sa=null,ja=!1,gu=null,$1={onError:function(e){hs=!0,Sa=e}};function M1(e,t,n,r,o,s,i,l,c){hs=!1,Sa=null,I1.apply($1,arguments)}function A1(e,t,n,r,o,s,i,l,c){if(M1.apply(this,arguments),hs){if(hs){var u=Sa;hs=!1,Sa=null}else throw Error(I(198));ja||(ja=!0,gu=u)}}function Fr(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 pv(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(Fr(e)!==e)throw Error(I(188))}function D1(e){var t=e.alternate;if(!t){if(t=Fr(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 hv(e){return e=D1(e),e!==null?mv(e):null}function mv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mv(e);if(t!==null)return t;e=e.sibling}return null}var gv=Ct.unstable_scheduleCallback,Kp=Ct.unstable_cancelCallback,F1=Ct.unstable_shouldYield,L1=Ct.unstable_requestPaint,Ie=Ct.unstable_now,U1=Ct.unstable_getCurrentPriorityLevel,Hd=Ct.unstable_ImmediatePriority,vv=Ct.unstable_UserBlockingPriority,Ca=Ct.unstable_NormalPriority,V1=Ct.unstable_LowPriority,yv=Ct.unstable_IdlePriority,ml=null,an=null;function z1(e){if(an&&typeof an.onCommitFiberRoot=="function")try{an.onCommitFiberRoot(ml,e,void 0,(e.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:H1,B1=Math.log,q1=Math.LN2;function H1(e){return e>>>=0,e===0?32:31-(B1(e)/q1|0)|0}var xi=64,bi=4194304;function ls(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=ls(l):(s&=i,s!==0&&(r=ls(s)))}else i=n&~o,i!==0?r=ls(i):s!==0&&(r=ls(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-Gt(t),o=1<<n,r|=e[n],t&=~o;return r}function W1(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 K1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Gt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=W1(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 xv(){var e=xi;return xi<<=1,!(xi&4194240)&&(xi=64),e}function uc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ti(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gt(t),e[t]=n}function Y1(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-Gt(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-Gt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ge=0;function bv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wv,Kd,Sv,jv,Cv,yu=!1,wi=[],er=null,tr=null,nr=null,Ns=new Map,ks=new Map,Yn=[],G1="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 Yp(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":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.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=ri(t),t!==null&&Kd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Q1(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 Ns.set(s,Wo(Ns.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,ks.set(s,Wo(ks.get(s)||null,e,t,n,r,o)),!0}return!1}function _v(e){var t=xr(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=pv(n),t!==null){e.blockedOn=t,Cv(e.priority,function(){Sv(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 Ki(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=ri(n),t!==null&&Kd(t),e.blockedOn=n,!1;t.shift()}return!0}function Gp(e,t,n){Ki(e)&&n.delete(t)}function X1(){yu=!1,er!==null&&Ki(er)&&(er=null),tr!==null&&Ki(tr)&&(tr=null),nr!==null&&Ki(nr)&&(nr=null),Ns.forEach(Gp),ks.forEach(Gp)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,yu||(yu=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,X1)))}function Os(e){function t(o){return Ko(o,e)}if(0<wi.length){Ko(wi[0],e);for(var n=1;n<wi.length;n++){var r=wi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Ko(er,e),tr!==null&&Ko(tr,e),nr!==null&&Ko(nr,e),Ns.forEach(t),ks.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);)_v(n),n.blockedOn===null&&Yn.shift()}var co=Fn.ReactCurrentBatchConfig,Ea=!0;function Z1(e,t,n,r){var o=ge,s=co.transition;co.transition=null;try{ge=1,Yd(e,t,n,r)}finally{ge=o,co.transition=s}}function J1(e,t,n,r){var o=ge,s=co.transition;co.transition=null;try{ge=4,Yd(e,t,n,r)}finally{ge=o,co.transition=s}}function Yd(e,t,n,r){if(Ea){var o=xu(e,t,n,r);if(o===null)bc(e,t,r,Ra,n),Yp(e,r);else if(Q1(o,e,t,n,r))r.stopPropagation();else if(Yp(e,r),t&4&&-1<G1.indexOf(e)){for(;o!==null;){var s=ri(o);if(s!==null&&wv(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=xr(e),e!==null)if(t=Fr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pv(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 Ev(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(U1()){case Hd:return 1;case vv:return 4;case Ca:case V1:return 16;case yv:return 536870912;default:return 16}default:return 16}}var Xn=null,Gd=null,Yi=null;function Rv(){if(Yi)return Yi;var e,t=Gd,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 Yi=o.slice(e,1<r?1-r:void 0)}function Gi(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 Si(){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)?Si:Qp,this.isPropagationStopped=Qp,this}return ke(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=Si)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Si)},persist:function(){},isPersistent:Si}),t}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qd=Ot(Ao),ni=ke({},Ao,{view:0,detail:0}),eS=Ot(ni),dc,fc,Yo,gl=ke({},ni,{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),tS=ke({},gl,{dataTransfer:0}),nS=Ot(tS),rS=ke({},ni,{relatedTarget:0}),pc=Ot(rS),oS=ke({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Ot(oS),iS=ke({},Ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),aS=Ot(iS),lS=ke({},Ao,{data:0}),Zp=Ot(lS),cS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uS={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"},dS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dS[e])?!!t[e]:!1}function Xd(){return fS}var pS=ke({},ni,{key:function(e){if(e.key){var t=cS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uS[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"?Gi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hS=Ot(pS),mS=ke({},gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jp=Ot(mS),gS=ke({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xd}),vS=Ot(gS),yS=ke({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),xS=Ot(yS),bS=ke({},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}),wS=Ot(bS),SS=[9,13,27,32],Zd=On&&"CompositionEvent"in window,ms=null;On&&"documentMode"in document&&(ms=document.documentMode);var jS=On&&"TextEvent"in window&&!ms,Nv=On&&(!Zd||ms&&8<ms&&11>=ms),eh=" ",th=!1;function kv(e,t){switch(e){case"keyup":return SS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ov(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gr=!1;function CS(e,t){switch(e){case"compositionend":return Ov(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 _S(e,t){if(Gr)return e==="compositionend"||!Zd&&kv(e,t)?(e=Rv(),Yi=Gd=Xn=null,Gr=!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 Nv&&t.locale!=="ko"?null:t.data;default:return null}}var ES={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"?!!ES[e.type]:t==="textarea"}function Tv(e,t,n,r){lv(r),t=Na(t,"onChange"),0<t.length&&(n=new Qd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,Ts=null;function RS(e){zv(e,0)}function vl(e){var t=Zr(e);if(tv(t))return e}function NS(e,t){if(e==="change")return t}var Pv=!1;if(On){var hc;if(On){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;Pv=hc&&(!document.documentMode||9<document.documentMode)}function oh(){gs&&(gs.detachEvent("onpropertychange",Iv),Ts=gs=null)}function Iv(e){if(e.propertyName==="value"&&vl(Ts)){var t=[];Tv(t,Ts,e,qd(e)),fv(RS,t)}}function kS(e,t,n){e==="focusin"?(oh(),gs=t,Ts=n,gs.attachEvent("onpropertychange",Iv)):e==="focusout"&&oh()}function OS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vl(Ts)}function TS(e,t){if(e==="click")return vl(t)}function PS(e,t){if(e==="input"||e==="change")return vl(t)}function IS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:IS;function Ps(e,t){if(Zt(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)||!Zt(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 $v(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$v(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mv(){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 $S(e){var t=Mv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$v(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 MS=On&&"documentMode"in document&&11>=document.documentMode,Qr=null,bu=null,vs=null,wu=!1;function ah(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||Qr==null||Qr!==wa(r)||(r=Qr,"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}),vs&&Ps(vs,r)||(vs=r,r=Na(bu,"onSelect"),0<r.length&&(t=new Qd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xr={animationend:ji("Animation","AnimationEnd"),animationiteration:ji("Animation","AnimationIteration"),animationstart:ji("Animation","AnimationStart"),transitionend:ji("Transition","TransitionEnd")},gc={},Av={};On&&(Av=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 yl(e){if(gc[e])return gc[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Av)return gc[e]=t[n];return e}var Dv=yl("animationend"),Fv=yl("animationiteration"),Lv=yl("animationstart"),Uv=yl("transitionend"),Vv=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 fr(e,t){Vv.set(e,t),Dr(t,[e])}for(var vc=0;vc<lh.length;vc++){var yc=lh[vc],AS=yc.toLowerCase(),DS=yc[0].toUpperCase()+yc.slice(1);fr(AS,"on"+DS)}fr(Dv,"onAnimationEnd");fr(Fv,"onAnimationIteration");fr(Lv,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Uv,"onTransitionEnd");vo("onMouseEnter",["mouseout","mouseover"]);vo("onMouseLeave",["mouseout","mouseover"]);vo("onPointerEnter",["pointerout","pointerover"]);vo("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="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(" "),FS=new Set("cancel close invalid load scroll toggle".split(" ").concat(cs));function ch(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,A1(r,t,void 0,e),e.currentTarget=null}function zv(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(ja)throw e=gu,ja=!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)||(Bv(t,e,2,!1),n.add(r))}function xc(e,t,n){var r=0;t&&(r|=4),Bv(n,e,r,t)}var Ci="_reactListening"+Math.random().toString(36).slice(2);function Is(e){if(!e[Ci]){e[Ci]=!0,Qg.forEach(function(n){n!=="selectionchange"&&(FS.has(n)||xc(n,!1,e),xc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ci]||(t[Ci]=!0,xc("selectionchange",!1,t))}}function Bv(e,t,n,r){switch(Ev(t)){case 1:var o=Z1;break;case 4:o=J1;break;default:o=Yd}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=xr(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}fv(function(){var u=s,d=qd(n),f=[];e:{var p=Vv.get(e);if(p!==void 0){var m=Qd,g=e;switch(e){case"keypress":if(Gi(n)===0)break e;case"keydown":case"keyup":m=hS;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=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=vS;break;case Dv:case Fv:case Lv:m=sS;break;case Uv:m=xS;break;case"scroll":m=eS;break;case"wheel":m=wS;break;case"copy":case"cut":case"paste":m=aS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Jp}var v=(t&4)!==0,x=!v&&e==="scroll",h=v?p!==null?p+"Capture":null:p;v=[];for(var y=u,b;y!==null;){b=y;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,h!==null&&(S=Rs(y,h),S!=null&&v.push($s(y,S,b)))),x)break;y=y.return}0<v.length&&(p=new m(p,g,null,n,d),f.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==pu&&(g=n.relatedTarget||n.fromElement)&&(xr(g)||g[Tn]))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?xr(g):null,g!==null&&(x=Fr(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(v=Xp,S="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=Jp,S="onPointerLeave",h="onPointerEnter",y="pointer"),x=m==null?p:Zr(m),b=g==null?p:Zr(g),p=new v(S,y+"leave",m,n,d),p.target=x,p.relatedTarget=b,S=null,xr(d)===u&&(v=new v(h,y+"enter",g,n,d),v.target=b,v.relatedTarget=x,S=v),x=S,m&&g)t:{for(v=m,h=g,y=0,b=v;b;b=zr(b))y++;for(b=0,S=h;S;S=zr(S))b++;for(;0<y-b;)v=zr(v),y--;for(;0<b-y;)h=zr(h),b--;for(;y--;){if(v===h||h!==null&&v===h.alternate)break t;v=zr(v),h=zr(h)}v=null}else v=null;m!==null&&uh(f,p,m,v,!1),g!==null&&x!==null&&uh(f,x,g,v,!0)}}e:{if(p=u?Zr(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var j=NS;else if(nh(p))if(Pv)j=PS;else{j=OS;var C=kS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=TS);if(j&&(j=j(e,u))){Tv(f,j,n,d);break e}C&&C(e,p,u),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&lu(p,"number",p.value)}switch(C=u?Zr(u):window,e){case"focusin":(nh(C)||C.contentEditable==="true")&&(Qr=C,bu=u,vs=null);break;case"focusout":vs=bu=Qr=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,ah(f,n,d);break;case"selectionchange":if(MS)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 Gr?kv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Nv&&n.locale!=="ko"&&(Gr||E!=="onCompositionStart"?E==="onCompositionEnd"&&Gr&&(_=Rv()):(Xn=d,Gd="value"in Xn?Xn.value:Xn.textContent,Gr=!0)),C=Na(u,E),0<C.length&&(E=new Zp(E,e,null,n,d),f.push({event:E,listeners:C}),_?E.data=_:(_=Ov(n),_!==null&&(E.data=_)))),(_=jS?CS(e,n):_S(e,n))&&(u=Na(u,"onBeforeInput"),0<u.length&&(d=new Zp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=_))}zv(f,t)})}function $s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Na(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Rs(e,n),s!=null&&r.unshift($s(e,s,o)),s=Rs(e,t),s!=null&&r.push($s(e,s,o))),e=e.return}return r}function zr(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=Rs(n,s),c!=null&&i.unshift($s(n,c,l))):o||(c=Rs(n,s),c!=null&&i.push($s(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var LS=/\r\n?/g,US=/\u0000|\uFFFD/g;function dh(e){return(typeof e=="string"?e:""+e).replace(LS,`
38
- `).replace(US,"")}function _i(e,t,n){if(t=dh(t),dh(e)!==t&&n)throw Error(I(425))}function ka(){}var Su=null,ju=null;function Cu(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,VS=typeof clearTimeout=="function"?clearTimeout:void 0,fh=typeof Promise=="function"?Promise:void 0,zS=typeof queueMicrotask=="function"?queueMicrotask:typeof fh<"u"?function(e){return fh.resolve(null).then(e).catch(BS)}:_u;function BS(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),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Os(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 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 Do=Math.random().toString(36).slice(2),sn="__reactFiber$"+Do,Ms="__reactProps$"+Do,Tn="__reactContainer$"+Do,Eu="__reactEvents$"+Do,qS="__reactListeners$"+Do,HS="__reactHandles$"+Do;function xr(e){var t=e[sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tn]||n[sn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ph(e);e!==null;){if(n=e[sn])return n;e=ph(e)}return t}e=n,n=e.parentNode}return null}function ri(e){return e=e[sn]||e[Tn],!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 xl(e){return e[Ms]||null}var Ru=[],Jr=-1;function pr(e){return{current:e}}function we(e){0>Jr||(e.current=Ru[Jr],Ru[Jr]=null,Jr--)}function xe(e,t){Jr++,Ru[Jr]=e.current,e.current=t}var cr={},et=pr(cr),ft=pr(!1),Nr=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 Oa(){we(ft),we(et)}function hh(e,t,n){if(et.current!==cr)throw Error(I(168));xe(et,t),xe(ft,n)}function qv(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,k1(e)||"Unknown",o));return ke({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,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=qv(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,we(ft),we(et),xe(et,e)):we(ft),xe(ft,n)}var bn=null,bl=!1,Sc=!1;function Hv(e){bn===null?bn=[e]:bn.push(e)}function WS(e){bl=!0,Hv(e)}function hr(){if(!Sc&&bn!==null){Sc=!0;var e=0,t=ge;try{var n=bn;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}bn=null,bl=!1}catch(o){throw bn!==null&&(bn=bn.slice(e+1)),gv(Hd,hr),o}finally{ge=t,Sc=!1}}return null}var eo=[],to=0,Pa=null,Ia=0,$t=[],Mt=0,kr=null,jn=1,Cn="";function gr(e,t){eo[to++]=Ia,eo[to++]=Pa,Pa=e,Ia=t}function Wv(e,t,n){$t[Mt++]=jn,$t[Mt++]=Cn,$t[Mt++]=kr,kr=e;var r=jn;e=Cn;var o=32-Gt(r)-1;r&=~(1<<o),n+=1;var s=32-Gt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jn=1<<32-Gt(t)+o|n<<o|r,Cn=s+e}else jn=1<<s|n<<o|r,Cn=e}function ef(e){e.return!==null&&(gr(e,1),Wv(e,1,0))}function tf(e){for(;e===Pa;)Pa=eo[--to],eo[to]=null,Ia=eo[--to],eo[to]=null;for(;e===kr;)kr=$t[--Mt],$t[Mt]=null,Cn=$t[--Mt],$t[Mt]=null,jn=$t[--Mt],$t[Mt]=null}var St=null,wt=null,je=!1,Kt=null;function Kv(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=rr(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=kr!==null?{id:jn,overflow:Cn}: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 Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ku(e){if(je){var t=wt;if(t){var n=t;if(!gh(e,t)){if(Nu(e))throw Error(I(418));t=rr(n.nextSibling);var r=St;t&&gh(e,t)?Kv(r,n):(e.flags=e.flags&-4097|2,je=!1,St=e)}}else{if(Nu(e))throw Error(I(418));e.flags=e.flags&-4097|2,je=!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 Ei(e){if(e!==St)return!1;if(!je)return vh(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=wt)){if(Nu(e))throw Yv(),Error(I(418));for(;t;)Kv(e,t),t=rr(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=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=St?rr(e.stateNode.nextSibling):null;return!0}function Yv(){for(var e=wt;e;)e=rr(e.nextSibling)}function xo(){wt=St=null,je=!1}function nf(e){Kt===null?Kt=[e]:Kt.push(e)}var KS=Fn.ReactCurrentBatchConfig;function Ht(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var $a=pr(null),Ma=null,no=null,rf=null;function of(){rf=no=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 uo(e,t){Ma=e,rf=no=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},no===null){if(Ma===null)throw Error(I(308));no=e,Ma.dependencies={lanes:0,firstContext:e}}else no=no.next=e;return t}var br=null;function af(e){br===null?br=[e]:br.push(e)}function Gv(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,Pn(e,r)}function Pn(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 lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qv(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 En(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,ue&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Pn(e,n)}return o=r.interleaved,o===null?(t.next=t,af(r)):(t.next=o.next,o.next=t),r.interleaved=t,Pn(e,n)}function Qi(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;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,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,v=l;switch(p=t,m=n,v.tag){case 1:if(g=v.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=v.payload,p=typeof g=="function"?g.call(m,f,p):g,p==null)break e;f=ke({},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 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);Tr|=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 Xv=new Gg.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Fr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),o=ir(e),s=En(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Qt(t,e,o,r),Qi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ot(),o=ir(e),s=En(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Qt(t,e,o,r),Qi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ot(),r=ir(e),o=En(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Qt(t,e,r,n),Qi(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?!Ps(n,r)||!Ps(o,s):!0}function Zv(e,t,n){var r=!1,o=cr,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)?yo(e,o):cr),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=Xv,lf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Lt(s):(s=pt(t)?Nr:et.current,o.context=yo(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 Go(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===Xv&&(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 Ri(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 Jv(e){function t(h,y){if(e){var b=h.deletions;b===null?(h.deletions=[y],h.flags|=16):b.push(y)}}function n(h,y){if(!e)return null;for(;y!==null;)t(h,y),y=y.sibling;return null}function r(h,y){for(h=new Map;y!==null;)y.key!==null?h.set(y.key,y):h.set(y.index,y),y=y.sibling;return h}function o(h,y){return h=ar(h,y),h.index=0,h.sibling=null,h}function s(h,y,b){return h.index=b,e?(b=h.alternate,b!==null?(b=b.index,b<y?(h.flags|=2,y):b):(h.flags|=2,y)):(h.flags|=1048576,y)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,y,b,S){return y===null||y.tag!==6?(y=kc(b,h.mode,S),y.return=h,y):(y=o(y,b),y.return=h,y)}function c(h,y,b,S){var j=b.type;return j===Yr?d(h,y,b.props.children,S,b.key):y!==null&&(y.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Hn&&Sh(j)===y.type)?(S=o(y,b.props),S.ref=Go(h,y,b),S.return=h,S):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Go(h,y,b),S.return=h,S)}function u(h,y,b,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=Oc(b,h.mode,S),y.return=h,y):(y=o(y,b.children||[]),y.return=h,y)}function d(h,y,b,S,j){return y===null||y.tag!==7?(y=Cr(b,h.mode,S,j),y.return=h,y):(y=o(y,b),y.return=h,y)}function f(h,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=kc(""+y,h.mode,b),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case gi:return b=na(y.type,y.key,y.props,null,h.mode,b),b.ref=Go(h,null,y),b.return=h,b;case Kr:return y=Oc(y,h.mode,b),y.return=h,y;case Hn:var S=y._init;return f(h,S(y._payload),b)}if(as(y)||qo(y))return y=Cr(y,h.mode,b,null),y.return=h,y;Ri(h,y)}return null}function p(h,y,b,S){var j=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(h,y,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gi:return b.key===j?c(h,y,b,S):null;case Kr:return b.key===j?u(h,y,b,S):null;case Hn:return j=b._init,p(h,y,j(b._payload),S)}if(as(b)||qo(b))return j!==null?null:d(h,y,b,S,null);Ri(h,b)}return null}function m(h,y,b,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(b)||null,l(y,h,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case gi:return h=h.get(S.key===null?b:S.key)||null,c(y,h,S,j);case Kr:return h=h.get(S.key===null?b:S.key)||null,u(y,h,S,j);case Hn:var C=S._init;return m(h,y,b,C(S._payload),j)}if(as(S)||qo(S))return h=h.get(b)||null,d(y,h,S,j,null);Ri(y,S)}return null}function g(h,y,b,S){for(var j=null,C=null,_=y,E=y=0,N=null;_!==null&&E<b.length;E++){_.index>E?(N=_,_=null):N=_.sibling;var R=p(h,_,b[E],S);if(R===null){_===null&&(_=N);break}e&&_&&R.alternate===null&&t(h,_),y=s(R,y,E),C===null?j=R:C.sibling=R,C=R,_=N}if(E===b.length)return n(h,_),je&&gr(h,E),j;if(_===null){for(;E<b.length;E++)_=f(h,b[E],S),_!==null&&(y=s(_,y,E),C===null?j=_:C.sibling=_,C=_);return je&&gr(h,E),j}for(_=r(h,_);E<b.length;E++)N=m(_,h,E,b[E],S),N!==null&&(e&&N.alternate!==null&&_.delete(N.key===null?E:N.key),y=s(N,y,E),C===null?j=N:C.sibling=N,C=N);return e&&_.forEach(function(O){return t(h,O)}),je&&gr(h,E),j}function v(h,y,b,S){var j=qo(b);if(typeof j!="function")throw Error(I(150));if(b=j.call(b),b==null)throw Error(I(151));for(var C=j=null,_=y,E=y=0,N=null,R=b.next();_!==null&&!R.done;E++,R=b.next()){_.index>E?(N=_,_=null):N=_.sibling;var O=p(h,_,R.value,S);if(O===null){_===null&&(_=N);break}e&&_&&O.alternate===null&&t(h,_),y=s(O,y,E),C===null?j=O:C.sibling=O,C=O,_=N}if(R.done)return n(h,_),je&&gr(h,E),j;if(_===null){for(;!R.done;E++,R=b.next())R=f(h,R.value,S),R!==null&&(y=s(R,y,E),C===null?j=R:C.sibling=R,C=R);return je&&gr(h,E),j}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),y=s(R,y,E),C===null?j=R:C.sibling=R,C=R);return e&&_.forEach(function(k){return t(h,k)}),je&&gr(h,E),j}function x(h,y,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 gi:e:{for(var j=b.key,C=y;C!==null;){if(C.key===j){if(j=b.type,j===Yr){if(C.tag===7){n(h,C.sibling),y=o(C,b.props.children),y.return=h,h=y;break e}}else if(C.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Hn&&Sh(j)===C.type){n(h,C.sibling),y=o(C,b.props),y.ref=Go(h,C,b),y.return=h,h=y;break e}n(h,C);break}else t(h,C);C=C.sibling}b.type===Yr?(y=Cr(b.props.children,h.mode,S,b.key),y.return=h,h=y):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Go(h,y,b),S.return=h,h=S)}return i(h);case Kr:e:{for(C=b.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(h,y.sibling),y=o(y,b.children||[]),y.return=h,h=y;break e}else{n(h,y);break}else t(h,y);y=y.sibling}y=Oc(b,h.mode,S),y.return=h,h=y}return i(h);case Hn:return C=b._init,x(h,y,C(b._payload),S)}if(as(b))return g(h,y,b,S);if(qo(b))return v(h,y,b,S);Ri(h,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(h,y.sibling),y=o(y,b),y.return=h,h=y):(n(h,y),y=kc(b,h.mode,S),y.return=h,h=y),i(h)):n(h,y)}return x}var bo=Jv(!0),ey=Jv(!1),oi={},ln=pr(oi),As=pr(oi),Ds=pr(oi);function wr(e){if(e===oi)throw Error(I(174));return e}function cf(e,t){switch(xe(Ds,t),xe(As,e),xe(ln,oi),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(ln),xe(ln,t)}function wo(){we(ln),we(As),we(Ds)}function ty(e){wr(Ds.current);var t=wr(ln.current),n=uu(t,e.type);t!==n&&(xe(As,e),xe(ln,n))}function uf(e){As.current===e&&(we(ln),we(As))}var Ee=pr(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 jc=[];function df(){for(var e=0;e<jc.length;e++)jc[e]._workInProgressVersionPrimary=null;jc.length=0}var Xi=Fn.ReactCurrentDispatcher,Cc=Fn.ReactCurrentBatchConfig,Or=0,Ne=null,De=null,ze=null,Fa=!1,ys=!1,Fs=0,YS=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(!Zt(e[n],t[n]))return!1;return!0}function pf(e,t,n,r,o,s){if(Or=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?ZS:JS,e=n(r,o),ys){s=0;do{if(ys=!1,Fs=0,25<=s)throw Error(I(301));s+=1,ze=De=null,t.updateQueue=null,Xi.current=ej,e=n(r,o)}while(ys)}if(Xi.current=La,t=De!==null&&De.next!==null,Or=0,ze=De=Ne=null,Fa=!1,t)throw Error(I(300));return e}function hf(){var e=Fs!==0;return Fs=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?Ne.memoizedState=ze=e:ze=ze.next=e,ze}function Ut(){if(De===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=ze===null?Ne.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?Ne.memoizedState=ze=e:ze=ze.next=e}return ze}function Ls(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((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,Ne.lanes|=d,Tr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,Zt(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,Ne.lanes|=s,Tr|=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);Zt(s,t.memoizedState)||(dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ny(){}function ry(e,t){var n=Ne,r=Ut(),o=t(),s=!Zt(r.memoizedState,o);if(s&&(r.memoizedState=o,dt=!0),r=r.queue,mf(iy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,Us(9,sy.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Or&30||oy(n,t,o)}return o}function oy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sy(e,t,n,r){t.value=n,t.getSnapshot=r,ay(t)&&ly(e)}function iy(e,t,n){return n(function(){ay(t)&&ly(e)})}function ay(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zt(e,n)}catch{return!0}}function ly(e){var t=Pn(e,1);t!==null&&Qt(t,e,1,-1)}function jh(e){var t=tn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:e},t.queue=e,e=e.dispatch=XS.bind(null,Ne,e),[t.memoizedState,e]}function Us(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 cy(){return Ut().memoizedState}function Zi(e,t,n,r){var o=tn();Ne.flags|=e,o.memoizedState=Us(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=Us(t,n,s,r);return}}Ne.flags|=e,o.memoizedState=Us(1|t,n,s,r)}function Ch(e,t){return Zi(8390656,8,e,t)}function mf(e,t){return Sl(2048,8,e,t)}function uy(e,t){return Sl(4,2,e,t)}function dy(e,t){return Sl(4,4,e,t)}function fy(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 py(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4,4,fy.bind(null,t,e),n)}function gf(){}function hy(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 my(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 gy(e,t,n){return Or&21?(Zt(n,t)||(n=xv(),Ne.lanes|=n,Tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=n)}function GS(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Cc.transition;Cc.transition={};try{e(!1),t()}finally{ge=n,Cc.transition=r}}function vy(){return Ut().memoizedState}function QS(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yy(e))xy(t,n);else if(n=Gv(e,t,n,r),n!==null){var o=ot();Qt(n,e,r,o),by(n,t,r)}}function XS(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yy(e))xy(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,Zt(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=Gv(e,t,o,r),n!==null&&(o=ot(),Qt(n,e,r,o),by(n,t,r))}}function yy(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function xy(e,t){ys=Fa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function by(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},ZS={readContext:Lt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Ch,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zi(4194308,4,fy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zi(4,2,e,t)},useMemo:function(e,t){var n=tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tn();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=QS.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:jh,useDebugValue:gf,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=jh(!1),t=e[0];return e=GS.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=tn();if(je){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Or&30||oy(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Ch(iy.bind(null,r,s,e),[e]),r.flags|=2048,Us(9,sy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=tn(),t=Be.identifierPrefix;if(je){var n=Cn,r=jn;n=(r&~(1<<32-Gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=YS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},JS={readContext:Lt,useCallback:hy,useContext:Lt,useEffect:mf,useImperativeHandle:py,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:my,useReducer:_c,useRef:cy,useState:function(){return _c(Ls)},useDebugValue:gf,useDeferredValue:function(e){var t=Ut();return gy(t,De.memoizedState,e)},useTransition:function(){var e=_c(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ny,useSyncExternalStore:ry,useId:vy,unstable_isNewReconciler:!1},ej={readContext:Lt,useCallback:hy,useContext:Lt,useEffect:mf,useImperativeHandle:py,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:my,useReducer:Ec,useRef:cy,useState:function(){return Ec(Ls)},useDebugValue:gf,useDeferredValue:function(e){var t=Ut();return De===null?t.memoizedState=e:gy(t,De.memoizedState,e)},useTransition:function(){var e=Ec(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ny,useSyncExternalStore:ry,useId:vy,unstable_isNewReconciler:!1};function So(e,t){try{var n="",r=t;do n+=N1(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 N1(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 Qr: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 Zg:return(e.displayName||"Context")+".Consumer";case Xg: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 k1(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 lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ev(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O1(e){var t=ev(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 vi(e){e._valueTracker||(e._valueTracker=O1(e))}function tv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ev(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 ke({},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=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 nv(e,t){t=t.checked,t!=null&&Ud(e,"checked",t,!1)}function au(e,t){nv(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")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(e,t.type,lr(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 lo(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 cu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return ke({},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:lr(n)}}function rv(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 qp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ov(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"?ov(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yi,sv=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(yi=yi||document.createElement("div"),yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ps={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},T1=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(e){T1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ps[t]=ps[e]})});function iv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ps.hasOwnProperty(e)&&ps[e]?(""+t).trim():t+"px"}function av(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=iv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var P1=ke({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(P1[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,co=null,uo=null;function Hp(e){if(e=ri(e)){if(typeof hu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=xl(t),hu(e.stateNode,e.type,t))}}function lv(e){co?uo?uo.push(e):uo=[e]:co=e}function cv(){if(co){var e=co,t=uo;if(uo=co=null,Hp(e),t)for(e=0;e<t.length;e++)Hp(t[e])}}function uv(e,t){return e(t)}function dv(){}var cc=!1;function fv(e,t,n){if(cc)return e(t,n);cc=!0;try{return uv(e,t,n)}finally{cc=!1,(co!==null||uo!==null)&&(dv(),cv())}}function Rs(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(In)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{mu=!1}function I1(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 hs=!1,Sa=null,ja=!1,gu=null,$1={onError:function(e){hs=!0,Sa=e}};function M1(e,t,n,r,o,s,i,l,c){hs=!1,Sa=null,I1.apply($1,arguments)}function A1(e,t,n,r,o,s,i,l,c){if(M1.apply(this,arguments),hs){if(hs){var u=Sa;hs=!1,Sa=null}else throw Error(I(198));ja||(ja=!0,gu=u)}}function Fr(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 pv(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(Fr(e)!==e)throw Error(I(188))}function D1(e){var t=e.alternate;if(!t){if(t=Fr(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 hv(e){return e=D1(e),e!==null?mv(e):null}function mv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mv(e);if(t!==null)return t;e=e.sibling}return null}var gv=Et.unstable_scheduleCallback,Kp=Et.unstable_cancelCallback,F1=Et.unstable_shouldYield,L1=Et.unstable_requestPaint,$e=Et.unstable_now,U1=Et.unstable_getCurrentPriorityLevel,Hd=Et.unstable_ImmediatePriority,vv=Et.unstable_UserBlockingPriority,Ca=Et.unstable_NormalPriority,V1=Et.unstable_LowPriority,yv=Et.unstable_IdlePriority,ml=null,cn=null;function z1(e){if(cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(ml,e,void 0,(e.current.flags&128)===128)}catch{}}var Xt=Math.clz32?Math.clz32:H1,B1=Math.log,q1=Math.LN2;function H1(e){return e>>>=0,e===0?32:31-(B1(e)/q1|0)|0}var xi=64,bi=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-Xt(t),o=1<<n,r|=e[n],t&=~o;return r}function W1(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 K1(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]=W1(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 xv(){var e=xi;return xi<<=1,!(xi&4194240)&&(xi=64),e}function uc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ti(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 Y1(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 Wd(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 ve=0;function bv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wv,Kd,Sv,jv,Cv,yu=!1,wi=[],er=null,tr=null,nr=null,Ns=new Map,ks=new Map,Gn=[],G1="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 Yp(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":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.delete(t.pointerId)}}function Yo(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=ri(t),t!==null&&Kd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Q1(e,t,n,r,o){switch(t){case"focusin":return er=Yo(er,e,t,n,r,o),!0;case"dragenter":return tr=Yo(tr,e,t,n,r,o),!0;case"mouseover":return nr=Yo(nr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ns.set(s,Yo(Ns.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,ks.set(s,Yo(ks.get(s)||null,e,t,n,r,o)),!0}return!1}function _v(e){var t=xr(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=pv(n),t!==null){e.blockedOn=t,Cv(e.priority,function(){Sv(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 Ki(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=ri(n),t!==null&&Kd(t),e.blockedOn=n,!1;t.shift()}return!0}function Gp(e,t,n){Ki(e)&&n.delete(t)}function X1(){yu=!1,er!==null&&Ki(er)&&(er=null),tr!==null&&Ki(tr)&&(tr=null),nr!==null&&Ki(nr)&&(nr=null),Ns.forEach(Gp),ks.forEach(Gp)}function Go(e,t){e.blockedOn===t&&(e.blockedOn=null,yu||(yu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,X1)))}function Os(e){function t(o){return Go(o,e)}if(0<wi.length){Go(wi[0],e);for(var n=1;n<wi.length;n++){var r=wi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Go(er,e),tr!==null&&Go(tr,e),nr!==null&&Go(nr,e),Ns.forEach(t),ks.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);)_v(n),n.blockedOn===null&&Gn.shift()}var fo=Vn.ReactCurrentBatchConfig,Ea=!0;function Z1(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=1,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function J1(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=4,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function Yd(e,t,n,r){if(Ea){var o=xu(e,t,n,r);if(o===null)bc(e,t,r,Ra,n),Yp(e,r);else if(Q1(o,e,t,n,r))r.stopPropagation();else if(Yp(e,r),t&4&&-1<G1.indexOf(e)){for(;o!==null;){var s=ri(o);if(s!==null&&wv(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=xr(e),e!==null)if(t=Fr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pv(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 Ev(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(U1()){case Hd:return 1;case vv:return 4;case Ca:case V1:return 16;case yv:return 536870912;default:return 16}default:return 16}}var Zn=null,Gd=null,Yi=null;function Rv(){if(Yi)return Yi;var e,t=Gd,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 Gi(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 Si(){return!0}function Qp(){return!1}function Pt(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)?Si:Qp,this.isPropagationStopped=Qp,this}return ke(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=Si)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Si)},persist:function(){},isPersistent:Si}),t}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qd=Pt(Fo),ni=ke({},Fo,{view:0,detail:0}),eS=Pt(ni),dc,fc,Qo,gl=ke({},ni,{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!==Qo&&(Qo&&e.type==="mousemove"?(dc=e.screenX-Qo.screenX,fc=e.screenY-Qo.screenY):fc=dc=0,Qo=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),Xp=Pt(gl),tS=ke({},gl,{dataTransfer:0}),nS=Pt(tS),rS=ke({},ni,{relatedTarget:0}),pc=Pt(rS),oS=ke({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Pt(oS),iS=ke({},Fo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),aS=Pt(iS),lS=ke({},Fo,{data:0}),Zp=Pt(lS),cS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uS={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"},dS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dS[e])?!!t[e]:!1}function Xd(){return fS}var pS=ke({},ni,{key:function(e){if(e.key){var t=cS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uS[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"?Gi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hS=Pt(pS),mS=ke({},gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jp=Pt(mS),gS=ke({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xd}),vS=Pt(gS),yS=ke({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),xS=Pt(yS),bS=ke({},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}),wS=Pt(bS),SS=[9,13,27,32],Zd=In&&"CompositionEvent"in window,ms=null;In&&"documentMode"in document&&(ms=document.documentMode);var jS=In&&"TextEvent"in window&&!ms,Nv=In&&(!Zd||ms&&8<ms&&11>=ms),eh=" ",th=!1;function kv(e,t){switch(e){case"keyup":return SS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ov(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function CS(e,t){switch(e){case"compositionend":return Ov(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 _S(e,t){if(Xr)return e==="compositionend"||!Zd&&kv(e,t)?(e=Rv(),Yi=Gd=Zn=null,Xr=!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 Nv&&t.locale!=="ko"?null:t.data;default:return null}}var ES={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"?!!ES[e.type]:t==="textarea"}function Tv(e,t,n,r){lv(r),t=Na(t,"onChange"),0<t.length&&(n=new Qd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,Ts=null;function RS(e){zv(e,0)}function vl(e){var t=eo(e);if(tv(t))return e}function NS(e,t){if(e==="change")return t}var Pv=!1;if(In){var hc;if(In){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;Pv=hc&&(!document.documentMode||9<document.documentMode)}function oh(){gs&&(gs.detachEvent("onpropertychange",Iv),Ts=gs=null)}function Iv(e){if(e.propertyName==="value"&&vl(Ts)){var t=[];Tv(t,Ts,e,qd(e)),fv(RS,t)}}function kS(e,t,n){e==="focusin"?(oh(),gs=t,Ts=n,gs.attachEvent("onpropertychange",Iv)):e==="focusout"&&oh()}function OS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vl(Ts)}function TS(e,t){if(e==="click")return vl(t)}function PS(e,t){if(e==="input"||e==="change")return vl(t)}function IS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:IS;function Ps(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(!tu.call(t,o)||!en(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 $v(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$v(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mv(){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 $S(e){var t=Mv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&$v(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 MS=In&&"documentMode"in document&&11>=document.documentMode,Zr=null,bu=null,vs=null,wu=!1;function ah(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||Zr==null||Zr!==wa(r)||(r=Zr,"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}),vs&&Ps(vs,r)||(vs=r,r=Na(bu,"onSelect"),0<r.length&&(t=new Qd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Jr={animationend:ji("Animation","AnimationEnd"),animationiteration:ji("Animation","AnimationIteration"),animationstart:ji("Animation","AnimationStart"),transitionend:ji("Transition","TransitionEnd")},gc={},Av={};In&&(Av=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function yl(e){if(gc[e])return gc[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Av)return gc[e]=t[n];return e}var Dv=yl("animationend"),Fv=yl("animationiteration"),Lv=yl("animationstart"),Uv=yl("transitionend"),Vv=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 fr(e,t){Vv.set(e,t),Dr(t,[e])}for(var vc=0;vc<lh.length;vc++){var yc=lh[vc],AS=yc.toLowerCase(),DS=yc[0].toUpperCase()+yc.slice(1);fr(AS,"on"+DS)}fr(Dv,"onAnimationEnd");fr(Fv,"onAnimationIteration");fr(Lv,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Uv,"onTransitionEnd");xo("onMouseEnter",["mouseout","mouseover"]);xo("onMouseLeave",["mouseout","mouseover"]);xo("onPointerEnter",["pointerout","pointerover"]);xo("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("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(" "),FS=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,A1(r,t,void 0,e),e.currentTarget=null}function zv(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(ja)throw e=gu,ja=!1,gu=null,e}function we(e,t){var n=t[Eu];n===void 0&&(n=t[Eu]=new Set);var r=e+"__bubble";n.has(r)||(Bv(t,e,2,!1),n.add(r))}function xc(e,t,n){var r=0;t&&(r|=4),Bv(n,e,r,t)}var Ci="_reactListening"+Math.random().toString(36).slice(2);function Is(e){if(!e[Ci]){e[Ci]=!0,Qg.forEach(function(n){n!=="selectionchange"&&(FS.has(n)||xc(n,!1,e),xc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ci]||(t[Ci]=!0,xc("selectionchange",!1,t))}}function Bv(e,t,n,r){switch(Ev(t)){case 1:var o=Z1;break;case 4:o=J1;break;default:o=Yd}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=xr(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}fv(function(){var u=s,d=qd(n),f=[];e:{var p=Vv.get(e);if(p!==void 0){var m=Qd,x=e;switch(e){case"keypress":if(Gi(n)===0)break e;case"keydown":case"keyup":m=hS;break;case"focusin":x="focus",m=pc;break;case"focusout":x="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=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=vS;break;case Dv:case Fv:case Lv:m=sS;break;case Uv:m=xS;break;case"scroll":m=eS;break;case"wheel":m=wS;break;case"copy":case"cut":case"paste":m=aS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Jp}var y=(t&4)!==0,v=!y&&e==="scroll",h=y?p!==null?p+"Capture":null:p;y=[];for(var g=u,b;g!==null;){b=g;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,h!==null&&(S=Rs(g,h),S!=null&&y.push($s(g,S,b)))),v)break;g=g.return}0<y.length&&(p=new m(p,x,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&&(x=n.relatedTarget||n.fromElement)&&(xr(x)||x[$n]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?xr(x):null,x!==null&&(v=Fr(x),x!==v||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(y=Xp,S="onMouseLeave",h="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=Jp,S="onPointerLeave",h="onPointerEnter",g="pointer"),v=m==null?p:eo(m),b=x==null?p:eo(x),p=new y(S,g+"leave",m,n,d),p.target=v,p.relatedTarget=b,S=null,xr(d)===u&&(y=new y(h,g+"enter",x,n,d),y.target=b,y.relatedTarget=v,S=y),v=S,m&&x)t:{for(y=m,h=x,g=0,b=y;b;b=zr(b))g++;for(b=0,S=h;S;S=zr(S))b++;for(;0<g-b;)y=zr(y),g--;for(;0<b-g;)h=zr(h),b--;for(;g--;){if(y===h||h!==null&&y===h.alternate)break t;y=zr(y),h=zr(h)}y=null}else y=null;m!==null&&uh(f,p,m,y,!1),x!==null&&v!==null&&uh(f,v,x,y,!0)}}e:{if(p=u?eo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var j=NS;else if(nh(p))if(Pv)j=PS;else{j=OS;var C=kS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=TS);if(j&&(j=j(e,u))){Tv(f,j,n,d);break e}C&&C(e,p,u),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&lu(p,"number",p.value)}switch(C=u?eo(u):window,e){case"focusin":(nh(C)||C.contentEditable==="true")&&(Zr=C,bu=u,vs=null);break;case"focusout":vs=bu=Zr=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,ah(f,n,d);break;case"selectionchange":if(MS)break;case"keydown":case"keyup":ah(f,n,d)}var E;if(Zd)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Xr?kv(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Nv&&n.locale!=="ko"&&(Xr||_!=="onCompositionStart"?_==="onCompositionEnd"&&Xr&&(E=Rv()):(Zn=d,Gd="value"in Zn?Zn.value:Zn.textContent,Xr=!0)),C=Na(u,_),0<C.length&&(_=new Zp(_,e,null,n,d),f.push({event:_,listeners:C}),E?_.data=E:(E=Ov(n),E!==null&&(_.data=E)))),(E=jS?CS(e,n):_S(e,n))&&(u=Na(u,"onBeforeInput"),0<u.length&&(d=new Zp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}zv(f,t)})}function $s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Na(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Rs(e,n),s!=null&&r.unshift($s(e,s,o)),s=Rs(e,t),s!=null&&r.push($s(e,s,o))),e=e.return}return r}function zr(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=Rs(n,s),c!=null&&i.unshift($s(n,c,l))):o||(c=Rs(n,s),c!=null&&i.push($s(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var LS=/\r\n?/g,US=/\u0000|\uFFFD/g;function dh(e){return(typeof e=="string"?e:""+e).replace(LS,`
38
+ `).replace(US,"")}function _i(e,t,n){if(t=dh(t),dh(e)!==t&&n)throw Error(I(425))}function ka(){}var Su=null,ju=null;function Cu(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,VS=typeof clearTimeout=="function"?clearTimeout:void 0,fh=typeof Promise=="function"?Promise:void 0,zS=typeof queueMicrotask=="function"?queueMicrotask:typeof fh<"u"?function(e){return fh.resolve(null).then(e).catch(BS)}:_u;function BS(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),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Os(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 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 Lo=Math.random().toString(36).slice(2),ln="__reactFiber$"+Lo,Ms="__reactProps$"+Lo,$n="__reactContainer$"+Lo,Eu="__reactEvents$"+Lo,qS="__reactListeners$"+Lo,HS="__reactHandles$"+Lo;function xr(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$n]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ph(e);e!==null;){if(n=e[ln])return n;e=ph(e)}return t}e=n,n=e.parentNode}return null}function ri(e){return e=e[ln]||e[$n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function eo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function xl(e){return e[Ms]||null}var Ru=[],to=-1;function pr(e){return{current:e}}function je(e){0>to||(e.current=Ru[to],Ru[to]=null,to--)}function xe(e,t){to++,Ru[to]=e.current,e.current=t}var cr={},nt=pr(cr),ht=pr(!1),Nr=cr;function bo(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 mt(e){return e=e.childContextTypes,e!=null}function Oa(){je(ht),je(nt)}function hh(e,t,n){if(nt.current!==cr)throw Error(I(168));xe(nt,t),xe(ht,n)}function qv(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,k1(e)||"Unknown",o));return ke({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Nr=nt.current,xe(nt,e),xe(ht,ht.current),!0}function mh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=qv(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,je(ht),je(nt),xe(nt,e)):je(ht),xe(ht,n)}var Sn=null,bl=!1,Sc=!1;function Hv(e){Sn===null?Sn=[e]:Sn.push(e)}function WS(e){bl=!0,Hv(e)}function hr(){if(!Sc&&Sn!==null){Sc=!0;var e=0,t=ve;try{var n=Sn;for(ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sn=null,bl=!1}catch(o){throw Sn!==null&&(Sn=Sn.slice(e+1)),gv(Hd,hr),o}finally{ve=t,Sc=!1}}return null}var no=[],ro=0,Pa=null,Ia=0,Mt=[],At=0,kr=null,En=1,Rn="";function gr(e,t){no[ro++]=Ia,no[ro++]=Pa,Pa=e,Ia=t}function Wv(e,t,n){Mt[At++]=En,Mt[At++]=Rn,Mt[At++]=kr,kr=e;var r=En;e=Rn;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,En=1<<32-Xt(t)+o|n<<o|r,Rn=s+e}else En=1<<s|n<<o|r,Rn=e}function ef(e){e.return!==null&&(gr(e,1),Wv(e,1,0))}function tf(e){for(;e===Pa;)Pa=no[--ro],no[ro]=null,Ia=no[--ro],no[ro]=null;for(;e===kr;)kr=Mt[--At],Mt[At]=null,Rn=Mt[--At],Mt[At]=null,En=Mt[--At],Mt[At]=null}var Ct=null,jt=null,_e=!1,Gt=null;function Kv(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 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,Ct=e,jt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=kr!==null?{id:En,overflow:Rn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,jt=null,!0):!1;default:return!1}}function Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ku(e){if(_e){var t=jt;if(t){var n=t;if(!gh(e,t)){if(Nu(e))throw Error(I(418));t=rr(n.nextSibling);var r=Ct;t&&gh(e,t)?Kv(r,n):(e.flags=e.flags&-4097|2,_e=!1,Ct=e)}}else{if(Nu(e))throw Error(I(418));e.flags=e.flags&-4097|2,_e=!1,Ct=e}}}function vh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function Ei(e){if(e!==Ct)return!1;if(!_e)return vh(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=jt)){if(Nu(e))throw Yv(),Error(I(418));for(;t;)Kv(e,t),t=rr(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){jt=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=Ct?rr(e.stateNode.nextSibling):null;return!0}function Yv(){for(var e=jt;e;)e=rr(e.nextSibling)}function wo(){jt=Ct=null,_e=!1}function nf(e){Gt===null?Gt=[e]:Gt.push(e)}var KS=Vn.ReactCurrentBatchConfig;function Kt(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var $a=pr(null),Ma=null,oo=null,rf=null;function of(){rf=oo=Ma=null}function sf(e){var t=$a.current;je($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 po(e,t){Ma=e,rf=oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(rf!==e)if(e={context:e,memoizedValue:t,next:null},oo===null){if(Ma===null)throw Error(I(308));oo=e,Ma.dependencies={lanes:0,firstContext:e}}else oo=oo.next=e;return t}var br=null;function af(e){br===null?br=[e]:br.push(e)}function Gv(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,Mn(e,r)}function Mn(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 Qv(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 kn(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,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mn(e,n)}return o=r.interleaved,o===null?(t.next=t,af(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mn(e,n)}function Qi(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 x=e,y=l;switch(p=t,m=n,y.tag){case 1:if(x=y.payload,typeof x=="function"){f=x.call(m,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,p=typeof x=="function"?x.call(m,f,p):x,p==null)break e;f=ke({},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);Tr|=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 Xv=new Gg.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Fr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Qi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(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),Qi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),r=ir(e),o=kn(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Zt(t,e,r,n),Qi(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?!Ps(n,r)||!Ps(o,s):!0}function Zv(e,t,n){var r=!1,o=cr,s=t.contextType;return typeof s=="object"&&s!==null?s=Ut(s):(o=mt(t)?Nr:nt.current,r=t.contextTypes,s=(r=r!=null)?bo(e,o):cr),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=Xv,lf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ut(s):(s=mt(t)?Nr:nt.current,o.context=bo(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 Xo(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===Xv&&(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 Ri(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 Jv(e){function t(h,g){if(e){var b=h.deletions;b===null?(h.deletions=[g],h.flags|=16):b.push(g)}}function n(h,g){if(!e)return null;for(;g!==null;)t(h,g),g=g.sibling;return null}function r(h,g){for(h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function o(h,g){return h=ar(h,g),h.index=0,h.sibling=null,h}function s(h,g,b){return h.index=b,e?(b=h.alternate,b!==null?(b=b.index,b<g?(h.flags|=2,g):b):(h.flags|=2,g)):(h.flags|=1048576,g)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,g,b,S){return g===null||g.tag!==6?(g=kc(b,h.mode,S),g.return=h,g):(g=o(g,b),g.return=h,g)}function c(h,g,b,S){var j=b.type;return j===Qr?d(h,g,b.props.children,S,b.key):g!==null&&(g.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Wn&&Sh(j)===g.type)?(S=o(g,b.props),S.ref=Xo(h,g,b),S.return=h,S):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,g,b),S.return=h,S)}function u(h,g,b,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Oc(b,h.mode,S),g.return=h,g):(g=o(g,b.children||[]),g.return=h,g)}function d(h,g,b,S,j){return g===null||g.tag!==7?(g=Cr(b,h.mode,S,j),g.return=h,g):(g=o(g,b),g.return=h,g)}function f(h,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=kc(""+g,h.mode,b),g.return=h,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case gi:return b=na(g.type,g.key,g.props,null,h.mode,b),b.ref=Xo(h,null,g),b.return=h,b;case Gr:return g=Oc(g,h.mode,b),g.return=h,g;case Wn:var S=g._init;return f(h,S(g._payload),b)}if(ls(g)||Wo(g))return g=Cr(g,h.mode,b,null),g.return=h,g;Ri(h,g)}return null}function p(h,g,b,S){var j=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(h,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gi:return b.key===j?c(h,g,b,S):null;case Gr:return b.key===j?u(h,g,b,S):null;case Wn:return j=b._init,p(h,g,j(b._payload),S)}if(ls(b)||Wo(b))return j!==null?null:d(h,g,b,S,null);Ri(h,b)}return null}function m(h,g,b,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(b)||null,l(g,h,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case gi:return h=h.get(S.key===null?b:S.key)||null,c(g,h,S,j);case Gr:return h=h.get(S.key===null?b:S.key)||null,u(g,h,S,j);case Wn:var C=S._init;return m(h,g,b,C(S._payload),j)}if(ls(S)||Wo(S))return h=h.get(b)||null,d(g,h,S,j,null);Ri(g,S)}return null}function x(h,g,b,S){for(var j=null,C=null,E=g,_=g=0,N=null;E!==null&&_<b.length;_++){E.index>_?(N=E,E=null):N=E.sibling;var R=p(h,E,b[_],S);if(R===null){E===null&&(E=N);break}e&&E&&R.alternate===null&&t(h,E),g=s(R,g,_),C===null?j=R:C.sibling=R,C=R,E=N}if(_===b.length)return n(h,E),_e&&gr(h,_),j;if(E===null){for(;_<b.length;_++)E=f(h,b[_],S),E!==null&&(g=s(E,g,_),C===null?j=E:C.sibling=E,C=E);return _e&&gr(h,_),j}for(E=r(h,E);_<b.length;_++)N=m(E,h,_,b[_],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?_:N.key),g=s(N,g,_),C===null?j=N:C.sibling=N,C=N);return e&&E.forEach(function(O){return t(h,O)}),_e&&gr(h,_),j}function y(h,g,b,S){var j=Wo(b);if(typeof j!="function")throw Error(I(150));if(b=j.call(b),b==null)throw Error(I(151));for(var C=j=null,E=g,_=g=0,N=null,R=b.next();E!==null&&!R.done;_++,R=b.next()){E.index>_?(N=E,E=null):N=E.sibling;var O=p(h,E,R.value,S);if(O===null){E===null&&(E=N);break}e&&E&&O.alternate===null&&t(h,E),g=s(O,g,_),C===null?j=O:C.sibling=O,C=O,E=N}if(R.done)return n(h,E),_e&&gr(h,_),j;if(E===null){for(;!R.done;_++,R=b.next())R=f(h,R.value,S),R!==null&&(g=s(R,g,_),C===null?j=R:C.sibling=R,C=R);return _e&&gr(h,_),j}for(E=r(h,E);!R.done;_++,R=b.next())R=m(E,h,_,R.value,S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),g=s(R,g,_),C===null?j=R:C.sibling=R,C=R);return e&&E.forEach(function(k){return t(h,k)}),_e&&gr(h,_),j}function v(h,g,b,S){if(typeof b=="object"&&b!==null&&b.type===Qr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case gi:e:{for(var j=b.key,C=g;C!==null;){if(C.key===j){if(j=b.type,j===Qr){if(C.tag===7){n(h,C.sibling),g=o(C,b.props.children),g.return=h,h=g;break e}}else if(C.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Wn&&Sh(j)===C.type){n(h,C.sibling),g=o(C,b.props),g.ref=Xo(h,C,b),g.return=h,h=g;break e}n(h,C);break}else t(h,C);C=C.sibling}b.type===Qr?(g=Cr(b.props.children,h.mode,S,b.key),g.return=h,h=g):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,g,b),S.return=h,h=S)}return i(h);case Gr:e:{for(C=b.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(h,g.sibling),g=o(g,b.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=Oc(b,h.mode,S),g.return=h,h=g}return i(h);case Wn:return C=b._init,v(h,g,C(b._payload),S)}if(ls(b))return x(h,g,b,S);if(Wo(b))return y(h,g,b,S);Ri(h,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(h,g.sibling),g=o(g,b),g.return=h,h=g):(n(h,g),g=kc(b,h.mode,S),g.return=h,h=g),i(h)):n(h,g)}return v}var So=Jv(!0),ey=Jv(!1),oi={},un=pr(oi),As=pr(oi),Ds=pr(oi);function wr(e){if(e===oi)throw Error(I(174));return e}function cf(e,t){switch(xe(Ds,t),xe(As,e),xe(un,oi),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)}je(un),xe(un,t)}function jo(){je(un),je(As),je(Ds)}function ty(e){wr(Ds.current);var t=wr(un.current),n=uu(t,e.type);t!==n&&(xe(As,e),xe(un,n))}function uf(e){As.current===e&&(je(un),je(As))}var Ee=pr(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 jc=[];function df(){for(var e=0;e<jc.length;e++)jc[e]._workInProgressVersionPrimary=null;jc.length=0}var Xi=Vn.ReactCurrentDispatcher,Cc=Vn.ReactCurrentBatchConfig,Or=0,Ne=null,Fe=null,Be=null,Fa=!1,ys=!1,Fs=0,YS=0;function Ze(){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(!en(e[n],t[n]))return!1;return!0}function pf(e,t,n,r,o,s){if(Or=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?ZS:JS,e=n(r,o),ys){s=0;do{if(ys=!1,Fs=0,25<=s)throw Error(I(301));s+=1,Be=Fe=null,t.updateQueue=null,Xi.current=ej,e=n(r,o)}while(ys)}if(Xi.current=La,t=Fe!==null&&Fe.next!==null,Or=0,Be=Fe=Ne=null,Fa=!1,t)throw Error(I(300));return e}function hf(){var e=Fs!==0;return Fs=0,e}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ne.memoizedState=Be=e:Be=Be.next=e,Be}function Vt(){if(Fe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Be===null?Ne.memoizedState:Be.next;if(t!==null)Be=t,Fe=e;else{if(e===null)throw Error(I(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Be===null?Ne.memoizedState=Be=e:Be=Be.next=e}return Be}function Ls(e,t){return typeof t=="function"?t(e):t}function _c(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Fe,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,Ne.lanes|=d,Tr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,en(r,t.memoizedState)||(pt=!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,Ne.lanes|=s,Tr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ec(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)||(pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ny(){}function ry(e,t){var n=Ne,r=Vt(),o=t(),s=!en(r.memoizedState,o);if(s&&(r.memoizedState=o,pt=!0),r=r.queue,mf(iy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Us(9,sy.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(I(349));Or&30||oy(n,t,o)}return o}function oy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sy(e,t,n,r){t.value=n,t.getSnapshot=r,ay(t)&&ly(e)}function iy(e,t,n){return n(function(){ay(t)&&ly(e)})}function ay(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function ly(e){var t=Mn(e,1);t!==null&&Zt(t,e,1,-1)}function jh(e){var t=rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:e},t.queue=e,e=e.dispatch=XS.bind(null,Ne,e),[t.memoizedState,e]}function Us(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 cy(){return Vt().memoizedState}function Zi(e,t,n,r){var o=rn();Ne.flags|=e,o.memoizedState=Us(1|t,n,void 0,r===void 0?null:r)}function Sl(e,t,n,r){var o=Vt();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var i=Fe.memoizedState;if(s=i.destroy,r!==null&&ff(r,i.deps)){o.memoizedState=Us(t,n,s,r);return}}Ne.flags|=e,o.memoizedState=Us(1|t,n,s,r)}function Ch(e,t){return Zi(8390656,8,e,t)}function mf(e,t){return Sl(2048,8,e,t)}function uy(e,t){return Sl(4,2,e,t)}function dy(e,t){return Sl(4,4,e,t)}function fy(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 py(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4,4,fy.bind(null,t,e),n)}function gf(){}function hy(e,t){var n=Vt();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 my(e,t){var n=Vt();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 gy(e,t,n){return Or&21?(en(n,t)||(n=xv(),Ne.lanes|=n,Tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n)}function GS(e,t){var n=ve;ve=n!==0&&4>n?n:4,e(!0);var r=Cc.transition;Cc.transition={};try{e(!1),t()}finally{ve=n,Cc.transition=r}}function vy(){return Vt().memoizedState}function QS(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yy(e))xy(t,n);else if(n=Gv(e,t,n,r),n!==null){var o=at();Zt(n,e,r,o),by(n,t,r)}}function XS(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yy(e))xy(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,af(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Gv(e,t,o,r),n!==null&&(o=at(),Zt(n,e,r,o),by(n,t,r))}}function yy(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function xy(e,t){ys=Fa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function by(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wd(e,n)}}var La={readContext:Ut,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},ZS={readContext:Ut,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Ch,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zi(4194308,4,fy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zi(4,2,e,t)},useMemo:function(e,t){var n=rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rn();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=QS.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:jh,useDebugValue:gf,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=jh(!1),t=e[0];return e=GS.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=rn();if(_e){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),qe===null)throw Error(I(349));Or&30||oy(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Ch(iy.bind(null,r,s,e),[e]),r.flags|=2048,Us(9,sy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=rn(),t=qe.identifierPrefix;if(_e){var n=Rn,r=En;n=(r&~(1<<32-Xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=YS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},JS={readContext:Ut,useCallback:hy,useContext:Ut,useEffect:mf,useImperativeHandle:py,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:my,useReducer:_c,useRef:cy,useState:function(){return _c(Ls)},useDebugValue:gf,useDeferredValue:function(e){var t=Vt();return gy(t,Fe.memoizedState,e)},useTransition:function(){var e=_c(Ls)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:ny,useSyncExternalStore:ry,useId:vy,unstable_isNewReconciler:!1},ej={readContext:Ut,useCallback:hy,useContext:Ut,useEffect:mf,useImperativeHandle:py,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:my,useReducer:Ec,useRef:cy,useState:function(){return Ec(Ls)},useDebugValue:gf,useDeferredValue:function(e){var t=Vt();return Fe===null?t.memoizedState=e:gy(t,Fe.memoizedState,e)},useTransition:function(){var e=Ec(Ls)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:ny,useSyncExternalStore:ry,useId:vy,unstable_isNewReconciler:!1};function Co(e,t){try{var n="",r=t;do n+=N1(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 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 tj=typeof WeakMap=="function"?WeakMap:Map;function wy(e,t,n){n=En(-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 Sy(e,t,n){n=En(-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"&&(sr===null?sr=new Set([this]):sr.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 tj;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=mj.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=En(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var nj=Fn.ReactCurrentOwner,dt=!1;function nt(e,t,n,r){t.child=e===null?ey(t,null,n,r):bo(t,e.child,n,r)}function Nh(e,t,n,r,o){n=n.render;var s=t.ref;return uo(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,In(e,t,o)):(je&&n&&ef(t),t.flags|=1,nt(e,t,r,o),t.child)}function kh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Cf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,jy(e,t,s,r,o)):(e=na(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:Ps,n(i,r)&&e.ref===t.ref)return In(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function jy(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ps(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,In(e,t,o)}return $u(e,t,n,r,o)}function Cy(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(oo,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(oo,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(oo,bt),bt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(oo,bt),bt|=r;return nt(e,t,o,n),t.child}function _y(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=yo(t,s),uo(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,In(e,t,o)):(je&&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(uo(t,o),t.stateNode===null)Ji(e,t),Zv(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=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)&&wh(t,i,r,u),Wn=!1;var p=t.memoizedState;i.state=p,Aa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ft.current||Wn?(typeof d=="function"&&(Tu(t,n,d,r),c=t.memoizedState),(l=Wn||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,Qv(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=yo(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),Wn=!1,p=t.memoizedState,i.state=p,Aa(t,r,i,o);var g=t.memoizedState;l!==f||p!==g||ft.current||Wn?(typeof m=="function"&&(Tu(t,n,m,r),g=t.memoizedState),(u=Wn||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){_y(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&mh(t,n,!1),In(e,t,s);r=t.stateNode,nj.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)):nt(e,t,l,s),t.memoizedState=r.state,o&&mh(t,n,!0),t.child}function Ey(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 xo(),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 Ry(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 ku(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=Cr(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 rj(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=Cr(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=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 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),bo(t,e.child,null,n),e=vf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rj(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=Cr(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=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,Pn(e,o),Qt(r,e,o,-1))}return jf(),r=Rc(Error(I(421))),Ni(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=gj.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,wt=rr(o.nextSibling),St=t,je=!0,Kt=null,e!==null&&($t[Mt++]=jn,$t[Mt++]=Cn,$t[Mt++]=kr,jn=e.id,Cn=e.overflow,kr=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 Nc(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 Ny(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),Nc(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}Nc(t,!0,n,null,s);break;case"together":Nc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function In(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tr|=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 oj(e,t,n){switch(t.tag){case 3:Ey(t),xo();break;case 5:ty(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?Ry(e,t,n):(xe(Ee,Ee.current&1),e=In(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 Ny(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,Cy(e,t,n)}return In(e,t,n)}var ky,Fu,Oy,Ty;ky=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(){};Oy=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(ln.current);var s=null;switch(n){case"input":o=iu(e,o),r=iu(e,r),s=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},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=ka)}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"&&(_s.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"&&(_s.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)}};Ty=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!je)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 sj(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,wo(),we(ft),we(et),df(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Kt!==null&&(Wu(Kt),Kt=null))),Fu(e,t),Xe(t),null;case 5:uf(t);var o=wr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)Oy(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(ln.current),Ei(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[sn]=t,r[Ms]=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<cs.length;o++)be(cs[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&&_i(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&_i(r.textContent,l,e),o=["children",""+l]):_s.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&be("scroll",r)}switch(n){case"input":vi(r),zp(r,s,!0);break;case"textarea":vi(r),qp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ka)}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=ov(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[sn]=t,e[Ms]=r,ky(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<cs.length;o++)be(cs[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=ke({},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"?av(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&sv(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Es(e,c):typeof c=="number"&&Es(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(_s.hasOwnProperty(s)?c!=null&&s==="onScroll"&&be("scroll",e):c!=null&&Ud(e,s,c,i))}switch(n){case"input":vi(e),zp(e,r,!1);break;case"textarea":vi(e),qp(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=ka)}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)Ty(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ds.current),wr(ln.current),Ei(t)){if(r=t.stateNode,n=t.memoizedProps,r[sn]=t,(s=r.nodeValue!==n)&&(e=St,e!==null))switch(e.tag){case 3:_i(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_i(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[sn]=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(je&&wt!==null&&t.mode&1&&!(t.flags&128))Yv(),xo(),t.flags|=98560,s=!1;else if(s=Ei(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[sn]=t}else xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),s=!1}else Kt!==null&&(Wu(Kt),Kt=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):jf())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return wo(),Fu(e,t),e===null&&Is(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)Qo(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,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 xe(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ie()>jo&&(t.flags|=128,r=!0,Qo(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),Qo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!je)return Xe(t),null}else 2*Ie()-s.renderingStartTime>jo&&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=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 ij(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 wo(),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));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 sf(t.type._context),null;case 22:case 23:return Sf(),null;case 24:return null;default:return null}}var ki=!1,Je=!1,aj=typeof WeakSet=="function"?WeakSet:Set,B=null;function ro(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 lj(e,t){if(Su=Ea,e=Mv(),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(ju={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 v=g.memoizedProps,x=g.memoizedState,h=t.stateNode,y=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ht(t.type,v),x);h.__reactInternalSnapshotBeforeUpdate=y}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 xs(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 jl(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 Py(e){var t=e.alternate;t!==null&&(e.alternate=null,Py(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[sn],delete t[Ms],delete t[Eu],delete t[qS],delete t[HS])),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 Iy(e){return e.tag===5||e.tag===3||e.tag===4}function $h(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iy(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=ka));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 qn(e,t,n){for(n=n.child;n!==null;)$y(e,t,n),n=n.sibling}function $y(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:Je||ro(n,t);case 6:var r=We,o=Wt;We=null,qn(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),Os(e)):wc(We,n.stateNode));break;case 4:r=We,o=Wt,We=n.stateNode.containerInfo,Wt=!0,qn(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)}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){Oe(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 Mh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new aj),t.forEach(function(r){var o=vj.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));$y(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;)My(t,e),t=t.sibling}function My(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),Jt(e),r&4){try{xs(3,e,e.return),jl(3,e)}catch(v){Oe(e,e.return,v)}try{xs(5,e,e.return)}catch(v){Oe(e,e.return,v)}}break;case 1:Bt(t,e),Jt(e),r&512&&n!==null&&ro(n,n.return);break;case 5:if(Bt(t,e),Jt(e),r&512&&n!==null&&ro(n,n.return),e.flags&32){var o=e.stateNode;try{Es(o,"")}catch(v){Oe(e,e.return,v)}}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&&nv(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"?av(o,f):d==="dangerouslySetInnerHTML"?sv(o,f):d==="children"?Es(o,f):Ud(o,d,f,u)}switch(l){case"input":au(o,s);break;case"textarea":rv(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?io(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?io(o,!!s.multiple,s.defaultValue,!0):io(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ms]=s}catch(v){Oe(e,e.return,v)}}break;case 6:if(Bt(t,e),Jt(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(v){Oe(e,e.return,v)}}break;case 3:if(Bt(t,e),Jt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(v){Oe(e,e.return,v)}break;case 4:Bt(t,e),Jt(e);break;case 13:Bt(t,e),Jt(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),Jt(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:xs(4,p,p.return);break;case 1:ro(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(v){Oe(r,n,v)}}break;case 5:ro(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=iv("display",i))}catch(v){Oe(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){Oe(e,e.return,v)}}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),Jt(e),r&4&&Mh(e);break;case 21:break;default:Bt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Iy(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&&(Es(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 cj(e,t,n){B=e,Ay(e)}function Ay(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||ki;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Je;l=ki;var u=Je;if(ki=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,Ay(s),s=s.sibling;B=o,ki=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||jl(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&&Os(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{jl(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 uj=Math.ceil,Ua=Fn.ReactCurrentDispatcher,yf=Fn.ReactCurrentOwner,Ft=Fn.ReactCurrentBatchConfig,ue=0,Be=null,Me=null,Ye=0,bt=0,oo=pr(0),Fe=0,Vs=null,Tr=0,Cl=0,xf=0,bs=null,ut=null,bf=0,jo=1/0,xn=null,Va=!1,Bu=null,sr=null,Oi=!1,Zn=null,za=0,ws=0,qu=null,ea=-1,ta=0;function ot(){return ue&6?Ie():ea!==-1?ea:ea=Ie()}function ir(e){return e.mode&1?ue&2&&Ye!==0?Ye&-Ye:KS.transition!==null?(ta===0&&(ta=xv()),ta):(e=ge,e!==0||(e=window.event,e=e===void 0?16:Ev(e.type)),e):1}function Qt(e,t,n,r){if(50<ws)throw ws=0,qu=null,Error(I(185));ti(e,n,r),(!(ue&2)||e!==Be)&&(e===Be&&(!(ue&2)&&(Cl|=n),Fe===4&&Gn(e,Ye)),ht(e,r),n===1&&ue===0&&!(t.mode&1)&&(jo=Ie()+500,bl&&hr()))}function ht(e,t){var n=e.callbackNode;K1(e,t);var r=_a(e,e===Be?Ye: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?WS(Lh.bind(null,e)):Hv(Lh.bind(null,e)),zS(function(){!(ue&6)&&hr()}),n=null;else{switch(bv(r)){case 1:n=Hd;break;case 4:n=vv;break;case 16:n=Ca;break;case 536870912:n=yv;break;default:n=Ca}n=qy(n,Dy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dy(e,t){if(ea=-1,ta=0,ue&6)throw Error(I(327));var n=e.callbackNode;if(fo()&&e.callbackNode!==n)return null;var r=_a(e,e===Be?Ye: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=Ly();(Be!==e||Ye!==t)&&(xn=null,jo=Ie()+500,jr(e,t));do try{pj();break}catch(l){Fy(e,l)}while(!0);of(),Ua.current=s,ue=o,Me!==null?t=0:(Be=null,Ye=0,t=Fe)}if(t!==0){if(t===2&&(o=vu(e),o!==0&&(r=o,t=Hu(e,o))),t===1)throw n=Vs,jr(e,0),Gn(e,r),ht(e,Ie()),n;if(t===6)Gn(e,r);else{if(o=e.current.alternate,!(r&30)&&!dj(o)&&(t=Ba(e,r),t===2&&(s=vu(e),s!==0&&(r=s,t=Hu(e,s))),t===1))throw n=Vs,jr(e,0),Gn(e,r),ht(e,Ie()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ut,xn);break;case 3:if(Gn(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(vr.bind(null,e,ut,xn),t);break}vr(e,ut,xn);break;case 4:if(Gn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Gt(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*uj(r/1960))-r,10<r){e.timeoutHandle=_u(vr.bind(null,e,ut,xn),r);break}vr(e,ut,xn);break;case 5:vr(e,ut,xn);break;default:throw Error(I(329))}}}return ht(e,Ie()),e.callbackNode===n?Dy.bind(null,e):null}function Hu(e,t){var n=bs;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 dj(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(!Zt(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 Gn(e,t){for(t&=~xf,t&=~Cl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function Lh(e){if(ue&6)throw Error(I(327));fo();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=Vs,jr(e,0),Gn(e,t),ht(e,Ie()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ut,xn),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&&hr())}}function Pr(e){Zn!==null&&Zn.tag===0&&!(ue&6)&&fo();var t=ue;ue|=1;var n=Ft.transition,r=ge;try{if(Ft.transition=null,ge=1,e)return e()}finally{ge=r,Ft.transition=n,ue=t,!(ue&6)&&hr()}}function Sf(){bt=oo.current,we(oo)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,VS(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:wo(),we(ft),we(et),df();break;case 5:uf(r);break;case 4:wo();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=ar(e.current,null),Ye=bt=t,Fe=0,Vs=null,xf=Cl=Tr=0,ut=bs=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 Fy(e,t){do{var n=Me;try{if(of(),Xi.current=La,Fa){for(var r=Ne.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Fa=!1}if(Or=0,ze=De=Ne=null,ys=!1,Fs=0,yf.current=null,n===null||n.return===null){Fe=1,Vs=t,Me=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ye,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 v=new Set;v.add(c),t.updateQueue=v}else g.add(c);break e}else{if(!(t&1)){_h(s,u,t),jf();break e}c=Error(I(426))}}else if(je&&l.mode&1){var x=Eh(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Rh(x,i,l,s,t),nf(So(c,l));break e}}s=c=So(c,l),Fe!==4&&(Fe=2),bs===null?bs=[s]:bs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=wy(s,c,t);yh(s,h);break e;case 1:l=c;var y=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(sr===null||!sr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Sy(s,l,t);yh(s,S);break e}}s=s.return}while(s!==null)}Vy(n)}catch(j){t=j,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function Ly(){var e=Ua.current;return Ua.current=La,e===null?La:e}function jf(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Be===null||!(Tr&268435455)&&!(Cl&268435455)||Gn(Be,Ye)}function Ba(e,t){var n=ue;ue|=2;var r=Ly();(Be!==e||Ye!==t)&&(xn=null,jr(e,t));do try{fj();break}catch(o){Fy(e,o)}while(!0);if(of(),ue=n,Ua.current=r,Me!==null)throw Error(I(261));return Be=null,Ye=0,Fe}function fj(){for(;Me!==null;)Uy(Me)}function pj(){for(;Me!==null&&!F1();)Uy(Me)}function Uy(e){var t=By(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?Vy(e):Me=t,yf.current=null}function Vy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ij(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=sj(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 vr(e,t,n){var r=ge,o=Ft.transition;try{Ft.transition=null,ge=1,hj(e,t,n,r)}finally{Ft.transition=o,ge=r}return null}function hj(e,t,n,r){do fo();while(Zn!==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(Y1(e,s),e===Be&&(Me=Be=null,Ye=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Oi||(Oi=!0,qy(Ca,function(){return fo(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ft.transition,Ft.transition=null;var i=ge;ge=1;var l=ue;ue|=4,yf.current=null,lj(e,n),My(n,e),$S(ju),Ea=!!Su,ju=Su=null,e.current=n,cj(n),L1(),ue=l,ge=i,Ft.transition=s}else e.current=n;if(Oi&&(Oi=!1,Zn=e,za=o),s=e.pendingLanes,s===0&&(sr=null),z1(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&&fo(),s=e.pendingLanes,s&1?e===qu?ws++:(ws=0,qu=e):ws=0,hr(),null}function fo(){if(Zn!==null){var e=bv(za),t=Ft.transition,n=ge;try{if(Ft.transition=null,ge=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=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:xs(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(Py(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 v=g.child;if(v!==null){g.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==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:xs(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,B=h;break e}B=s.return}}var y=e.current;for(B=y;B!==null;){i=B;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,B=b;else e:for(i=y;B!==null;){if(l=B,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:jl(9,l)}}catch(j){Oe(l,l.return,j)}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,hr(),an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(ml,e)}catch{}r=!0}return r}finally{ge=n,Ft.transition=t}}return!1}function Uh(e,t,n){t=So(n,t),t=wy(e,t,1),e=or(e,t,1),t=ot(),e!==null&&(ti(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"&&(sr===null||!sr.has(r))){e=So(n,e),e=Sy(t,e,1),t=or(t,e,1),e=ot(),t!==null&&(ti(t,1,e),ht(t,e));break}}t=t.return}}function mj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ye&n)===n&&(Fe===4||Fe===3&&(Ye&130023424)===Ye&&500>Ie()-bf?jr(e,0):xf|=n),ht(e,t)}function zy(e,t){t===0&&(e.mode&1?(t=bi,bi<<=1,!(bi&130023424)&&(bi=4194304)):t=1);var n=ot();e=Pn(e,t),e!==null&&(ti(e,t,n),ht(e,n))}function gj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zy(e,n)}function vj(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),zy(e,n)}var By;By=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,oj(e,t,n);dt=!!(e.flags&131072)}else dt=!1,je&&t.flags&1048576&&Wv(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var o=yo(t,et.current);uo(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,je&&s&&ef(t),nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xj(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=Nh(null,t,r,e,n);break e;case 14:t=kh(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(Ey(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Qv(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=So(Error(I(423)),t),t=Th(e,t,r,n,o);break e}else if(r!==o){o=So(Error(I(424)),t),t=Th(e,t,r,n,o);break e}else for(wt=rr(t.stateNode.containerInfo.firstChild),St=t,je=!0,Kt=null,n=ey(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xo(),r===o){t=In(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return ty(t),e===null&&ku(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Cu(r,o)?i=null:s!==null&&Cu(r,s)&&(t.flags|=32),_y(e,t),nt(e,t,i,n),t.child;case 6:return e===null&&ku(t),null;case 13:return Ry(e,t,n);case 4:return cf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(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),Nh(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(Zt(s.value,i)){if(s.children===o.children&&!ft.current){t=In(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=En(-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,uo(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),kh(e,t,r,o,n);case 15:return jy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ht(r,o),Ji(e,t),t.tag=1,pt(r)?(e=!0,Ta(t)):e=!1,uo(t,n),Zv(t,r,o),Pu(t,r,o,n),Mu(null,t,r,!0,e,n);case 19:return Ny(e,t,n);case 22:return Cy(e,t,n)}throw Error(I(156,t.tag))};function qy(e,t){return gv(e,t)}function yj(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 yj(e,t,n,r)}function Cf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xj(e){if(typeof e=="function")return Cf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zd)return 11;if(e===Bd)return 14}return 2}function ar(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 na(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Cf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yr:return Cr(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 Jg:return _l(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xg:i=10;break e;case Zg:i=9;break e;case zd:i=11;break e;case Bd:i=14;break e;case Hn: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 Cr(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=Jg,e.lanes=n,e.stateNode={isHidden:!1},e}function kc(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 bj(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 bj(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 wj(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 Hy(e){if(!e)return cr;e=e._reactInternals;e:{if(Fr(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 qv(e,n,t)}return t}function Wy(e,t,n,r,o,s,i,l,c){return e=_f(n,r,!0,e,o,s,i,l,c),e.context=Hy(null),n=e.current,r=ot(),o=ir(n),s=En(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,ti(e,o,r),ht(e,r),e}function El(e,t,n,r){var o=t.current,s=ot(),i=ir(o);return n=Hy(n),t.context===null?t.context=n:t.pendingContext=n,t=En(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=or(o,t,i),e!==null&&(Qt(e,o,i,s),Qi(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 Sj(){return null}var Ky=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;Pr(function(){El(null,e,null,null)}),t[Tn]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=jv();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&&_v(e)}};function Nf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zh(){}function jj(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=Wy(t,r,e,0,null,!1,!1,"",zh);return e._reactRootContainer=i,e[Tn]=i.current,Is(e.nodeType===8?e.parentNode:e),Pr(),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[Tn]=c.current,Is(e.nodeType===8?e.parentNode:e),Pr(function(){El(t,c,n,r)}),c}function kl(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=jj(n,t,e,o,r);return qa(i)}wv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ls(t.pendingLanes);n!==0&&(Wd(t,n|1),ht(t,Ie()),!(ue&6)&&(jo=Ie()+500,hr()))}break;case 13:Pr(function(){var r=Pn(e,1);if(r!==null){var o=ot();Qt(r,e,1,o)}}),Ef(e,1)}};Kd=function(e){if(e.tag===13){var t=Pn(e,134217728);if(t!==null){var n=ot();Qt(t,e,134217728,n)}Ef(e,134217728)}};Sv=function(e){if(e.tag===13){var t=ir(e),n=Pn(e,t);if(n!==null){var r=ot();Qt(n,e,t,r)}Ef(e,t)}};jv=function(){return ge};Cv=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=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));tv(r),au(r,o)}}}break;case"textarea":rv(e,n);break;case"select":t=n.value,t!=null&&io(e,!!n.multiple,t,!1)}};uv=wf;dv=Pr;var Cj={usingClientEntryPoint:!1,Events:[ri,Zr,xl,lv,cv,wf]},Xo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},_j={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:Fn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hv(e),e===null?null:e.stateNode},findFiberByHostInstance:Xo.findFiberByHostInstance||Sj,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 Ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ti.isDisabled&&Ti.supportsFiber)try{ml=Ti.inject(_j),an=Ti}catch{}}kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cj;kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nf(t))throw Error(I(200));return wj(e,t,null,n)};kt.createRoot=function(e,t){if(!Nf(e))throw Error(I(299));var n=!1,r="",o=Ky;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[Tn]=t.current,Is(e.nodeType===8?e.parentNode:e),new Rf(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=hv(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e){return Pr(e)};kt.hydrate=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!0,n)};kt.hydrateRoot=function(e,t,n){if(!Nf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Ky;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Wy(t,null,e,1,n??null,o,!1,s,i),e[Tn]=t.current,Is(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)};kt.render=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!1,n)};kt.unmountComponentAtNode=function(e){if(!Nl(e))throw Error(I(40));return e._reactRootContainer?(Pr(function(){kl(null,null,e,!1,function(){e._reactRootContainer=null,e[Tn]=null})}),!0):!1};kt.unstable_batchedUpdates=wf;kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Nl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return kl(e,t,n,!1,r)};kt.version="18.2.0-next-9e3b772b8-20220608";function Yy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yy)}catch(e){console.error(e)}}Yy(),Wg.exports=kt;var kf=Wg.exports;const Sr=Js(kf);var Bh=kf;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 Ej=typeof Symbol=="function"&&Symbol.observable||"@@observable",qh=Ej,Tc=()=>Math.random().toString(36).substring(7).split("").join("."),Rj={INIT:`@@redux/INIT${Tc()}`,REPLACE:`@@redux/REPLACE${Tc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tc()}`},Ha=Rj;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 Gy(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(Gy)(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 y=l++;return i.set(y,x),function(){if(h){if(c)throw new Error(He(6));h=!1,u(),i.delete(y),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(y=>{y()}),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 y(){const S=h;S.next&&S.next(d())}return y(),{unsubscribe:x(y)}},[qh](){return this}}}return p({type:Ha.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[qh]:g}}function Nj(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 kj(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{Nj(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 Oj(...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 Tj(e){return Of(e)&&"type"in e&&typeof e.type=="string"}var Qy=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 Co=Object.getPrototypeOf;function ur(e){return!!e&&!!e[_t]}function $n(e){var t;return e?Xy(e)||Array.isArray(e)||!!e[Hh]||!!((t=e.constructor)!=null&&t[Hh])||Tl(e)||Pl(e):!1}var Pj=Object.prototype.constructor.toString();function Xy(e){if(!e||typeof e!="object")return!1;const t=Co(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)===Pj}function zs(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 Zy(e,t,n){const r=Ol(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ij(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 yr(e){return e.copy_||e.base_}function Yu(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&&Xy(e))return Co(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(Co(e),n)}function Tf(e,t=!1){return Il(e)||ur(e)||!$n(e)||(Ol(e)>1&&(e.set=e.add=e.clear=e.delete=$j),Object.freeze(e),t&&zs(e,(n,r)=>Tf(r,!0))),e}function $j(){Yt(2)}function Il(e){return Object.isFrozen(e)}var Mj={};function Ir(e){const t=Mj[e];return t||Yt(0,e),t}var Bs;function Jy(){return Bs}function Aj(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wh(e,t){t&&(Ir("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gu(e){Qu(e),e.drafts_.forEach(Dj),e.drafts_=null}function Qu(e){e===Bs&&(Bs=e.parent_)}function Kh(e){return Bs=Aj(Bs,e)}function Dj(e){const t=e[_t];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[_t].modified_&&(Gu(t),Yt(4)),$n(e)&&(e=Ka(t,e),t.parent_||Ya(t,e)),t.patches_&&Ir("Patches").generateReplacementPatches_(n[_t].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),Gu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Qy?e:void 0}function Ka(e,t,n){if(Il(t))return t;const r=t[_t];if(!r)return zs(t,(o,s)=>Gh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ya(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),zs(s,(l,c)=>Gh(e,r,o,l,c,n,i)),Ya(e,o,!1),n&&e.patches_&&Ir("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Gh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!Ku(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(Zy(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if($n(o)&&!Il(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,o),(!t||!t.scope_.parent_)&&Ya(e,o)}}function Ya(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tf(t,n)}function Fj(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Jy(),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=qs);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=yr(e);if(!Ku(n,t))return Lj(e,n,t);const r=n[t];return e.finalized_||!$n(r)?r:r===Pc(e.base_,t)?(Ic(e),e.copy_[t]=Zu(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=ex(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Pc(yr(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(Ij(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=yr(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 Co(e.base_)},setPrototypeOf(){Yt(12)}},qs={};zs(Pf,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.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?yr(n):e)[t]}function Lj(e,t,n){var o;const r=ex(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ex(e,t){if(!(t in e))return;let n=Co(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Co(n)}}function Xu(e){e.modified_||(e.modified_=!0,e.parent_&&Xu(e.parent_))}function Ic(e){e.copy_||(e.copy_=Yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uj=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($n(t)){const s=Kh(this),i=Zu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Gu(s):Qu(s)}return Wh(s,r),Yh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Qy&&(o=void 0),this.autoFreeze_&&Tf(o,!0),r){const s=[],i=[];Ir("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){$n(e)||Yt(8),ur(e)&&(e=tx(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),Yh(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=Ir("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Zu(e,t){const n=Tl(e)?Ir("MapSet").proxyMap_(e,t):Pl(e)?Ir("MapSet").proxySet_(e,t):Fj(e,t);return(t?t.scope_:Jy()).drafts_.push(n),n}function tx(e){return ur(e)||Yt(10,e),nx(e)}function nx(e){if(!$n(e)||Il(e))return e;const t=e[_t];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yu(e,!0);return zs(n,(r,o)=>{Zy(n,r,nx(o))}),t&&(t.finalized_=!1),n}var Et=new Uj,rx=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 Vj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Bj(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 qj(e){const t=Array.isArray(e[0])?e[0]:e;return Bj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Hj(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Wj=class{constructor(e){this.value=e}deref(){return this.value}},Kj=typeof WeakRef<"u"?WeakRef:Wj,Yj=0,Xh=1;function Pi(){return{s:Yj,v:void 0,o:null,p:null}}function If(e,t={}){let n=Pi();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 v=l.o;v===null&&(l.o=v=new WeakMap);const x=v.get(g);x===void 0?(l=Pi(),v.set(g,l)):l=x}else{let v=l.p;v===null&&(l.p=v=new Map);const x=v.get(g);x===void 0?(l=Pi(),v.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 Kj(d):d}return u.v=d,d}return i.clearCache=()=>{n=Pi(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function ox(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()),Vj(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:v={}}=d,x=Qh(p),h=Qh(g),y=qj(o),b=f(function(){return s++,u.apply(null,arguments)},...x),S=m(function(){i++;const C=Hj(y,arguments);return l=b.apply(null,C),l},...h);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Gj=ox(If),Qj=Object.assign((e,t=Gj)=>{zj(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:()=>Qj});function sx(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Xj=sx(),Zj=sx,Jj=(...e)=>{const t=ox(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?tx(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};Jj(If);var eC=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)},tC=e=>e&&typeof e.match=="function";function Rn(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=>Tj(r)&&r.type===e,n}var ix=class us extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,us.prototype)}static get[Symbol.species](){return us}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new us(...t[0].concat(this)):new us(...t.concat(this))}};function Zh(e){return $n(e)?rx(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 nC(e){return typeof e=="boolean"}var rC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new ix;return n&&(nC(n)?i.push(Xj):i.push(Zj(n.extraArgument))),i},oC="RTK_autoBatch",ax=e=>t=>{setTimeout(t,e)},sC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ax(10),iC=(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"?sC:e.type==="callback"?e.queueNotification:ax(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[oC]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},aC=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new ix(e);return r&&o.push(iC(typeof r=="object"?r:void 0)),o},lC=!0;function Ln(e){const t=rC(),{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=kj(n);else throw new Error(mt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=eC({trace:!lC,...typeof o=="object"&&o}));const d=Oj(...c),f=aC(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Gy(l,s,m)}function lx(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 cC(e){return typeof e=="function"}function uC(e,t){let[n,r,o]=lx(t),s;if(cC(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(ur(d)){const m=f(d,c);return m===void 0?d:m}else{if($n(d))return rx(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 dC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cx=(e=21)=>{let t="",n=e;for(;n--;)t+=dC[Math.random()*64|0];return t},fC=(e,t)=>tC(e)?e.match(t):e(t);function pC(...e){return t=>e.some(n=>fC(n,t))}var hC=["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}},mC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of hC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},tt=(()=>{function e(t,n,r){const o=Rn(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=Rn(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=Rn(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||mC)(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):cx(),m=new AbortController;let g,v;function x(y){v=y,m.abort()}const h=async function(){var S,j;let y;try{let C=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(vC(C)&&(C=await C),C===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((E,N)=>{g=()=>{N({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",g)});u(s(p,c,(j=r==null?void 0:r.getPendingMeta)==null?void 0:j.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),y=await Promise.race([_,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:x,rejectWithValue:(E,N)=>new $c(E,N),fulfillWithValue:(E,N)=>new em(E,N)})).then(E=>{if(E instanceof $c)throw E;return E instanceof em?o(E.payload,p,c,E.meta):o(E,p,c)})])}catch(C){y=C instanceof $c?i(null,p,c,C.payload,C.meta):i(C,p,c)}finally{g&&m.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&i.match(y)&&y.meta.condition||u(y),y}();return Object.assign(h,{abort:x,requestId:p,arg:c,unwrap(){return h.then(gC)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:pC(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function gC(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function vC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var yC=Symbol.for("rtk-slice-createasyncthunk");function xC(e,t){return`${e}/${t}`}function bC({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[yC];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(SC()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const j=typeof b=="string"?b:b.type;if(!j)throw new Error(mt(12));if(j in u.sliceCaseReducersByType)throw new Error(mt(13));return u.sliceCaseReducersByType[j]=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],j={reducerName:b,type:xC(s,b),createNotation:typeof o.reducers=="function"};CC(S)?EC(j,S,d,t):jC(j,S,d)});function f(){const[b={},S=[],j=void 0]=typeof o.extraReducers=="function"?lx(o.extraReducers):[o.extraReducers],C={...b,...u.sliceCaseReducersByType};return uC(o.initialState,_=>{for(let E in C)_.addCase(E,C[E]);for(let E of u.sliceMatchers)_.addMatcher(E.matcher,E.reducer);for(let E of S)_.addMatcher(E.matcher,E.reducer);j&&_.addDefaultCase(j)})}const p=b=>b,m=new Map;let g;function v(b,S){return g||(g=f()),g(b,S)}function x(){return g||(g=f()),g.getInitialState()}function h(b,S=!1){function j(_){let E=_[b];return typeof E>"u"&&S&&(E=x()),E}function C(_=p){const E=Jh(m,S,{insert:()=>new WeakMap});return Jh(E,_,{insert:()=>{const N={};for(const[R,O]of Object.entries(o.selectors??{}))N[R]=wC(O,_,x,S);return N}})}return{reducerPath:b,getSelectors:C,get selectors(){return C(j)},selectSlice:j}}const y={name:s,reducer:v,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:x,...h(i),injectInto(b,{reducerPath:S,...j}={}){const C=S??i;return b.inject({reducerPath:C,reducer:v},j),{...y,...h(C,!0)}}};return y}}function wC(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 Lr=bC();function SC(){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 jC({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!_C(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?Rn(e,i):Rn(e))}function CC(e){return e._reducerDefinitionType==="asyncThunk"}function _C(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EC({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||Ii,pending:l||Ii,rejected:c||Ii,settled:u||Ii})}function Ii(){}var RC=(e,t)=>{if(typeof e!="function")throw new Error(mt(32))},$f="listenerMiddleware",NC=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=Rn(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 RC(s),{predicate:o,type:t,effect:s}},kC=Object.assign(e=>{const{type:t,predicate:n,effect:r}=NC(e);return{id:cx(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>kC}),OC=Object.assign(Rn(`${$f}/add`),{withTypes:()=>OC});Rn(`${$f}/removeAll`);var TC=Object.assign(Rn(`${$f}/remove`),{withTypes:()=>TC});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 ux={exports:{}},dx={};/**
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 tj=typeof WeakMap=="function"?WeakMap:Map;function wy(e,t,n){n=kn(-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 Sy(e,t,n){n=kn(-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"&&(sr===null?sr=new Set([this]):sr.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 tj;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=mj.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=kn(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var nj=Vn.ReactCurrentOwner,pt=!1;function st(e,t,n,r){t.child=e===null?ey(t,null,n,r):So(t,e.child,n,r)}function Nh(e,t,n,r,o){n=n.render;var s=t.ref;return po(t,o),r=pf(e,t,n,r,s,o),n=hf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,An(e,t,o)):(_e&&n&&ef(t),t.flags|=1,st(e,t,r,o),t.child)}function kh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Cf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,jy(e,t,s,r,o)):(e=na(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:Ps,n(i,r)&&e.ref===t.ref)return An(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function jy(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ps(s,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(pt=!0);else return t.lanes=e.lanes,An(e,t,o)}return $u(e,t,n,r,o)}function Cy(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(io,St),St|=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(io,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(io,St),St|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(io,St),St|=r;return st(e,t,o,n),t.child}function _y(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=mt(n)?Nr:nt.current;return s=bo(t,s),po(t,o),n=pf(e,t,n,r,s,o),r=hf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,An(e,t,o)):(_e&&r&&ef(t),t.flags|=1,st(e,t,n,o),t.child)}function Oh(e,t,n,r,o){if(mt(n)){var s=!0;Ta(t)}else s=!1;if(po(t,o),t.stateNode===null)Ji(e,t),Zv(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=Ut(u):(u=mt(n)?Nr:nt.current,u=bo(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||ht.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,Qv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Kt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ut(c):(c=mt(n)?Nr:nt.current,c=bo(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 x=t.memoizedState;l!==f||p!==x||ht.current||Kn?(typeof m=="function"&&(Tu(t,n,m,r),x=t.memoizedState),(u=Kn||bh(t,n,u,r,p,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,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=x),i.props=r,i.state=x,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){_y(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&mh(t,n,!1),An(e,t,s);r=t.stateNode,nj.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=So(t,e.child,null,s),t.child=So(t,null,l,s)):st(e,t,l,s),t.memoizedState=r.state,o&&mh(t,n,!0),t.child}function Ey(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 wo(),nf(o),t.flags|=256,st(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 Ry(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 ku(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=Cr(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 rj(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=Cr(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=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 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),So(t,e.child,null,n),e=vf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rj(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=Cr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&So(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,pt||l){if(r=qe,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,Mn(e,o),Zt(r,e,o,-1))}return jf(),r=Rc(Error(I(421))),Ni(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=gj.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,jt=rr(o.nextSibling),Ct=t,_e=!0,Gt=null,e!==null&&(Mt[At++]=En,Mt[At++]=Rn,Mt[At++]=kr,En=e.id,Rn=e.overflow,kr=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 Nc(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 Ny(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(st(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),Nc(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}Nc(t,!0,n,null,s);break;case"together":Nc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function An(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tr|=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 oj(e,t,n){switch(t.tag){case 3:Ey(t),wo();break;case 5:ty(t);break;case 1:mt(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?Ry(e,t,n):(xe(Ee,Ee.current&1),e=An(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 Ny(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,Cy(e,t,n)}return An(e,t,n)}var ky,Fu,Oy,Ty;ky=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(){};Oy=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(un.current);var s=null;switch(n){case"input":o=iu(e,o),r=iu(e,r),s=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},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=ka)}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"&&(_s.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"&&(_s.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&we("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)}};Ty=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zo(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 Je(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 sj(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 Je(t),null;case 1:return mt(t.type)&&Oa(),Je(t),null;case 3:return r=t.stateNode,jo(),je(ht),je(nt),df(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gt!==null&&(Wu(Gt),Gt=null))),Fu(e,t),Je(t),null;case 5:uf(t);var o=wr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)Oy(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 Je(t),null}if(e=wr(un.current),Ei(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ln]=t,r[Ms]=s,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":Vp(r,s),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},we("invalid",r);break;case"textarea":Bp(r,s),we("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&&_i(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&_i(r.textContent,l,e),o=["children",""+l]):_s.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&we("scroll",r)}switch(n){case"input":vi(r),zp(r,s,!0);break;case"textarea":vi(r),qp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ka)}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=ov(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[ln]=t,e[Ms]=r,ky(e,t,!1,!1),t.stateNode=e;e:{switch(i=fu(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],e);o=r;break;case"source":we("error",e),o=r;break;case"img":case"image":case"link":we("error",e),we("load",e),o=r;break;case"details":we("toggle",e),o=r;break;case"input":Vp(e,r),o=iu(e,r),we("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ke({},r,{value:void 0}),we("invalid",e);break;case"textarea":Bp(e,r),o=cu(e,r),we("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"?av(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&sv(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Es(e,c):typeof c=="number"&&Es(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(_s.hasOwnProperty(s)?c!=null&&s==="onScroll"&&we("scroll",e):c!=null&&Ud(e,s,c,i))}switch(n){case"input":vi(e),zp(e,r,!1);break;case"textarea":vi(e),qp(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?lo(e,!!r.multiple,s,!1):r.defaultValue!=null&&lo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ka)}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 Je(t),null;case 6:if(e&&t.stateNode!=null)Ty(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ds.current),wr(un.current),Ei(t)){if(r=t.stateNode,n=t.memoizedProps,r[ln]=t,(s=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:_i(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_i(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ln]=t,t.stateNode=r}return Je(t),null;case 13:if(je(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&jt!==null&&t.mode&1&&!(t.flags&128))Yv(),wo(),t.flags|=98560,s=!1;else if(s=Ei(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[ln]=t}else wo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(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?Le===0&&(Le=3):jf())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return jo(),Fu(e,t),e===null&&Is(t.stateNode.containerInfo),Je(t),null;case 10:return sf(t.type._context),Je(t),null;case 17:return mt(t.type)&&Oa(),Je(t),null;case 19:if(je(Ee),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Zo(s,!1);else{if(Le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Da(e),i!==null){for(t.flags|=128,Zo(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&&$e()>_o&&(t.flags|=128,r=!0,Zo(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),Zo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return Je(t),null}else 2*$e()-s.renderingStartTime>_o&&n!==1073741824&&(t.flags|=128,r=!0,Zo(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=$e(),t.sibling=null,n=Ee.current,xe(Ee,r?n&1|2:n&1),t):(Je(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?St&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function ij(e,t){switch(tf(t),t.tag){case 1:return mt(t.type)&&Oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),je(ht),je(nt),df(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uf(t),null;case 13:if(je(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Ee),null;case 4:return jo(),null;case 10:return sf(t.type._context),null;case 22:case 23:return Sf(),null;case 24:return null;default:return null}}var ki=!1,tt=!1,aj=typeof WeakSet=="function"?WeakSet:Set,z=null;function so(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 lj(e,t){if(Su=Ea,e=Mv(),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(ju={focusedElem:e,selectionRange:n},Ea=!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 x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,v=x.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Kt(t.type,y),v);h.__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){Oe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return x=Ih,Ih=!1,x}function xs(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 jl(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 Py(e){var t=e.alternate;t!==null&&(e.alternate=null,Py(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ln],delete t[Ms],delete t[Eu],delete t[qS],delete t[HS])),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 Iy(e){return e.tag===5||e.tag===3||e.tag===4}function $h(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iy(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=ka));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 Ke=null,Yt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)$y(e,t,n),n=n.sibling}function $y(e,t,n){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:tt||so(n,t);case 6:var r=Ke,o=Yt;Ke=null,Hn(e,t,n),Ke=r,Yt=o,Ke!==null&&(Yt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Yt?(e=Ke,n=n.stateNode,e.nodeType===8?wc(e.parentNode,n):e.nodeType===1&&wc(e,n),Os(e)):wc(Ke,n.stateNode));break;case 4:r=Ke,o=Yt,Ke=n.stateNode.containerInfo,Yt=!0,Hn(e,t,n),Ke=r,Yt=o;break;case 0:case 11:case 14:case 15:if(!tt&&(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(!tt&&(so(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?(tt=(r=tt)||n.memoizedState!==null,Hn(e,t,n),tt=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 aj),t.forEach(function(r){var o=vj.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ht(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:Ke=l.stateNode,Yt=!1;break e;case 3:Ke=l.stateNode.containerInfo,Yt=!0;break e;case 4:Ke=l.stateNode.containerInfo,Yt=!0;break e}l=l.return}if(Ke===null)throw Error(I(160));$y(s,i,o),Ke=null,Yt=!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;)My(t,e),t=t.sibling}function My(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(t,e),tn(e),r&4){try{xs(3,e,e.return),jl(3,e)}catch(y){Oe(e,e.return,y)}try{xs(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:Ht(t,e),tn(e),r&512&&n!==null&&so(n,n.return);break;case 5:if(Ht(t,e),tn(e),r&512&&n!==null&&so(n,n.return),e.flags&32){var o=e.stateNode;try{Es(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&&nv(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"?av(o,f):d==="dangerouslySetInnerHTML"?sv(o,f):d==="children"?Es(o,f):Ud(o,d,f,u)}switch(l){case"input":au(o,s);break;case"textarea":rv(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?lo(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?lo(o,!!s.multiple,s.defaultValue,!0):lo(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ms]=s}catch(y){Oe(e,e.return,y)}}break;case 6:if(Ht(t,e),tn(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(Ht(t,e),tn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:Ht(t,e),tn(e);break;case 13:Ht(t,e),tn(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(bf=$e())),r&4&&Mh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(u=tt)||d,Ht(t,e),tt=u):Ht(t,e),tn(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,m=p.child,p.tag){case 0:case 11:case 14:case 15:xs(4,p,p.return);break;case 1:so(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(y){Oe(r,n,y)}}break;case 5:so(p,p.return);break;case 22:if(p.memoizedState!==null){Dh(f);continue}}m!==null?(m.return=p,z=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=iv("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:Ht(t,e),tn(e),r&4&&Mh(e);break;case 21:break;default:Ht(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Iy(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&&(Es(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 cj(e,t,n){z=e,Ay(e)}function Ay(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||ki;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||tt;l=ki;var u=tt;if(ki=i,(tt=c)&&!u)for(z=o;z!==null;)i=z,c=i.child,i.tag===22&&i.memoizedState!==null?Fh(o):c!==null?(c.return=i,z=c):Fh(o);for(;s!==null;)z=s,Ay(s),s=s.sibling;z=o,ki=l,tt=u}Ah(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,z=s):Ah(e)}}function Ah(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:tt||jl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kt(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&&Os(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}tt||t.flags&512&&Uu(t)}catch(p){Oe(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 Dh(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 Fh(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jl(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){z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,z=l;break}z=t.return}}var uj=Math.ceil,Ua=Vn.ReactCurrentDispatcher,yf=Vn.ReactCurrentOwner,Lt=Vn.ReactCurrentBatchConfig,le=0,qe=null,Ae=null,Ge=0,St=0,io=pr(0),Le=0,Vs=null,Tr=0,Cl=0,xf=0,bs=null,ft=null,bf=0,_o=1/0,wn=null,Va=!1,Bu=null,sr=null,Oi=!1,Jn=null,za=0,ws=0,qu=null,ea=-1,ta=0;function at(){return le&6?$e():ea!==-1?ea:ea=$e()}function ir(e){return e.mode&1?le&2&&Ge!==0?Ge&-Ge:KS.transition!==null?(ta===0&&(ta=xv()),ta):(e=ve,e!==0||(e=window.event,e=e===void 0?16:Ev(e.type)),e):1}function Zt(e,t,n,r){if(50<ws)throw ws=0,qu=null,Error(I(185));ti(e,n,r),(!(le&2)||e!==qe)&&(e===qe&&(!(le&2)&&(Cl|=n),Le===4&&Qn(e,Ge)),gt(e,r),n===1&&le===0&&!(t.mode&1)&&(_o=$e()+500,bl&&hr()))}function gt(e,t){var n=e.callbackNode;K1(e,t);var r=_a(e,e===qe?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?WS(Lh.bind(null,e)):Hv(Lh.bind(null,e)),zS(function(){!(le&6)&&hr()}),n=null;else{switch(bv(r)){case 1:n=Hd;break;case 4:n=vv;break;case 16:n=Ca;break;case 536870912:n=yv;break;default:n=Ca}n=qy(n,Dy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dy(e,t){if(ea=-1,ta=0,le&6)throw Error(I(327));var n=e.callbackNode;if(ho()&&e.callbackNode!==n)return null;var r=_a(e,e===qe?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ba(e,r);else{t=r;var o=le;le|=2;var s=Ly();(qe!==e||Ge!==t)&&(wn=null,_o=$e()+500,jr(e,t));do try{pj();break}catch(l){Fy(e,l)}while(!0);of(),Ua.current=s,le=o,Ae!==null?t=0:(qe=null,Ge=0,t=Le)}if(t!==0){if(t===2&&(o=vu(e),o!==0&&(r=o,t=Hu(e,o))),t===1)throw n=Vs,jr(e,0),Qn(e,r),gt(e,$e()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!dj(o)&&(t=Ba(e,r),t===2&&(s=vu(e),s!==0&&(r=s,t=Hu(e,s))),t===1))throw n=Vs,jr(e,0),Qn(e,r),gt(e,$e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ft,wn);break;case 3:if(Qn(e,r),(r&130023424)===r&&(t=bf+500-$e(),10<t)){if(_a(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){at(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_u(vr.bind(null,e,ft,wn),t);break}vr(e,ft,wn);break;case 4:if(Qn(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=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*uj(r/1960))-r,10<r){e.timeoutHandle=_u(vr.bind(null,e,ft,wn),r);break}vr(e,ft,wn);break;case 5:vr(e,ft,wn);break;default:throw Error(I(329))}}}return gt(e,$e()),e.callbackNode===n?Dy.bind(null,e):null}function Hu(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(jr(e,t).flags|=256),e=Ba(e,t),e!==2&&(t=ft,ft=n,t!==null&&Wu(t)),e}function Wu(e){ft===null?ft=e:ft.push.apply(ft,e)}function dj(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 Qn(e,t){for(t&=~xf,t&=~Cl,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 Lh(e){if(le&6)throw Error(I(327));ho();var t=_a(e,0);if(!(t&1))return gt(e,$e()),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=Vs,jr(e,0),Qn(e,t),gt(e,$e()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ft,wn),gt(e,$e()),null}function wf(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(_o=$e()+500,bl&&hr())}}function Pr(e){Jn!==null&&Jn.tag===0&&!(le&6)&&ho();var t=le;le|=1;var n=Lt.transition,r=ve;try{if(Lt.transition=null,ve=1,e)return e()}finally{ve=r,Lt.transition=n,le=t,!(le&6)&&hr()}}function Sf(){St=io.current,je(io)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,VS(n)),Ae!==null)for(n=Ae.return;n!==null;){var r=n;switch(tf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Oa();break;case 3:jo(),je(ht),je(nt),df();break;case 5:uf(r);break;case 4:jo();break;case 13:je(Ee);break;case 19:je(Ee);break;case 10:sf(r.type._context);break;case 22:case 23:Sf()}n=n.return}if(qe=e,Ae=e=ar(e.current,null),Ge=St=t,Le=0,Vs=null,xf=Cl=Tr=0,ft=bs=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 Fy(e,t){do{var n=Ae;try{if(of(),Xi.current=La,Fa){for(var r=Ne.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Fa=!1}if(Or=0,Be=Fe=Ne=null,ys=!1,Fs=0,yf.current=null,n===null||n.return===null){Le=1,Vs=t,Ae=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 x=t.updateQueue;if(x===null){var y=new Set;y.add(c),t.updateQueue=y}else x.add(c);break e}else{if(!(t&1)){_h(s,u,t),jf();break e}c=Error(I(426))}}else if(_e&&l.mode&1){var v=Eh(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Rh(v,i,l,s,t),nf(Co(c,l));break e}}s=c=Co(c,l),Le!==4&&(Le=2),bs===null?bs=[s]:bs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=wy(s,c,t);yh(s,h);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=Sy(s,l,t);yh(s,S);break e}}s=s.return}while(s!==null)}Vy(n)}catch(j){t=j,Ae===n&&n!==null&&(Ae=n=n.return);continue}break}while(!0)}function Ly(){var e=Ua.current;return Ua.current=La,e===null?La:e}function jf(){(Le===0||Le===3||Le===2)&&(Le=4),qe===null||!(Tr&268435455)&&!(Cl&268435455)||Qn(qe,Ge)}function Ba(e,t){var n=le;le|=2;var r=Ly();(qe!==e||Ge!==t)&&(wn=null,jr(e,t));do try{fj();break}catch(o){Fy(e,o)}while(!0);if(of(),le=n,Ua.current=r,Ae!==null)throw Error(I(261));return qe=null,Ge=0,Le}function fj(){for(;Ae!==null;)Uy(Ae)}function pj(){for(;Ae!==null&&!F1();)Uy(Ae)}function Uy(e){var t=By(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?Vy(e):Ae=t,yf.current=null}function Vy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ij(n,t),n!==null){n.flags&=32767,Ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Ae=null;return}}else if(n=sj(n,t,St),n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Le===0&&(Le=5)}function vr(e,t,n){var r=ve,o=Lt.transition;try{Lt.transition=null,ve=1,hj(e,t,n,r)}finally{Lt.transition=o,ve=r}return null}function hj(e,t,n,r){do ho();while(Jn!==null);if(le&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(Y1(e,s),e===qe&&(Ae=qe=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Oi||(Oi=!0,qy(Ca,function(){return ho(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Lt.transition,Lt.transition=null;var i=ve;ve=1;var l=le;le|=4,yf.current=null,lj(e,n),My(n,e),$S(ju),Ea=!!Su,ju=Su=null,e.current=n,cj(n),L1(),le=l,ve=i,Lt.transition=s}else e.current=n;if(Oi&&(Oi=!1,Jn=e,za=o),s=e.pendingLanes,s===0&&(sr=null),z1(n.stateNode),gt(e,$e()),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&&ho(),s=e.pendingLanes,s&1?e===qu?ws++:(ws=0,qu=e):ws=0,hr(),null}function ho(){if(Jn!==null){var e=bv(za),t=Lt.transition,n=ve;try{if(Lt.transition=null,ve=16>e?16:e,Jn===null)var r=!1;else{if(e=Jn,Jn=null,za=0,le&6)throw Error(I(331));var o=le;for(le|=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:xs(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,m=d.return;if(Py(d),d===u){z=null;break}if(p!==null){p.return=m,z=p;break}z=m}}}var x=s.alternate;if(x!==null){var y=x.child;if(y!==null){x.child=null;do{var v=y.sibling;y.sibling=null,y=v}while(y!==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:xs(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,z=h;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:jl(9,l)}}catch(j){Oe(l,l.return,j)}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(le=o,hr(),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(ml,e)}catch{}r=!0}return r}finally{ve=n,Lt.transition=t}}return!1}function Uh(e,t,n){t=Co(n,t),t=wy(e,t,1),e=or(e,t,1),t=at(),e!==null&&(ti(e,1,t),gt(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"&&(sr===null||!sr.has(r))){e=Co(n,e),e=Sy(t,e,1),t=or(t,e,1),e=at(),t!==null&&(ti(t,1,e),gt(t,e));break}}t=t.return}}function mj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Ge&n)===n&&(Le===4||Le===3&&(Ge&130023424)===Ge&&500>$e()-bf?jr(e,0):xf|=n),gt(e,t)}function zy(e,t){t===0&&(e.mode&1?(t=bi,bi<<=1,!(bi&130023424)&&(bi=4194304)):t=1);var n=at();e=Mn(e,t),e!==null&&(ti(e,t,n),gt(e,n))}function gj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zy(e,n)}function vj(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),zy(e,n)}var By;By=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pt=!1,oj(e,t,n);pt=!!(e.flags&131072)}else pt=!1,_e&&t.flags&1048576&&Wv(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var o=bo(t,nt.current);po(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,mt(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,_e&&s&&ef(t),st(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xj(r),e=Kt(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=Nh(null,t,r,e,n);break e;case 14:t=kh(null,t,r,Kt(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:Kt(r,o),$u(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Oh(e,t,r,o,n);case 3:e:{if(Ey(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Qv(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(jt=rr(t.stateNode.containerInfo.firstChild),Ct=t,_e=!0,Gt=null,n=ey(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===o){t=An(e,t,n);break e}st(e,t,r,n)}t=t.child}return t;case 5:return ty(t),e===null&&ku(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Cu(r,o)?i=null:s!==null&&Cu(r,s)&&(t.flags|=32),_y(e,t),st(e,t,i,n),t.child;case 6:return e===null&&ku(t),null;case 13:return Ry(e,t,n);case 4:return cf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):st(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Nh(e,t,r,o,n);case 7:return st(e,t,t.pendingProps,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(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(en(s.value,i)){if(s.children===o.children&&!ht.current){t=An(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=kn(-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}st(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=Ut(o),r=r(o),t.flags|=1,st(e,t,r,n),t.child;case 14:return r=t.type,o=Kt(r,t.pendingProps),o=Kt(r.type,o),kh(e,t,r,o,n);case 15:return jy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Ji(e,t),t.tag=1,mt(r)?(e=!0,Ta(t)):e=!1,po(t,n),Zv(t,r,o),Pu(t,r,o,n),Mu(null,t,r,!0,e,n);case 19:return Ny(e,t,n);case 22:return Cy(e,t,n)}throw Error(I(156,t.tag))};function qy(e,t){return gv(e,t)}function yj(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 yj(e,t,n,r)}function Cf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xj(e){if(typeof e=="function")return Cf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zd)return 11;if(e===Bd)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 na(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Cf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Qr:return Cr(n.children,o,s,t);case Vd:i=8,o|=8;break;case nu:return e=Ft(12,n,t,o|2),e.elementType=nu,e.lanes=s,e;case ru:return e=Ft(13,n,t,o),e.elementType=ru,e.lanes=s,e;case ou:return e=Ft(19,n,t,o),e.elementType=ou,e.lanes=s,e;case Jg:return _l(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xg:i=10;break e;case Zg: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=Ft(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Cr(e,t,n,r){return e=Ft(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=Ft(22,e,r,t),e.elementType=Jg,e.lanes=n,e.stateNode={isHidden:!1},e}function kc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Oc(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 bj(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 bj(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},lf(s),e}function wj(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 Hy(e){if(!e)return cr;e=e._reactInternals;e:{if(Fr(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(mt(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(mt(n))return qv(e,n,t)}return t}function Wy(e,t,n,r,o,s,i,l,c){return e=_f(n,r,!0,e,o,s,i,l,c),e.context=Hy(null),n=e.current,r=at(),o=ir(n),s=kn(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,ti(e,o,r),gt(e,r),e}function El(e,t,n,r){var o=t.current,s=at(),i=ir(o);return n=Hy(n),t.context===null?t.context=n:t.pendingContext=n,t=kn(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),Qi(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 Sj(){return null}var Ky=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;Pr(function(){El(null,e,null,null)}),t[$n]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=jv();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&&_v(e)}};function Nf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zh(){}function jj(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=Wy(t,r,e,0,null,!1,!1,"",zh);return e._reactRootContainer=i,e[$n]=i.current,Is(e.nodeType===8?e.parentNode:e),Pr(),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[$n]=c.current,Is(e.nodeType===8?e.parentNode:e),Pr(function(){El(t,c,n,r)}),c}function kl(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=jj(n,t,e,o,r);return qa(i)}wv=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),gt(t,$e()),!(le&6)&&(_o=$e()+500,hr()))}break;case 13:Pr(function(){var r=Mn(e,1);if(r!==null){var o=at();Zt(r,e,1,o)}}),Ef(e,1)}};Kd=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=at();Zt(t,e,134217728,n)}Ef(e,134217728)}};Sv=function(e){if(e.tag===13){var t=ir(e),n=Mn(e,t);if(n!==null){var r=at();Zt(n,e,t,r)}Ef(e,t)}};jv=function(){return ve};Cv=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=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));tv(r),au(r,o)}}}break;case"textarea":rv(e,n);break;case"select":t=n.value,t!=null&&lo(e,!!n.multiple,t,!1)}};uv=wf;dv=Pr;var Cj={usingClientEntryPoint:!1,Events:[ri,eo,xl,lv,cv,wf]},Jo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},_j={bundleType:Jo.bundleType,version:Jo.version,rendererPackageName:Jo.rendererPackageName,rendererConfig:Jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hv(e),e===null?null:e.stateNode},findFiberByHostInstance:Jo.findFiberByHostInstance||Sj,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 Ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ti.isDisabled&&Ti.supportsFiber)try{ml=Ti.inject(_j),cn=Ti}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cj;Tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nf(t))throw Error(I(200));return wj(e,t,null,n)};Tt.createRoot=function(e,t){if(!Nf(e))throw Error(I(299));var n=!1,r="",o=Ky;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[$n]=t.current,Is(e.nodeType===8?e.parentNode:e),new Rf(t)};Tt.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=hv(t),e=e===null?null:e.stateNode,e};Tt.flushSync=function(e){return Pr(e)};Tt.hydrate=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!0,n)};Tt.hydrateRoot=function(e,t,n){if(!Nf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Ky;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Wy(t,null,e,1,n??null,o,!1,s,i),e[$n]=t.current,Is(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)};Tt.render=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!1,n)};Tt.unmountComponentAtNode=function(e){if(!Nl(e))throw Error(I(40));return e._reactRootContainer?(Pr(function(){kl(null,null,e,!1,function(){e._reactRootContainer=null,e[$n]=null})}),!0):!1};Tt.unstable_batchedUpdates=wf;Tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Nl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return kl(e,t,n,!1,r)};Tt.version="18.2.0-next-9e3b772b8-20220608";function Yy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yy)}catch(e){console.error(e)}}Yy(),Wg.exports=Tt;var kf=Wg.exports;const Sr=Js(kf);var Bh=kf;bt.createRoot=Bh.createRoot,bt.hydrateRoot=Bh.hydrateRoot;function We(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 Ej=typeof Symbol=="function"&&Symbol.observable||"@@observable",qh=Ej,Tc=()=>Math.random().toString(36).substring(7).split("").join("."),Rj={INIT:`@@redux/INIT${Tc()}`,REPLACE:`@@redux/REPLACE${Tc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tc()}`},Ha=Rj;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 Gy(e,t,n){if(typeof e!="function")throw new Error(We(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(We(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(We(1));return n(Gy)(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((v,h)=>{i.set(h,v)}))}function d(){if(c)throw new Error(We(3));return o}function f(v){if(typeof v!="function")throw new Error(We(4));if(c)throw new Error(We(5));let h=!0;u();const g=l++;return i.set(g,v),function(){if(h){if(c)throw new Error(We(6));h=!1,u(),i.delete(g),s=null}}}function p(v){if(!Of(v))throw new Error(We(7));if(typeof v.type>"u")throw new Error(We(8));if(typeof v.type!="string")throw new Error(We(17));if(c)throw new Error(We(9));try{c=!0,o=r(o,v)}finally{c=!1}return(s=i).forEach(g=>{g()}),v}function m(v){if(typeof v!="function")throw new Error(We(10));r=v,p({type:Ha.REPLACE})}function x(){const v=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(We(11));function g(){const S=h;S.next&&S.next(d())}return g(),{unsubscribe:v(g)}},[qh](){return this}}}return p({type:Ha.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[qh]:x}}function Nj(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ha.INIT})>"u")throw new Error(We(12));if(typeof n(void 0,{type:Ha.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(We(13))})}function kj(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{Nj(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],x=p(m,l);if(typeof x>"u")throw l&&l.type,new Error(We(14));u[f]=x,c=c||x!==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 Oj(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(We(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 Tj(e){return Of(e)&&"type"in e&&typeof e.type=="string"}var Qy=Symbol.for("immer-nothing"),Hh=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state");function Qt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Eo=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Rt]}function Dn(e){var t;return e?Xy(e)||Array.isArray(e)||!!e[Hh]||!!((t=e.constructor)!=null&&t[Hh])||Tl(e)||Pl(e):!1}var Pj=Object.prototype.constructor.toString();function Xy(e){if(!e||typeof e!="object")return!1;const t=Eo(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)===Pj}function zs(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[Rt];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 Zy(e,t,n){const r=Ol(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ij(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 yr(e){return e.copy_||e.base_}function Yu(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&&Xy(e))return Eo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Rt];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(Eo(e),n)}function Tf(e,t=!1){return Il(e)||ur(e)||!Dn(e)||(Ol(e)>1&&(e.set=e.add=e.clear=e.delete=$j),Object.freeze(e),t&&zs(e,(n,r)=>Tf(r,!0))),e}function $j(){Qt(2)}function Il(e){return Object.isFrozen(e)}var Mj={};function Ir(e){const t=Mj[e];return t||Qt(0,e),t}var Bs;function Jy(){return Bs}function Aj(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wh(e,t){t&&(Ir("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gu(e){Qu(e),e.drafts_.forEach(Dj),e.drafts_=null}function Qu(e){e===Bs&&(Bs=e.parent_)}function Kh(e){return Bs=Aj(Bs,e)}function Dj(e){const t=e[Rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rt].modified_&&(Gu(t),Qt(4)),Dn(e)&&(e=Ka(t,e),t.parent_||Ya(t,e)),t.patches_&&Ir("Patches").generateReplacementPatches_(n[Rt].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),Gu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Qy?e:void 0}function Ka(e,t,n){if(Il(t))return t;const r=t[Rt];if(!r)return zs(t,(o,s)=>Gh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ya(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),zs(s,(l,c)=>Gh(e,r,o,l,c,n,i)),Ya(e,o,!1),n&&e.patches_&&Ir("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Gh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!Ku(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(Zy(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Dn(o)&&!Il(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,o),(!t||!t.scope_.parent_)&&Ya(e,o)}}function Ya(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tf(t,n)}function Fj(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Jy(),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=qs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var Pf={get(e,t){if(t===Rt)return e;const n=yr(e);if(!Ku(n,t))return Lj(e,n,t);const r=n[t];return e.finalized_||!Dn(r)?r:r===Pc(e.base_,t)?(Ic(e),e.copy_[t]=Zu(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=ex(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Pc(yr(e),t),s=o==null?void 0:o[Rt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ij(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=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 Eo(e.base_)},setPrototypeOf(){Qt(12)}},qs={};zs(Pf,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.set=function(e,t,n){return Pf.set.call(this,e[0],t,n,e[0])};function Pc(e,t){const n=e[Rt];return(n?yr(n):e)[t]}function Lj(e,t,n){var o;const r=ex(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ex(e,t){if(!(t in e))return;let n=Eo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Eo(n)}}function Xu(e){e.modified_||(e.modified_=!0,e.parent_&&Xu(e.parent_))}function Ic(e){e.copy_||(e.copy_=Yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uj=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(Dn(t)){const s=Kh(this),i=Zu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Gu(s):Qu(s)}return Wh(s,r),Yh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Qy&&(o=void 0),this.autoFreeze_&&Tf(o,!0),r){const s=[],i=[];Ir("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){Dn(e)||Qt(8),ur(e)&&(e=tx(e));const t=Kh(this),n=Zu(e,void 0);return n[Rt].isManual_=!0,Qu(t),n}finishDraft(e,t){const n=e&&e[Rt];(!n||!n.isManual_)&&Qt(9);const{scope_:r}=n;return Wh(r,t),Yh(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=Ir("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Zu(e,t){const n=Tl(e)?Ir("MapSet").proxyMap_(e,t):Pl(e)?Ir("MapSet").proxySet_(e,t):Fj(e,t);return(t?t.scope_:Jy()).drafts_.push(n),n}function tx(e){return ur(e)||Qt(10,e),nx(e)}function nx(e){if(!Dn(e)||Il(e))return e;const t=e[Rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yu(e,!0);return zs(n,(r,o)=>{Zy(n,r,nx(o))}),t&&(t.finalized_=!1),n}var Nt=new Uj,rx=Nt.produce;Nt.produceWithPatches.bind(Nt);Nt.setAutoFreeze.bind(Nt);Nt.setUseStrictShallowCopy.bind(Nt);Nt.applyPatches.bind(Nt);Nt.createDraft.bind(Nt);Nt.finishDraft.bind(Nt);function Vj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Bj(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 qj(e){const t=Array.isArray(e[0])?e[0]:e;return Bj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Hj(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Wj=class{constructor(e){this.value=e}deref(){return this.value}},Kj=typeof WeakRef<"u"?WeakRef:Wj,Yj=0,Xh=1;function Pi(){return{s:Yj,v:void 0,o:null,p:null}}function If(e,t={}){let n=Pi();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 x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const v=y.get(x);v===void 0?(l=Pi(),y.set(x,l)):l=v}else{let y=l.p;y===null&&(l.p=y=new Map);const v=y.get(x);v===void 0?(l=Pi(),y.set(x,l)):l=v}}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 Kj(d):d}return u.v=d,d}return i.clearCache=()=>{n=Pi(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function ox(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()),Vj(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:x=[],devModeChecks:y={}}=d,v=Qh(p),h=Qh(x),g=qj(o),b=f(function(){return s++,u.apply(null,arguments)},...v),S=m(function(){i++;const C=Hj(g,arguments);return l=b.apply(null,C),l},...h);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:m})};return Object.assign(r,{withTypes:()=>r}),r}var Gj=ox(If),Qj=Object.assign((e,t=Gj)=>{zj(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:()=>Qj});function sx(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Xj=sx(),Zj=sx,Jj=(...e)=>{const t=ox(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?tx(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};Jj(If);var eC=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)},tC=e=>e&&typeof e.match=="function";function On(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(vt(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=>Tj(r)&&r.type===e,n}var ix=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 Dn(e)?rx(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(vt(10));const r=n.insert(t,e);return e.set(t,r),r}function nC(e){return typeof e=="boolean"}var rC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new ix;return n&&(nC(n)?i.push(Xj):i.push(Zj(n.extraArgument))),i},oC="RTK_autoBatch",ax=e=>t=>{setTimeout(t,e)},sC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ax(10),iC=(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"?sC:e.type==="callback"?e.queueNotification:ax(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[oC]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},aC=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new ix(e);return r&&o.push(iC(typeof r=="object"?r:void 0)),o},lC=!0;function zn(e){const t=rC(),{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=kj(n);else throw new Error(vt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=eC({trace:!lC,...typeof o=="object"&&o}));const d=Oj(...c),f=aC(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Gy(l,s,m)}function lx(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(vt(28));if(l in t)throw new Error(vt(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 cC(e){return typeof e=="function"}function uC(e,t){let[n,r,o]=lx(t),s;if(cC(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(ur(d)){const m=f(d,c);return m===void 0?d:m}else{if(Dn(d))return rx(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(vt(9))}return p}}return d},l)}return i.getInitialState=s,i}var dC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cx=(e=21)=>{let t="",n=e;for(;n--;)t+=dC[Math.random()*64|0];return t},fC=(e,t)=>tC(e)?e.match(t):e(t);function pC(...e){return t=>e.some(n=>fC(n,t))}var hC=["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}},mC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of hC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},rt=(()=>{function e(t,n,r){const o=On(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=On(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=On(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||mC)(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):cx(),m=new AbortController;let x,y;function v(g){y=g,m.abort()}const h=async function(){var S,j;let g;try{let C=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(vC(C)&&(C=await C),C===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((_,N)=>{x=()=>{N({name:"AbortError",message:y||"Aborted"})},m.signal.addEventListener("abort",x)});u(s(p,c,(j=r==null?void 0:r.getPendingMeta)==null?void 0:j.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),g=await Promise.race([E,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:v,rejectWithValue:(_,N)=>new $c(_,N),fulfillWithValue:(_,N)=>new em(_,N)})).then(_=>{if(_ instanceof $c)throw _;return _ instanceof em?o(_.payload,p,c,_.meta):o(_,p,c)})])}catch(C){g=C instanceof $c?i(null,p,c,C.payload,C.meta):i(C,p,c)}finally{x&&m.signal.removeEventListener("abort",x)}return r&&!r.dispatchConditionRejection&&i.match(g)&&g.meta.condition||u(g),g}();return Object.assign(h,{abort:v,requestId:p,arg:c,unwrap(){return h.then(gC)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:pC(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function gC(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function vC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var yC=Symbol.for("rtk-slice-createasyncthunk");function xC(e,t){return`${e}/${t}`}function bC({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[yC];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(vt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(SC()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const j=typeof b=="string"?b:b.type;if(!j)throw new Error(vt(12));if(j in u.sliceCaseReducersByType)throw new Error(vt(13));return u.sliceCaseReducersByType[j]=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],j={reducerName:b,type:xC(s,b),createNotation:typeof o.reducers=="function"};CC(S)?EC(j,S,d,t):jC(j,S,d)});function f(){const[b={},S=[],j=void 0]=typeof o.extraReducers=="function"?lx(o.extraReducers):[o.extraReducers],C={...b,...u.sliceCaseReducersByType};return uC(o.initialState,E=>{for(let _ in C)E.addCase(_,C[_]);for(let _ of u.sliceMatchers)E.addMatcher(_.matcher,_.reducer);for(let _ of S)E.addMatcher(_.matcher,_.reducer);j&&E.addDefaultCase(j)})}const p=b=>b,m=new Map;let x;function y(b,S){return x||(x=f()),x(b,S)}function v(){return x||(x=f()),x.getInitialState()}function h(b,S=!1){function j(E){let _=E[b];return typeof _>"u"&&S&&(_=v()),_}function C(E=p){const _=Jh(m,S,{insert:()=>new WeakMap});return Jh(_,E,{insert:()=>{const N={};for(const[R,O]of Object.entries(o.selectors??{}))N[R]=wC(O,E,v,S);return N}})}return{reducerPath:b,getSelectors:C,get selectors(){return C(j)},selectSlice:j}}const g={name:s,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...h(i),injectInto(b,{reducerPath:S,...j}={}){const C=S??i;return b.inject({reducerPath:C,reducer:y},j),{...g,...h(C,!0)}}};return g}}function wC(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 Lr=bC();function SC(){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 jC({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!_C(r))throw new Error(vt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?On(e,i):On(e))}function CC(e){return e._reducerDefinitionType==="asyncThunk"}function _C(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EC({type:e,reducerName:t},n,r,o){if(!o)throw new Error(vt(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||Ii,pending:l||Ii,rejected:c||Ii,settled:u||Ii})}function Ii(){}var RC=(e,t)=>{if(typeof e!="function")throw new Error(vt(32))},$f="listenerMiddleware",NC=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=On(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(vt(21));return RC(s),{predicate:o,type:t,effect:s}},kC=Object.assign(e=>{const{type:t,predicate:n,effect:r}=NC(e);return{id:cx(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(vt(22))}}},{withTypes:()=>kC}),OC=Object.assign(On(`${$f}/add`),{withTypes:()=>OC});On(`${$f}/removeAll`);var TC=Object.assign(On(`${$f}/remove`),{withTypes:()=>TC});function vt(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 ux={exports:{}},dx={};/**
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 si=w;function PC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IC=typeof Object.is=="function"?Object.is:PC,$C=si.useSyncExternalStore,MC=si.useRef,AC=si.useEffect,DC=si.useMemo,FC=si.useDebugValue;dx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=MC(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=DC(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,IC(d,m))return g;var v=r(m);return o!==void 0&&o(g,v)?g:(d=m,f=v)}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=$C(e,s[0],s[1]);return AC(function(){i.hasValue=!0,i.value=l},[l]),FC(l),l};ux.exports=dx;var LC=ux.exports,le="default"in ba?Re:ba,tm=Symbol.for("react-redux-context"),nm=typeof globalThis<"u"?globalThis:{};function UC(){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 Mn=UC(),fx=()=>{throw new Error("uSES not initialized!")};function Mf(e=Mn){return function(){return le.useContext(e)}}var px=Mf(),hx=fx,VC=e=>{hx=e},zC=(e,t)=>e===t;function BC(e=Mn){const t=e===Mn?px:Mf(e),n=(r,o={})=>{const{equalityFn:s=zC,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=hx(c.addNestedSub,l.getState,u||l.getState,p,s);return le.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var G=BC(),qC=Symbol.for("react.element"),HC=Symbol.for("react.portal"),WC=Symbol.for("react.fragment"),KC=Symbol.for("react.strict_mode"),YC=Symbol.for("react.profiler"),GC=Symbol.for("react.provider"),QC=Symbol.for("react.context"),XC=Symbol.for("react.server_context"),mx=Symbol.for("react.forward_ref"),ZC=Symbol.for("react.suspense"),JC=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),e_=Symbol.for("react.lazy"),t_=mx,n_=Af;function r_(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case qC:{const n=e.type;switch(n){case WC:case YC:case KC:case ZC:case JC:return n;default:{const r=n&&n.$$typeof;switch(r){case XC:case QC:case mx:case e_:case Af:case GC:return r;default:return t}}}}case HC:return t}}}function o_(e){return r_(e)===Af}function s_(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function m(y,b){return c=y,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 v(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function x(){const y=e(c,u),b=!i(y,d);return d=y,b&&(p=n(d,f,u)),p}function h(y,b){const S=!s(b,u),j=!o(y,c,b,u);return c=y,u=b,S&&j?g():S?v():j?x():p}return function(b,S){return l?h(b,S):m(b,S)}}function i_(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return s_(s,i,l,e,o)}function a_(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 gx(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 l_(e){return e&&typeof e=="object"?Ju(t=>a_(e,t)):e?typeof e=="function"?gx(e):Df(e,"mapDispatchToProps"):Ju(t=>({dispatch:t}))}function c_(e){return e?typeof e=="function"?gx(e):Df(e,"mapStateToProps"):Ju(()=>({}))}function u_(e,t,n){return{...n,...e,...t}}function d_(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 f_(e){return e?typeof e=="function"?d_(e):Df(e,"mergeProps"):()=>u_}function p_(e){e()}function h_(){let e=null,t=null;return{clear(){e=null,t=null},notify(){p_(()=>{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 vx(e,t){let n,r=om,o=0,s=!1;function i(v){d();const x=r.subscribe(v);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=h_())}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 m_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ga=m_?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 g_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},v_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},y_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},x_={[t_]:y_,[n_]:yx};function im(e){return o_(e)?yx:x_[e.$$typeof]||g_}var b_=Object.defineProperty,w_=Object.getOwnPropertyNames,am=Object.getOwnPropertySymbols,S_=Object.getOwnPropertyDescriptor,j_=Object.getPrototypeOf,lm=Object.prototype;function ed(e,t){if(typeof t!="string"){if(lm){const s=j_(t);s&&s!==lm&&ed(e,s)}let n=w_(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(!v_[i]&&!(o&&o[i])&&!(r&&r[i])){const l=S_(t,i);try{b_(e,i,l)}catch{}}}}return e}var xx=fx,C_=e=>{xx=e},__=[null,null];function E_(e,t,n){Ga(()=>e(...t),n)}function R_(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function N_(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 v=t.getState();let x,h;try{x=r(v,o.current)}catch(y){h=y,p=y}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 k_(e,t){return e===t}function O_(e,t,n,{pure:r,areStatesEqual:o=k_,areOwnPropsEqual:s=Mc,areStatePropsEqual:i=Mc,areMergedPropsEqual:l=Mc,forwardRef:c=!1,context:u=Mn}={}){const d=u,f=c_(e),p=l_(t),m=f_(n),g=!!e;return x=>{const h=x.displayName||x.name||"Component",y=`Connect(${h})`,b={shouldHandleStateChanges:g,displayName:y,wrappedComponentName:h,WrappedComponent:x,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(_){const[E,N,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]),k=le.useContext(O),P=!!_.store&&!!_.store.getState&&!!_.store.dispatch,A=!!k&&!!k.store,D=P?_.store:k.store,V=A?k.getServerState:D.getState,X=le.useMemo(()=>i_(D.dispatch,b),[D]),[T,U]=le.useMemo(()=>{if(!g)return __;const L=vx(D,P?void 0:k.subscription),ne=L.notifyNestedSubs.bind(L);return[L,ne]},[D,P,k]),M=le.useMemo(()=>P?k:{...k,subscription:T},[P,k,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();Ga(()=>(te.current=!0,()=>{te.current=!1}),[]);const ae=le.useMemo(()=>()=>W.current&&R===z.current?W.current:X(D.getState(),R),[D,R]),ye=le.useMemo(()=>ne=>T?N_(g,D,T,X,z,H,J,te,W,U,ne):()=>{},[T]);E_(R_,[z,H,J,R,W,U]);let Se;try{Se=xx(ye,ae,V?()=>X(V(),R):ae)}catch(L){throw Z.current&&(L.message+=`
48
+ */var si=w;function PC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IC=typeof Object.is=="function"?Object.is:PC,$C=si.useSyncExternalStore,MC=si.useRef,AC=si.useEffect,DC=si.useMemo,FC=si.useDebugValue;dx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=MC(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=DC(function(){function c(m){if(!u){if(u=!0,d=m,m=r(m),o!==void 0&&i.hasValue){var x=i.value;if(o(x,m))return f=x}return f=m}if(x=f,IC(d,m))return x;var y=r(m);return o!==void 0&&o(x,y)?x:(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=$C(e,s[0],s[1]);return AC(function(){i.hasValue=!0,i.value=l},[l]),FC(l),l};ux.exports=dx;var LC=ux.exports,ie="default"in ba?Re:ba,tm=Symbol.for("react-redux-context"),nm=typeof globalThis<"u"?globalThis:{};function UC(){if(!ie.createContext)return{};const e=nm[tm]??(nm[tm]=new Map);let t=e.get(ie.createContext);return t||(t=ie.createContext(null),e.set(ie.createContext,t)),t}var Fn=UC(),fx=()=>{throw new Error("uSES not initialized!")};function Mf(e=Fn){return function(){return ie.useContext(e)}}var px=Mf(),hx=fx,VC=e=>{hx=e},zC=(e,t)=>e===t;function BC(e=Fn){const t=e===Fn?px:Mf(e),n=(r,o={})=>{const{equalityFn:s=zC,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();ie.useRef(!0);const p=ie.useCallback({[r.name](x){return r(x)}}[r.name],[r,d,i.stabilityCheck]),m=hx(c.addNestedSub,l.getState,u||l.getState,p,s);return ie.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var Y=BC(),qC=Symbol.for("react.element"),HC=Symbol.for("react.portal"),WC=Symbol.for("react.fragment"),KC=Symbol.for("react.strict_mode"),YC=Symbol.for("react.profiler"),GC=Symbol.for("react.provider"),QC=Symbol.for("react.context"),XC=Symbol.for("react.server_context"),mx=Symbol.for("react.forward_ref"),ZC=Symbol.for("react.suspense"),JC=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),e_=Symbol.for("react.lazy"),t_=mx,n_=Af;function r_(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case qC:{const n=e.type;switch(n){case WC:case YC:case KC:case ZC:case JC:return n;default:{const r=n&&n.$$typeof;switch(r){case XC:case QC:case mx:case e_:case Af:case GC:return r;default:return t}}}}case HC:return t}}}function o_(e){return r_(e)===Af}function s_(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function m(g,b){return c=g,u=b,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}function x(){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 v(){const g=e(c,u),b=!i(g,d);return d=g,b&&(p=n(d,f,u)),p}function h(g,b){const S=!s(b,u),j=!o(g,c,b,u);return c=g,u=b,S&&j?x():S?y():j?v():p}return function(b,S){return l?h(b,S):m(b,S)}}function i_(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return s_(s,i,l,e,o)}function a_(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 gx(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 l_(e){return e&&typeof e=="object"?Ju(t=>a_(e,t)):e?typeof e=="function"?gx(e):Df(e,"mapDispatchToProps"):Ju(t=>({dispatch:t}))}function c_(e){return e?typeof e=="function"?gx(e):Df(e,"mapStateToProps"):Ju(()=>({}))}function u_(e,t,n){return{...n,...e,...t}}function d_(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 f_(e){return e?typeof e=="function"?d_(e):Df(e,"mergeProps"):()=>u_}function p_(e){e()}function h_(){let e=null,t=null;return{clear(){e=null,t=null},notify(){p_(()=>{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 vx(e,t){let n,r=om,o=0,s=!1;function i(y){d();const v=r.subscribe(y);let h=!1;return()=>{h||(h=!0,v(),f())}}function l(){r.notify()}function c(){x.onStateChange&&x.onStateChange()}function u(){return s}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=h_())}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 x={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return x}var m_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ga=m_?ie.useLayoutEffect:ie.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 g_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},v_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},y_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},x_={[t_]:y_,[n_]:yx};function im(e){return o_(e)?yx:x_[e.$$typeof]||g_}var b_=Object.defineProperty,w_=Object.getOwnPropertyNames,am=Object.getOwnPropertySymbols,S_=Object.getOwnPropertyDescriptor,j_=Object.getPrototypeOf,lm=Object.prototype;function ed(e,t){if(typeof t!="string"){if(lm){const s=j_(t);s&&s!==lm&&ed(e,s)}let n=w_(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(!v_[i]&&!(o&&o[i])&&!(r&&r[i])){const l=S_(t,i);try{b_(e,i,l)}catch{}}}}return e}var xx=fx,C_=e=>{xx=e},__=[null,null];function E_(e,t,n){Ga(()=>e(...t),n)}function R_(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function N_(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 v,h;try{v=r(y,o.current)}catch(g){h=g,p=g}h||(p=null),v===s.current?i.current||u():(s.current=v,c.current=v,i.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function k_(e,t){return e===t}function O_(e,t,n,{pure:r,areStatesEqual:o=k_,areOwnPropsEqual:s=Mc,areStatePropsEqual:i=Mc,areMergedPropsEqual:l=Mc,forwardRef:c=!1,context:u=Fn}={}){const d=u,f=c_(e),p=l_(t),m=f_(n),x=!!e;return v=>{const h=v.displayName||v.name||"Component",g=`Connect(${h})`,b={shouldHandleStateChanges:x,displayName:g,wrappedComponentName:h,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(E){const[_,N,R]=ie.useMemo(()=>{const{reactReduxForwardedRef:me,...Ie}=E;return[E.context,me,Ie]},[E]),O=ie.useMemo(()=>{let me=d;return _!=null&&_.Consumer,me},[_,d]),k=ie.useContext(O),P=!!E.store&&!!E.store.getState&&!!E.store.dispatch,U=!!k&&!!k.store,F=P?E.store:k.store,V=U?k.getServerState:F.getState,Z=ie.useMemo(()=>i_(F.dispatch,b),[F]),[T,L]=ie.useMemo(()=>{if(!x)return __;const me=vx(F,P?void 0:k.subscription),Ie=me.notifyNestedSubs.bind(me);return[me,Ie]},[F,P,k]),A=ie.useMemo(()=>P?k:{...k,subscription:T},[P,k,T]),H=ie.useRef(),B=ie.useRef(R),X=ie.useRef(),J=ie.useRef(!1);ie.useRef(!1);const ee=ie.useRef(!1),Q=ie.useRef();Ga(()=>(ee.current=!0,()=>{ee.current=!1}),[]);const te=ie.useMemo(()=>()=>X.current&&R===B.current?X.current:Z(F.getState(),R),[F,R]),ue=ie.useMemo(()=>Ie=>T?N_(x,F,T,Z,B,H,J,ee,X,L,Ie):()=>{},[T]);E_(R_,[B,H,J,R,X,L]);let Ce;try{Ce=xx(ue,te,V?()=>Z(V(),R):te)}catch(me){throw Q.current&&(me.message+=`
49
49
  The error may be correlated with this previous error:
50
- ${Z.current.stack}
50
+ ${Q.current.stack}
51
51
 
52
- `),L}Ga(()=>{Z.current=void 0,W.current=void 0,H.current=Se});const Ae=le.useMemo(()=>le.createElement(x,{...Se,ref:N}),[N,x,Se]);return le.useMemo(()=>g?le.createElement(O.Provider,{value:M},Ae):Ae,[O,Ae,M])}const C=le.memo(S);if(C.WrappedComponent=x,C.displayName=S.displayName=y,c){const E=le.forwardRef(function(R,O){return le.createElement(C,{...R,reactReduxForwardedRef:O})});return E.displayName=y,E.WrappedComponent=x,ed(E,x)}return ed(C,x)}}var T_=O_;function P_({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=le.useMemo(()=>{const u=vx(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]);Ga(()=>{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 le.createElement(c.Provider,{value:i},n)}var Un=P_;function bx(e=Mn){const t=e===Mn?px:Mf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var I_=bx();function $_(e=Mn){const t=e===Mn?I_:bx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var me=$_();VC(LC.useSyncExternalStoreWithSelector);C_(w.useSyncExternalStore);const en="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:()=>`${en}/get-your-first-project`,profile_path:()=>`${en}/profile`,project_types_path:()=>`${en}/project-types`,projects_path:()=>`${en}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${en}/requests/${e}/renew`,request_action_path:(e,t)=>`${en}/requests/${e}/actions/${t}`,request_actions_path:e=>`${en}/requests/${e}/actions`,request_path:e=>`${en}/requests/${e}`,resources_path:()=>`${en}/resources`,search_people_path:()=>`${en}/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},M_=e=>new Date(`${e}T00:00:00`),A_={year:"numeric",month:"short",day:"numeric"},ho=(e,t)=>M_(e).toLocaleString("en-us",t||A_),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=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}`},Nn=e=>a.jsx("i",{className:`bi bi-${e}`}),ii=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},cm=e=>{const t=ii(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},wx=(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=>wx(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,D_=(e,t,n)=>`${rt(t)} ${dm(n,t)} / ${dm(e,1)}`,Sx=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"}],jx={};for(let e of $l)jx[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 ai(e){e&&(re.routes={...re.routes,...e})}const od={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Ac={};function Cx(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 F_(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function L_(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 U_(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:[]},v=[];n.points.forEach((h,y)=>{Object.keys(od).forEach(b=>{g[b].push(h[1],od[b].colors[y])}),v.push(h[1],5*(y+1))});const x=[];if(n.lines.forEach((h,y)=>{x.push(h[1],1*(y+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...v],"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,...v],"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 V_(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 z_(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:V_(...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=B_(e,n),s=r===t.length-1?"+":"";return[`${Cx(Math.round(o))}${s}`,o]})}function B_(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 q_="_fullscreen_1iid9_6",H_="_map_1iid9_14",$i={"allocations-map":"_allocations-map_1iid9_1",fullscreen:q_,map:H_},W_="_group_11k83_1",K_="_button_11k83_6",Y_="_icon_11k83_16",Dc={group:W_,button:K_,icon:Y_};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 G_="_controls_1be4t_1",Q_={controls:G_};function X_({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:Q_.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 Z_="_legend_odgg9_1",J_="_symbols_odgg9_17",eE="_symbol_odgg9_17",ra={legend:Z_,symbols:J_,symbol:eE};function tE(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 nE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ra.symbol,children:[tE(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:ra.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:ra.symbols,children:r})]})}const rE="_info_oxxoh_1",oE="_user_oxxoh_7",sE="_rp_oxxoh_10",iE="_credits_oxxoh_15",oa={info:rE,user:oE,rp:sE,credits:iE};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 ${oa[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function aE({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:`${ra.legend} ${oa.info}`,children:a.jsxs("p",{className:oa[r],children:["Researchers at ",mm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:oa.credits,children:[Cx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",mm(c.rp,"rp","resource provider")]}):"","."]})})}function lE(){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,v]=w.useState(null),[x,h]=w.useState("user"),[y,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await F_()))()},[]),w.useEffect(()=>{(async S=>{const[j,C]=await Promise.all(["organizations",`credits_${S}`].map(L_));if(!g){const E={};j.features.forEach(N=>E[N.id.toString()]=N.properties.name),v(E)}const _=z_(j,C,y);f(_),S==="exchanged"&&!i&&l(U_(_))})(y)},[y]),w.useEffect(()=>{p&&p.setStyle(fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:y,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(()=>{y==="allocated"&&h("user")},[y]),w.useLayoutEffect(()=>m(new maplibregl.Map({container:t.current,style:fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:y,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:`${$i["allocations-map"]} ${c?$i.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:$i.map,ref:t}),a.jsx(X_,{creditType:y,fullscreen:c,organizationType:x,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(nE,{activeOrg:n,creditLevels:i,organizationType:x}),a.jsx(aE,{activeOrg:n,creditType:y,organizationMap:g,organizationType:x}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:$i.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const cE=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)},uE="_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:uE,"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 _x={exports:{}},dE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fE=dE,pE=fE;function Ex(){}function Rx(){}Rx.resetWarningCache=Ex;var hE=function(){function e(r,o,s,i,l,c){if(c!==pE){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:Rx,resetWarningCache:Ex};return n.PropTypes=n,n};_x.exports=hE();var mE=_x.exports;const q=Js(mE),gE=(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}),vE=e=>({type:"SET_LOADING",payload:e}),ym=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Zo=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Lc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),yE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),xE=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})})),bE=(e,t)=>{const[n,r]=w.useReducer(gE,{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(vE(!0));try{const i=await yE(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)||[]}},wE=(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(v=>{f.add(v.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(v=>v.resource_name===m.key))||!1,onChange:v=>i(f.allocation_type_id,m.key,v,f)}]}))}}):[],requiredResourcesColumns:c}},SE=(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((j,C)=>{n(Lc(j,{allowed_action:{resource_state_type_id:C}}))},[n]),v=w.useCallback((j,C)=>{n(Lc(j,{comment:C}))},[n]),x=w.useCallback((j,C,_,E)=>{const N=_?[...E.required_resources||[],{resource_name:C,required_resource_id:e.required_resources_available.find(R=>R.resource_name===C).resource_id}]:(E.required_resources||[]).filter(R=>R.resource_name!==C);n(Lc(j,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const j=t.allocation_types.flatMap(C=>C.required_resources||[]).map(C=>C.required_resource_id);f(j)}},[i,t]);const h=w.useCallback((j,C)=>{f(_=>C?[..._,j]:_.filter(E=>E!==j))},[]),y=w.useCallback(()=>{const j=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),C=d.filter(N=>!j.includes(N)),_=j.filter(N=>!d.includes(N)),E=t.allocation_types.map(N=>{const R=N.required_resources||[],O=C.map(P=>{const A=r.find(D=>D.resource_id===P);return{resource_name:A.resource_name,required_resource_id:A.resource_id}}),k=R.filter(P=>!_.includes(P.required_resource_id)).concat(O.filter(P=>!R.some(A=>A.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(sd({...e,resource_details:{...t,allocation_types:E}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(j=>{const C=j.target.value;m(C)},[]),S=w.useCallback(()=>{var _,E;if(!p)return;const j=o.find(N=>N.allocation_type_id.toString()===p),C=(_=t.allocation_types)==null?void 0:_.some(N=>N.allocation_type_id===j.allocation_type_id);if(j&&!C){const N=(E=s[0])==null?void 0:E.value,R=[...t.allocation_types||[],{allocation_type_id:j.allocation_type_id,display_name:j.display_name,allowed_action:{resource_state_type_id:N},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:y,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:g,handleCommentChange:v,handleRequiredResourceChange:x}},jE=(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 xE(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]),CE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},_E={"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 Ce=({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:"×"})})]}),_o=({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))})]});_o.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 ds({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 EE="_blurred_16xcy_16",vn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:EE,"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:vn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:vn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${vn["header-buttons-container"]} ${r?"":vn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${vn["alt-warning-banner"]}`:vn["warning-banner"],children:[a.jsxs("span",{className:vn["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:`${vn["content-container"]} ${r?"":vn.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(ds,{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(ds,{label:"Resource Name",value:t.resource_name,onChange:p=>o(Zo("resource_name",p.target.value)),inputClassName:"span8"}),c&&a.jsx(ds,{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(ds,{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(_o,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:p=>o(Zo("resource_type_id",p.target.value)),className:"span8"}),a.jsx(_o,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:p=>o(Zo("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 Nx({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 y=await fetch("/resources/addable.json");n(!1),y.status==200?o(await y.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const y=await fetch(`/resources/addable/${l}.json`);y.status==200?d(await y.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(Ce,{color:"danger",children:s}):r.length==0&&(p=a.jsx(Ce,{children:"There are currently no resources available to add."}));const m=[{value:-1,label:"Select a resource..."}].concat(r.map(y=>({value:y.xras_cider_resource_id,label:y.resource_descriptive_name}))),g=u?u.resource_details:null,v=!s&&g&&g.resource_name.length>0&&g.resource_type_id>0&&g.unit_type_id>0,x=y=>{y.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[y.field]:y.value}})},h=()=>{(async()=>{const y=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(y.status==200){const b=await y.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(_o,{options:m,onChange:y=>c(parseInt(y.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:_E["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:v,children:p})}Nx.propTypes={onClose:q.func.isRequired};function RE({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,v]=w.useState(p),x=j=>{v(j),console.log(j),j==p?l(o):l(s)};function h(j,C){C.preventDefault(),v(j),x(j)}w.useEffect(()=>{l(o)},[o]);const y=(j,C)=>{d.current=C},b=(j,C)=>{if(j.preventDefault(),d.current===C)return;const _=[...i],E=_[d.current];_.splice(d.current,1),_.splice(C,0,E),d.current=C,l(_);const{clientY:N}=j,R=130;N<R?vm(-1,f):window.innerHeight-N<R?vm(1,f):Fc(f)},S=()=>{d.current=null,Fc(f),cE(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:j=>h(p,j),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:j=>h(m,j),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((j,C)=>a.jsxs("div",{className:`${qt["resources-item"]}`,draggable:!0,onDragStart:_=>y(_,C),onDragOver:_=>b(_,C),onDrop:S,children:[a.jsx("span",{className:qt["drag-handle"]}),a.jsx("span",{className:qt["resource-name"],children:a.jsx("a",{href:`${r}/resources/${j.resource_id}`,className:qt["resource-link"],children:j.display_resource_name})}),a.jsx("span",{className:qt["resource-repo"],children:j.resource_repository_key||"N/A"})]},j.resource_id))]})]})]}),c&&a.jsx(Nx,{onClose:()=>u(!1)})]})}function Ur(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const NE="_grid_afccc_1",kE="_important_afccc_30",OE="_input_afccc_34",TE="_edited_afccc_38",PE="_disabled_afccc_46",IE="_scroll_afccc_59",_r={grid:NE,important:kE,input:OE,edited:TE,disabled:PE,scroll:IE};function $E({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 ME="_datepicker_19wnv_1",AE="_error_19wnv_1",xm={datepicker:ME,error:AE},DE=({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"})})},Jo=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},FE={text:$E,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(_o,{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(ds,{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(DE,{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 pn({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 v=u.current.querySelector(`tbody tr:nth-child(${c+1})`);v&&v.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let v=0;v<r;v++)d[v+1]=d[v]+(e[v].width||100);const f=(v,x)=>v<r?{position:"sticky",left:`${d[v]}px`,minWidth:`${e[v].width||100}px`,width:`${e[v].width||100}px`,zIndex:x||1}:{},p=e.map((v,x)=>a.jsxs("th",{className:v.headerClass||v.class||"",style:f(x,100),children:[v.formatHeader?v.formatHeader(v.name,v):v.name,v.tooltip&&a.jsx(qf,{title:v.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},v.key)),m=t.map((v,x)=>{const h=e.map((y,b)=>{const S=FE[y.type||"text"];return a.jsx(S,{column:y,row:v,style:f(b)},y.key)});return a.jsx("tr",{className:s[x]||"",children:h},x)}),g={};return o&&(g.minWidth=o),a.jsx("div",{className:`${_r.grid} ${i?_r.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"},kx=({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"]})]});kx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const Ox=Re.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:id["allocation-types-grid"],children:[a.jsx(pn,{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."})]})});Ox.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const Br={"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"},Tx=Re.memo(function({columns:t,rows:n,onAddDiscountRate:r,dateErrors:o=[]}){return a.jsxs("div",{className:Br["exchange-rates-grid"],children:[a.jsxs("div",{className:Br["header-container"],children:[a.jsx("h2",{className:Br["header-title"],children:"Exchange Rates"}),a.jsx("div",{className:Br["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(pn,{columns:t,rows:n,rowClasses:Array(n.length).fill(Br["vertical-align-center"]),scroll:!1}),o.length>0&&a.jsx("div",{className:Br["error-summary"],children:a.jsx("ul",{children:o.map((s,i)=>a.jsx("li",{children:s},i))})})]})});Tx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const LE=(e,t)=>{const n=w.useCallback(m=>{var v,x;t({type:"DELETE_EXCHANGE_RATE",payload:m}),(((x=(v=e==null?void 0:e.resource_details)==null?void 0:v.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 v={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:{...v,...x}}})},i=()=>{var v,x;const m=[];return(((x=(v=e==null?void 0:e.resource_details)==null?void 0:v.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,y)=>h&&h!==""&&(!h.includes("overlaps")||m.indexOf(h)===y))},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,v,x)=>{const h=new Date(m).getTime(),y=new Date(g).getTime(),b=new Date(v).getTime(),S=new Date(x).getTime();return h<=S&&b<=y},u=(m,g)=>{let v="";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)){v=`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 v},d=(m,g,v)=>{var R,O;const x={start_date:"begin_date",end_date:"end_date"},h=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},y=((O=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:O.discount_rates)||[],b=y.find(k=>k.id===m);if(!b)return;const S={[x[g]]:v},j={},C=g==="end_date",_=()=>{if(!v)return j[`${g}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===g),P=(k==null?void 0:k.minDate)||"1900-01-01",A=(k==null?void 0:k.maxDate)||"2100-12-31",D=C&&b.begin_date?b.begin_date:P;return v<D?(j[`${g}_error`]=`${g.replace("_"," ")} ${h(v)} cannot be before ${h(D)}`,!1):v>A?(j[`${g}_error`]=`${g.replace("_"," ")} cannot be after ${h(A)}`,!1):(j[`${g}_error`]="",!0)},E=()=>{const k=g==="end_date"?v:b.end_date;if(g==="start_date"&&k){if(v>k)return j.end_date_error=`end date ${h(k)} cannot be before ${h(v)}`,!1;j.end_date_error=j.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=g==="start_date"?v:b.begin_date,P=g==="end_date"?v:b.end_date;if(k&&P){const A=u({...b,begin_date:k,end_date:P},y);return j.start_date_error=A,j.end_date_error=A,!A}return!0};if(!_()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}});return}E(),N(),C&&!b.begin_date?j.start_date_error="Date cannot be empty or invalid":!C&&!b.end_date&&(j.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}})},f=()=>{var j,C;const m=((C=(j=e==null?void 0:e.resource_details)==null?void 0:j.exchange_rates)==null?void 0:C.discount_rates)||[];let v=new Date;m.forEach(_=>{if(_.end_date){const E=new Date(_.end_date);E>v&&(v=E)}});const x=new Date(v);x.setDate(x.getDate()+1);const h=x.toISOString().split("T")[0],y=new Date(x);y.setDate(y.getDate()+15);const b=y.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)??"",v=(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",y=j=>!j||Number(j)===0?"-":`${(1/Number(j)).toFixed(2)} ${h}`;return[{rate_type:"Base Rate",rate:{value:g.toString(),onChange:j=>o(j)},conversion:y(g)},...v.map(j=>{var N;const C=j.is_new||j.begin_date>x,_=C||j.begin_date==="",E=j.is_new||j.end_date>=x||j.end_date==="";return{rate_type:"Discount",rate:{value:((N=j.exchange_rate)==null?void 0:N.toString())||"",onChange:C?R=>s(j.id,R):null,disabled:!C},conversion:y(j.exchange_rate),start_date:{value:j.begin_date||"",onChange:R=>d(j.id,"start_date",R),error:j.start_date_error,disabled:!_},end_date:{value:j.end_date||"",onChange:R=>d(j.id,"end_date",R),error:j.end_date_error,disabled:!E},actions:{id:j.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function Px({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=bE(e,t),{isEditing:l,handleEditingChange:c}=CE(),{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:v,resourceTypesOptions:x,unitTypesOptions:h,availableResources:y,availableAllocationTypes:b}=Vf(u),{showAddResourceModal:S,setShowAddResourceModal:j,showAddAllocationTypeModal:C,setShowAddAllocationTypeModal:_,selectedNewResource:E,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:O,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:A,handleCommentChange:D,handleRequiredResourceChange:V}=SE(u,m,o),{exchangeRateColumns:X,exchangeRateRows:T,handleAddDiscountRate:U,dateErrors:M}=LE(u,o),H=jE(m,e,t,i,s,o);w.useEffect(()=>{n&&M.length==0?n(H):n(null)},[H,n,M]);const{allocationColumns:z,allocationRows:W}=wE(m,y,E,v,A,D,V),[J,te]=w.useState(!1);return d?a.jsx(Ur,{}):f.length>0?a.jsx("div",{children:f.map((Z,ae)=>a.jsx(Ce,{color:"danger",dismissable:!0,children:Z},ae))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(Ce,{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(Tx,{columns:X,rows:T,onAddDiscountRate:U,dateErrors:M}),a.jsx(zf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(kx,{onAddAllocationType:()=>l&&_(!0),onAddRequiredResource:()=>l&&j(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
52
+ `),me}Ga(()=>{Q.current=void 0,X.current=void 0,H.current=Ce});const De=ie.useMemo(()=>ie.createElement(v,{...Ce,ref:N}),[N,v,Ce]);return ie.useMemo(()=>x?ie.createElement(O.Provider,{value:A},De):De,[O,De,A])}const C=ie.memo(S);if(C.WrappedComponent=v,C.displayName=S.displayName=g,c){const _=ie.forwardRef(function(R,O){return ie.createElement(C,{...R,reactReduxForwardedRef:O})});return _.displayName=g,_.WrappedComponent=v,ed(_,v)}return ed(C,v)}}var T_=O_;function P_({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ie.useMemo(()=>{const u=vx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=ie.useMemo(()=>e.getState(),[e]);Ga(()=>{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||Fn;return ie.createElement(c.Provider,{value:i},n)}var Bn=P_;function bx(e=Fn){const t=e===Fn?px:Mf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var I_=bx();function $_(e=Fn){const t=e===Fn?I_:bx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ge=$_();VC(LC.useSyncExternalStoreWithSelector);C_(w.useSyncExternalStore);const nn="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:()=>`${nn}/get-your-first-project`,profile_path:()=>`${nn}/profile`,project_types_path:()=>`${nn}/project-types`,projects_path:()=>`${nn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${nn}/requests/${e}/renew`,request_action_path:(e,t)=>`${nn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${nn}/requests/${e}/actions`,request_path:e=>`${nn}/requests/${e}`,resources_path:()=>`${nn}/resources`,search_people_path:()=>`${nn}/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"}},mo=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},M_=e=>new Date(`${e}T00:00:00`),A_={year:"numeric",month:"short",day:"numeric"},go=(e,t)=>M_(e).toLocaleString("en-us",t||A_),it=(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=go(e.startDate,t),s=go(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=go(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},Tn=e=>a.jsx("i",{className:`bi bi-${e}`}),ii=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},cm=e=>{const t=ii(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},wx=(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:[Tn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[Tn("x-circle")," No"]}),Uf=e=>wx(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,D_=(e,t,n)=>`${it(t)} ${dm(n,t)} / ${dm(e,1)}`,Sx=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"}],jx={};for(let e of $l)jx[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 ai(e){e&&(ne.routes={...ne.routes,...e})}const od={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Ac={};function Cx(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 F_(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function L_(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 U_(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 x={user:[],rp:[]},y=[];n.points.forEach((h,g)=>{Object.keys(od).forEach(b=>{x[b].push(h[1],od[b].colors[g])}),y.push(h[1],5*(g+1))});const v=[];if(n.lines.forEach((h,g)=>{v.push(h[1],1*(g+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...y],"circle-color":["interpolate",["linear"],["get",p],...x[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,...x[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"],...v]}})}}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 V_(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 z_(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:V_(...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=B_(e,n),s=r===t.length-1?"+":"";return[`${Cx(Math.round(o))}${s}`,o]})}function B_(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 q_="_fullscreen_1iid9_6",H_="_map_1iid9_14",$i={"allocations-map":"_allocations-map_1iid9_1",fullscreen:q_,map:H_},W_="_group_11k83_1",K_="_button_11k83_6",Y_="_icon_11k83_16",Dc={group:W_,button:K_,icon:Y_};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 G_="_controls_1be4t_1",Q_={controls:G_};function X_({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:Q_.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 Z_="_legend_odgg9_1",J_="_symbols_odgg9_17",eE="_symbol_odgg9_17",ra={legend:Z_,symbols:J_,symbol:eE};function tE(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 nE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ra.symbol,children:[tE(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:ra.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:ra.symbols,children:r})]})}const rE="_info_oxxoh_1",oE="_user_oxxoh_7",sE="_rp_oxxoh_10",iE="_credits_oxxoh_15",oa={info:rE,user:oE,rp:sE,credits:iE};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 ${oa[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function aE({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:`${ra.legend} ${oa.info}`,children:a.jsxs("p",{className:oa[r],children:["Researchers at ",mm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:oa.credits,children:[Cx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",mm(c.rp,"rp","resource provider")]}):"","."]})})}function lE(){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),[x,y]=w.useState(null),[v,h]=w.useState("user"),[g,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await F_()))()},[]),w.useEffect(()=>{(async S=>{const[j,C]=await Promise.all(["organizations",`credits_${S}`].map(L_));if(!x){const _={};j.features.forEach(N=>_[N.id.toString()]=N.properties.name),y(_)}const E=z_(j,C,g);f(E),S==="exchanged"&&!i&&l(U_(E))})(g)},[g]),w.useEffect(()=>{p&&p.setStyle(fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:v}))},[n,d,p,v]),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"&&h("user")},[g]),w.useLayoutEffect(()=>m(new maplibregl.Map({container:t.current,style:fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:v}),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:`${$i["allocations-map"]} ${c?$i.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:$i.map,ref:t}),a.jsx(X_,{creditType:g,fullscreen:c,organizationType:v,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(nE,{activeOrg:n,creditLevels:i,organizationType:v}),a.jsx(aE,{activeOrg:n,creditType:g,organizationMap:x,organizationType:v}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:$i.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const cE=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)},uE="_dragging_1vb1t_45",Wt={"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:uE,"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 _x={exports:{}},dE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fE=dE,pE=fE;function Ex(){}function Rx(){}Rx.resetWarningCache=Ex;var hE=function(){function e(r,o,s,i,l,c){if(c!==pE){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:Rx,resetWarningCache:Ex};return n.PropTypes=n,n};_x.exports=hE();var mE=_x.exports;const q=Js(mE),gE=(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}),vE=e=>({type:"SET_LOADING",payload:e}),ym=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Br=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Lc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),yE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),xE=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})})),bE=(e,t)=>{const[n,r]=w.useReducer(gE,{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(vE(!0));try{const i=await yE(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)||[]}},wE=(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 x;(x=m.required_resources)==null||x.forEach(y=>{f.add(y.resource_name)})}),Array.from(f).sort((m,x)=>m.localeCompare(x)).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 x;return[m.key,{checked:((x=f.required_resources)==null?void 0:x.some(y=>y.resource_name===m.key))||!1,onChange:y=>i(f.allocation_type_id,m.key,y,f)}]}))}}):[],requiredResourcesColumns:c}},SE=(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(""),x=w.useCallback((j,C)=>{n(Lc(j,{allowed_action:{resource_state_type_id:C}}))},[n]),y=w.useCallback((j,C)=>{n(Lc(j,{comment:C}))},[n]),v=w.useCallback((j,C,E,_)=>{const N=E?[..._.required_resources||[],{resource_name:C,required_resource_id:e.required_resources_available.find(R=>R.resource_name===C).resource_id}]:(_.required_resources||[]).filter(R=>R.resource_name!==C);n(Lc(j,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const j=t.allocation_types.flatMap(C=>C.required_resources||[]).map(C=>C.required_resource_id);f(j)}},[i,t]);const h=w.useCallback((j,C)=>{f(E=>C?[...E,j]:E.filter(_=>_!==j))},[]),g=w.useCallback(()=>{const j=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),C=d.filter(N=>!j.includes(N)),E=j.filter(N=>!d.includes(N)),_=t.allocation_types.map(N=>{const R=N.required_resources||[],O=C.map(P=>{const U=r.find(F=>F.resource_id===P);return{resource_name:U.resource_name,required_resource_id:U.resource_id}}),k=R.filter(P=>!E.includes(P.required_resource_id)).concat(O.filter(P=>!R.some(U=>U.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(sd({...e,resource_details:{...t,allocation_types:_}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(j=>{const C=j.target.value;m(C)},[]),S=w.useCallback(()=>{var E,_;if(!p)return;const j=o.find(N=>N.allocation_type_id.toString()===p),C=(E=t.allocation_types)==null?void 0:E.some(N=>N.allocation_type_id===j.allocation_type_id);if(j&&!C){const N=(_=s[0])==null?void 0:_.value,R=[...t.allocation_types||[],{allocation_type_id:j.allocation_type_id,display_name:j.display_name,allowed_action:{resource_state_type_id:N},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:g,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:x,handleCommentChange:y,handleRequiredResourceChange:v}},jE=(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,min_exchange:e.min_exchange,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 xE(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]),CE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},_E={"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 Se=({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:"×"})})]}),Ro=({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))})]});Ro.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 Yr({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 EE="_blurred_16xcy_16",xn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:EE,"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:xn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:xn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${xn["header-buttons-container"]} ${r?"":xn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${xn["alt-warning-banner"]}`:xn["warning-banner"],children:[a.jsxs("span",{className:xn["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:`${xn["content-container"]} ${r?"":xn.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}){var p;const d="Dollar Value per SUs",f=l?a.jsx(Yr,{label:u?null:d,value:t.dollar_value,onChange:m=>o(Br("dollar_value",m.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(Yr,{label:"Resource Name",value:t.resource_name,onChange:m=>o(Br("resource_name",m.target.value)),inputClassName:"span8"}),c&&a.jsx(Yr,{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(Yr,{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:m=>o(Br("description",m.target.value)),inputClassName:"span8"}),a.jsx(Ro,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:m=>o(Br("resource_type_id",m.target.value)),className:"span8"}),a.jsx(Ro,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:m=>o(Br("unit_type_id",m.target.value)),className:"span8"}),a.jsx(Yr,{label:`Minimum exchange amount, in ${(p=r.find(m=>m.value.toString()===t.unit_type_id))==null?void 0:p.label}`,value:t.min_exchange,onChange:m=>o(Br("min_exchange",m.target.value)),inputClassName:"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 Nx({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 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(Se,{color:"danger",children:s}):r.length==0&&(p=a.jsx(Se,{children:"There are currently no resources available to add."}));const m=[{value:-1,label:"Select a resource..."}].concat(r.map(g=>({value:g.xras_cider_resource_id,label:g.resource_descriptive_name}))),x=u?u.resource_details:null,y=!s&&x&&x.resource_name.length>0&&x.resource_type_id>0&&x.unit_type_id>0,v=g=>{g.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[g.field]:g.value}})},h=()=>{(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({...x,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(Ro,{options:m,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:_E["form-wrapper"],children:a.jsx(Bf,{resourceDetails:x,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:v})})]})]})),a.jsx(Xa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:h,buttonText:"Save",canSave:y,children:p})}Nx.propTypes={onClose:q.func.isRequired};function RE({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",[x,y]=w.useState(p),v=j=>{y(j),console.log(j),j==p?l(o):l(s)};function h(j,C){C.preventDefault(),y(j),v(j)}w.useEffect(()=>{l(o)},[o]);const g=(j,C)=>{d.current=C},b=(j,C)=>{if(j.preventDefault(),d.current===C)return;const E=[...i],_=E[d.current];E.splice(d.current,1),E.splice(C,0,_),d.current=C,l(E);const{clientY:N}=j,R=130;N<R?vm(-1,f):window.innerHeight-N<R?vm(1,f):Fc(f)},S=()=>{d.current=null,Fc(f),cE(r,i)};return w.useEffect(()=>()=>Fc(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Wt["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:Wt["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 ${x===p?"active":""}`,"data-toggle":x===p?"tab":void 0,style:{cursor:"default",...x===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:j=>h(p,j),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${x===m?"active":""}`,"data-toggle":x===m?"tab":void 0,style:{cursor:"default"},onClick:j=>h(m,j),children:m})})]}),a.jsxs("div",{className:Wt["resources-list"],children:[a.jsxs("div",{className:Wt["resources-header"],children:[a.jsx("span",{className:Wt["header-name"],children:"Resource Name"}),a.jsx("span",{className:Wt["header-repo"],children:"Repository Key"})]}),i.map((j,C)=>a.jsxs("div",{className:`${Wt["resources-item"]}`,draggable:!0,onDragStart:E=>g(E,C),onDragOver:E=>b(E,C),onDrop:S,children:[a.jsx("span",{className:Wt["drag-handle"]}),a.jsx("span",{className:Wt["resource-name"],children:a.jsx("a",{href:`${r}/resources/${j.resource_id}`,className:Wt["resource-link"],children:j.display_resource_name})}),a.jsx("span",{className:Wt["resource-repo"],children:j.resource_repository_key||"N/A"})]},j.resource_id))]})]})]}),c&&a.jsx(Nx,{onClose:()=>u(!1)})]})}function Ur(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const NE="_grid_afccc_1",kE="_important_afccc_30",OE="_input_afccc_34",TE="_edited_afccc_38",PE="_disabled_afccc_46",IE="_scroll_afccc_59",_r={grid:NE,important:kE,input:OE,edited:TE,disabled:PE,scroll:IE};function $E({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 ME="_datepicker_19wnv_1",AE="_error_19wnv_1",xm={datepicker:ME,error:AE},DE=({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)},FE={text:$E,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Ro,{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(Yr,{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(DE,{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 mn({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,v)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${e[y].width||100}px`,width:`${e[y].width||100}px`,zIndex:v||1}:{},p=e.map((y,v)=>a.jsxs("th",{className:y.headerClass||y.class||"",style:f(v,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,v)=>{const h=e.map((g,b)=>{const S=FE[g.type||"text"];return a.jsx(S,{column:g,row:y,style:f(b)},g.key)});return a.jsx("tr",{className:s[v]||"",children:h},v)}),x={};return o&&(x.minWidth=o),a.jsx("div",{className:`${_r.grid} ${i?_r.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:x,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"},kx=({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"]})]});kx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const Ox=Re.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:id["allocation-types-grid"],children:[a.jsx(mn,{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."})]})});Ox.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"},Tx=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(mn,{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))})})]})});Tx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const LE=(e,t)=>{const n=w.useCallback(m=>{var y,v;t({type:"DELETE_EXCHANGE_RATE",payload:m}),(((v=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:v.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,x)=>{const y={exchange_rate:x},v={};x?v.rate_error="":v.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...y,...v}}})},i=()=>{var y,v;const m=[];return(((v=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:v.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,g)=>h&&h!==""&&(!h.includes("overlaps")||m.indexOf(h)===g))},l=m=>{const x=new Date(m);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(x)},c=(m,x,y,v)=>{const h=new Date(m).getTime(),g=new Date(x).getTime(),b=new Date(y).getTime(),S=new Date(v).getTime();return h<=S&&b<=g},u=(m,x)=>{let y="";if(m.begin_date&&m.end_date){const v=x.filter(h=>h.id!==m.id);for(const h of v)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,x,y)=>{var R,O;const v={start_date:"begin_date",end_date:"end_date"},h=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},g=((O=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:O.discount_rates)||[],b=g.find(k=>k.id===m);if(!b)return;const S={[v[x]]:y},j={},C=x==="end_date",E=()=>{if(!y)return j[`${x}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===x),P=(k==null?void 0:k.minDate)||"1900-01-01",U=(k==null?void 0:k.maxDate)||"2100-12-31",F=C&&b.begin_date?b.begin_date:P;return y<F?(j[`${x}_error`]=`${x.replace("_"," ")} ${h(y)} cannot be before ${h(F)}`,!1):y>U?(j[`${x}_error`]=`${x.replace("_"," ")} cannot be after ${h(U)}`,!1):(j[`${x}_error`]="",!0)},_=()=>{const k=x==="end_date"?y:b.end_date;if(x==="start_date"&&k){if(y>k)return j.end_date_error=`end date ${h(k)} cannot be before ${h(y)}`,!1;j.end_date_error=j.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=x==="start_date"?y:b.begin_date,P=x==="end_date"?y:b.end_date;if(k&&P){const U=u({...b,begin_date:k,end_date:P},g);return j.start_date_error=U,j.end_date_error=U,!U}return!0};if(!E()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}});return}_(),N(),C&&!b.begin_date?j.start_date_error="Date cannot be empty or invalid":!C&&!b.end_date&&(j.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}})},f=()=>{var j,C;const m=((C=(j=e==null?void 0:e.resource_details)==null?void 0:j.exchange_rates)==null?void 0:C.discount_rates)||[];let y=new Date;m.forEach(E=>{if(E.end_date){const _=new Date(E.end_date);_>y&&(y=_)}});const v=new Date(y);v.setDate(v.getDate()+1);const h=v.toISOString().split("T")[0],g=new Date(v);g.setDate(g.getDate()+15);const b=g.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,x=(m==null?void 0:m.base_rate)??"",y=(m==null?void 0:m.discount_rates)||[],v=new Date().toISOString().split("T")[0],h=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",g=j=>!j||Number(j)===0?"-":`${(1/Number(j)).toFixed(2)} ${h}`;return[{rate_type:"Base Rate",rate:{value:x.toString(),onChange:j=>o(j)},conversion:g(x)},...y.map(j=>{var N;const C=j.is_new||j.begin_date>v,E=C||j.begin_date==="",_=j.is_new||j.end_date>=v||j.end_date==="";return{rate_type:"Discount",rate:{value:((N=j.exchange_rate)==null?void 0:N.toString())||"",onChange:C?R=>s(j.id,R):null,disabled:!C},conversion:g(j.exchange_rate),start_date:{value:j.begin_date||"",onChange:R=>d(j.id,"start_date",R),error:j.start_date_error,disabled:!E},end_date:{value:j.end_date||"",onChange:R=>d(j.id,"end_date",R),error:j.end_date_error,disabled:!_},actions:{id:j.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function Px({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=bE(e,t),{isEditing:l,handleEditingChange:c}=CE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,m=u==null?void 0:u.resource_details,x=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:y,resourceTypesOptions:v,unitTypesOptions:h,availableResources:g,availableAllocationTypes:b}=Vf(u),{showAddResourceModal:S,setShowAddResourceModal:j,showAddAllocationTypeModal:C,setShowAddAllocationTypeModal:E,selectedNewResource:_,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:O,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:U,handleCommentChange:F,handleRequiredResourceChange:V}=SE(u,m,o),{exchangeRateColumns:Z,exchangeRateRows:T,handleAddDiscountRate:L,dateErrors:A}=LE(u,o),H=jE(m,e,t,i,s,o);w.useEffect(()=>{n&&A.length==0?n(H):n(null)},[H,n,A]);const{allocationColumns:B,allocationRows:X}=wE(m,g,_,y,U,F,V),[J,ee]=w.useState(!1);return d?a.jsx(Ur,{}):f.length>0?a.jsx("div",{children:f.map((Q,te)=>a.jsx(Se,{color:"danger",dismissable:!0,children:Q},te))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(Se,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Properties"}),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:v,unitTypesOptions:h,dispatch:o,isDollarValueEditing:J,onDollarValueEditingChange:ee})]}),x&&a.jsx(Tx,{columns:Z,rows:T,onAddDiscountRate:L,dateErrors:A}),a.jsx(zf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(kx,{onAddAllocationType:()=>l&&E(!0),onAddRequiredResource:()=>l&&j(!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(Ox,{columns:z,rows:W})}),a.jsx(Xa,{show:S,onClose:()=>j(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:y.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=>N(Z.resource_id,ae.target.checked)}),Z.resource_name]},Z.resource_id))})}),a.jsx(Xa,{show:C,onClose:()=>_(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(_o,{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:k})})]}):a.jsx("div",{children:"No resource data available."})}Px.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}`,UE=(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:v,status:x}=d,h=f.map(({entryDate:y})=>y).sort()[0].split("T")[0];return VE(e,d,{entryDate:h,grantNumber:t}),{allocationType:p,endDate:m,entryDate:h,requestId:g,startDate:v,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:v,resources:x,role:h,username:y})=>{const b=x.filter(E=>E.userAccountState=="active"&&E.unitType!="ACCESS Credits"),S=b.map(E=>E.xrasResourceId),j=b.filter(E=>E.resourceProviderState=="pending-active").map(E=>E.xrasResourceId),C=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:v,resourceAccountPendingIds:j,resourceAccountInactiveIds:C,resourceIds:S,resourceUsernames:_,role:h,username:y}}).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)},VE=(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:y,allowedOperations:b,approvedStartDate:S,detailAvailable:j,entryDate:C,isRequest:_,requestedStartDate:E,resources:N})=>({actionId:x,allowedOperations:b,detailAvailable:j,date:(C||S||E).split("T")[0],deleteStatus:null,isRequest:_,resources:N.map(ad).sort(Qa),showDeleteModal:!1,status:h,type:y})),allocationType:n,allowedActions:zE(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 v=m.allowedActions.Exchange||m.allowedActions.Transfer;if(v){g={};for(let x of v.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(v&&v.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},zE=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:v,organizationName:x,resourceRepositoryKey:h,resourceType:y,startDate:b,unitType:S,userGuideUrl:j,xrasResourceId:C})=>{const _=S=="Yes / No",E=S=="ACCESS Credits";return{allocated:po(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":y.toLowerCase(),isActive:e=="active",isBoolean:_,isCredit:E,isFake:!1,isUnderReview:!1,isNew:!1,name:f.trim(),questions:(s||[]).filter(({isActive:N})=>N).sort(wm).map(N=>({attributeSetId:N.attributeSetId,attributes:N.attributes.sort(wm).map(R=>({required:R.isRequired,resourceAttributeId:R.resourceAttributeId,label:R.attributeName})),fieldType:N.attributeSetRelationType,label:N.attributeSetName,resourceId:C,values:[]})),resourceProvider:{organizationId:g,name:x,favicon:v},requested:po(um(r,t)||0,0,"floor"),requires:d||[],resourceId:C,resourceRepositoryKey:h,startDate:b,type:y,unit:S,used:po(o||0,0,"ceil"),userGuideUrl:j}},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})))},Ix=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Mi=(e,t)=>{const n=Le(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},nn=(e,t)=>e.projects[t.payload.grantNumber],Le=(e,t)=>e.requests[t.payload.requestId],BE=(e,t)=>nn(e,t).users.find(({username:n})=>n==t.payload.username),ld=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,jm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Ix(e.resourceIds,e.initialResourceIds),$x=()=>document.querySelector("meta[name=csrf-token]").content,qE=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}))},sa=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({})}),Mx=tt("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Ax=tt("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ia=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})}),aa=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:$x()};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})}),la=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:v}of r.resources)if(g!=f&&!p){o[v]={resource_id:v,requested:1,amount:g-f};for(let{attributes:x,values:h,fieldType:y}of m)if(h.length){let b=x[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(y),C={resource_attribute_id:y=="multi_sel"?h:S?h[0]:b};S||(C.attribute_value=h[0]),s[b]=C}}const i={authenticity_token:$x(),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})}),ca=tt("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Ix(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})}),Dx=Lr({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=nn(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=nn(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=nn(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=po(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Le(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=nn(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=BE(e,t);n.role=t.payload.role,jm(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=Mi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Le(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=nn(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):[];jm(c)}}},extraReducers:e=>{e.addCase(sa.pending,t=>{t.projectListLoading=!0}).addCase(sa.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&&UE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(sa.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Mx.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Ax.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ia.pending,(t,n)=>{const r=Le(t,{payload:n.meta.arg});r.usageDetailStatus=Ue.pending}).addCase(ia.fulfilled,(t,n)=>{const r=Le(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ue.success}).addCase(ia.rejected,(t,n)=>{const r=Le(t,n);r.usageDetailStatus=Ue.error}).addCase(aa.pending,(t,n)=>{const r=Mi(t,{payload:n.meta.arg});r.deleteStatus=Ue.pending}).addCase(aa.fulfilled,(t,n)=>{const r=Le(t,n),o=Mi(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(aa.rejected,(t,n)=>{const r=Mi(t,n);r.deleteStatus=Ue.error}).addCase(la.pending,(t,n)=>{const r=Le(t,{payload:n.meta.arg});r.exchangeStatus=Ue.pending,r.showResourcesModal=!1}).addCase(la.fulfilled,(t,n)=>{const r=Le(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ue.success}).addCase(la.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(ca.pending,(t,n)=>{const r=nn(t,{payload:n.meta.arg});r.usersStatus=Ue.pending}).addCase(ca.fulfilled,(t,n)=>{const r=nn(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Ue.success}).addCase(ca.rejected,(t,n)=>{const r=nn(t,n);r.usersStatus=Ue.error})}}),HE=e=>e.api.error,WE=e=>e.api.projectsList,KE=e=>e.api.projectListLoading,YE=(e,t)=>nn(e.api,{payload:{grantNumber:t}}),GE=(e,t)=>Le(e.api,{payload:{requestId:t}}),QE=e=>e.api.username,{addResource:XE,addUser:ZE,closeUsageDetailModal:JE,hideAlert:eD,resetResources:eR,resetUsers:tR,setRequest:nR,setResourceQuestionValues:rR,setResourceRequest:oR,setResourcesReason:sR,setTab:iR,setUserRole:aR,toggleActionsModal:lR,toggleConfirmModal:cR,toggleDeleteModal:uR,toggleResourcesModal:dR,toggleUsersResources:fR}=Dx.actions,pR=Dx.reducer,hR=e=>{const t=G(HE),n=G(KE),r=G(WE),o=me();return w.useEffect(()=>{o(sa(e))},[]),{error:t,loading:n,projects:r}},Rt=(e,t)=>{const n=G(s=>YE(s,e)),r=G(QE),o=me();return w.useEffect(()=>{!n&&!t&&o(Mx({grantNumber:e}))},[t]),{project:n,addUser:s=>o(ZE({grantNumber:e,user:s})),resetUsers:()=>o(tR({grantNumber:e})),saveUsers:()=>o(ca({grantNumber:e})),setRequest:s=>o(nR({grantNumber:e,requestId:s})),setTab:s=>o(iR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(aR({grantNumber:e,username:s,role:i})),statuses:Ue,toggleUsersResources:(s,i,l)=>o(fR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},at=(e,t)=>{const n=G(o=>GE(o,e)),r=me();return w.useEffect(()=>{n||r(Ax({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(XE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(JE({requestId:e})),deleteAction:o=>r(aa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ia({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(eR({requestId:e})),saveResources:()=>r(la({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(rR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(oR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(sR({requestId:e,reason:o})),statuses:Ue,toggleActionsModal:()=>r(lR({requestId:e})),toggleConfirmModal:()=>r(cR({requestId:e})),toggleDeleteModal:o=>r(uR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(dR({requestId:e}))}},mR="_project_qqnbz_1",gR="_expand_qqnbz_5",Cm={project:mR,expand:gR},vR="_returnedForCorrectionsNotes_jujbd_1",yR={returnedForCorrectionsNotes:vR};function Fx(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},Lx=Re.createContext(Ja),xR=Re.createContext(!1);let bR=!!(typeof window<"u"&&window.document&&window.document.createElement),Uc=new WeakMap;function wR(e=!1){let t=w.useContext(Lx),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 SR(e){let t=w.useContext(Lx);t===Ja&&!bR&&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=wR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function jR(e){let t=Re.useId(),[n]=w.useState(RR()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const Ux=typeof Re.useId=="function"?jR:SR;function CR(){return!1}function _R(){return!0}function ER(e){return()=>{}}function RR(){return typeof Re.useSyncExternalStore=="function"?Re.useSyncExternalStore(ER,CR,_R):w.useContext(xR)}const NR=w.createContext(null),Fo=NR,kR=w.createContext(null),$r=(e,t=null)=>e!=null?String(e):t||null,An=kR;function OR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=OR(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 TR(e,t){const n=_m(e),r=_m(t);return o=>{n&&n(o),r&&r(o)}}function hn(e,t){return w.useMemo(()=>TR(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=hn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const PR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],IR=["activeKey","getControlledId","getControllerId"],$R=["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 Vx(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,PR);const g=w.useContext(Fo);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:v,getControlledId:x,getControllerId:h}=g,y=cd(g,IR),b=$r(n);return[Object.assign({},m,{role:i,id:x(n),"aria-labelledby":h(n)}),{eventKey:n,isActive:t==null&&b!=null?$r(v)===b:t,transition:o||y.transition,mountOnEnter:r??y.mountOnEnter,unmountOnExit:s??y.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const zx=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=cd(e,$R);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:g=Hf}]=Vx(r);return a.jsx(Fo.Provider,{value:null,children:a.jsx(An.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}))})})})});zx.displayName="TabPanel";const Bx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Fx(o,s,r),p=Ux(t),m=w.useMemo(()=>n||((v,x)=>p?`${p}-${x}-${v}`:null),[p,n]),g=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:v=>m(v,"tabpane"),getControllerId:v=>m(v,"tab")}),[f,d,i,l,c,m]);return a.jsx(Fo.Provider,{value:g,children:a.jsx(An.Provider,{value:f||null,children:u})})};Bx.Panel=zx;const qx=Bx;var Hx={exports:{}};/*!
54
+ Please proceed with caution.`,children:a.jsx(Ox,{columns:B,rows:X})}),a.jsx(Xa,{show:S,onClose:()=>j(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:g.map(Q=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:_.includes(Q.resource_id),onChange:te=>N(Q.resource_id,te.target.checked)}),Q.resource_name]},Q.resource_id))})}),a.jsx(Xa,{show:C,onClose:()=>E(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Ro,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(Q=>({value:Q.allocation_type_id,label:Q.display_name}))],value:O,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}Px.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Ve={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}`,UE=(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:x,startDate:y,status:v}=d,h=f.map(({entryDate:g})=>g).sort()[0].split("T")[0];return VE(e,d,{entryDate:h,grantNumber:t}),{allocationType:p,endDate:m,entryDate:h,requestId:x,startDate:y,status:v}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:m,lastName:x,organization:y,resources:v,role:h,username:g})=>{const b=v.filter(_=>_.userAccountState=="active"&&_.unitType!="ACCESS Credits"),S=b.map(_=>_.xrasResourceId),j=b.filter(_=>_.resourceProviderState=="pending-active").map(_=>_.xrasResourceId),C=v.filter(_=>_.userAccountState!="active").map(_=>_.xrasResourceId),E={};for(let _ of b)E[_.xrasResourceId]=_.resourceUsername;return{eligibility:m,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:h,lastName:x,organization:y,resourceAccountPendingIds:j,resourceAccountInactiveIds:C,resourceIds:S,resourceUsernames:E,role:h,username:g}}).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)},VE=(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:v,actionStatusType:h,actionType:g,allowedOperations:b,approvedStartDate:S,detailAvailable:j,entryDate:C,isRequest:E,requestedStartDate:_,resources:N})=>({actionId:v,allowedOperations:b,detailAvailable:j,date:(C||S||_).split("T")[0],deleteStatus:null,isRequest:E,resources:N.map(ad).sort(Qa),showDeleteModal:!1,status:h,type:g})),allocationType:n,allowedActions:zE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(ad).filter(v=>v.isCredit||v.allocated>0).sort(Qa),resourcesReason:"",returnedForCorrections:!!t.find(v=>v.returnedForCorrections),returnedForCorrectionsNotes:t.map(v=>v.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 x={};for(let v of m.actions)if(["Exchange","Transfer"].includes(v.type)&&["Submitted","Under Review","Incomplete"].includes(v.status)){m.exchangeActionId=v.actionId,m.exchangeActionEditable=v.status==="Incomplete";for(let h of v.resources)x[h.resourceId]=h;for(let h of m.resources)h.resourceId in x&&(h.requested+=x[h.resourceId].requested,delete x[h.resourceId]);m.resources.push(...Object.values(x).map(h=>({...h,isNew:!0})));break}const y=m.allowedActions.Exchange||m.allowedActions.Transfer;if(y){x={};for(let v of y.resources)x[v.resourceId]=v;for(let v of m.resources)v.resourceId in x&&(v.questions=x[v.resourceId].questions||[],v.requires=x[v.resourceId].requires||[])}m.resources.length&&!m.resources.find(v=>v.isCredit)&&m.resources.push(y&&y.resources.find(v=>v.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},zE=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,minimumExchange:x,organizationId:y,organizationFaviconUrl:v,organizationName:h,resourceRepositoryKey:g,resourceType:b,startDate:S,unitType:j,userGuideUrl:C,xrasResourceId:E})=>{const _=j=="Yes / No",N=j=="ACCESS Credits";return{allocated:mo(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:N?"credit":b.toLowerCase(),isActive:e=="active",isBoolean:_,isCredit:N,isFake:!1,isUnderReview:!1,isNew:!1,minimumExchange:x,name:f.trim(),questions:(s||[]).filter(({isActive:R})=>R).sort(wm).map(R=>({attributeSetId:R.attributeSetId,attributes:R.attributes.sort(wm).map(O=>({required:O.isRequired,resourceAttributeId:O.resourceAttributeId,label:O.attributeName})),fieldType:R.attributeSetRelationType,label:R.attributeSetName,resourceId:E,values:[]})),resourceProvider:{organizationId:y,name:h,favicon:v},requested:mo(um(r,t)||0,0,"floor"),requires:d||[],resourceId:E,resourceRepositoryKey:g,startDate:S,type:b,unit:j,used:mo(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})))},Ix=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Mi=(e,t)=>{const n=Ue(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},on=(e,t)=>e.projects[t.payload.grantNumber],Ue=(e,t)=>e.requests[t.payload.requestId],BE=(e,t)=>on(e,t).users.find(({username:n})=>n==t.payload.username),ld=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,jm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Ix(e.resourceIds,e.initialResourceIds),$x=()=>document.querySelector("meta[name=csrf-token]").content,qE=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}))},sa=rt("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({})}),Mx=rt("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Ax=rt("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ia=rt("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})}),aa=rt("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:$x()};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})}),la=rt("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:x,resourceId:y}of r.resources)if(x!=f&&!p){o[y]={resource_id:y,requested:1,amount:x-f};for(let{attributes:v,values:h,fieldType:g}of m)if(h.length){let b=v[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(g),C={resource_attribute_id:g=="multi_sel"?h:S?h[0]:b};S||(C.attribute_value=h[0]),s[b]=C}}const i={authenticity_token:$x(),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})}),ca=rt("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Ix(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(ne.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}})).status==200?{grantNumber:e}:n({grantNumber:e})}),Dx=Lr({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Ue(e,t);Sm(n,r)},addUser:(e,t)=>{const n=on(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=Ue(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Ue(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=on(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=on(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=Ue(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=Ue(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=mo(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Ue(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=on(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=BE(e,t);n.role=t.payload.role,jm(n)},toggleActionsModal:(e,t)=>{const n=Ue(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Ue(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Mi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Ue(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=on(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):[];jm(c)}}},extraReducers:e=>{e.addCase(sa.pending,t=>{t.projectListLoading=!0}).addCase(sa.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&&UE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(sa.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Mx.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Ax.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ia.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.usageDetailStatus=Ve.pending}).addCase(ia.fulfilled,(t,n)=>{const r=Ue(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ve.success}).addCase(ia.rejected,(t,n)=>{const r=Ue(t,n);r.usageDetailStatus=Ve.error}).addCase(aa.pending,(t,n)=>{const r=Mi(t,{payload:n.meta.arg});r.deleteStatus=Ve.pending}).addCase(aa.fulfilled,(t,n)=>{const r=Ue(t,n),o=Mi(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=Ve.success,o.showDeleteModal=!1}).addCase(aa.rejected,(t,n)=>{const r=Mi(t,n);r.deleteStatus=Ve.error}).addCase(la.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.exchangeStatus=Ve.pending,r.showResourcesModal=!1}).addCase(la.fulfilled,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ve.success}).addCase(la.rejected,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Ve.error}).addCase(ca.pending,(t,n)=>{const r=on(t,{payload:n.meta.arg});r.usersStatus=Ve.pending}).addCase(ca.fulfilled,(t,n)=>{const r=on(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Ve.success}).addCase(ca.rejected,(t,n)=>{const r=on(t,n);r.usersStatus=Ve.error})}}),HE=e=>e.api.error,WE=e=>e.api.projectsList,KE=e=>e.api.projectListLoading,YE=(e,t)=>on(e.api,{payload:{grantNumber:t}}),GE=(e,t)=>Ue(e.api,{payload:{requestId:t}}),QE=e=>e.api.username,{addResource:XE,addUser:ZE,closeUsageDetailModal:JE,hideAlert:eD,resetResources:eR,resetUsers:tR,setRequest:nR,setResourceQuestionValues:rR,setResourceRequest:oR,setResourcesReason:sR,setTab:iR,setUserRole:aR,toggleActionsModal:lR,toggleConfirmModal:cR,toggleDeleteModal:uR,toggleResourcesModal:dR,toggleUsersResources:fR}=Dx.actions,pR=Dx.reducer,hR=e=>{const t=Y(HE),n=Y(KE),r=Y(WE),o=ge();return w.useEffect(()=>{o(sa(e))},[]),{error:t,loading:n,projects:r}},kt=(e,t)=>{const n=Y(s=>YE(s,e)),r=Y(QE),o=ge();return w.useEffect(()=>{!n&&!t&&o(Mx({grantNumber:e}))},[t]),{project:n,addUser:s=>o(ZE({grantNumber:e,user:s})),resetUsers:()=>o(tR({grantNumber:e})),saveUsers:()=>o(ca({grantNumber:e})),setRequest:s=>o(nR({grantNumber:e,requestId:s})),setTab:s=>o(iR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(aR({grantNumber:e,username:s,role:i})),statuses:Ve,toggleUsersResources:(s,i,l)=>o(fR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},ut=(e,t)=>{const n=Y(o=>GE(o,e)),r=ge();return w.useEffect(()=>{n||r(Ax({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(XE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(JE({requestId:e})),deleteAction:o=>r(aa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ia({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(eR({requestId:e})),saveResources:()=>r(la({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(rR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(oR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(sR({requestId:e,reason:o})),statuses:Ve,toggleActionsModal:()=>r(lR({requestId:e})),toggleConfirmModal:()=>r(cR({requestId:e})),toggleDeleteModal:o=>r(uR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(dR({requestId:e}))}},mR="_project_qqnbz_1",gR="_expand_qqnbz_5",Cm={project:mR,expand:gR},vR="_returnedForCorrectionsNotes_jujbd_1",yR={returnedForCorrectionsNotes:vR};function Fx(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},Lx=Re.createContext(Ja),xR=Re.createContext(!1);let bR=!!(typeof window<"u"&&window.document&&window.document.createElement),Uc=new WeakMap;function wR(e=!1){let t=w.useContext(Lx),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 SR(e){let t=w.useContext(Lx);t===Ja&&!bR&&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=wR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function jR(e){let t=Re.useId(),[n]=w.useState(RR()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const Ux=typeof Re.useId=="function"?jR:SR;function CR(){return!1}function _R(){return!0}function ER(e){return()=>{}}function RR(){return typeof Re.useSyncExternalStore=="function"?Re.useSyncExternalStore(ER,CR,_R):w.useContext(xR)}const NR=w.createContext(null),Uo=NR,kR=w.createContext(null),$r=(e,t=null)=>e!=null?String(e):t||null,Ln=kR;function OR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=OR(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 TR(e,t){const n=_m(e),r=_m(t);return o=>{n&&n(o),r&&r(o)}}function gn(e,t){return w.useMemo(()=>TR(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=gn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const PR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],IR=["activeKey","getControlledId","getControllerId"],$R=["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 Vx(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,PR);const x=w.useContext(Uo);if(!x)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:v,getControllerId:h}=x,g=cd(x,IR),b=$r(n);return[Object.assign({},m,{role:i,id:v(n),"aria-labelledby":h(n)}),{eventKey:n,isActive:t==null&&b!=null?$r(y)===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 zx=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=cd(e,$R);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:x=Hf}]=Vx(r);return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(x,{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}))})})})});zx.displayName="TabPanel";const Bx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Fx(o,s,r),p=Ux(t),m=w.useMemo(()=>n||((y,v)=>p?`${p}-${v}-${y}`:null),[p,n]),x=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(Uo.Provider,{value:x,children:a.jsx(Ln.Provider,{value:f||null,children:u})})};Bx.Panel=zx;const qx=Bx;var Hx={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})()})(Hx);var MR=Hx.exports;const se=Js(MR);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 AR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Em={disabled:!1},Wx=Re.createContext(null);var DR=function(t){return t.scrollTop},fs="unmounted",Kn="exited",wn="entering",Qn="entered",tl="exiting",Vn=function(e){AR(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=wn):c=Qn:r.unmountOnExit||r.mountOnEnter?c=fs:c=Kn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===fs?{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!==wn&&i!==Qn&&(s=wn):(i===wn||i===Qn)&&(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===wn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this);i&&DR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Kn&&this.setState({status:fs})},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||Em.disabled){this.safeSetState({status:Qn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:wn},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||Em.disabled){this.safeSetState({status:Kn},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: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===fs)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(Wx.Provider,{value:null},typeof i=="function"?i(o,l):Re.cloneElement(Re.Children.only(i),l))},t}(Re.Component);Vn.contextType=Wx;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=fs;Vn.EXITED=Kn;Vn.ENTERING=wn;Vn.ENTERED=Qn;Vn.EXITING=tl;const FR=Vn;function Lo(e){return e&&e.ownerDocument||document}function LR(e){var t=Lo(e);return t&&t.defaultView||window}function UR(e,t){return LR(e).getComputedStyle(e,t)}var VR=/([A-Z])/g;function zR(e){return e.replace(VR,"-$1").toLowerCase()}var BR=/^ms-/;function Ai(e){return zR(e).replace(BR,"-ms-")}var qR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function HR(e){return!!(e&&qR.test(e))}function kn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Ai(t))||UR(e).getPropertyValue(Ai(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Ai(o)):HR(o)?r+=o+"("+s+") ":n+=Ai(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Uo=!!(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}};Uo&&(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 _n(e,t,n,r){return Kf(e,t,n,r),function(){fd(e,t,n,r)}}function WR(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 KR(e){var t=kn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function YR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||WR(e,"transitionend",!0)},t+n),s=_n(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Kx(e,t,n,r){n==null&&(n=KR(e)||0);var o=YR(e,n,r),s=_n(e,"transitionend",t);return function(){o(),s()}}function Rm(e,t){const n=kn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Yx(e,t){const n=Rm(e,"transitionDuration"),r=Rm(e,"transitionDelay"),o=Kx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Gx(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const GR=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=hn(f,c),m=C=>{p(nl(C))},g=C=>_=>{C&&f.current&&C(f.current,_)},v=w.useCallback(g(e),[e]),x=w.useCallback(g(t),[t]),h=w.useCallback(g(n),[n]),y=w.useCallback(g(r),[r]),b=w.useCallback(g(o),[o]),S=w.useCallback(g(s),[s]),j=w.useCallback(g(i),[i]);return a.jsx(FR,{ref:d,...u,onEnter:v,onEntered:h,onEntering:x,onExit:y,onExited:S,onExiting:b,addEndListener:j,nodeRef:f,children:typeof l=="function"?(C,_)=>l(C,{..._,ref:m}):Re.cloneElement(l,{ref:m})})}),Qx=GR,QR={[wn]:"show",[Qn]:"show"},Xx=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)=>{Gx(c),r==null||r(c,u)},[r]);return a.jsx(Qx,{ref:s,addEndListener:Yx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:se("fade",e,t.props.className,QR[c],n[c])})})});Xx.displayName="Fade";const Eo=Xx;function Yf(e){return typeof e=="boolean"?e?Eo:Hf:e}const Zx=({transition:e,...t})=>a.jsx(qx,{...t,transition:Yf(e)});Zx.displayName="TabContainer";const XR=Zx,ZR=["xxl","xl","lg","md","sm","xs"],JR="xs",Jx=w.createContext({prefixes:{},breakpoints:ZR,minBreakpoint:JR});function he(e,t){const{prefixes:n}=w.useContext(Jx);return e||n[t]||t}function Ml(){const{dir:e}=w.useContext(Jx);return e==="rtl"}const e0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"tab-content"),a.jsx(n,{ref:o,className:se(e,t),...r})));e0.displayName="TabContent";const t0=e0,n0=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:v,transition:x=Eo}]=Vx({...n,transition:Yf(t)}),h=he(e,"tab-pane");return a.jsx(Fo.Provider,{value:null,children:a.jsx(An.Provider,{value:null,children:a.jsx(x,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:g,unmountOnExit:v,children:a.jsx(s,{...i,ref:r,className:se(o,h,l&&"active")})})})})});n0.displayName="TabPane";const r0=n0,eN={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},o0=()=>{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")};o0.propTypes=eN;const es=Object.assign(o0,{Container:XR,Content:t0,Pane:r0});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 Nm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function tN(e){var t=nN(e,"string");return typeof t=="symbol"?t:String(t)}function nN(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 s0(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[Nm(r)],l=s[r],c=Wf(s,[Nm(r),r].map(tN)),u=t[r],d=s0(l,i,e[u]),f=d[0],p=d[1];return Q({},c,(o={},o[r]=f,o[u]=p,o))},e)}var km={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,v=Array(g>6?g-6:0),x=6;x<g;x++)v[x-6]=arguments[x];return r.apply(void 0,[l,c,p,d,m].concat(v))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(pd,pd.exports);var rN=pd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=rN,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 v=g.apply(void 0,f);v!=null&&(m=v)}}),m}return(0,r.default)(u)}e.exports=t.default})(km,km.exports);var oN=Function.prototype.bind.call(Function.prototype.call,[].slice);function Sn(e,t){return oN(e.querySelectorAll(t))}function i0(){const[,e]=w.useReducer(t=>!t,!1);return e}const a0=w.createContext(null);a0.displayName="NavContext";const Gf=a0,sN="data-rr-ui-",iN="rrUi";function Vo(e){return`${sN}${e}`}function aN(e){return`${iN}${e}`}const lN=["as","disabled"];function cN(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 uN(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"&&uN(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=cN(e,lN);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 dN=["as","active","eventKey"];function fN(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 l0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(An),l=w.useContext(Gf),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 c0=w.forwardRef((e,t)=>{let{as:n=Xf,active:r,eventKey:o}=e,s=fN(e,dN);const[i,l]=l0(Object.assign({key:$r(o,s.href),active:r},s));return i[Vo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});c0.displayName="NavItem";const pN=c0,hN=["as","onSelect","activeKey","role","onKeyDown"];function mN(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=Vo("event-key"),u0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=mN(e,hN);const c=i0(),u=w.useRef(!1),d=w.useContext(An),f=w.useContext(Fo);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const g=w.useRef(null),v=b=>{const S=g.current;if(!S)return null;const j=Sn(S,`[${Tm}]:not([aria-disabled=true])`),C=S.querySelector("[aria-selected=true]");if(!C||C!==document.activeElement)return null;const _=j.indexOf(C);if(_===-1)return null;let E=_+b;return E>=j.length&&(E=0),E<0&&(E=j.length-1),j[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=v(-1);break;case"ArrowRight":case"ArrowDown":S=v(1);break;default:return}S&&(b.preventDefault(),x(S.dataset[aN("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 y=hn(t,g);return a.jsx(An.Provider,{value:x,children:a.jsx(Gf.Provider,{value:{role:s,activeKey:$r(o),getControlledId:p||Om,getControllerId:m||Om},children:a.jsx(n,Object.assign({},l,{onKeyDown:h,ref:y,role:s}))})})});u0.displayName="Nav";const gN=Object.assign(u0,{Item:pN}),d0=w.createContext(null);d0.displayName="NavbarContext";const f0=d0,p0=w.createContext(null);p0.displayName="CardHeaderContext";const vN=p0,h0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"nav-item"),a.jsx(n,{ref:o,className:se(e,t),...r})));h0.displayName="NavItem";const m0=h0;function rl(){return w.useState(null)}function yN(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 g0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const xN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",bN=typeof document<"u",ol=bN||xN?w.useLayoutEffect:w.useEffect,wN=["onKeyDown"];function SN(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 jN(e){return!e||e.trim()==="#"}const v0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=SN(e,wN);const[o]=Qf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return jN(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}))});v0.displayName="Anchor";const y0=v0,x0=w.forwardRef(({bsPrefix:e,className:t,as:n=y0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=he(e,"nav-link");const[c,u]=l0({key:$r(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")})});x0.displayName="NavLink";const b0=x0,w0=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=he(r,"nav");let m,g,v=!1;const x=w.useContext(f0),h=w.useContext(vN);return x?(m=x.bsPrefix,v=l??!0):h&&({cardHeaderBsPrefix:g}=h),a.jsx(gN,{as:n,ref:t,activeKey:d,className:se(u,{[p]:!v,[`${m}-nav`]:v,[`${m}-nav-scroll`]:v&&c,[`${g}-${o}`]:!!g,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});w0.displayName="Nav";const CN=Object.assign(w0,{Item:m0,Link:b0});function Pm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function _N(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function EN(e){let t;return _N(e,n=>{t==null&&(t=n.props.eventKey)}),t}function RN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(m0,{as:"li",role:"presentation",children:a.jsx(b0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const S0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=EN(l),...u}=Al(e,{activeKey:"onSelect"});return a.jsxs(qx,{id:t,activeKey:c,onSelect:n,transition:Yf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(CN,{...u,role:"tablist",as:"ul",variant:i,children:Pm(l,RN)}),a.jsx(t0,{children:Pm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(r0,{...f})})})]})};S0.displayName="Tabs";const NN=S0,kN=w.createContext(null),Dl=kN;var Im=Object.prototype.hasOwnProperty;function $m(e,t,n){for(n of e.keys())if(Ss(n,t))return n}function Ss(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--&&Ss(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)||!Ss(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)||!Ss(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function ON(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",li=[gt,Vt,zt,vt],Ro="start",Hs="end",TN="clippingParents",j0="viewport",ts="popper",PN="reference",Mm=li.reduce(function(e,t){return e.concat([t+"-"+Ro,t+"-"+Hs])},[]),C0=[].concat(li,[Jf]).reduce(function(e,t){return e.concat([t,t+"-"+Ro,t+"-"+Hs])},[]),IN="beforeRead",$N="read",MN="afterRead",AN="beforeMain",DN="main",FN="afterMain",LN="beforeWrite",UN="write",VN="afterWrite",zN=[IN,$N,MN,AN,DN,FN,LN,UN,VN];function cn(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 un(e){var t=Nt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ep(e){if(typeof ShadowRoot>"u")return!1;var t=Nt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=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 _0(){return!/^((?!chrome|android).)*safari/i.test(hd())}function ko(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&un(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=!_0()&&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=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 E0(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 dr(e){return e?(e.nodeName||"").toLowerCase():null}function Dn(e){return Nt(e).getComputedStyle(e)}function BN(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fl(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(ep(e)?e.host:null)||mr(e)}function Am(e){return!un(e)||Dn(e).position==="fixed"?null:e.offsetParent}function qN(e){var t=/firefox/i.test(hd()),n=/Trident/i.test(hd());if(n&&un(e)){var r=Dn(e);if(r.position==="fixed")return null}var o=Fl(e);for(ep(o)&&(o=o.host);un(o)&&["html","body"].indexOf(dr(o))<0;){var s=Dn(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 ci(e){for(var t=Nt(e),n=Am(e);n&&BN(n)&&Dn(n).position==="static";)n=Am(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Dn(n).position==="static")?t:n||qN(e)||t}function np(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function js(e,t,n){return Er(e,sl(t,n))}function HN(e,t,n){var r=js(e,t,n);return r>n?n:r}function R0(){return{top:0,right:0,bottom:0,left:0}}function N0(e){return Object.assign({},R0(),e)}function k0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var WN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,N0(typeof t!="number"?t:k0(t,li))};function KN(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=cn(n.placement),c=np(l),u=[vt,zt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=WN(o.padding,n),p=tp(s),m=c==="y"?gt:vt,g=c==="y"?Vt:zt,v=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],x=i[c]-n.rects.reference[c],h=ci(s),y=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,b=v/2-x/2,S=f[m],j=y-p[d]-f[g],C=y/2-p[d]/2+b,_=js(S,C,j),E=c;n.modifiersData[r]=(t={},t[E]=_,t.centerOffset=_-C,t)}}function YN(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)||E0(t.elements.popper,o)&&(t.elements.arrow=o))}const GN={name:"arrow",enabled:!0,phase:"main",fn:KN,effect:YN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oo(e){return e.split("-")[1]}var QN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function XN(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,v=g===void 0?0:g,x=typeof d=="function"?d({x:m,y:v}):{x:m,y:v};m=x.x,v=x.y;var h=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),b=vt,S=gt,j=window;if(u){var C=ci(n),_="clientHeight",E="clientWidth";if(C===Nt(n)&&(C=mr(n),Dn(C).position!=="static"&&l==="absolute"&&(_="scrollHeight",E="scrollWidth")),C=C,o===gt||(o===vt||o===zt)&&s===Hs){S=Vt;var N=f&&C===j&&j.visualViewport?j.visualViewport.height:C[_];v-=N-r.height,v*=c?1:-1}if(o===vt||(o===gt||o===Vt)&&s===Hs){b=zt;var R=f&&C===j&&j.visualViewport?j.visualViewport.width:C[E];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&QN),k=d===!0?XN({x:m,y:v},Nt(n)):{x:m,y:v};if(m=k.x,v=k.y,c){var P;return Object.assign({},O,(P={},P[S]=y?"0":"",P[b]=h?"0":"",P.transform=(j.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",P))}return Object.assign({},O,(t={},t[S]=y?v+"px":"",t[b]=h?m+"px":"",t.transform="",t))}function ZN(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:cn(t.placement),variation:Oo(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 JN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZN,data:{}};var Di={passive:!0};function ek(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,Di)}),l&&c.addEventListener("resize",n.update,Di),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Di)}),l&&c.removeEventListener("resize",n.update,Di)}}const tk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ek,data:{}};var nk={left:"right",right:"left",bottom:"top",top:"bottom"};function ua(e){return e.replace(/left|right|bottom|top/g,function(t){return nk[t]})}var rk={start:"end",end:"start"};function Fm(e){return e.replace(/start|end/g,function(t){return rk[t]})}function rp(e){var t=Nt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function op(e){return ko(mr(e)).left+rp(e).scrollLeft}function ok(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=_0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+op(e),y:c}}function sk(e){var t,n=mr(e),r=rp(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+op(e),c=-r.scrollTop;return Dn(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function sp(e){var t=Dn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function O0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:un(e)&&sp(e)?e:O0(Fl(e))}function Cs(e,t){var n;t===void 0&&(t=[]);var r=O0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Nt(r),i=o?[s].concat(s.visualViewport||[],sp(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Cs(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 ik(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 Lm(e,t,n){return t===j0?md(ok(e,n)):Mr(t)?ik(t,n):md(sk(mr(e)))}function ak(e){var t=Cs(Fl(e)),n=["absolute","fixed"].indexOf(Dn(e).position)>=0,r=n&&un(e)?ci(e):e;return Mr(r)?t.filter(function(o){return Mr(o)&&E0(o,r)&&dr(o)!=="body"}):[]}function lk(e,t,n,r){var o=t==="clippingParents"?ak(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=Er(d.top,c.top),c.right=sl(d.right,c.right),c.bottom=sl(d.bottom,c.bottom),c.left=Er(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 T0(e){var t=e.reference,n=e.element,r=e.placement,o=r?cn(r):null,s=r?Oo(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 Ro:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Hs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ws(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?TN:l,u=n.rootBoundary,d=u===void 0?j0:u,f=n.elementContext,p=f===void 0?ts:f,m=n.altBoundary,g=m===void 0?!1:m,v=n.padding,x=v===void 0?0:v,h=N0(typeof x!="number"?x:k0(x,li)),y=p===ts?PN:ts,b=e.rects.popper,S=e.elements[g?y:p],j=lk(Mr(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),C=ko(e.elements.reference),_=T0({reference:C,element:b,strategy:"absolute",placement:o}),E=md(Object.assign({},b,_)),N=p===ts?E:C,R={top:j.top-N.top+h.top,bottom:N.bottom-j.bottom+h.bottom,left:j.left-N.left+h.left,right:N.right-j.right+h.right},O=e.modifiersData.offset;if(p===ts&&O){var k=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]+=k[D]*A})}return R}function ck(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?C0:c,d=Oo(r),f=d?l?Mm:Mm.filter(function(g){return Oo(g)===d}):li,p=f.filter(function(g){return u.indexOf(g)>=0});p.length===0&&(p=f);var m=p.reduce(function(g,v){return g[v]=Ws(e,{placement:v,boundary:o,rootBoundary:s,padding:i})[cn(v)],g},{});return Object.keys(m).sort(function(g,v){return m[g]-m[v]})}function uk(e){if(cn(e)===Jf)return[];var t=ua(e);return[Fm(e),t,Fm(t)]}function dk(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,v=n.allowedAutoPlacements,x=t.options.placement,h=cn(x),y=h===x,b=c||(y||!g?[ua(x)]:uk(x)),S=[x].concat(b).reduce(function(J,te){return J.concat(cn(te)===Jf?ck(t,{placement:te,boundary:d,rootBoundary:f,padding:u,flipVariations:g,allowedAutoPlacements:v}):te)},[]),j=t.rects.reference,C=t.rects.popper,_=new Map,E=!0,N=S[0],R=0;R<S.length;R++){var O=S[R],k=cn(O),P=Oo(O)===Ro,A=[gt,Vt].indexOf(k)>=0,D=A?"width":"height",V=Ws(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),X=A?P?zt:vt:P?Vt:gt;j[D]>C[D]&&(X=ua(X));var T=ua(X),U=[];if(s&&U.push(V[k]<=0),l&&U.push(V[X]<=0,V[T]<=0),U.every(function(J){return J})){N=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 ye=_.get(ae);if(ye)return ye.slice(0,te).every(function(Se){return Se})});if(Z)return N=Z,"break"},z=M;z>0;z--){var W=H(z);if(W==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const fk={name:"flip",enabled:!0,phase:"main",fn:dk,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 pk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ws(t,{elementContext:"reference"}),l=Ws(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 hk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:pk};function mk(e,t,n){var r=cn(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 gk(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=C0.reduce(function(d,f){return d[f]=mk(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 vk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gk};function yk(e){var t=e.state,n=e.name;t.modifiersData[n]=T0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xk={name:"popperOffsets",enabled:!0,phase:"read",fn:yk,data:{}};function bk(e){return e==="x"?"y":"x"}function wk(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,v=g===void 0?0:g,x=Ws(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),h=cn(t.placement),y=Oo(t.placement),b=!y,S=np(h),j=bk(S),C=t.modifiersData.popperOffsets,_=t.rects.reference,E=t.rects.popper,N=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(C){if(s){var P,A=S==="y"?gt:vt,D=S==="y"?Vt:zt,V=S==="y"?"height":"width",X=C[S],T=X+x[A],U=X-x[D],M=m?-E[V]/2:0,H=y===Ro?_[V]:E[V],z=y===Ro?-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:R0(),Z=te[A],ae=te[D],ye=js(0,_[V],J[V]),Se=b?_[V]/2-M-ye-Z-R.mainAxis:H-ye-Z-R.mainAxis,Ae=b?-_[V]/2+M+ye+ae+R.mainAxis:z+ye+ae+R.mainAxis,F=t.elements.arrow&&ci(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?Er(U,oe):U);C[S]=lt,k[S]=lt-X}if(l){var Pt,It=S==="x"?gt:vt,ct=S==="x"?Vt:zt,_e=C[j],zn=j==="y"?"height":"width",Bn=_e+x[It],pi=_e-x[ct],Vr=[gt,vt].indexOf(h)!==-1,hi=(Pt=O==null?void 0:O[j])!=null?Pt:0,ce=Vr?Bn:_e-_[zn]-E[zn]-hi+R.altAxis,gn=Vr?_e+_[zn]+E[zn]-hi-R.altAxis:pi,Bo=m&&Vr?HN(ce,_e,gn):js(m?ce:Bn,_e,m?gn:pi);C[j]=Bo,k[j]=Bo-_e}t.modifiersData[r]=k}}const Sk={name:"preventOverflow",enabled:!0,phase:"main",fn:wk,requiresIfExists:["offset"]};function jk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ck(e){return e===Nt(e)||!un(e)?rp(e):jk(e)}function _k(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 Ek(e,t,n){n===void 0&&(n=!1);var r=un(t),o=un(t)&&_k(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"||sp(s))&&(l=Ck(t)),un(t)?(c=ko(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 Rk(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 Nk(e){var t=Rk(e);return zN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function kk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ok(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 Tk(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 y=typeof h=="function"?h(d.options):h;v(),d.options=Object.assign({},s,d.options,y),d.scrollParents={reference:Mr(l)?Cs(l):l.contextElement?Cs(l.contextElement):[],popper:Cs(c)};var b=Nk(Ok([].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,y=h.reference,b=h.popper;if(Bm(y,b)){d.rects={reference:Ek(y,ci(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 j=d.orderedModifiers[S],C=j.fn,_=j.options,E=_===void 0?{}:_,N=j.name;typeof C=="function"&&(d=C({state:d,options:E,name:N,instance:m})||d)}}}},update:kk(function(){return new Promise(function(x){m.forceUpdate(),x(d)})}),destroy:function(){v(),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,y=x.options,b=y===void 0?{}:y,S=x.effect;if(typeof S=="function"){var j=S({state:d,name:h,instance:m,options:b}),C=function(){};f.push(j||C)}})}function v(){f.forEach(function(x){return x()}),f=[]}return m}}const Pk=Tk({defaultModifiers:[hk,xk,JN,tk,vk,fk,Sk,GN]}),Ik=["enabled","placement","strategy","modifiers"];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 Mk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ak={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)}}},Dk=[];function P0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Dk}=n,l=$k(n,Ik);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]=ON(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={},y={};Object.keys(x.elements).forEach(b=>{h[b]=x.styles[b],y[b]=x.attributes[b]}),m({state:x,styles:h,attributes:y,update:d,forceUpdate:f,placement:x.placement})}}),[d,f,m]),v=w.useMemo(()=>(Ss(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...v,g,Mk]})},[s,o,g,r,v]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=Pk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...v,Ak,g]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(x=>Object.assign({},x,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ks(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Fk=function(){},Lk=Fk;const Uk=Js(Lk),qm=()=>{};function Vk(e){return e.button===0}function zk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const da=e=>e&&("current"in e?e.current:e),Hm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function I0(e,t=qm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=da(e);Uk(!!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||zk(u)||!Vk(u)||!!Ks(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=da(e);d&&Ks(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(da(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=_n(f,Hm[r],l,!0));const v=_n(f,r,i,!0),x=_n(f,r,y=>{if(y===m){m=void 0;return}c(y)});let h=[];return"ontouchstart"in f.documentElement&&(h=[].slice.call(f.body.children).map(y=>_n(y,"mousemove",qm))),()=>{g==null||g(),v(),x(),h.forEach(y=>y())}},[e,n,r,i,l,c])}function Bk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function qk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function $0({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=Bk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:qk(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 Hk=["children"];function Wk(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 Kk=()=>{};function M0(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=C=>{t==null||t.toggle(!1,C)},{placement:v,setMenu:x,menuElement:h,toggleElement:y}=t||{},b=P0(y,h,$0({placement:u||v||"bottom-start",enabled:p,enableEvents:f??m,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:x||Kk,"aria-labelledby":y==null?void 0:y.id},b.attributes.popper,{style:b.styles.popper}),j={show:m,placement:v,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 I0(h,g,{clickTrigger:l,disabled:!m}),[S,j]}const Yk={usePopper:!0};function ip(e){let{children:t}=e,n=Wk(e,Hk);const[r,o]=M0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ip.displayName="DropdownMenu";ip.defaultProps=Yk;const A0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Wm=()=>{};function D0(){const e=Ux(),{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&&A0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function F0({children:e}){const[t,n]=D0();return a.jsx(a.Fragment,{children:e(t,n)})}F0.displayName="DropdownToggle";const Gk=["eventKey","disabled","onClick","active","as"];function Qk(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 L0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(An),i=w.useContext(Gf),{activeKey:l}=i||{},c=$r(e,t),u=n==null&&e!=null?$r(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 U0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Xf}=e,l=Qk(e,Gk);const[c]=L0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});U0.displayName="DropdownItem";const V0=w.createContext(Uo?window:void 0);V0.Provider;function Ll(){return w.useContext(V0)}function Km(){const e=i0(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ui({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Vo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Ll(),[u,d]=Fx(t,e,r),[f,p]=Km(),m=f.current,[g,v]=Km(),x=g.current,h=g0(u),y=w.useRef(null),b=w.useRef(!1),S=w.useContext(An),j=w.useCallback((O,k,P=k==null?void 0:k.type)=>{d(O,{originalEvent:k,source:P})},[d]),C=Te((O,k)=>{n==null||n(O,k),j(!1,k,"select"),k.isPropagationStopped()||S==null||S(O,k)}),_=w.useMemo(()=>({toggle:j,placement:i,show:u,menuElement:m,toggleElement:x,setMenu:p,setToggle:v}),[j,i,u,m,x,p,v]);m&&h&&!u&&(b.current=m.contains(m.ownerDocument.activeElement));const E=Te(()=>{x&&x.focus&&x.focus()}),N=Te(()=>{const O=y.current;let k=s;if(k==null&&(k=f.current&&A0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(O))return;const P=Sn(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(()=>{y.current=null});const R=(O,k)=>{if(!f.current)return null;const P=Sn(f.current,o);let A=P.indexOf(O)+k;return A=Math.max(0,Math.min(A,P.length)),P[A]};return yN(w.useCallback(()=>c.document,[c]),"keydown",O=>{var k,P;const{key:A}=O,D=O.target,V=(k=f.current)==null?void 0:k.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;y.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(An.Provider,{value:C,children:a.jsx(Dl.Provider,{value:_,children:l})})}ui.displayName="Dropdown";ui.Menu=ip;ui.Toggle=F0;ui.Item=U0;const z0=w.createContext({});z0.displayName="DropdownContext";const B0=z0,q0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=he(t,"dropdown-divider"),a.jsx(n,{ref:s,className:se(e,t),role:r,...o})));q0.displayName="DropdownDivider";const Xk=q0,H0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=he(t,"dropdown-header"),a.jsx(n,{ref:s,className:se(e,t),role:r,...o})));H0.displayName="DropdownHeader";const Zk=H0,W0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=y0,...l},c)=>{const u=he(e,"dropdown-item"),[d,f]=L0({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")})});W0.displayName="DropdownItem";const Jk=W0,K0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=he(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:se(e,t),...r})));K0.displayName="DropdownItemText";const eO=K0,Y0=w.createContext(null);Y0.displayName="InputGroupContext";const G0=Y0;function Q0(e,t){return e}function X0(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 m=w.useContext(f0),g=he(e,"dropdown-menu"),{align:v,drop:x,isRTL:h}=w.useContext(B0);n=n||v;const y=w.useContext(G0),b=[];if(n)if(typeof n=="object"){const O=Object.keys(n);if(O.length){const k=O[0],P=n[k];p=P==="start",b.push(`${g}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=X0(p,x,h),[j,{hasShown:C,popper:_,show:E,toggle:N}]=M0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(j.ref=hn(Q0(f),j.ref),ol(()=>{E&&(_==null||_.update())},[E]),!C&&!i&&!y)return null;typeof l!="string"&&(j.show=E,j.close=()=>N==null?void 0:N(!1),j.align=n);let R=d.style;return _!=null&&_.placement&&(R={...d.style,...j.style},d["x-placement"]=_.placement),a.jsx(l,{...d,...j,style:R,...(b.length||m)&&{"data-bs-popper":"static"},className:se(t,g,E&&"show",p&&`${g}-end`,u&&`${g}-${u}`,...b)})});Z0.displayName="DropdownMenu";const tO=Z0,J0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=he(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")})});J0.displayName="Button";const nO=J0,eb=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=nO,...s},i)=>{const l=he(e,"dropdown-toggle"),c=w.useContext(Dl);r!==void 0&&(s.bsPrefix=r);const[u]=D0();return u.ref=hn(u.ref,Q0(i)),a.jsx(o,{className:se(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});eb.displayName="DropdownToggle";const rO=eb,tb=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(G0),v=he(n,"dropdown"),x=Ml(),h=_=>p===!1?_==="click":p==="inside"?_!=="rootClose":p==="outside"?_!=="select":!0,y=Te((_,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"),h(E.source)&&(c==null||c(_,E)))}),S=X0(i==="end",r,x),j=w.useMemo(()=>({align:i,drop:r,isRTL:x}),[i,r,x]),C={down:v,"down-centered":`${v}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(B0.Provider,{value:j,children:a.jsx(ui,{placement:S,show:o,onSelect:l,onToggle:y,focusFirstItemOnShow:u,itemSelector:`.${v}-item:not(.disabled):not(:disabled)`,children:g?m.children:a.jsx(d,{...m,ref:t,className:se(s,o&&"show",C[r])})})})});tb.displayName="Dropdown";const Fi=Object.assign(tb,{Toggle:rO,Menu:tO,Item:Jk,ItemText:eO,Divider:Xk,Header:Zk});var Li;function Ym(e){if((!Li&&Li!==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),Li=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Li}function oO(e){const t=w.useRef(e);return t.current=e,t}function ap(e){const t=oO(e);w.useEffect(()=>()=>t.current(),[])}function zc(e){e===void 0&&(e=Lo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function sO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Gm=Vo("modal-open");class iO{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return sO(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(kn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Gm,""),kn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Gm),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=iO,Bc=(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 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 aO({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 lO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=aO({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=hn(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(lO,Object.assign({},n,{transition:t})):a.jsx(Hf,Object.assign({},n))}function nb(e){return e.code==="Escape"||e.keyCode===27}const cO=["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 uO(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 dO(e){return qc||(qc=new lp({ownerDocument:e==null?void 0:e.document})),qc}function fO(e){const t=Ll(),n=e||dO(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 rb=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:v=!0,enforceFocus:x=!0,restoreFocus:h=!0,restoreFocusOptions:y,renderDialog:b,renderBackdrop:S=oe=>a.jsx("div",Object.assign({},oe)),manager:j,container:C,onShow:_,onHide:E=()=>{},onExit:N,onExited:R,onExiting:O,onEnter:k,onEntering:P,onEntered:A}=e,D=uO(e,cO);const V=Ll(),X=gd(C),T=fO(j),U=Zf(),M=g0(n),[H,z]=w.useState(!n),W=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),Uo&&!M&&n&&(W.current=zc(V==null?void 0:V.document)),n&&H&&z(!1);const J=Te(()=>{if(T.add(),Ae.current=_n(document,"keydown",ye),Se.current=_n(document,"focus",()=>setTimeout(Z),!0),_&&_(),v){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&&!Ks(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(y),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&&!Ks(T.dialog,oe)&&T.dialog.focus()}),ae=Te(oe=>{oe.target===oe.currentTarget&&(u==null||u(oe),l===!0&&E())}),ye=Te(oe=>{c&&nb(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:N,onExiting:O,onExited:F,onEnter:k,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:Sr.createPortal(a.jsxs(a.Fragment,{children:[ee,ne]}),X)})});rb.displayName="Modal";const pO=Object.assign(rb,{Manager:lp});function yd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function hO(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 mO(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 Hr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class gO extends lp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,kn(n,{[t]:`${parseFloat(kn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],kn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(hO(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Sn(n,Hr.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),Sn(n,Hr.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),Sn(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();mO(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Sn(n,Hr.FIXED_CONTENT).forEach(s=>this.restore(r,s)),Sn(n,Hr.STICKY_CONTENT).forEach(s=>this.restore(o,s)),Sn(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Hc;function vO(e){return Hc||(Hc=new gO(e)),Hc}const ob=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-body"),a.jsx(n,{ref:o,className:se(e,t),...r})));ob.displayName="ModalBody";const yO=ob,xO=w.createContext({onHide(){}}),sb=xO,ib=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=he(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})})});ib.displayName="ModalDialog";const ab=ib,lb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-footer"),a.jsx(n,{ref:o,className:se(e,t),...r})));lb.displayName="ModalFooter";const bO=lb,wO={"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=wO;const SO=cp,jO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(sb),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(SO,{"aria-label":e,variant:t,onClick:c})]})}),CO=jO,cb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=he(e,"modal-header"),a.jsx(CO,{ref:s,...o,className:se(t,e),closeLabel:n,closeButton:r})));cb.displayName="ModalHeader";const _O=cb,EO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:se(t.className,e)})),RO=EO("h4"),ub=w.forwardRef(({className:e,bsPrefix:t,as:n=RO,...r},o)=>(t=he(t,"modal-title"),a.jsx(n,{ref:o,className:se(e,t),...r})));ub.displayName="ModalTitle";const NO=ub;function kO(e){return a.jsx(Eo,{...e,timeout:null})}function OO(e){return a.jsx(Eo,{...e,timeout:null})}const db=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=ab,"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:v,onShow:x,onHide:h,container:y,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:j=!0,restoreFocusOptions:C,onEntered:_,onExit:E,onExiting:N,onEnter:R,onEntering:O,onExited:k,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=hn(V,te),ae=Te(h),ye=Ml();e=he(e,"modal");const Se=w.useMemo(()=>({onHide:ae}),[ae]);function Ae(){return A||vO({isRTL:ye})}function F(ce){if(!Uo)return;const gn=Ae().getScrollbarWidth()>0,Bo=ce.scrollHeight>Lo(ce).documentElement.clientHeight;T({paddingRight:gn&&!Bo?Ym():void 0,paddingLeft:!gn&&Bo?Ym():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=Kx(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?v==null||v(ce):(ce.preventDefault(),m==="static"&&oe())},ct=(ce,gn)=>{ce&&F(ce),R==null||R(ce,gn)},_e=ce=>{W.current==null||W.current(),E==null||E(ce)},zn=(ce,gn)=>{O==null||O(ce,gn),Kf(window,"resize",L)},Bn=ce=>{ce&&(ce.style.display=""),k==null||k(ce),fd(window,"resize",L)},pi=w.useCallback(ce=>a.jsx("div",{...ce,className:se(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...X};Vr.display="block";const hi=ce=>a.jsx("div",{role:"dialog",...ce,style:Vr,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(sb.Provider,{value:Se,children:a.jsx(pO,{show:f,ref:Z,backdrop:m,container:y,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:j,restoreFocusOptions:C,onEscapeKeyDown:It,onShow:x,onHide:h,onEnter:ct,onEntering:zn,onEntered:_,onExit:_e,onExiting:N,onExited:Bn,manager:Ae(),transition:p?kO:void 0,backdropTransition:p?OO:void 0,renderBackdrop:pi,renderDialog:hi})})});db.displayName="Modal";const de=Object.assign(db,{Body:yO,Header:_O,Title:NO,Footer:bO,Dialog:ab,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),TO=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 PO({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(Fi,{className:"d-flex flex-column",children:[a.jsx(Fi.Toggle,{as:TO,children:p}),a.jsx(Fi.Menu,{children:d.map(([v,x,h])=>a.jsx(Fi.Item,{href:x,onClick:y=>{h!=="get"&&(y.preventDefault(),y.target.dataset.method=h,$&&$.rails&&$.rails.handleMethod($(y.target)))},children:v},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(de,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:"Manage Your Project"})}),a.jsxs(de.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function IO({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-Sx(n))*100;return a.jsxs(de,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(de.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(de.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 $O({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(de,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:"Confirm Deletion"})}),a.jsxs(de.Body,{children:[d&&a.jsxs(Ce,{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:Ff(o)}),"? Deletions cannot be undone."]})]}),a.jsx(de.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 To({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 fb({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(To,{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(To,{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:re.routes.request_action_path(t.requestId,e.actionId),children:i}):i,s]})}function Jn({resource:e,userGuide:t=!0}){const{full:n,short:r}=ii(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(To,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Po({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 MO=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function AO({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=(v,x)=>v?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(v.requestId),children:[x=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Ff(v),x=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let v of n.actions)for(let x of v.resources)f.has(x.resourceId)||(f.add(x.resourceId),p.push(x));p.sort(Qa);const m=[{key:"action",name:"Action Details",format:(v,x)=>a.jsx(fb,{action:x,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:v=>a.jsx(Po,{status:v})},...p.map(v=>({key:`resource${v.resourceId}`,name:v.name,icon:v.icon,class:"text-end",format:v.isBoolean?x=>x?Lf(x):null:MO,formatHeader:(x,h)=>a.jsx(Jn,{resource:h,userGuide:!1})}))],g=n.actions.map(v=>{const x={...v};for(let{resourceId:h}of p)x[`resource${h}`]=0;for(let{resourceId:h,approved:y,requested:b}of v.resources)x[`resource${h}`]=y||b||0;return x});return a.jsxs("div",{className:"history",children:[a.jsx(pn,{columns:m,rows:g}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function DO({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(fb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx(Po,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(pn,{rows:n.actions,columns:o})}function ns(...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 FO={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function LO(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=FO[e];return r+parseInt(kn(t,o[0]),10)+parseInt(kn(t,o[1]),10)}const UO={[Kn]:"collapse",[tl]:"collapsing",[wn]:"collapsing",[Qn]:"collapse show"},VO=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=LO,...g},v)=>{const x=typeof l=="function"?l():l,h=w.useMemo(()=>ns(C=>{C.style[x]="0"},e),[x,e]),y=w.useMemo(()=>ns(C=>{const _=`scroll${x[0].toUpperCase()}${x.slice(1)}`;C.style[x]=`${C[_]}px`},t),[x,t]),b=w.useMemo(()=>ns(C=>{C.style[x]=null},n),[x,n]),S=w.useMemo(()=>ns(C=>{C.style[x]=`${m(x,C)}px`,Gx(C)},r),[r,m,x]),j=w.useMemo(()=>ns(C=>{C.style[x]=null},o),[x,o]);return a.jsx(Qx,{ref:v,addEndListener:Yx,...g,"aria-expanded":g.role?c:null,onEnter:h,onEntering:y,onEntered:b,onExit:S,onExiting:j,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(C,_)=>Re.cloneElement(i,{..._,className:se(s,i.props.className,UO[C],x==="width"&&"collapse-horizontal")})})}),zO=VO;function pb(e,t){return Array.isArray(e)?e.includes(t):e===t}const hb=w.createContext({});hb.displayName="AccordionContext";const Ul=hb,mb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Ul);return t=he(t,"accordion-collapse"),a.jsx(zO,{ref:i,in:pb(l,o),...s,className:se(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});mb.displayName="AccordionCollapse";const gb=mb,vb=w.createContext({eventKey:""});vb.displayName="AccordionItemContext";const up=vb,yb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=he(t,"accordion-body");const{eventKey:f}=w.useContext(up);return a.jsx(gb,{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)})})});yb.displayName="AccordionBody";const BO=yb;function qO(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 xb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=he(t,"accordion-button");const{eventKey:i}=w.useContext(up),l=qO(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,!pb(c,i)&&"collapsed")})});xb.displayName="AccordionButton";const bb=xb,wb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=he(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:se(n,t),children:a.jsx(bb,{onClick:o,children:r})})));wb.displayName="AccordionHeader";const HO=wb,Sb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=he(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)})})});Sb.displayName="AccordionItem";const WO=Sb,jb=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=he(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`)})})});jb.displayName="Accordion";const fa=Object.assign(jb,{Button:bb,Collapse:gb,Item:WO,Header:HO,Body:BO}),xd=2**31-1;function Cb(e,t,n){const r=n-Date.now();e.current=r<=xd?setTimeout(t,r):setTimeout(()=>Cb(e,t,n),xd)}function KO(){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):Cb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const YO=()=>{};function GO(e,t,{disabled:n,clickTrigger:r}={}){const o=t||YO;I0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{nb(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Lo(da(e));let l=(i.defaultView||window).event;const c=_n(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const _b=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=hn(d,t),g=gd(e.container),v=gd(e.target),[x,h]=w.useState(!e.show),y=P0(v,u,$0({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(GO(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:j,onExiting:C,onEnter:_,onEntering:E,onEntered:N}=e;let R=e.children(Object.assign({},y.attributes.popper,{style:y.styles.popper,ref:m}),{popper:y,placement:o,show:!!e.show,arrowProps:Object.assign({},y.attributes.arrow,{style:y.styles.arrow,ref:p})});return R=vd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:j,onExiting:C,onExited:b,onEnter:_,onEntering:E,onEntered:N}),g?Sr.createPortal(R,g):null});_b.displayName="Overlay";const QO=_b,Eb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-header"),a.jsx(n,{ref:o,className:se(e,t),...r})));Eb.displayName="PopoverHeader";const XO=Eb,Rb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-body"),a.jsx(n,{ref:o,className:se(e,t),...r})));Rb.displayName="PopoverBody";const Nb=Rb;function kb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Ob(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const ZO=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=he(e,"popover"),m=Ml(),[g]=(t==null?void 0:t.split("-"))||[],v=kb(g,m);let x=r;return u&&!l&&(x={...r,...Ob(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-${v}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(Nb,{children:o}):o]})}),JO=Object.assign(ZO,{Header:XO,Body:Nb,POPPER_OFFSET:[0,8]}),Tb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=he(e,"tooltip");const f=Ml(),[p]=(t==null?void 0:t.split("-"))||[],m=kb(p,f);let g=r;return c&&!i&&(g={...r,...Ob(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})]})});Tb.displayName="Tooltip";const Vl=Object.assign(Tb,{TOOLTIP_OFFSET:[0,6]});function eT(e){const t=w.useRef(null),n=he(void 0,"popover"),r=he(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(yd(t.current,n))return JO.POPPER_OFFSET;if(yd(t.current,r))return Vl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function tT(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 Pb=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]=eT(i.offset),m=hn(l,f),g=t===!0?Eo:t||void 0,v=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(QO,{...i,ref:m,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:v},transition:g,rootClose:r,placement:o,show:s,children:(x,{arrowProps:h,popper:y,show:b})=>{var S,j;tT(x,h);const C=y==null?void 0:y.placement,_=Object.assign(c.current,{state:y==null?void 0:y.state,scheduleUpdate:y==null?void 0:y.update,placement:C,outOfBoundaries:(y==null||(S=y.state)==null||(j=S.modifiersData.hide)==null?void 0:j.isReferenceHidden)||!1,strategy:n.strategy}),E=!!u;return typeof e=="function"?e({...x,placement:C,show:b,...!t&&b&&{className:"show"},popper:_,arrowProps:h,hasDoneInitialMeasure:E}):w.cloneElement(e,{...x,placement:C,arrowProps:h,popper:_,hasDoneInitialMeasure:E,className:se(e.props.className,!t&&b&&"show"),style:{...e.props.style,...x.style}})}})});Pb.displayName="Overlay";const Ib=Pb;function nT(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)&&!Ks(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const rT=({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=hn(f,n.ref),m=KO(),g=w.useRef(""),[v,x]=s0(o,s,i),h=nT(l),{onFocus:y,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},j=D=>{p(nl(D))},C=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)=>{C(),y==null||y(...D)},[C,y]),N=w.useCallback((...D)=>{_(),b==null||b(...D)},[_,b]),R=w.useCallback((...D)=>{x(!v),S==null||S(...D)},[S,x,v]),O=w.useCallback((...D)=>{Xm(C,D,"fromElement")},[C]),k=w.useCallback((...D)=>{Xm(_,D,"toElement")},[_]),P=e==null?[]:[].concat(e),A={ref:j};return P.indexOf("click")!==-1&&(A.onClick=R),P.indexOf("focus")!==-1&&(A.onFocus=E,A.onBlur=N),P.indexOf("hover")!==-1&&(A.onMouseOver=O,A.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(A):w.cloneElement(n,A),a.jsx(Ib,{...d,show:v,onHide:_,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},dp=rT;function oT({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(Jn,{resource:m})},{key:"isActive",name:"Status",format:p=>a.jsx(Po,{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,v=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(v,100)}%`}}),rt(g,{abbreviate:!0})," of"," ",rt(m.allocated,{abbreviate:!0})," ",m.unit," ","remaining (",Math.round(v),"%)"]})}},{key:"endDate",name:"End Date",format:p=>ho(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(Po,{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 v=a.jsxs(Vl,{children:["Please contact ",Uf(r)," to request access to this resource."]});return a.jsx(dp,{overlay:v,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(pn,{columns:f,rows:l}):null]})}const sT=[{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(" ")}}],iT=({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(pn,{rows:r,columns:sT}):null};function aT({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(oT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(iT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(DO,{requestId:e})})]}):null]})}function Ar(e){"@babel/helpers - typeof";return Ar=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},Ar(e)}function lT(e,t){if(Ar(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ar(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $b(e){var t=lT(e,"string");return Ar(t)=="symbol"?t:String(t)}function so(e,t,n){return t=$b(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){so(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 cT(e){if(Array.isArray(e))return e}function uT(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 Mb(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 dT(){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 cT(e)||uT(e,t)||Mb(e,t)||dT()}function mn(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 fT=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ab(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=mn(e,fT),v=w.useState(l!==void 0?l:n),x=Ve(v,2),h=x[0],y=x[1],b=w.useState(c!==void 0?c:o),S=Ve(b,2),j=S[0],C=S[1],_=w.useState(m!==void 0?m:i),E=Ve(_,2),N=E[0],R=E[1],O=w.useCallback(function(T,U){typeof u=="function"&&u(T,U),R(T)},[u]),k=w.useCallback(function(T,U){var M;typeof d=="function"&&(M=d(T,U)),y(M!==void 0?M:T)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),C(!0)},[p]),A=w.useCallback(function(){typeof f=="function"&&f(),C(!1)},[f]),D=l!==void 0?l:h,V=c!==void 0?c:j,X=m!==void 0?m:N;return K(K({},g),{},{inputValue:D,menuIsOpen:V,onChange:O,onInputChange:k,onMenuClose:A,onMenuOpen:P,value:X})}function pT(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,$b(r.key),r)}}function hT(e,t,n){return t&&Jm(e.prototype,t),n&&Jm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mT(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 Db(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Db=function(){return!!e})()}function gT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vT(e,t){if(t&&(Ar(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gT(e)}function yT(e){var t=Db();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 vT(this,o)}}function xT(e){if(Array.isArray(e))return bd(e)}function bT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wT(){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 xT(e)||bT(e)||Mb(e)||wT()}function ST(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 jT(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 CT=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(jT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=ST(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-",fe="-webkit-",Fb="comm",pp="rule",hp="decl",_T="@import",Lb="@keyframes",ET="@layer",RT=Math.abs,zl=String.fromCharCode,NT=Object.assign;function kT(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 Ub(e){return e.trim()}function OT(e,t){return(e=t.exec(e))?e[0]:e}function pe(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 rn(e){return e.length}function mp(e){return e.length}function Ui(e,t){return t.push(e),e}function TT(e,t){return e.map(t).join("")}var Bl=1,Io=1,Vb=0,xt=0,$e=0,zo="";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:Io,length:i,return:""}}function rs(e,t){return NT(ql("",null,null,"",null,null,0),e,{length:-e.length},t)}function PT(){return $e}function IT(){return $e=xt>0?Ke(zo,--xt):0,Io--,$e===10&&(Io=1,Bl--),$e}function jt(){return $e=xt<Vb?Ke(zo,xt++):0,Io++,$e===10&&(Io=1,Bl++),$e}function dn(){return Ke(zo,xt)}function pa(){return xt}function di(e,t){return Ys(zo,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 zb(e){return Bl=Io=1,Vb=rn(zo=e),xt=0,[]}function Bb(e){return zo="",e}function ha(e){return Ub(di(xt-1,Sd(e===91?e+2:e===40?e+1:e)))}function $T(e){for(;($e=dn())&&$e<33;)jt();return Gs(e)>2||Gs($e)>3?"":" "}function MT(e,t){for(;--t&&jt()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return di(e,pa()+(t<6&&dn()==32&&jt()==32))}function Sd(e){for(;jt();)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:jt();break}return xt}function AT(e,t){for(;jt()&&e+$e!==57;)if(e+$e===84&&dn()===47)break;return"/*"+di(t,xt-1)+"*"+zl(e===47?e:jt())}function DT(e){for(;!Gs(dn());)jt();return di(e,xt)}function FT(e){return Bb(ma("",null,null,null,[""],e=zb(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,v=1,x=1,h=1,y=0,b="",S=o,j=s,C=r,_=b;x;)switch(g=y,y=jt()){case 40:if(g!=108&&Ke(_,f-1)==58){wd(_+=pe(ha(y),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:_+=ha(y);break;case 9:case 10:case 13:case 32:_+=$T(g);break;case 92:_+=MT(pa()-1,7);continue;case 47:switch(dn()){case 42:case 47:Ui(LT(AT(jt(),pa()),t,n),c);break;default:_+="/"}break;case 123*v:l[u++]=rn(_)*h;case 125*v:case 59:case 0:switch(y){case 0:case 125:x=0;case 59+d:h==-1&&(_=pe(_,/\f/g,"")),m>0&&rn(_)-f&&Ui(m>32?tg(_+";",r,n,f-1):tg(pe(_," ","")+";",r,n,f-2),c);break;case 59:_+=";";default:if(Ui(C=eg(_,t,n,u,d,o,l,b,S=[],j=[],f),s),y===123)if(d===0)ma(_,t,C,C,S,s,f,l,j);else switch(p===99&&Ke(_,3)===110?100:p){case 100:case 108:case 109:case 115:ma(e,C,C,r&&Ui(eg(e,C,C,0,0,o,l,b,o,S=[],f),j),o,j,f,l,r?S:j);break;default:ma(_,C,C,C,[""],j,0,l,j)}}u=d=m=0,v=h=1,b=_="",f=i;break;case 58:f=1+rn(_),m=g;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&IT()==125)continue}switch(_+=zl(y),y*v){case 38:h=d>0?1:(_+="\f",-1);break;case 44:l[u++]=(rn(_)-1)*h,h=1;break;case 64:dn()===45&&(_+=ha(jt())),p=dn(),d=f=rn(b=_+=DT(pa())),y++;break;case 45:g===45&&rn(_)==2&&(v=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,v=0,x=0;g<r;++g)for(var h=0,y=Ys(e,f+1,f=RT(v=i[g])),b=e;h<m;++h)(b=Ub(v>0?p[h]+" "+y:pe(y,/&\f/g,p[h])))&&(c[x++]=b);return ql(e,t,n,o===0?pp:l,c,u,d)}function LT(e,t,n){return ql(e,t,n,Fb,zl(PT()),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 mo(e,t){for(var n="",r=mp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function UT(e,t,n,r){switch(e.type){case ET:if(e.children.length)break;case _T:case hp:return e.return=e.return||e.value;case Fb:return"";case Lb:return e.return=e.value+"{"+mo(e.children,r)+"}";case pp:e.value=e.props.join(",")}return rn(n=mo(e.children,r))?e.return=e.value+"{"+n+"}":""}function VT(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 zT(e){return function(t){t.root||(t=t.return)&&e(t)}}function BT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var qT=function(t,n,r){for(var o=0,s=0;o=s,s=dn(),o===38&&s===12&&(n[r]=1),!Gs(s);)jt();return di(t,xt)},HT=function(t,n){var r=-1,o=44;do switch(Gs(o)){case 0:o===38&&dn()===12&&(n[r]=1),t[r]+=qT(xt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=dn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=zl(o)}while(o=jt());return t},WT=function(t,n){return Bb(HT(zb(t),n))},ng=new WeakMap,KT=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=WT(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]}}},YT=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function qb(e,t){switch(kT(e,t)){case 5103:return fe+"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 fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+al+e+Ze+e+e;case 6828:case 4268:return fe+e+Ze+e+e;case 6165:return fe+e+Ze+"flex-"+e+e;case 5187:return fe+e+pe(e,/(\w+).+(:[^]+)/,fe+"box-$1$2"+Ze+"flex-$1$2")+e;case 5443:return fe+e+Ze+"flex-item-"+pe(e,/flex-|-self/,"")+e;case 4675:return fe+e+Ze+"flex-line-pack"+pe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+Ze+pe(e,"shrink","negative")+e;case 5292:return fe+e+Ze+pe(e,"basis","preferred-size")+e;case 6060:return fe+"box-"+pe(e,"-grow","")+fe+e+Ze+pe(e,"grow","positive")+e;case 4554:return fe+pe(e,/([^-])(transform)/g,"$1"+fe+"$2")+e;case 6187:return pe(pe(pe(e,/(zoom-|grab)/,fe+"$1"),/(image-set)/,fe+"$1"),e,"")+e;case 5495:case 3959:return pe(e,/(image-set\([^]*)/,fe+"$1$`$1");case 4968:return pe(pe(e,/(.+:)(flex-)?(.*)/,fe+"box-pack:$3"+Ze+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return pe(e,/(.+)-inline(.+)/,fe+"$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(rn(e)-1-t>6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return pe(e,/(.+:)(.+)-([^]+)/,"$1"+fe+"$2-$3$1"+al+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wd(e,"stretch")?qb(pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,rn(e)-3-(~wd(e,"!important")&&10))){case 107:return pe(e,":",":"+fe)+e;case 101:return pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+fe+(Ke(e,14)===45?"inline-":"")+"box$3$1"+fe+"$2$3$1"+Ze+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return fe+e+Ze+pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+Ze+pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+Ze+pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+Ze+e+e}return e}var GT=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hp:t.return=qb(t.value,t.length);break;case Lb:return mo([rs(t,{value:pe(t.value,"@","@"+fe)})],o);case pp:if(t.length)return TT(t.props,function(s){switch(OT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mo([rs(t,{props:[pe(s,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return mo([rs(t,{props:[pe(s,/:(plac\w+)/,":"+fe+"input-$1")]}),rs(t,{props:[pe(s,/:(plac\w+)/,":"+al+"$1")]}),rs(t,{props:[pe(s,/:(plac\w+)/,Ze+"input-$1")]})],o)}return""})}},QT=[GT],XT=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(v){var x=v.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var o=t.stylisPlugins||QT,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var x=v.getAttribute("data-emotion").split(" "),h=1;h<x.length;h++)s[x[h]]=!0;l.push(v)});var c,u=[KT,YT];{var d,f=[UT,zT(function(v){d.insert(v)})],p=VT(u.concat(o,f)),m=function(x){return mo(FT(x),p)};c=function(x,h,y,b){d=y,m(x?x+"{"+h.styles+"}":h.styles),b&&(g.inserted[h.name]=!0)}}var g={key:n,sheet:new CT({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},Hb={exports:{}},ve={};/** @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})()})(Hx);var MR=Hx.exports;const oe=Js(MR);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 AR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Em={disabled:!1},Wx=Re.createContext(null);var DR=function(t){return t.scrollTop},fs="unmounted",Yn="exited",jn="entering",Xn="entered",tl="exiting",qn=function(e){AR(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=Yn,s.appearStatus=jn):c=Xn:r.unmountOnExit||r.mountOnEnter?c=fs:c=Yn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===fs?{status:Yn}: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!==jn&&i!==Xn&&(s=jn):(i===jn||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===jn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this);i&&DR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Yn&&this.setState({status:fs})},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||Em.disabled){this.safeSetState({status:Xn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:jn},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:Sr.findDOMNode(this);if(!s||Em.disabled){this.safeSetState({status:Yn},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:Yn},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===fs)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(Wx.Provider,{value:null},typeof i=="function"?i(o,l):Re.cloneElement(Re.Children.only(i),l))},t}(Re.Component);qn.contextType=Wx;qn.propTypes={};function Hr(){}qn.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};qn.UNMOUNTED=fs;qn.EXITED=Yn;qn.ENTERING=jn;qn.ENTERED=Xn;qn.EXITING=tl;const FR=qn;function Vo(e){return e&&e.ownerDocument||document}function LR(e){var t=Vo(e);return t&&t.defaultView||window}function UR(e,t){return LR(e).getComputedStyle(e,t)}var VR=/([A-Z])/g;function zR(e){return e.replace(VR,"-$1").toLowerCase()}var BR=/^ms-/;function Ai(e){return zR(e).replace(BR,"-ms-")}var qR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function HR(e){return!!(e&&qR.test(e))}function Pn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Ai(t))||UR(e).getPropertyValue(Ai(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Ai(o)):HR(o)?r+=o+"("+s+") ":n+=Ai(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const zo=!!(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}};zo&&(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 Nn(e,t,n,r){return Kf(e,t,n,r),function(){fd(e,t,n,r)}}function WR(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 KR(e){var t=Pn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function YR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||WR(e,"transitionend",!0)},t+n),s=Nn(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Kx(e,t,n,r){n==null&&(n=KR(e)||0);var o=YR(e,n,r),s=Nn(e,"transitionend",t);return function(){o(),s()}}function Rm(e,t){const n=Pn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Yx(e,t){const n=Rm(e,"transitionDuration"),r=Rm(e,"transitionDelay"),o=Kx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Gx(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const GR=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=gn(f,c),m=C=>{p(nl(C))},x=C=>E=>{C&&f.current&&C(f.current,E)},y=w.useCallback(x(e),[e]),v=w.useCallback(x(t),[t]),h=w.useCallback(x(n),[n]),g=w.useCallback(x(r),[r]),b=w.useCallback(x(o),[o]),S=w.useCallback(x(s),[s]),j=w.useCallback(x(i),[i]);return a.jsx(FR,{ref:d,...u,onEnter:y,onEntered:h,onEntering:v,onExit:g,onExited:S,onExiting:b,addEndListener:j,nodeRef:f,children:typeof l=="function"?(C,E)=>l(C,{...E,ref:m}):Re.cloneElement(l,{ref:m})})}),Qx=GR,QR={[jn]:"show",[Xn]:"show"},Xx=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)=>{Gx(c),r==null||r(c,u)},[r]);return a.jsx(Qx,{ref:s,addEndListener:Yx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,QR[c],n[c])})})});Xx.displayName="Fade";const No=Xx;function Yf(e){return typeof e=="boolean"?e?No:Hf:e}const Zx=({transition:e,...t})=>a.jsx(qx,{...t,transition:Yf(e)});Zx.displayName="TabContainer";const XR=Zx,ZR=["xxl","xl","lg","md","sm","xs"],JR="xs",Jx=w.createContext({prefixes:{},breakpoints:ZR,minBreakpoint:JR});function he(e,t){const{prefixes:n}=w.useContext(Jx);return e||n[t]||t}function Ml(){const{dir:e}=w.useContext(Jx);return e==="rtl"}const e0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"tab-content"),a.jsx(n,{ref:o,className:oe(e,t),...r})));e0.displayName="TabContent";const t0=e0,n0=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:x,unmountOnExit:y,transition:v=No}]=Vx({...n,transition:Yf(t)}),h=he(e,"tab-pane");return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(v,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:x,unmountOnExit:y,children:a.jsx(s,{...i,ref:r,className:oe(o,h,l&&"active")})})})})});n0.displayName="TabPane";const r0=n0,eN={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},o0=()=>{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")};o0.propTypes=eN;const ts=Object.assign(o0,{Container:XR,Content:t0,Pane:r0});function G(){return G=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},G.apply(this,arguments)}function Nm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function tN(e){var t=nN(e,"string");return typeof t=="symbol"?t:String(t)}function nN(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 s0(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[Nm(r)],l=s[r],c=Wf(s,[Nm(r),r].map(tN)),u=t[r],d=s0(l,i,e[u]),f=d[0],p=d[1];return G({},c,(o={},o[r]=f,o[u]=p,o))},e)}var km={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 x=arguments.length,y=Array(x>6?x-6:0),v=6;v<x;v++)y[v-6]=arguments[v];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 rN=pd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=rN,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(x){if(m==null){var y=x.apply(void 0,f);y!=null&&(m=y)}}),m}return(0,r.default)(u)}e.exports=t.default})(km,km.exports);var oN=Function.prototype.bind.call(Function.prototype.call,[].slice);function Cn(e,t){return oN(e.querySelectorAll(t))}function i0(){const[,e]=w.useReducer(t=>!t,!1);return e}const a0=w.createContext(null);a0.displayName="NavContext";const Gf=a0,sN="data-rr-ui-",iN="rrUi";function Bo(e){return`${sN}${e}`}function aN(e){return`${iN}${e}`}const lN=["as","disabled"];function cN(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 uN(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"&&uN(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=cN(e,lN);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 dN=["as","active","eventKey"];function fN(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 l0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Ln),l=w.useContext(Gf),c=w.useContext(Uo);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[Bo("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 c0=w.forwardRef((e,t)=>{let{as:n=Xf,active:r,eventKey:o}=e,s=fN(e,dN);const[i,l]=l0(Object.assign({key:$r(o,s.href),active:r},s));return i[Bo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});c0.displayName="NavItem";const pN=c0,hN=["as","onSelect","activeKey","role","onKeyDown"];function mN(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=Bo("event-key"),u0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=mN(e,hN);const c=i0(),u=w.useRef(!1),d=w.useContext(Ln),f=w.useContext(Uo);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const x=w.useRef(null),y=b=>{const S=x.current;if(!S)return null;const j=Cn(S,`[${Tm}]:not([aria-disabled=true])`),C=S.querySelector("[aria-selected=true]");if(!C||C!==document.activeElement)return null;const E=j.indexOf(C);if(E===-1)return null;let _=E+b;return _>=j.length&&(_=0),_<0&&(_=j.length-1),j[_]},v=(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(),v(S.dataset[aN("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(x.current&&u.current){const b=x.current.querySelector(`[${Tm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const g=gn(t,x);return a.jsx(Ln.Provider,{value:v,children:a.jsx(Gf.Provider,{value:{role:s,activeKey:$r(o),getControlledId:p||Om,getControllerId:m||Om},children:a.jsx(n,Object.assign({},l,{onKeyDown:h,ref:g,role:s}))})})});u0.displayName="Nav";const gN=Object.assign(u0,{Item:pN}),d0=w.createContext(null);d0.displayName="NavbarContext";const f0=d0,p0=w.createContext(null);p0.displayName="CardHeaderContext";const vN=p0,h0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"nav-item"),a.jsx(n,{ref:o,className:oe(e,t),...r})));h0.displayName="NavItem";const m0=h0;function rl(){return w.useState(null)}function yN(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 g0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const xN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",bN=typeof document<"u",ol=bN||xN?w.useLayoutEffect:w.useEffect,wN=["onKeyDown"];function SN(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 jN(e){return!e||e.trim()==="#"}const v0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=SN(e,wN);const[o]=Qf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return jN(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}))});v0.displayName="Anchor";const y0=v0,x0=w.forwardRef(({bsPrefix:e,className:t,as:n=y0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=he(e,"nav-link");const[c,u]=l0({key:$r(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")})});x0.displayName="NavLink";const b0=x0,w0=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=he(r,"nav");let m,x,y=!1;const v=w.useContext(f0),h=w.useContext(vN);return v?(m=v.bsPrefix,y=l??!0):h&&({cardHeaderBsPrefix:x}=h),a.jsx(gN,{as:n,ref:t,activeKey:d,className:oe(u,{[p]:!y,[`${m}-nav`]:y,[`${m}-nav-scroll`]:y&&c,[`${x}-${o}`]:!!x,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});w0.displayName="Nav";const CN=Object.assign(w0,{Item:m0,Link:b0});function Pm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function _N(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function EN(e){let t;return _N(e,n=>{t==null&&(t=n.props.eventKey)}),t}function RN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(m0,{as:"li",role:"presentation",children:a.jsx(b0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const S0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=EN(l),...u}=Al(e,{activeKey:"onSelect"});return a.jsxs(qx,{id:t,activeKey:c,onSelect:n,transition:Yf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(CN,{...u,role:"tablist",as:"ul",variant:i,children:Pm(l,RN)}),a.jsx(t0,{children:Pm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(r0,{...f})})})]})};S0.displayName="Tabs";const NN=S0,kN=w.createContext(null),Dl=kN;var Im=Object.prototype.hasOwnProperty;function $m(e,t,n){for(n of e.keys())if(Ss(n,t))return n}function Ss(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--&&Ss(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)||!Ss(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)||!Ss(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function ON(e){const t=Zf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var yt="top",zt="bottom",Bt="right",xt="left",Jf="auto",li=[yt,zt,Bt,xt],ko="start",Hs="end",TN="clippingParents",j0="viewport",ns="popper",PN="reference",Mm=li.reduce(function(e,t){return e.concat([t+"-"+ko,t+"-"+Hs])},[]),C0=[].concat(li,[Jf]).reduce(function(e,t){return e.concat([t,t+"-"+ko,t+"-"+Hs])},[]),IN="beforeRead",$N="read",MN="afterRead",AN="beforeMain",DN="main",FN="afterMain",LN="beforeWrite",UN="write",VN="afterWrite",zN=[IN,$N,MN,AN,DN,FN,LN,UN,VN];function dn(e){return e.split("-")[0]}function Ot(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=Ot(e).Element;return e instanceof t||e instanceof Element}function fn(e){var t=Ot(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ep(e){if(typeof ShadowRoot>"u")return!1;var t=Ot(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,sl=Math.min,Oo=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 _0(){return!/^((?!chrome|android).)*safari/i.test(hd())}function To(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&fn(e)&&(o=e.offsetWidth>0&&Oo(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Oo(r.height)/e.offsetHeight||1);var i=Mr(e)?Ot(e):window,l=i.visualViewport,c=!_0()&&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=To(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 E0(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 dr(e){return e?(e.nodeName||"").toLowerCase():null}function Un(e){return Ot(e).getComputedStyle(e)}function BN(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fl(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(ep(e)?e.host:null)||mr(e)}function Am(e){return!fn(e)||Un(e).position==="fixed"?null:e.offsetParent}function qN(e){var t=/firefox/i.test(hd()),n=/Trident/i.test(hd());if(n&&fn(e)){var r=Un(e);if(r.position==="fixed")return null}var o=Fl(e);for(ep(o)&&(o=o.host);fn(o)&&["html","body"].indexOf(dr(o))<0;){var s=Un(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 ci(e){for(var t=Ot(e),n=Am(e);n&&BN(n)&&Un(n).position==="static";)n=Am(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Un(n).position==="static")?t:n||qN(e)||t}function np(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function js(e,t,n){return Er(e,sl(t,n))}function HN(e,t,n){var r=js(e,t,n);return r>n?n:r}function R0(){return{top:0,right:0,bottom:0,left:0}}function N0(e){return Object.assign({},R0(),e)}function k0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var WN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,N0(typeof t!="number"?t:k0(t,li))};function KN(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=dn(n.placement),c=np(l),u=[xt,Bt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=WN(o.padding,n),p=tp(s),m=c==="y"?yt:xt,x=c==="y"?zt:Bt,y=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],v=i[c]-n.rects.reference[c],h=ci(s),g=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,b=y/2-v/2,S=f[m],j=g-p[d]-f[x],C=g/2-p[d]/2+b,E=js(S,C,j),_=c;n.modifiersData[r]=(t={},t[_]=E,t.centerOffset=E-C,t)}}function YN(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)||E0(t.elements.popper,o)&&(t.elements.arrow=o))}const GN={name:"arrow",enabled:!0,phase:"main",fn:KN,effect:YN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Po(e){return e.split("-")[1]}var QN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function XN(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Oo(n*o)/o||0,y:Oo(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,x=i.y,y=x===void 0?0:x,v=typeof d=="function"?d({x:m,y}):{x:m,y};m=v.x,y=v.y;var h=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=xt,S=yt,j=window;if(u){var C=ci(n),E="clientHeight",_="clientWidth";if(C===Ot(n)&&(C=mr(n),Un(C).position!=="static"&&l==="absolute"&&(E="scrollHeight",_="scrollWidth")),C=C,o===yt||(o===xt||o===Bt)&&s===Hs){S=zt;var N=f&&C===j&&j.visualViewport?j.visualViewport.height:C[E];y-=N-r.height,y*=c?1:-1}if(o===xt||(o===yt||o===zt)&&s===Hs){b=Bt;var R=f&&C===j&&j.visualViewport?j.visualViewport.width:C[_];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&QN),k=d===!0?XN({x:m,y},Ot(n)):{x:m,y};if(m=k.x,y=k.y,c){var P;return Object.assign({},O,(P={},P[S]=g?"0":"",P[b]=h?"0":"",P.transform=(j.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",P))}return Object.assign({},O,(t={},t[S]=g?y+"px":"",t[b]=h?m+"px":"",t.transform="",t))}function ZN(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:dn(t.placement),variation:Po(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 JN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZN,data:{}};var Di={passive:!0};function ek(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=Ot(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Di)}),l&&c.addEventListener("resize",n.update,Di),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Di)}),l&&c.removeEventListener("resize",n.update,Di)}}const tk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ek,data:{}};var nk={left:"right",right:"left",bottom:"top",top:"bottom"};function ua(e){return e.replace(/left|right|bottom|top/g,function(t){return nk[t]})}var rk={start:"end",end:"start"};function Fm(e){return e.replace(/start|end/g,function(t){return rk[t]})}function rp(e){var t=Ot(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function op(e){return To(mr(e)).left+rp(e).scrollLeft}function ok(e,t){var n=Ot(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=_0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+op(e),y:c}}function sk(e){var t,n=mr(e),r=rp(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+op(e),c=-r.scrollTop;return Un(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function sp(e){var t=Un(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function O0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:fn(e)&&sp(e)?e:O0(Fl(e))}function Cs(e,t){var n;t===void 0&&(t=[]);var r=O0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Ot(r),i=o?[s].concat(s.visualViewport||[],sp(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Cs(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 ik(e,t){var n=To(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===j0?md(ok(e,n)):Mr(t)?ik(t,n):md(sk(mr(e)))}function ak(e){var t=Cs(Fl(e)),n=["absolute","fixed"].indexOf(Un(e).position)>=0,r=n&&fn(e)?ci(e):e;return Mr(r)?t.filter(function(o){return Mr(o)&&E0(o,r)&&dr(o)!=="body"}):[]}function lk(e,t,n,r){var o=t==="clippingParents"?ak(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=Er(d.top,c.top),c.right=sl(d.right,c.right),c.bottom=sl(d.bottom,c.bottom),c.left=Er(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 T0(e){var t=e.reference,n=e.element,r=e.placement,o=r?dn(r):null,s=r?Po(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case yt:c={x:i,y:t.y-n.height};break;case zt:c={x:i,y:t.y+t.height};break;case Bt:c={x:t.x+t.width,y:l};break;case xt: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 Hs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ws(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?TN:l,u=n.rootBoundary,d=u===void 0?j0:u,f=n.elementContext,p=f===void 0?ns:f,m=n.altBoundary,x=m===void 0?!1:m,y=n.padding,v=y===void 0?0:y,h=N0(typeof v!="number"?v:k0(v,li)),g=p===ns?PN:ns,b=e.rects.popper,S=e.elements[x?g:p],j=lk(Mr(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),C=To(e.elements.reference),E=T0({reference:C,element:b,strategy:"absolute",placement:o}),_=md(Object.assign({},b,E)),N=p===ns?_:C,R={top:j.top-N.top+h.top,bottom:N.bottom-j.bottom+h.bottom,left:j.left-N.left+h.left,right:N.right-j.right+h.right},O=e.modifiersData.offset;if(p===ns&&O){var k=O[o];Object.keys(R).forEach(function(P){var U=[Bt,zt].indexOf(P)>=0?1:-1,F=[yt,zt].indexOf(P)>=0?"y":"x";R[P]+=k[F]*U})}return R}function ck(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?C0:c,d=Po(r),f=d?l?Mm:Mm.filter(function(x){return Po(x)===d}):li,p=f.filter(function(x){return u.indexOf(x)>=0});p.length===0&&(p=f);var m=p.reduce(function(x,y){return x[y]=Ws(e,{placement:y,boundary:o,rootBoundary:s,padding:i})[dn(y)],x},{});return Object.keys(m).sort(function(x,y){return m[x]-m[y]})}function uk(e){if(dn(e)===Jf)return[];var t=ua(e);return[Fm(e),t,Fm(t)]}function dk(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,x=m===void 0?!0:m,y=n.allowedAutoPlacements,v=t.options.placement,h=dn(v),g=h===v,b=c||(g||!x?[ua(v)]:uk(v)),S=[v].concat(b).reduce(function(J,ee){return J.concat(dn(ee)===Jf?ck(t,{placement:ee,boundary:d,rootBoundary:f,padding:u,flipVariations:x,allowedAutoPlacements:y}):ee)},[]),j=t.rects.reference,C=t.rects.popper,E=new Map,_=!0,N=S[0],R=0;R<S.length;R++){var O=S[R],k=dn(O),P=Po(O)===ko,U=[yt,zt].indexOf(k)>=0,F=U?"width":"height",V=Ws(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Z=U?P?Bt:xt:P?zt:yt;j[F]>C[F]&&(Z=ua(Z));var T=ua(Z),L=[];if(s&&L.push(V[k]<=0),l&&L.push(V[Z]<=0,V[T]<=0),L.every(function(J){return J})){N=O,_=!1;break}E.set(O,L)}if(_)for(var A=x?3:1,H=function(ee){var Q=S.find(function(te){var ue=E.get(te);if(ue)return ue.slice(0,ee).every(function(Ce){return Ce})});if(Q)return N=Q,"break"},B=A;B>0;B--){var X=H(B);if(X==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const fk={name:"flip",enabled:!0,phase:"main",fn:dk,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[yt,Bt,zt,xt].some(function(t){return e[t]>=0})}function pk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ws(t,{elementContext:"reference"}),l=Ws(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 hk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:pk};function mk(e,t,n){var r=dn(e),o=[xt,yt].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,[xt,Bt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function gk(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=C0.reduce(function(d,f){return d[f]=mk(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 vk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gk};function yk(e){var t=e.state,n=e.name;t.modifiersData[n]=T0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xk={name:"popperOffsets",enabled:!0,phase:"read",fn:yk,data:{}};function bk(e){return e==="x"?"y":"x"}function wk(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,x=n.tetherOffset,y=x===void 0?0:x,v=Ws(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),h=dn(t.placement),g=Po(t.placement),b=!g,S=np(h),j=bk(S),C=t.modifiersData.popperOffsets,E=t.rects.reference,_=t.rects.popper,N=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(C){if(s){var P,U=S==="y"?yt:xt,F=S==="y"?zt:Bt,V=S==="y"?"height":"width",Z=C[S],T=Z+v[U],L=Z-v[F],A=m?-_[V]/2:0,H=g===ko?E[V]:_[V],B=g===ko?-_[V]:-E[V],X=t.elements.arrow,J=m&&X?tp(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:R0(),Q=ee[U],te=ee[F],ue=js(0,E[V],J[V]),Ce=b?E[V]/2-A-ue-Q-R.mainAxis:H-ue-Q-R.mainAxis,De=b?-E[V]/2+A+ue+te+R.mainAxis:B+ue+te+R.mainAxis,Xe=t.elements.arrow&&ci(t.elements.arrow),me=Xe?S==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,Ie=(P=O==null?void 0:O[S])!=null?P:0,M=Z+Ce-Ie-me,D=Z+De-Ie,de=js(m?sl(T,M):T,Z,m?Er(L,D):L);C[S]=de,k[S]=de-Z}if(l){var re,dt=S==="x"?yt:xt,ot=S==="x"?zt:Bt,be=C[j],qt=j==="y"?"height":"width",$t=be+v[dt],pi=be-v[ot],Vr=[yt,xt].indexOf(h)!==-1,hi=(re=O==null?void 0:O[j])!=null?re:0,ae=Vr?$t:be-E[qt]-_[qt]-hi+R.altAxis,yn=Vr?be+E[qt]+_[qt]-hi-R.altAxis:pi,Ho=m&&Vr?HN(ae,be,yn):js(m?ae:$t,be,m?yn:pi);C[j]=Ho,k[j]=Ho-be}t.modifiersData[r]=k}}const Sk={name:"preventOverflow",enabled:!0,phase:"main",fn:wk,requiresIfExists:["offset"]};function jk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ck(e){return e===Ot(e)||!fn(e)?rp(e):jk(e)}function _k(e){var t=e.getBoundingClientRect(),n=Oo(t.width)/e.offsetWidth||1,r=Oo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ek(e,t,n){n===void 0&&(n=!1);var r=fn(t),o=fn(t)&&_k(t),s=mr(t),i=To(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||sp(s))&&(l=Ck(t)),fn(t)?(c=To(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 Rk(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 Nk(e){var t=Rk(e);return zN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function kk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ok(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 Tk(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 g=typeof h=="function"?h(d.options):h;y(),d.options=Object.assign({},s,d.options,g),d.scrollParents={reference:Mr(l)?Cs(l):l.contextElement?Cs(l.contextElement):[],popper:Cs(c)};var b=Nk(Ok([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),x(),m.update()},forceUpdate:function(){if(!p){var h=d.elements,g=h.reference,b=h.popper;if(Bm(g,b)){d.rects={reference:Ek(g,ci(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 j=d.orderedModifiers[S],C=j.fn,E=j.options,_=E===void 0?{}:E,N=j.name;typeof C=="function"&&(d=C({state:d,options:_,name:N,instance:m})||d)}}}},update:kk(function(){return new Promise(function(v){m.forceUpdate(),v(d)})}),destroy:function(){y(),p=!0}};if(!Bm(l,c))return m;m.setOptions(u).then(function(v){!p&&u.onFirstUpdate&&u.onFirstUpdate(v)});function x(){d.orderedModifiers.forEach(function(v){var h=v.name,g=v.options,b=g===void 0?{}:g,S=v.effect;if(typeof S=="function"){var j=S({state:d,name:h,instance:m,options:b}),C=function(){};f.push(j||C)}})}function y(){f.forEach(function(v){return v()}),f=[]}return m}}const Pk=Tk({defaultModifiers:[hk,xk,JN,tk,vk,fk,Sk,GN]}),Ik=["enabled","placement","strategy","modifiers"];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 Mk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ak={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)}}},Dk=[];function P0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Dk}=n,l=$k(n,Ik);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var v;(v=u.current)==null||v.update()},[]),f=w.useCallback(()=>{var v;(v=u.current)==null||v.forceUpdate()},[]),[p,m]=ON(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),x=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:v})=>{const h={},g={};Object.keys(v.elements).forEach(b=>{h[b]=v.styles[b],g[b]=v.attributes[b]}),m({state:v,styles:h,attributes:g,update:d,forceUpdate:f,placement:v.placement})}}),[d,f,m]),y=w.useMemo(()=>(Ss(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...y,x,Mk]})},[s,o,x,r,y]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=Pk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...y,Ak,x]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(v=>Object.assign({},v,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ks(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Fk=function(){},Lk=Fk;const Uk=Js(Lk),qm=()=>{};function Vk(e){return e.button===0}function zk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const da=e=>e&&("current"in e?e.current:e),Hm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function I0(e,t=qm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=da(e);Uk(!!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||zk(u)||!Vk(u)||!!Ks(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=da(e);d&&Ks(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=Vo(da(e)),p=f.defaultView||window;let m=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,x=null;Hm[r]&&(x=Nn(f,Hm[r],l,!0));const y=Nn(f,r,i,!0),v=Nn(f,r,g=>{if(g===m){m=void 0;return}c(g)});let h=[];return"ontouchstart"in f.documentElement&&(h=[].slice.call(f.body.children).map(g=>Nn(g,"mousemove",qm))),()=>{x==null||x(),y(),v(),h.forEach(g=>g())}},[e,n,r,i,l,c])}function Bk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function qk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function $0({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 x=Bk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:qk(Object.assign({},x,{eventListeners:{enabled:t,options:(u=x.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},x.preventOverflow,{options:i?Object.assign({padding:i},(d=x.preventOverflow)==null?void 0:d.options):(f=x.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=x.offset)==null?void 0:p.options)},arrow:Object.assign({},x.arrow,{enabled:!!l,options:Object.assign({},(m=x.arrow)==null?void 0:m.options,{element:l})}),flip:Object.assign({enabled:!!r},x.flip)}))})}const Hk=["children"];function Wk(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 Kk=()=>{};function M0(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 x=C=>{t==null||t.toggle(!1,C)},{placement:y,setMenu:v,menuElement:h,toggleElement:g}=t||{},b=P0(g,h,$0({placement:u||y||"bottom-start",enabled:p,enableEvents:f??m,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:v||Kk,"aria-labelledby":g==null?void 0:g.id},b.attributes.popper,{style:b.styles.popper}),j={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 I0(h,x,{clickTrigger:l,disabled:!m}),[S,j]}const Yk={usePopper:!0};function ip(e){let{children:t}=e,n=Wk(e,Hk);const[r,o]=M0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ip.displayName="DropdownMenu";ip.defaultProps=Yk;const A0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Wm=()=>{};function D0(){const e=Ux(),{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&&A0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function F0({children:e}){const[t,n]=D0();return a.jsx(a.Fragment,{children:e(t,n)})}F0.displayName="DropdownToggle";const Gk=["eventKey","disabled","onClick","active","as"];function Qk(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 L0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Ln),i=w.useContext(Gf),{activeKey:l}=i||{},c=$r(e,t),u=n==null&&e!=null?$r(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,[Bo("dropdown-item")]:""},{isActive:u}]}const U0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Xf}=e,l=Qk(e,Gk);const[c]=L0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});U0.displayName="DropdownItem";const V0=w.createContext(zo?window:void 0);V0.Provider;function Ll(){return w.useContext(V0)}function Km(){const e=i0(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ui({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Bo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Ll(),[u,d]=Fx(t,e,r),[f,p]=Km(),m=f.current,[x,y]=Km(),v=x.current,h=g0(u),g=w.useRef(null),b=w.useRef(!1),S=w.useContext(Ln),j=w.useCallback((O,k,P=k==null?void 0:k.type)=>{d(O,{originalEvent:k,source:P})},[d]),C=Te((O,k)=>{n==null||n(O,k),j(!1,k,"select"),k.isPropagationStopped()||S==null||S(O,k)}),E=w.useMemo(()=>({toggle:j,placement:i,show:u,menuElement:m,toggleElement:v,setMenu:p,setToggle:y}),[j,i,u,m,v,p,y]);m&&h&&!u&&(b.current=m.contains(m.ownerDocument.activeElement));const _=Te(()=>{v&&v.focus&&v.focus()}),N=Te(()=>{const O=g.current;let k=s;if(k==null&&(k=f.current&&A0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(O))return;const P=Cn(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,_())},[u,b,_,N]),w.useEffect(()=>{g.current=null});const R=(O,k)=>{if(!f.current)return null;const P=Cn(f.current,o);let U=P.indexOf(O)+k;return U=Math.max(0,Math.min(U,P.length)),P[U]};return yN(w.useCallback(()=>c.document,[c]),"keydown",O=>{var k,P;const{key:U}=O,F=O.target,V=(k=f.current)==null?void 0:k.contains(F),Z=(P=x.current)==null?void 0:P.contains(F);if(/input|textarea/i.test(F.tagName)&&(U===" "||U!=="Escape"&&V||U==="Escape"&&F.type==="search")||!V&&!Z||U==="Tab"&&(!f.current||!u))return;g.current=O.type;const L={originalEvent:O,source:O.type};switch(U){case"ArrowUp":{const A=R(F,-1);A&&A.focus&&A.focus(),O.preventDefault();return}case"ArrowDown":if(O.preventDefault(),!u)d(!0,L);else{const A=R(F,1);A&&A.focus&&A.focus()}return;case"Tab":Kf(F.ownerDocument,"keyup",A=>{var H;(A.key==="Tab"&&!A.target||!((H=f.current)!=null&&H.contains(A.target)))&&d(!1,L)},{once:!0});break;case"Escape":U==="Escape"&&(O.preventDefault(),O.stopPropagation()),d(!1,L);break}}),a.jsx(Ln.Provider,{value:C,children:a.jsx(Dl.Provider,{value:E,children:l})})}ui.displayName="Dropdown";ui.Menu=ip;ui.Toggle=F0;ui.Item=U0;const z0=w.createContext({});z0.displayName="DropdownContext";const B0=z0,q0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=he(t,"dropdown-divider"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));q0.displayName="DropdownDivider";const Xk=q0,H0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=he(t,"dropdown-header"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));H0.displayName="DropdownHeader";const Zk=H0,W0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=y0,...l},c)=>{const u=he(e,"dropdown-item"),[d,f]=L0({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")})});W0.displayName="DropdownItem";const Jk=W0,K0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=he(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:oe(e,t),...r})));K0.displayName="DropdownItemText";const eO=K0,Y0=w.createContext(null);Y0.displayName="InputGroupContext";const G0=Y0;function Q0(e,t){return e}function X0(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 m=w.useContext(f0),x=he(e,"dropdown-menu"),{align:y,drop:v,isRTL:h}=w.useContext(B0);n=n||y;const g=w.useContext(G0),b=[];if(n)if(typeof n=="object"){const O=Object.keys(n);if(O.length){const k=O[0],P=n[k];p=P==="start",b.push(`${x}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=X0(p,v,h),[j,{hasShown:C,popper:E,show:_,toggle:N}]=M0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(j.ref=gn(Q0(f),j.ref),ol(()=>{_&&(E==null||E.update())},[_]),!C&&!i&&!g)return null;typeof l!="string"&&(j.show=_,j.close=()=>N==null?void 0:N(!1),j.align=n);let R=d.style;return E!=null&&E.placement&&(R={...d.style,...j.style},d["x-placement"]=E.placement),a.jsx(l,{...d,...j,style:R,...(b.length||m)&&{"data-bs-popper":"static"},className:oe(t,x,_&&"show",p&&`${x}-end`,u&&`${x}-${u}`,...b)})});Z0.displayName="DropdownMenu";const tO=Z0,J0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=he(t,"btn"),[d,{tagName:f}]=Qf({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")})});J0.displayName="Button";const nO=J0,eb=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=nO,...s},i)=>{const l=he(e,"dropdown-toggle"),c=w.useContext(Dl);r!==void 0&&(s.bsPrefix=r);const[u]=D0();return u.ref=gn(u.ref,Q0(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});eb.displayName="DropdownToggle";const rO=eb,tb=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"}),x=w.useContext(G0),y=he(n,"dropdown"),v=Ml(),h=E=>p===!1?E==="click":p==="inside"?E!=="rootClose":p==="outside"?E!=="select":!0,g=Te((E,_)=>{var N,R;!((N=_.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&_.source==="mousedown"||(_.originalEvent.currentTarget===document&&(_.source!=="keydown"||_.originalEvent.key==="Escape")&&(_.source="rootClose"),h(_.source)&&(c==null||c(E,_)))}),S=X0(i==="end",r,v),j=w.useMemo(()=>({align:i,drop:r,isRTL:v}),[i,r,v]),C={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(B0.Provider,{value:j,children:a.jsx(ui,{placement:S,show:o,onSelect:l,onToggle:g,focusFirstItemOnShow:u,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:x?m.children:a.jsx(d,{...m,ref:t,className:oe(s,o&&"show",C[r])})})})});tb.displayName="Dropdown";const Fi=Object.assign(tb,{Toggle:rO,Menu:tO,Item:Jk,ItemText:eO,Divider:Xk,Header:Zk});var Li;function Ym(e){if((!Li&&Li!==0||e)&&zo){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),Li=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Li}function oO(e){const t=w.useRef(e);return t.current=e,t}function ap(e){const t=oO(e);w.useEffect(()=>()=>t.current(),[])}function zc(e){e===void 0&&(e=Vo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function sO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Gm=Bo("modal-open");class iO{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return sO(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(Pn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Gm,""),Pn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Gm),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=iO,Bc=(e,t)=>zo?e==null?(t||Vo()).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 aO({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 lO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=aO({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=gn(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(lO,Object.assign({},n,{transition:t})):a.jsx(Hf,Object.assign({},n))}function nb(e){return e.code==="Escape"||e.keyCode===27}const cO=["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 uO(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 dO(e){return qc||(qc=new lp({ownerDocument:e==null?void 0:e.document})),qc}function fO(e){const t=Ll(),n=e||dO(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 rb=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:x,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:h=!0,restoreFocusOptions:g,renderDialog:b,renderBackdrop:S=D=>a.jsx("div",Object.assign({},D)),manager:j,container:C,onShow:E,onHide:_=()=>{},onExit:N,onExited:R,onExiting:O,onEnter:k,onEntering:P,onEntered:U}=e,F=uO(e,cO);const V=Ll(),Z=gd(C),T=fO(j),L=Zf(),A=g0(n),[H,B]=w.useState(!n),X=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),zo&&!A&&n&&(X.current=zc(V==null?void 0:V.document)),n&&H&&B(!1);const J=Te(()=>{if(T.add(),De.current=Nn(document,"keydown",ue),Ce.current=Nn(document,"focus",()=>setTimeout(Q),!0),E&&E(),y){var D,de;const re=zc((D=(de=T.dialog)==null?void 0:de.ownerDocument)!=null?D:V==null?void 0:V.document);T.dialog&&re&&!Ks(T.dialog,re)&&(X.current=re,T.dialog.focus())}}),ee=Te(()=>{if(T.remove(),De.current==null||De.current(),Ce.current==null||Ce.current(),h){var D;(D=X.current)==null||D.focus==null||D.focus(g),X.current=null}});w.useEffect(()=>{!n||!Z||J()},[n,Z,J]),w.useEffect(()=>{H&&ee()},[H,ee]),ap(()=>{ee()});const Q=Te(()=>{if(!v||!L()||!T.isTopModal())return;const D=zc(V==null?void 0:V.document);T.dialog&&D&&!Ks(T.dialog,D)&&T.dialog.focus()}),te=Te(D=>{D.target===D.currentTarget&&(u==null||u(D),l===!0&&_())}),ue=Te(D=>{c&&nb(D)&&T.isTopModal()&&(d==null||d(D),D.defaultPrevented||_())}),Ce=w.useRef(),De=w.useRef(),Xe=(...D)=>{B(!0),R==null||R(...D)};if(!Z)return null;const me=Object.assign({role:r,ref:T.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:s,className:o,tabIndex:-1});let Ie=b?b(me):a.jsx("div",Object.assign({},me,{children:w.cloneElement(i,{role:"document"})}));Ie=vd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:O,onExited:Xe,onEnter:k,onEntering:P,onEntered:U,children:Ie});let M=null;return l&&(M=S({ref:T.setBackdropRef,onClick:te}),M=vd(m,x,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:M})),a.jsx(a.Fragment,{children:Sr.createPortal(a.jsxs(a.Fragment,{children:[M,Ie]}),Z)})});rb.displayName="Modal";const pO=Object.assign(rb,{Manager:lp});function yd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function hO(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 mO(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 gO extends lp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Pn(n,{[t]:`${parseFloat(Pn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Pn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(hO(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();mO(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 vO(e){return Hc||(Hc=new gO(e)),Hc}const ob=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));ob.displayName="ModalBody";const yO=ob,xO=w.createContext({onHide(){}}),sb=xO,ib=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=he(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})})});ib.displayName="ModalDialog";const ab=ib,lb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-footer"),a.jsx(n,{ref:o,className:oe(e,t),...r})));lb.displayName="ModalFooter";const bO=lb,wO={"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:oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));cp.displayName="CloseButton";cp.propTypes=wO;const SO=cp,jO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(sb),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(SO,{"aria-label":e,variant:t,onClick:c})]})}),CO=jO,cb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=he(e,"modal-header"),a.jsx(CO,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));cb.displayName="ModalHeader";const _O=cb,EO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),RO=EO("h4"),ub=w.forwardRef(({className:e,bsPrefix:t,as:n=RO,...r},o)=>(t=he(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));ub.displayName="ModalTitle";const NO=ub;function kO(e){return a.jsx(No,{...e,timeout:null})}function OO(e){return a.jsx(No,{...e,timeout:null})}const db=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=ab,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:m=!0,keyboard:x=!0,onEscapeKeyDown:y,onShow:v,onHide:h,container:g,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:j=!0,restoreFocusOptions:C,onEntered:E,onExit:_,onExiting:N,onEnter:R,onEntering:O,onExited:k,backdropClassName:P,manager:U,...F},V)=>{const[Z,T]=w.useState({}),[L,A]=w.useState(!1),H=w.useRef(!1),B=w.useRef(!1),X=w.useRef(null),[J,ee]=rl(),Q=gn(V,ee),te=Te(h),ue=Ml();e=he(e,"modal");const Ce=w.useMemo(()=>({onHide:te}),[te]);function De(){return U||vO({isRTL:ue})}function Xe(ae){if(!zo)return;const yn=De().getScrollbarWidth()>0,Ho=ae.scrollHeight>Vo(ae).documentElement.clientHeight;T({paddingRight:yn&&!Ho?Ym():void 0,paddingLeft:!yn&&Ho?Ym():void 0})}const me=Te(()=>{J&&Xe(J.dialog)});ap(()=>{fd(window,"resize",me),X.current==null||X.current()});const Ie=()=>{H.current=!0},M=ae=>{H.current&&J&&ae.target===J.dialog&&(B.current=!0),H.current=!1},D=()=>{A(!0),X.current=Kx(J.dialog,()=>{A(!1)})},de=ae=>{ae.target===ae.currentTarget&&D()},re=ae=>{if(m==="static"){de(ae);return}if(B.current||ae.target!==ae.currentTarget){B.current=!1;return}h==null||h()},dt=ae=>{x?y==null||y(ae):(ae.preventDefault(),m==="static"&&D())},ot=(ae,yn)=>{ae&&Xe(ae),R==null||R(ae,yn)},be=ae=>{X.current==null||X.current(),_==null||_(ae)},qt=(ae,yn)=>{O==null||O(ae,yn),Kf(window,"resize",me)},$t=ae=>{ae&&(ae.style.display=""),k==null||k(ae),fd(window,"resize",me)},pi=w.useCallback(ae=>a.jsx("div",{...ae,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...Z};Vr.display="block";const hi=ae=>a.jsx("div",{role:"dialog",...ae,style:Vr,className:oe(t,e,L&&`${e}-static`,!p&&"show"),onClick:m?re:void 0,onMouseUp:M,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...F,onMouseDown:Ie,className:r,contentClassName:o,children:s})});return a.jsx(sb.Provider,{value:Ce,children:a.jsx(pO,{show:f,ref:Q,backdrop:m,container:g,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:j,restoreFocusOptions:C,onEscapeKeyDown:dt,onShow:v,onHide:h,onEnter:ot,onEntering:qt,onEntered:E,onExit:be,onExiting:N,onExited:$t,manager:De(),transition:p?kO:void 0,backdropTransition:p?OO:void 0,renderBackdrop:pi,renderDialog:hi})})});db.displayName="Modal";const ce=Object.assign(db,{Body:yO,Header:_O,Title:NO,Footer:bO,Dialog:ab,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),TO=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 PO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=ut(e,t),{project:o}=kt(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:m,disabled:x})=>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(Fi,{className:"d-flex flex-column",children:[a.jsx(Fi.Toggle,{as:TO,children:p}),a.jsx(Fi.Menu,{children:d.map(([y,v,h])=>a.jsx(Fi.Item,{href:v,onClick:g=>{h!=="get"&&(g.preventDefault(),g.target.dataset.method=h,$&&$.rails&&$.rails.handleMethod($(g.target)))},children:y},v))})]}):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:x})]},u));return a.jsxs(ce,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Manage Your Project"})}),a.jsxs(ce.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function IO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=ut(e,t),{project:s}=kt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-Sx(n))*100;return a.jsxs(ce,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ce.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(ce.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 $O({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=ut(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==Ve.pending,d=l==Ve.error,f=()=>s(n);return a.jsxs(ce,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Confirm Deletion"})}),a.jsxs(ce.Body,{children:[d&&a.jsxs(Se,{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,": ",go(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:Ff(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ce.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 Io({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 fb({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(Io,{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(Io,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${go(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 _n({resource:e,userGuide:t=!0}){const{full:n,short:r}=ii(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(Io,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function $o({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 MO=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function AO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t),{project:o,setRequest:s}=kt(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,v)=>y?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(y.requestId),children:[v=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Ff(y),v=="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 v of y.resources)f.has(v.resourceId)||(f.add(v.resourceId),p.push(v));p.sort(Qa);const m=[{key:"action",name:"Action Details",format:(y,v)=>a.jsx(fb,{action:v,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:y=>a.jsx($o,{status:y})},...p.map(y=>({key:`resource${y.resourceId}`,name:y.name,icon:y.icon,class:"text-end",format:y.isBoolean?v=>v?Lf(v):null:MO,formatHeader:(v,h)=>a.jsx(_n,{resource:h,userGuide:!1})}))],x=n.actions.map(y=>{const v={...y};for(let{resourceId:h}of p)v[`resource${h}`]=0;for(let{resourceId:h,approved:g,requested:b}of y.resources)v[`resource${h}`]=g||b||0;return v});return a.jsxs("div",{className:"history",children:[a.jsx(mn,{columns:m,rows:x}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function DO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(fb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx($o,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(mn,{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 FO={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function LO(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=FO[e];return r+parseInt(Pn(t,o[0]),10)+parseInt(Pn(t,o[1]),10)}const UO={[Yn]:"collapse",[tl]:"collapsing",[jn]:"collapsing",[Xn]:"collapse show"},VO=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=LO,...x},y)=>{const v=typeof l=="function"?l():l,h=w.useMemo(()=>rs(C=>{C.style[v]="0"},e),[v,e]),g=w.useMemo(()=>rs(C=>{const E=`scroll${v[0].toUpperCase()}${v.slice(1)}`;C.style[v]=`${C[E]}px`},t),[v,t]),b=w.useMemo(()=>rs(C=>{C.style[v]=null},n),[v,n]),S=w.useMemo(()=>rs(C=>{C.style[v]=`${m(v,C)}px`,Gx(C)},r),[r,m,v]),j=w.useMemo(()=>rs(C=>{C.style[v]=null},o),[v,o]);return a.jsx(Qx,{ref:y,addEndListener:Yx,...x,"aria-expanded":x.role?c:null,onEnter:h,onEntering:g,onEntered:b,onExit:S,onExiting:j,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(C,E)=>Re.cloneElement(i,{...E,className:oe(s,i.props.className,UO[C],v==="width"&&"collapse-horizontal")})})}),zO=VO;function pb(e,t){return Array.isArray(e)?e.includes(t):e===t}const hb=w.createContext({});hb.displayName="AccordionContext";const Ul=hb,mb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Ul);return t=he(t,"accordion-collapse"),a.jsx(zO,{ref:i,in:pb(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});mb.displayName="AccordionCollapse";const gb=mb,vb=w.createContext({eventKey:""});vb.displayName="AccordionItemContext";const up=vb,yb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=he(t,"accordion-body");const{eventKey:f}=w.useContext(up);return a.jsx(gb,{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)})})});yb.displayName="AccordionBody";const BO=yb;function qO(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 xb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=he(t,"accordion-button");const{eventKey:i}=w.useContext(up),l=qO(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:oe(n,t,!pb(c,i)&&"collapsed")})});xb.displayName="AccordionButton";const bb=xb,wb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=he(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:oe(n,t),children:a.jsx(bb,{onClick:o,children:r})})));wb.displayName="AccordionHeader";const HO=wb,Sb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=he(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:oe(n,t)})})});Sb.displayName="AccordionItem";const WO=Sb,jb=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=he(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:oe(s,d,l&&`${d}-flush`)})})});jb.displayName="Accordion";const fa=Object.assign(jb,{Button:bb,Collapse:gb,Item:WO,Header:HO,Body:BO}),xd=2**31-1;function Cb(e,t,n){const r=n-Date.now();e.current=r<=xd?setTimeout(t,r):setTimeout(()=>Cb(e,t,n),xd)}function KO(){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):Cb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const YO=()=>{};function GO(e,t,{disabled:n,clickTrigger:r}={}){const o=t||YO;I0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{nb(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Vo(da(e));let l=(i.defaultView||window).event;const c=Nn(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const _b=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=gn(d,t),x=gd(e.container),y=gd(e.target),[v,h]=w.useState(!e.show),g=P0(y,u,$0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&v&&h(!1);const b=(...O)=>{h(!0),e.onExited&&e.onExited(...O)},S=e.show||!v;if(GO(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:j,onExiting:C,onEnter:E,onEntering:_,onEntered:N}=e;let R=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:m}),{popper:g,placement:o,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:p})});return R=vd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:j,onExiting:C,onExited:b,onEnter:E,onEntering:_,onEntered:N}),x?Sr.createPortal(R,x):null});_b.displayName="Overlay";const QO=_b,Eb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-header"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Eb.displayName="PopoverHeader";const XO=Eb,Rb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Rb.displayName="PopoverBody";const Nb=Rb;function kb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Ob(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const ZO=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=he(e,"popover"),m=Ml(),[x]=(t==null?void 0:t.split("-"))||[],y=kb(x,m);let v=r;return u&&!l&&(v={...r,...Ob(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:v,"x-placement":x,className:oe(n,p,x&&`bs-popover-${y}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(Nb,{children:o}):o]})}),JO=Object.assign(ZO,{Header:XO,Body:Nb,POPPER_OFFSET:[0,8]}),Tb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=he(e,"tooltip");const f=Ml(),[p]=(t==null?void 0:t.split("-"))||[],m=kb(p,f);let x=r;return c&&!i&&(x={...r,...Ob(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:x,role:"tooltip","x-placement":p,className:oe(n,e,`bs-tooltip-${m}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Tb.displayName="Tooltip";const Vl=Object.assign(Tb,{TOOLTIP_OFFSET:[0,6]});function eT(e){const t=w.useRef(null),n=he(void 0,"popover"),r=he(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(yd(t.current,n))return JO.POPPER_OFFSET;if(yd(t.current,r))return Vl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function tT(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 Pb=w.forwardRef(({children:e,transition:t=No,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=eT(i.offset),m=gn(l,f),x=t===!0?No:t||void 0,y=Te(v=>{d(v),n==null||n.onFirstUpdate==null||n.onFirstUpdate(v)});return ol(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(QO,{...i,ref:m,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:y},transition:x,rootClose:r,placement:o,show:s,children:(v,{arrowProps:h,popper:g,show:b})=>{var S,j;tT(v,h);const C=g==null?void 0:g.placement,E=Object.assign(c.current,{state:g==null?void 0:g.state,scheduleUpdate:g==null?void 0:g.update,placement:C,outOfBoundaries:(g==null||(S=g.state)==null||(j=S.modifiersData.hide)==null?void 0:j.isReferenceHidden)||!1,strategy:n.strategy}),_=!!u;return typeof e=="function"?e({...v,placement:C,show:b,...!t&&b&&{className:"show"},popper:E,arrowProps:h,hasDoneInitialMeasure:_}):w.cloneElement(e,{...v,placement:C,arrowProps:h,popper:E,hasDoneInitialMeasure:_,className:oe(e.props.className,!t&&b&&"show"),style:{...e.props.style,...v.style}})}})});Pb.displayName="Overlay";const Ib=Pb;function nT(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)&&!Ks(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const rT=({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=gn(f,n.ref),m=KO(),x=w.useRef(""),[y,v]=s0(o,s,i),h=nT(l),{onFocus:g,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},j=F=>{p(nl(F))},C=w.useCallback(()=>{if(m.clear(),x.current="show",!h.show){v(!0);return}m.set(()=>{x.current==="show"&&v(!0)},h.show)},[h.show,v,m]),E=w.useCallback(()=>{if(m.clear(),x.current="hide",!h.hide){v(!1);return}m.set(()=>{x.current==="hide"&&v(!1)},h.hide)},[h.hide,v,m]),_=w.useCallback((...F)=>{C(),g==null||g(...F)},[C,g]),N=w.useCallback((...F)=>{E(),b==null||b(...F)},[E,b]),R=w.useCallback((...F)=>{v(!y),S==null||S(...F)},[S,v,y]),O=w.useCallback((...F)=>{Xm(C,F,"fromElement")},[C]),k=w.useCallback((...F)=>{Xm(E,F,"toElement")},[E]),P=e==null?[]:[].concat(e),U={ref:j};return P.indexOf("click")!==-1&&(U.onClick=R),P.indexOf("focus")!==-1&&(U.onFocus=_,U.onBlur=N),P.indexOf("hover")!==-1&&(U.onMouseOver=O,U.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(U):w.cloneElement(n,U),a.jsx(Ib,{...d,show:y,onHide:E,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},dp=rT;function oT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r}=kt(t||n.grantNumber),{setTab:o}=kt(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(_n,{resource:m})},{key:"isActive",name:"Status",format:p=>a.jsx($o,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,m)=>{if(m.isBoolean)return Lf(m.allocated);const x=m.allocated-p,y=Math.max(x,0)*100/m.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${m.color}`,style:{width:`${Math.min(y,100)}%`}}),it(x,{abbreviate:!0})," of"," ",it(m.allocated,{abbreviate:!0})," ",m.unit," ","remaining (",Math.round(y),"%)"]})}},{key:"endDate",name:"End Date",format:p=>go(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:it}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,m)=>{const x=r.currentUser.resourceUsernames[m.resourceId];if(x)return x;if(r.currentUser.resourceAccountPendingIds.includes(m.resourceId))return a.jsx($o,{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:v=>{v.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:v=>{v.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:[Tn(ne.resourceTypeIcons[s.icon])," ",it(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:Tn("chevron-right")})]})]}):null,l.length?a.jsx(mn,{columns:f,rows:l}):null]})}const sT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[Tn(ne.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${it(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],iT=({requestId:e,grantNumber:t})=>{const{project:n}=kt(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(mn,{rows:r,columns:sT}):null};function aT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,username:o}=kt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(oT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(iT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(DO,{requestId:e})})]}):null]})}function Ar(e){"@babel/helpers - typeof";return Ar=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},Ar(e)}function lT(e,t){if(Ar(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ar(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $b(e){var t=lT(e,"string");return Ar(t)=="symbol"?t:String(t)}function ao(e,t,n){return t=$b(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 W(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){ao(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 cT(e){if(Array.isArray(e))return e}function uT(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 Mb(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 dT(){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 ze(e,t){return cT(e)||uT(e,t)||Mb(e,t)||dT()}function vn(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 fT=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ab(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,x=vn(e,fT),y=w.useState(l!==void 0?l:n),v=ze(y,2),h=v[0],g=v[1],b=w.useState(c!==void 0?c:o),S=ze(b,2),j=S[0],C=S[1],E=w.useState(m!==void 0?m:i),_=ze(E,2),N=_[0],R=_[1],O=w.useCallback(function(T,L){typeof u=="function"&&u(T,L),R(T)},[u]),k=w.useCallback(function(T,L){var A;typeof d=="function"&&(A=d(T,L)),g(A!==void 0?A:T)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),C(!0)},[p]),U=w.useCallback(function(){typeof f=="function"&&f(),C(!1)},[f]),F=l!==void 0?l:h,V=c!==void 0?c:j,Z=m!==void 0?m:N;return W(W({},x),{},{inputValue:F,menuIsOpen:V,onChange:O,onInputChange:k,onMenuClose:U,onMenuOpen:P,value:Z})}function pT(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,$b(r.key),r)}}function hT(e,t,n){return t&&Jm(e.prototype,t),n&&Jm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mT(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 Db(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Db=function(){return!!e})()}function gT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vT(e,t){if(t&&(Ar(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gT(e)}function yT(e){var t=Db();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 vT(this,o)}}function xT(e){if(Array.isArray(e))return bd(e)}function bT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wT(){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 xT(e)||bT(e)||Mb(e)||wT()}function ST(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 jT(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 CT=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(jT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=ST(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}(),et="-ms-",al="-moz-",fe="-webkit-",Fb="comm",pp="rule",hp="decl",_T="@import",Lb="@keyframes",ET="@layer",RT=Math.abs,zl=String.fromCharCode,NT=Object.assign;function kT(e,t){return Ye(e,0)^45?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}function Ub(e){return e.trim()}function OT(e,t){return(e=t.exec(e))?e[0]:e}function pe(e,t,n){return e.replace(t,n)}function wd(e,t){return e.indexOf(t)}function Ye(e,t){return e.charCodeAt(t)|0}function Ys(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function mp(e){return e.length}function Ui(e,t){return t.push(e),e}function TT(e,t){return e.map(t).join("")}var Bl=1,Mo=1,Vb=0,wt=0,Me=0,qo="";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:Mo,length:i,return:""}}function os(e,t){return NT(ql("",null,null,"",null,null,0),e,{length:-e.length},t)}function PT(){return Me}function IT(){return Me=wt>0?Ye(qo,--wt):0,Mo--,Me===10&&(Mo=1,Bl--),Me}function _t(){return Me=wt<Vb?Ye(qo,wt++):0,Mo++,Me===10&&(Mo=1,Bl++),Me}function pn(){return Ye(qo,wt)}function pa(){return wt}function di(e,t){return Ys(qo,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 zb(e){return Bl=Mo=1,Vb=sn(qo=e),wt=0,[]}function Bb(e){return qo="",e}function ha(e){return Ub(di(wt-1,Sd(e===91?e+2:e===40?e+1:e)))}function $T(e){for(;(Me=pn())&&Me<33;)_t();return Gs(e)>2||Gs(Me)>3?"":" "}function MT(e,t){for(;--t&&_t()&&!(Me<48||Me>102||Me>57&&Me<65||Me>70&&Me<97););return di(e,pa()+(t<6&&pn()==32&&_t()==32))}function Sd(e){for(;_t();)switch(Me){case e:return wt;case 34:case 39:e!==34&&e!==39&&Sd(Me);break;case 40:e===41&&Sd(e);break;case 92:_t();break}return wt}function AT(e,t){for(;_t()&&e+Me!==57;)if(e+Me===84&&pn()===47)break;return"/*"+di(t,wt-1)+"*"+zl(e===47?e:_t())}function DT(e){for(;!Gs(pn());)_t();return di(e,wt)}function FT(e){return Bb(ma("",null,null,null,[""],e=zb(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,x=0,y=1,v=1,h=1,g=0,b="",S=o,j=s,C=r,E=b;v;)switch(x=g,g=_t()){case 40:if(x!=108&&Ye(E,f-1)==58){wd(E+=pe(ha(g),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:E+=ha(g);break;case 9:case 10:case 13:case 32:E+=$T(x);break;case 92:E+=MT(pa()-1,7);continue;case 47:switch(pn()){case 42:case 47:Ui(LT(AT(_t(),pa()),t,n),c);break;default:E+="/"}break;case 123*y:l[u++]=sn(E)*h;case 125*y:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+d:h==-1&&(E=pe(E,/\f/g,"")),m>0&&sn(E)-f&&Ui(m>32?tg(E+";",r,n,f-1):tg(pe(E," ","")+";",r,n,f-2),c);break;case 59:E+=";";default:if(Ui(C=eg(E,t,n,u,d,o,l,b,S=[],j=[],f),s),g===123)if(d===0)ma(E,t,C,C,S,s,f,l,j);else switch(p===99&&Ye(E,3)===110?100:p){case 100:case 108:case 109:case 115:ma(e,C,C,r&&Ui(eg(e,C,C,0,0,o,l,b,o,S=[],f),j),o,j,f,l,r?S:j);break;default:ma(E,C,C,C,[""],j,0,l,j)}}u=d=m=0,y=h=1,b=E="",f=i;break;case 58:f=1+sn(E),m=x;default:if(y<1){if(g==123)--y;else if(g==125&&y++==0&&IT()==125)continue}switch(E+=zl(g),g*y){case 38:h=d>0?1:(E+="\f",-1);break;case 44:l[u++]=(sn(E)-1)*h,h=1;break;case 64:pn()===45&&(E+=ha(_t())),p=pn(),d=f=sn(b=E+=DT(pa())),g++;break;case 45:x===45&&sn(E)==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),x=0,y=0,v=0;x<r;++x)for(var h=0,g=Ys(e,f+1,f=RT(y=i[x])),b=e;h<m;++h)(b=Ub(y>0?p[h]+" "+g:pe(g,/&\f/g,p[h])))&&(c[v++]=b);return ql(e,t,n,o===0?pp:l,c,u,d)}function LT(e,t,n){return ql(e,t,n,Fb,zl(PT()),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 vo(e,t){for(var n="",r=mp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function UT(e,t,n,r){switch(e.type){case ET:if(e.children.length)break;case _T:case hp:return e.return=e.return||e.value;case Fb:return"";case Lb:return e.return=e.value+"{"+vo(e.children,r)+"}";case pp:e.value=e.props.join(",")}return sn(n=vo(e.children,r))?e.return=e.value+"{"+n+"}":""}function VT(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 zT(e){return function(t){t.root||(t=t.return)&&e(t)}}function BT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var qT=function(t,n,r){for(var o=0,s=0;o=s,s=pn(),o===38&&s===12&&(n[r]=1),!Gs(s);)_t();return di(t,wt)},HT=function(t,n){var r=-1,o=44;do switch(Gs(o)){case 0:o===38&&pn()===12&&(n[r]=1),t[r]+=qT(wt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=pn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=zl(o)}while(o=_t());return t},WT=function(t,n){return Bb(HT(zb(t),n))},ng=new WeakMap,KT=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=WT(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]}}},YT=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function qb(e,t){switch(kT(e,t)){case 5103:return fe+"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 fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+al+e+et+e+e;case 6828:case 4268:return fe+e+et+e+e;case 6165:return fe+e+et+"flex-"+e+e;case 5187:return fe+e+pe(e,/(\w+).+(:[^]+)/,fe+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return fe+e+et+"flex-item-"+pe(e,/flex-|-self/,"")+e;case 4675:return fe+e+et+"flex-line-pack"+pe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+et+pe(e,"shrink","negative")+e;case 5292:return fe+e+et+pe(e,"basis","preferred-size")+e;case 6060:return fe+"box-"+pe(e,"-grow","")+fe+e+et+pe(e,"grow","positive")+e;case 4554:return fe+pe(e,/([^-])(transform)/g,"$1"+fe+"$2")+e;case 6187:return pe(pe(pe(e,/(zoom-|grab)/,fe+"$1"),/(image-set)/,fe+"$1"),e,"")+e;case 5495:case 3959:return pe(e,/(image-set\([^]*)/,fe+"$1$`$1");case 4968:return pe(pe(e,/(.+:)(flex-)?(.*)/,fe+"box-pack:$3"+et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return pe(e,/(.+)-inline(.+)/,fe+"$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(sn(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(Ye(e,t+4)!==45)break;case 102:return pe(e,/(.+:)(.+)-([^]+)/,"$1"+fe+"$2-$3$1"+al+(Ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wd(e,"stretch")?qb(pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ye(e,t+1)!==115)break;case 6444:switch(Ye(e,sn(e)-3-(~wd(e,"!important")&&10))){case 107:return pe(e,":",":"+fe)+e;case 101:return pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+fe+(Ye(e,14)===45?"inline-":"")+"box$3$1"+fe+"$2$3$1"+et+"$2box$3")+e}break;case 5936:switch(Ye(e,t+11)){case 114:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+et+e+e}return e}var GT=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hp:t.return=qb(t.value,t.length);break;case Lb:return vo([os(t,{value:pe(t.value,"@","@"+fe)})],o);case pp:if(t.length)return TT(t.props,function(s){switch(OT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return vo([os(t,{props:[pe(s,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return vo([os(t,{props:[pe(s,/:(plac\w+)/,":"+fe+"input-$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,":"+al+"$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,et+"input-$1")]})],o)}return""})}},QT=[GT],XT=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 v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||QT,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),h=1;h<v.length;h++)s[v[h]]=!0;l.push(y)});var c,u=[KT,YT];{var d,f=[UT,zT(function(y){d.insert(y)})],p=VT(u.concat(o,f)),m=function(v){return vo(FT(v),p)};c=function(v,h,g,b){d=g,m(v?v+"{"+h.styles+"}":h.styles),b&&(x.inserted[h.name]=!0)}}var x={key:n,sheet:new CT({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 x.sheet.hydrate(l),x},Hb={exports:{}},ye={};/** @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 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,Yl=qe?Symbol.for("react.provider"):60109,Gl=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,ZT=qe?Symbol.for("react.suspense_list"):60120,Jl=qe?Symbol.for("react.memo"):60115,ec=qe?Symbol.for("react.lazy"):60116,JT=qe?Symbol.for("react.block"):60121,eP=qe?Symbol.for("react.fundamental"):60117,tP=qe?Symbol.for("react.responder"):60118,nP=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 Gl:case Xl:case ec:case Jl:case Yl:return e;default:return t}}case vp:return t}}}function Wb(e){return Tt(e)===Ql}ve.AsyncMode=yp;ve.ConcurrentMode=Ql;ve.ContextConsumer=Gl;ve.ContextProvider=Yl;ve.Element=gp;ve.ForwardRef=Xl;ve.Fragment=Hl;ve.Lazy=ec;ve.Memo=Jl;ve.Portal=vp;ve.Profiler=Kl;ve.StrictMode=Wl;ve.Suspense=Zl;ve.isAsyncMode=function(e){return Wb(e)||Tt(e)===yp};ve.isConcurrentMode=Wb;ve.isContextConsumer=function(e){return Tt(e)===Gl};ve.isContextProvider=function(e){return Tt(e)===Yl};ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gp};ve.isForwardRef=function(e){return Tt(e)===Xl};ve.isFragment=function(e){return Tt(e)===Hl};ve.isLazy=function(e){return Tt(e)===ec};ve.isMemo=function(e){return Tt(e)===Jl};ve.isPortal=function(e){return Tt(e)===vp};ve.isProfiler=function(e){return Tt(e)===Kl};ve.isStrictMode=function(e){return Tt(e)===Wl};ve.isSuspense=function(e){return Tt(e)===Zl};ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hl||e===Ql||e===Kl||e===Wl||e===Zl||e===ZT||typeof e=="object"&&e!==null&&(e.$$typeof===ec||e.$$typeof===Jl||e.$$typeof===Yl||e.$$typeof===Gl||e.$$typeof===Xl||e.$$typeof===eP||e.$$typeof===tP||e.$$typeof===nP||e.$$typeof===JT)};ve.typeOf=Tt;Hb.exports=ve;var rP=Hb.exports,Kb=rP,oP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yb={};Yb[Kb.ForwardRef]=oP;Yb[Kb.Memo]=sP;var iP=!0;function aP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Gb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||iP===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},lP=function(t,n,r){Gb(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 cP(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 uP={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},dP=/[A-Z]|^ms/g,fP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qb=function(t){return t.charCodeAt(1)===45},rg=function(t){return t!=null&&typeof t!="boolean"},Wc=BT(function(e){return Qb(e)?e:e.replace(dP,"-$&").toLowerCase()}),og=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(fP,function(r,o,s){return on={name:o,styles:s,next:on},o})}return uP[t]!==1&&!Qb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qs(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 on={name:n.name,styles:n.styles,next:on},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)on={name:r.name,styles:r.styles,next:on},r=r.next;var o=n.styles+";";return o}return pP(e,t,n)}case"function":{if(e!==void 0){var s=on,i=n(e);return on=s,Qs(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function pP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qs(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=Qs(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,on,Xb=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="";on=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Qs(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Qs(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=cP(s)+c;return{name:d,styles:s,next:on}},hP=function(t){return t()},mP=ba.useInsertionEffect?ba.useInsertionEffect:!1,gP=mP||hP,xp={}.hasOwnProperty,Zb=w.createContext(typeof HTMLElement<"u"?XT({key:"css"}):null);Zb.Provider;var vP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Zb);return t(n,o,r)})},yP=w.createContext({}),jd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xP=function(t,n){var r={};for(var o in n)xp.call(n,o)&&(r[o]=n[o]);return r[jd]=t,r},bP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Gb(n,r,o),gP(function(){return lP(n,r,o)}),null},wP=vP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[jd],s=[r],i="";typeof e.className=="string"?i=aP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Xb(s,void 0,w.useContext(yP));i+=t.key+"-"+l.name;var c={};for(var u in e)xp.call(e,u)&&u!=="css"&&u!==jd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(bP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),SP=wP,Y=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]=SP,s[1]=xP(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 Xb(t)}var jP=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 CP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const _P=Math.min,EP=Math.max,ll=Math.round,Vi=Math.floor,cl=e=>({x:e,y:e});function RP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Jb(e){return tw(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ew(e){var t;return(t=(tw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tw(e){return e instanceof Node||e instanceof Xt(e).Node}function Cd(e){return e instanceof Element||e instanceof Xt(e).Element}function wp(e){return e instanceof HTMLElement||e instanceof Xt(e).HTMLElement}function ig(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function nw(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 NP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function kP(e){return["html","body","#document"].includes(Jb(e))}function Sp(e){return Xt(e).getComputedStyle(e)}function OP(e){if(Jb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ig(e)&&e.host||ew(e);return ig(t)?t.host:t}function rw(e){const t=OP(e);return kP(t)?e.ownerDocument?e.ownerDocument.body:e.body:wp(t)&&nw(t)?t:rw(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=rw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Xt(o);return s?t.concat(i,i.visualViewport||[],nw(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function TP(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 jp(e){return Cd(e)?e:e.contextElement}function Kc(e){const t=jp(e);if(!wp(t))return cl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=TP(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 PP=cl(0);function IP(e){const t=Xt(e);return!NP()||!t.visualViewport?PP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $P(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xt(e)?!1:t}function ag(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=jp(e);let i=cl(1);t&&(r?Cd(r)&&(i=Kc(r)):i=Kc(e));const l=$P(s,n,r)?IP(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=Xt(s),m=r&&Cd(r)?Xt(r):r;let g=p.frameElement;for(;g&&r&&m!==p;){const v=Kc(g),x=g.getBoundingClientRect(),h=Sp(g),y=x.left+(g.clientLeft+parseFloat(h.paddingLeft))*v.x,b=x.top+(g.clientTop+parseFloat(h.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=y,u+=b,g=Xt(g).frameElement}}return RP({width:d,height:f,x:c,y:u})}function MP(e,t){let n=null,r;const o=ew(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=Vi(d),g=Vi(o.clientWidth-(u+f)),v=Vi(o.clientHeight-(d+p)),x=Vi(u),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-x+"px",threshold:EP(0,_P(1,c))||1};let b=!0;function S(j){const C=j[0].intersectionRatio;if(C!==c){if(!b)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return i(!0),s}function AP(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=jp(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?MP(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(h=>{let[y]=h;y&&y.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,v=c?ag(e):null;c&&x();function x(){const h=ag(e);v&&(h.x!==v.x||h.y!==v.y||h.width!==v.width||h.height!==v.height)&&n(),v=h,g=requestAnimationFrame(x)}return n(),()=>{var h;d.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,c&&cancelAnimationFrame(g)}}var _d=w.useLayoutEffect,DP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function FP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function LP(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(FP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var lg=function(t){return GP(t)?t.filter(Boolean):Ar(t)==="object"&&t!==null?[t]:[]},ow=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=mn(t,DP);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 UP(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 VP(e){return tc(e)?window.innerHeight:e.clientHeight}function sw(e){return tc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(tc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function zP(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 BP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function zi(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=sw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=BP(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 qP(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 HP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var iw=!1,WP={get passive(){return iw=!0}},Bi=typeof window<"u"?window:{};Bi.addEventListener&&Bi.removeEventListener&&(Bi.addEventListener("p",dl,WP),Bi.removeEventListener("p",dl,!1));var KP=iw;function YP(e){return e!=null}function GP(e){return Array.isArray(e)}function qi(e,t,n){return e?t:n}var QP=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},{})},XP=["children","innerProps"],ZP=["children","innerProps"];function JP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=zP(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,v=p.top,x=n.offsetParent.getBoundingClientRect(),h=x.top,y=i?window.innerHeight:VP(c),b=sw(c),S=parseInt(getComputedStyle(n).marginBottom,10),j=parseInt(getComputedStyle(n).marginTop,10),C=h-j,_=y-v,E=C+b,N=f-b-v,R=m-y+b+S,O=b+v-j,k=160;switch(o){case"auto":case"bottom":if(_>=g)return{placement:"bottom",maxHeight:t};if(N>=g&&!i)return s&&zi(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&_>=r){s&&zi(c,R,k);var P=i?_-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var A=t,D=i?C: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(C>=g)return{placement:"top",maxHeight:t};if(E>=g&&!i)return s&&zi(c,O,k),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&C>=r){var V=t;return(!i&&E>=r||i&&C>=r)&&(V=i?C-j:E-j),s&&zi(c,O,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function eI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var aw=function(t){return t==="auto"?"bottom":t},tI=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,eI(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})},lw=w.createContext(null),nI=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(lw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=Ve(p,2),g=m[0],v=m[1],x=w.useState(null),h=Ve(x,2),y=h[0],b=h[1],S=c.spacing.controlHeight;return _d(function(){var j=f.current;if(j){var C=i==="fixed",_=l&&!C,E=JP({maxHeight:o,menuEl:j,minHeight:r,placement:s,shouldScroll:_,isFixedPosition:C,controlHeight:S});v(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:y||aw(s),maxHeight:g})})},rI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return Y("div",Q({},Pe(t,"menu",{menu:!0}),{ref:r},o),n)},oI=rI,sI=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})},iI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return Y("div",Q({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},cw=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")})},aI=cw,lI=cw,cI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=mn(t,XP);return Y("div",Q({},Pe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},uI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=mn(t,ZP);return Y("div",Q({},Pe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},dI=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}},fI=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(aw(i)),f=Ve(d,2),p=f[0],m=f[1],g=w.useMemo(function(){return{setPortalPlacement:m}},[]),v=w.useState(null),x=Ve(v,2),h=x[0],y=x[1],b=w.useCallback(function(){if(o){var _=qP(o),E=l==="fixed"?0:window.pageYOffset,N=_[p]+E;(N!==(h==null?void 0:h.offset)||_.left!==(h==null?void 0:h.rect.left)||_.width!==(h==null?void 0:h.rect.width))&&y({offset:N,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=AP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);_d(function(){S()},[S]);var j=w.useCallback(function(_){c.current=_,S()},[S]);if(!n&&l!=="fixed"||!h)return null;var C=Y("div",Q({ref:j},Pe(K(K({},t),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return Y(lw.Provider,{value:g},n?kf.createPortal(C,n):C)},pI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},hI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return Y("div",Q({},Pe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},mI=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")})},gI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return Y("div",Q({},Pe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},vI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},yI=function(t){var n=t.children,r=t.innerProps;return Y("div",Q({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},dg,xI=["size"],bI=["innerProps","isRtl","size"],wI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},uw=function(t){var n=t.size,r=mn(t,xI);return Y("svg",Q({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:wI},r))},Cp=function(t){return Y(uw,Q({size:20},t),Y("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"}))},dw=function(t){return Y(uw,Q({size:20},t),Y("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"}))},fw=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}})},SI=fw,jI=function(t){var n=t.children,r=t.innerProps;return Y("div",Q({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Y(dw,null))},CI=fw,_I=function(t){var n=t.children,r=t.innerProps;return Y("div",Q({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Y(Cp,null))},EI=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})},RI=function(t){var n=t.innerProps;return Y("span",Q({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},NI=jP(dg||(dg=CP([`
67
+ */var He=typeof Symbol=="function"&&Symbol.for,gp=He?Symbol.for("react.element"):60103,vp=He?Symbol.for("react.portal"):60106,Hl=He?Symbol.for("react.fragment"):60107,Wl=He?Symbol.for("react.strict_mode"):60108,Kl=He?Symbol.for("react.profiler"):60114,Yl=He?Symbol.for("react.provider"):60109,Gl=He?Symbol.for("react.context"):60110,yp=He?Symbol.for("react.async_mode"):60111,Ql=He?Symbol.for("react.concurrent_mode"):60111,Xl=He?Symbol.for("react.forward_ref"):60112,Zl=He?Symbol.for("react.suspense"):60113,ZT=He?Symbol.for("react.suspense_list"):60120,Jl=He?Symbol.for("react.memo"):60115,ec=He?Symbol.for("react.lazy"):60116,JT=He?Symbol.for("react.block"):60121,eP=He?Symbol.for("react.fundamental"):60117,tP=He?Symbol.for("react.responder"):60118,nP=He?Symbol.for("react.scope"):60119;function It(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 Gl:case Xl:case ec:case Jl:case Yl:return e;default:return t}}case vp:return t}}}function Wb(e){return It(e)===Ql}ye.AsyncMode=yp;ye.ConcurrentMode=Ql;ye.ContextConsumer=Gl;ye.ContextProvider=Yl;ye.Element=gp;ye.ForwardRef=Xl;ye.Fragment=Hl;ye.Lazy=ec;ye.Memo=Jl;ye.Portal=vp;ye.Profiler=Kl;ye.StrictMode=Wl;ye.Suspense=Zl;ye.isAsyncMode=function(e){return Wb(e)||It(e)===yp};ye.isConcurrentMode=Wb;ye.isContextConsumer=function(e){return It(e)===Gl};ye.isContextProvider=function(e){return It(e)===Yl};ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gp};ye.isForwardRef=function(e){return It(e)===Xl};ye.isFragment=function(e){return It(e)===Hl};ye.isLazy=function(e){return It(e)===ec};ye.isMemo=function(e){return It(e)===Jl};ye.isPortal=function(e){return It(e)===vp};ye.isProfiler=function(e){return It(e)===Kl};ye.isStrictMode=function(e){return It(e)===Wl};ye.isSuspense=function(e){return It(e)===Zl};ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Hl||e===Ql||e===Kl||e===Wl||e===Zl||e===ZT||typeof e=="object"&&e!==null&&(e.$$typeof===ec||e.$$typeof===Jl||e.$$typeof===Yl||e.$$typeof===Gl||e.$$typeof===Xl||e.$$typeof===eP||e.$$typeof===tP||e.$$typeof===nP||e.$$typeof===JT)};ye.typeOf=It;Hb.exports=ye;var rP=Hb.exports,Kb=rP,oP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yb={};Yb[Kb.ForwardRef]=oP;Yb[Kb.Memo]=sP;var iP=!0;function aP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Gb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||iP===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},lP=function(t,n,r){Gb(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 cP(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 uP={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},dP=/[A-Z]|^ms/g,fP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qb=function(t){return t.charCodeAt(1)===45},rg=function(t){return t!=null&&typeof t!="boolean"},Wc=BT(function(e){return Qb(e)?e:e.replace(dP,"-$&").toLowerCase()}),og=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(fP,function(r,o,s){return an={name:o,styles:s,next:an},o})}return uP[t]!==1&&!Qb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qs(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 an={name:n.name,styles:n.styles,next:an},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)an={name:r.name,styles:r.styles,next:an},r=r.next;var o=n.styles+";";return o}return pP(e,t,n)}case"function":{if(e!==void 0){var s=an,i=n(e);return an=s,Qs(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function pP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qs(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=Qs(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,an,Xb=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="";an=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Qs(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Qs(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=cP(s)+c;return{name:d,styles:s,next:an}},hP=function(t){return t()},mP=ba.useInsertionEffect?ba.useInsertionEffect:!1,gP=mP||hP,xp={}.hasOwnProperty,Zb=w.createContext(typeof HTMLElement<"u"?XT({key:"css"}):null);Zb.Provider;var vP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Zb);return t(n,o,r)})},yP=w.createContext({}),jd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xP=function(t,n){var r={};for(var o in n)xp.call(n,o)&&(r[o]=n[o]);return r[jd]=t,r},bP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Gb(n,r,o),gP(function(){return lP(n,r,o)}),null},wP=vP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[jd],s=[r],i="";typeof e.className=="string"?i=aP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Xb(s,void 0,w.useContext(yP));i+=t.key+"-"+l.name;var c={};for(var u in e)xp.call(e,u)&&u!=="css"&&u!==jd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(bP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),SP=wP,K=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]=SP,s[1]=xP(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 Xb(t)}var jP=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 CP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const _P=Math.min,EP=Math.max,ll=Math.round,Vi=Math.floor,cl=e=>({x:e,y:e});function RP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Jb(e){return tw(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ew(e){var t;return(t=(tw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tw(e){return e instanceof Node||e instanceof Jt(e).Node}function Cd(e){return e instanceof Element||e instanceof Jt(e).Element}function wp(e){return e instanceof HTMLElement||e instanceof Jt(e).HTMLElement}function ig(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function nw(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 NP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function kP(e){return["html","body","#document"].includes(Jb(e))}function Sp(e){return Jt(e).getComputedStyle(e)}function OP(e){if(Jb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ig(e)&&e.host||ew(e);return ig(t)?t.host:t}function rw(e){const t=OP(e);return kP(t)?e.ownerDocument?e.ownerDocument.body:e.body:wp(t)&&nw(t)?t:rw(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=rw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Jt(o);return s?t.concat(i,i.visualViewport||[],nw(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function TP(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 jp(e){return Cd(e)?e:e.contextElement}function Kc(e){const t=jp(e);if(!wp(t))return cl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=TP(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 PP=cl(0);function IP(e){const t=Jt(e);return!NP()||!t.visualViewport?PP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $P(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function ag(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=jp(e);let i=cl(1);t&&(r?Cd(r)&&(i=Kc(r)):i=Kc(e));const l=$P(s,n,r)?IP(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=Jt(s),m=r&&Cd(r)?Jt(r):r;let x=p.frameElement;for(;x&&r&&m!==p;){const y=Kc(x),v=x.getBoundingClientRect(),h=Sp(x),g=v.left+(x.clientLeft+parseFloat(h.paddingLeft))*y.x,b=v.top+(x.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=g,u+=b,x=Jt(x).frameElement}}return RP({width:d,height:f,x:c,y:u})}function MP(e,t){let n=null,r;const o=ew(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=Vi(d),x=Vi(o.clientWidth-(u+f)),y=Vi(o.clientHeight-(d+p)),v=Vi(u),g={rootMargin:-m+"px "+-x+"px "+-y+"px "+-v+"px",threshold:EP(0,_P(1,c))||1};let b=!0;function S(j){const C=j[0].intersectionRatio;if(C!==c){if(!b)return i();C?i(!1,C):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 AP(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=jp(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?MP(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(h=>{let[g]=h;g&&g.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 x,y=c?ag(e):null;c&&v();function v(){const h=ag(e);y&&(h.x!==y.x||h.y!==y.y||h.width!==y.width||h.height!==y.height)&&n(),y=h,x=requestAnimationFrame(v)}return n(),()=>{var h;d.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,c&&cancelAnimationFrame(x)}}var _d=w.useLayoutEffect,DP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function FP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function LP(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(FP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var lg=function(t){return GP(t)?t.filter(Boolean):Ar(t)==="object"&&t!==null?[t]:[]},ow=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=vn(t,DP);return W({},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 UP(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 VP(e){return tc(e)?window.innerHeight:e.clientHeight}function sw(e){return tc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(tc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function zP(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 BP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function zi(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=sw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=BP(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 qP(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 HP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var iw=!1,WP={get passive(){return iw=!0}},Bi=typeof window<"u"?window:{};Bi.addEventListener&&Bi.removeEventListener&&(Bi.addEventListener("p",dl,WP),Bi.removeEventListener("p",dl,!1));var KP=iw;function YP(e){return e!=null}function GP(e){return Array.isArray(e)}function qi(e,t,n){return e?t:n}var QP=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=ze(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=ze(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},XP=["children","innerProps"],ZP=["children","innerProps"];function JP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=zP(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,x=p.height,y=p.top,v=n.offsetParent.getBoundingClientRect(),h=v.top,g=i?window.innerHeight:VP(c),b=sw(c),S=parseInt(getComputedStyle(n).marginBottom,10),j=parseInt(getComputedStyle(n).marginTop,10),C=h-j,E=g-y,_=C+b,N=f-b-y,R=m-g+b+S,O=b+y-j,k=160;switch(o){case"auto":case"bottom":if(E>=x)return{placement:"bottom",maxHeight:t};if(N>=x&&!i)return s&&zi(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&E>=r){s&&zi(c,R,k);var P=i?E-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var U=t,F=i?C:_;return F>=r&&(U=Math.min(F-S-l,t)),{placement:"top",maxHeight:U}}if(o==="bottom")return s&&fl(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(C>=x)return{placement:"top",maxHeight:t};if(_>=x&&!i)return s&&zi(c,O,k),{placement:"top",maxHeight:t};if(!i&&_>=r||i&&C>=r){var V=t;return(!i&&_>=r||i&&C>=r)&&(V=i?C-j:_-j),s&&zi(c,O,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function eI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var aw=function(t){return t==="auto"?"bottom":t},tI=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return W((r={label:"menu"},ao(r,eI(o),"100%"),ao(r,"position","absolute"),ao(r,"width","100%"),ao(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})},lw=w.createContext(null),nI=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(lw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=ze(p,2),x=m[0],y=m[1],v=w.useState(null),h=ze(v,2),g=h[0],b=h[1],S=c.spacing.controlHeight;return _d(function(){var j=f.current;if(j){var C=i==="fixed",E=l&&!C,_=JP({maxHeight:o,menuEl:j,minHeight:r,placement:s,shouldScroll:E,isFixedPosition:C,controlHeight:S});y(_.maxHeight),b(_.placement),d==null||d(_.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:W(W({},t),{},{placement:g||aw(s),maxHeight:x})})},rI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return K("div",G({},Pe(t,"menu",{menu:!0}),{ref:r},o),n)},oI=rI,sI=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return W({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},iI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return K("div",G({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},cw=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return W({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},aI=cw,lI=cw,cI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=vn(t,XP);return K("div",G({},Pe(W(W({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},uI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=vn(t,ZP);return K("div",G({},Pe(W(W({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},dI=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}},fI=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(aw(i)),f=ze(d,2),p=f[0],m=f[1],x=w.useMemo(function(){return{setPortalPlacement:m}},[]),y=w.useState(null),v=ze(y,2),h=v[0],g=v[1],b=w.useCallback(function(){if(o){var E=qP(o),_=l==="fixed"?0:window.pageYOffset,N=E[p]+_;(N!==(h==null?void 0:h.offset)||E.left!==(h==null?void 0:h.rect.left)||E.width!==(h==null?void 0:h.rect.width))&&g({offset:N,rect:E})}},[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=AP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);_d(function(){S()},[S]);var j=w.useCallback(function(E){c.current=E,S()},[S]);if(!n&&l!=="fixed"||!h)return null;var C=K("div",G({ref:j},Pe(W(W({},t),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return K(lw.Provider,{value:x},n?kf.createPortal(C,n):C)},pI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},hI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return K("div",G({},Pe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},mI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return W({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")})},gI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return K("div",G({},Pe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},vI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},yI=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},dg,xI=["size"],bI=["innerProps","isRtl","size"],wI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},uw=function(t){var n=t.size,r=vn(t,xI);return K("svg",G({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:wI},r))},Cp=function(t){return K(uw,G({size:20},t),K("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"}))},dw=function(t){return K(uw,G({size:20},t),K("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"}))},fw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return W({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},SI=fw,jI=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||K(dw,null))},CI=fw,_I=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||K(Cp,null))},EI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return W({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},RI=function(t){var n=t.innerProps;return K("span",G({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},NI=jP(dg||(dg=CP([`
68
68
  0%, 80%, 100% { opacity: 0; }
69
69
  40% { opacity: 1; }
70
- `]))),kI=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})},Yc=function(t){var n=t.delay,r=t.offset;return Y("span",{css:bp({animation:"".concat(NI," 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"},"","")})},OI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=mn(t,bI);return Y("div",Q({},Pe(K(K({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Y(Yc,{delay:0,offset:r}),Y(Yc,{delay:160,offset:!0}),Y(Yc,{delay:320,offset:!r}))},TI=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}})},PI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return Y("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)},II=PI,$I=["data"],MI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},AI=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 Y("div",Q({},Pe(t,"group",{group:!0}),c),Y(i,Q({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),Y("div",null,n))},DI=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"})},FI=function(t){var n=ow(t);n.data;var r=mn(n,$I);return Y("div",Q({},Pe(t,"groupHeading",{"group-heading":!0}),r))},LI=AI,UI=["innerRef","isDisabled","isHidden","inputClassName"],VI=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)":""},zI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},pw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},zI={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"},pw)},BI=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},pw)},qI=function(t){var n=t.cx,r=t.value,o=ow(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=mn(o,UI);return Y("div",Q({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),Y("input",Q({className:n({input:!0},c),ref:s,style:BI(l),disabled:i},u)))},HI=qI,WI=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})},KI=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})},YI=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}})},hw=function(t){var n=t.children,r=t.innerProps;return Y("div",r,n)},GI=hw,QI=hw;function XI(e){var t=e.children,n=e.innerProps;return Y("div",Q({role:"button"},n),t||Y(Cp,{size:14}))}var ZI=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 Y(u,{data:o,innerProps:K(K({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},Y(d,{data:o,innerProps:K({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),Y(f,{data:o,innerProps:K(K({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},JI=ZI,e$=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}})},t$=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return Y("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)},n$=t$,r$=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})},o$=function(t){var n=t.children,r=t.innerProps;return Y("div",Q({},Pe(t,"placeholder",{placeholder:!0}),r),n)},s$=o$,i$=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})},a$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Y("div",Q({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},l$=a$,c$={ClearIndicator:_I,Control:II,DropdownIndicator:jI,DownChevron:dw,CrossIcon:Cp,Group:LI,GroupHeading:FI,IndicatorsContainer:yI,IndicatorSeparator:RI,Input:HI,LoadingIndicator:OI,Menu:oI,MenuList:iI,MenuPortal:fI,LoadingMessage:uI,NoOptionsMessage:cI,MultiValue:JI,MultiValueContainer:GI,MultiValueLabel:QI,MultiValueRemove:XI,Option:n$,Placeholder:s$,SelectContainer:hI,SingleValue:l$,ValueContainer:gI},u$=function(t){return K(K({},c$),t.components)},fg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function d$(e,t){return!!(e===t||fg(e)&&fg(t))}function f$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!d$(e[n],t[n]))return!1;return!0}function p$(e,t){t===void 0&&(t=f$);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 h$={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"},m$=function(t){return Y("span",Q({css:h$},t))},pg=m$,g$={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(v,x){return v&&v.length?"".concat(v.indexOf(x)+1," of ").concat(v.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:"",".")}},v$=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,v=c.isOptionDisabled,x=c.isSearchable,h=c.menuIsOpen,y=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,j=c.isLoading,C=c["aria-label"],_=c["aria-live"],E=w.useMemo(function(){return K(K({},g$),f||{})},[f]),N=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(ye){return Array.isArray(ye)?null:ye},z=T||V||H(M),W=z?p(z):"",J=X||U||void 0,te=J?J.map(p):[],Z=K({isDisabled:z&&v(z,l),label:W,labels:te},n);D=E.onChange(Z)}return D},[n,E,v,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:v(V,l),isSelected:X,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};D=E.onFocus(T)}return D},[r,o,p,v,E,s,l,d]),O=w.useMemo(function(){var D="";if(h&&y.length&&!j&&E.onFilter){var V=b({count:s.length});D=E.onFilter({inputValue:m,resultsMessage:V})}return D},[s,m,h,E,y,b,j]),k=(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":C,context:V,isDisabled:r&&v(r,l),isMulti:g,isSearchable:x,tabSelectsValue:S,isInitialFocus:k})}return D},[C,r,o,g,v,x,h,E,l,S,k]),A=Y(w.Fragment,null,Y("span",{id:"aria-selection"},N),Y("span",{id:"aria-focused"},R),Y("span",{id:"aria-results"},O),Y("span",{id:"aria-guidance"},P));return Y(w.Fragment,null,Y(pg,{id:u},k&&A),Y(pg,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&A))},y$=v$,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źẑżžẓẕƶȥɀⱬꝣ"}],x$=new RegExp("["+Ed.map(function(e){return e.letters}).join("")+"]","g"),mw={};for(var Gc=0;Gc<Ed.length;Gc++)for(var Qc=Ed[Gc],Xc=0;Xc<Qc.letters.length;Xc++)mw[Qc.letters[Xc]]=Qc.base;var gw=function(t){return t.replace(x$,function(n){return mw[n]})},b$=p$(gw),hg=function(t){return t.replace(/^\s+|\s+$/g,"")},w$=function(t){return"".concat(t.label," ").concat(t.value)},S$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:w$,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=b$(d),f=gw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},j$=["innerRef"];function C$(e){var t=e.innerRef,n=mn(e,j$),r=QP(n,"onExited","in","enter","exit","appear");return Y("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 _$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function E$(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 y=u.current,b=y.scrollTop,S=y.scrollHeight,j=y.clientHeight,C=u.current,_=h>0,E=S-j-b,N=!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),C.scrollTop=S,N=!0,i.current=!0):!_&&-h>b&&(o&&!l.current&&o(x),C.scrollTop=0,N=!0,l.current=!0),N&&_$(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=KP?{passive:!1}:!1;x.addEventListener("wheel",f,h),x.addEventListener("touchstart",p,h),x.addEventListener("touchmove",m,h)}},[m,p,f]),v=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(){v(x)}}},[t,g,v]),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),os=0,Wr={capture:!1,passive:!1};function R$(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 v=d&&d[g];o.current[g]=v}),r&&os<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 v=gg[g];d&&(d[g]=v)}),d&&(d.paddingRight="".concat(m,"px"))}u&&bg()&&(u.addEventListener("touchmove",vg,Wr),c&&(c.addEventListener("touchstart",xg,Wr),c.addEventListener("touchmove",yg,Wr))),os+=1}},[r]),l=w.useCallback(function(c){if(wg){var u=document.body,d=u&&u.style;os=Math.max(os-1,0),r&&os<1&&mg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&bg()&&(u.removeEventListener("touchmove",vg,Wr),c&&(c.removeEventListener("touchstart",xg,Wr),c.removeEventListener("touchmove",yg,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 N$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},k$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function O$(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=E$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=R$({isEnabled:n}),f=function(m){u(m),d(m)};return Y(w.Fragment,null,n&&Y("div",{onClick:N$,css:k$}),t(f))}var T$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},P$=function(t){var n=t.name,r=t.onFocus;return Y("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:T$,value:"",onChange:function(){}})},I$=P$;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 $$(){return _p(/^iPhone/i)}function vw(){return _p(/^Mac/i)}function M$(){return _p(/^iPad/i)||vw()&&navigator.maxTouchPoints>1}function A$(){return $$()||M$()}function D$(){return vw()||A$()}var F$=function(t){return t.label},L$=function(t){return t.label},U$=function(t){return t.value},V$=function(t){return!!t.isDisabled},z$={clearIndicator:CI,container:pI,control:TI,dropdownIndicator:SI,group:MI,groupHeading:DI,indicatorsContainer:vI,indicatorSeparator:EI,input:VI,loadingIndicator:kI,loadingMessage:lI,menu:tI,menuList:sI,menuPortal:dI,multiValue:WI,multiValueLabel:KI,multiValueRemove:YI,noOptionsMessage:aI,option:e$,placeholder:r$,singleValue:i$,valueContainer:mI},B$={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%)"},q$=4,yw=4,H$=38,W$=yw*2,K$={baseUnit:yw,controlHeight:H$,menuGutter:W$},Zc={borderRadius:q$,colors:B$,spacing:K$},Y$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ug(),captureMenuScroll:!ug(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:S$(),formatGroupLabel:F$,getOptionLabel:L$,getOptionValue:U$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:V$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!HP(),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=ww(e,t,n),s=Sw(e,t,n),i=bw(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 Cg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Sg(e,n,t,r);return Cg(e,s)?s:void 0}).filter(YP)}function xw(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 jg(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 G$(e,t){return xw(ga(e,t))}function Cg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Cw(e)||!s)&&jw(e,{label:i,value:l,data:o},r)}function Q$(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 X$(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},bw=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function ww(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Sw(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 jw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Cw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Z$=1,Ep=function(e){mT(n,e);var t=yT(n);function n(r){var o;if(pT(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=D$(),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),v=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(!v)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=qi(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(qi(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=qi(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 jg(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 LP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return bw(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=z$[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 u$(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 xw(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 Cw(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,v=u.isDisabled,x=u.menuIsOpen,h=u.onKeyDown,y=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,j=S.focusedOption,C=S.focusedValue,_=S.selectValue;if(!v&&!(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(C)o.removeValue(C);else{if(!f)return;d?o.popValue():g&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!x||!y||!j||b&&o.isOptionSelected(j,_))return;o.selectOption(j);break;case"Enter":if(c.keyCode===229)break;if(x){if(!j||o.isComposing)return;o.selectOption(j);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(!j)return;o.selectOption(j);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||++Z$),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 hT(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,v=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:v,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 ww(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Sw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return jw(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,v=this.state,x=v.inputIsHidden,h=v.ariaSelection,y=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({},y,{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(C$,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,v=m.isDisabled,x=m.isMulti,h=m.inputValue,y=m.placeholder,b=this.state,S=b.selectValue,j=b.focusedValue,C=b.isFocused;if(!this.hasValue()||!g)return h?null:w.createElement(f,Q({},p,{key:"placeholder",isDisabled:v,isFocused:C,innerProps:{id:this.getElementId("placeholder")}}),y);if(x)return S.map(function(E,N){var R=E===j,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:v,key:O,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(h)return null;var _=S[0];return w.createElement(d,Q({},p,{data:_,isDisabled:v}),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,v=this.state.focusedOption,x=this.props,h=x.captureMenuScroll,y=x.inputValue,b=x.isLoading,S=x.loadingMessage,j=x.minMenuHeight,C=x.maxMenuHeight,_=x.menuIsOpen,E=x.menuPlacement,N=x.menuPosition,R=x.menuPortalTarget,O=x.menuShouldBlockScroll,k=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,ye=W.isSelected,Se=W.label,Ae=W.value,F=v===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:ye};return w.createElement(m,Q({},g,{innerProps:oe,data:Z,isDisabled:ae,isSelected:ye,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(ye){return V(ye,"".concat(te,"-").concat(ye.index))}))}else if(z.type==="option")return V(z,"".concat(z.index))});else if(b){var T=S({inputValue:y});if(T===null)return null;X=w.createElement(f,g,T)}else{var U=P({inputValue:y});if(U===null)return null;X=w.createElement(p,g,U)}var M={minMenuHeight:j,maxMenuHeight:C,menuPlacement:E,menuPosition:N,menuShouldScrollIntoView:k},H=w.createElement(nI,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(O$,{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:v}),X)}))});return R||N==="fixed"?w.createElement(d,Q({},g,{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(I$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(v){return o.getOptionValue(v)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var m=f.length>0?f.map(function(v,x){return w.createElement("input",{key:"i-".concat(x),name:u,type:"hidden",value:o.getOptionValue(v)})}):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(y$,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,v=this.commonProps=this.getCommonProps();return w.createElement(l,Q({},v,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:g}),this.renderLiveRegion(),w.createElement(s,Q({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:g,menuIsOpen:m}),w.createElement(c,Q({},v,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Q({},v,{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,v=o.menuIsOpen,x=o.inputValue,h=o.isMulti,y=lg(g),b={};if(i&&(g!==i.value||m!==i.options||v!==i.menuIsOpen||x!==i.inputValue)){var S=v?G$(o,y):[],j=v?jg(ga(o,y),"".concat(p,"-option")):[],C=l?Q$(s,y):null,_=X$(s,S),E=Jc(j,_);b={selectValue:y,focusedOption:_,focusedOptionId:E,focusableOptionsWithIds:j,focusedValue:C,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,O=d&&f;return d&&!O&&(R={value:qi(h,y,y[0]||null),options:y,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),K(K(K({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:O})}}]),n}(w.Component);Ep.defaultProps=Y$;var J$=w.forwardRef(function(e,t){var n=Ab(e);return w.createElement(Ep,Q({ref:t},n))}),Rp=J$;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,[m,g]=w.useState(p?localStorage.getItem(s)!="true":s),[v,x]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>x(!0),100)},[]);const h=()=>{p&&localStorage.setItem(s,"true")},y=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(Ib,{target:u.current,placement:c,show:m&&f&&v,children:y}):a.jsx(dp,{placement:c,onToggle:b=>{h(),g(b)},overlay:y,show:m&&f&&v,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const e2="_items_c2dbg_1",t2="_item_c2dbg_1",n2="_details_c2dbg_14",r2="_text_c2dbg_20",o2="_number_c2dbg_35",s2="_outer_c2dbg_50",i2="_inner_c2dbg_61",yn={items:e2,item:t2,details:n2,text:r2,number:o2,outer:s2,inner:i2},ss=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function a2({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,y=Math.max(0,h),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*y/b,C=`var(--bs-${p.isCredit?n:r[m%r.length]})`;if(x>0){const _=d,E=d+x/2,N=d+=x,R=x>.5?1:0,O=[`M ${ss(_,100)}`,`A 100 100 0 ${R} 1 ${ss(N,100)}`,`L ${ss(N,50)}`,`A 50 50 0 ${R} 0 ${ss(_,50)}`].join(" "),[k,P]=ss(E,75).split(" ").map(A=>parseFloat(A));c.push(a.jsx("path",{d:O,style:{fill:C}},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:yn.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:yn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:rt(y,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:yn.item,children:[a.jsx("span",{className:yn.number,children:g}),a.jsx("span",{className:`${yn.outer} ms-2 me-2`,style:{borderColor:C},children:a.jsx("span",{className:yn.inner,style:{backgroundColor:C,width:`${S}%`}})}),a.jsxs("strong",{className:yn.name,children:[a.jsx(Jn,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:yn.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:yn.items,children:f})})]})}const _g=e=>e;function l2({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 c2({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 v="Exchange"in n.allowedActions,x="Renewal"in n.allowedActions,h="Supplement"in n.allowedActions,y=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,j=n.exchangeErrors,C=n.exchangeActionId!==null,_=n.exchangeActionEditable,E=n.resources,N=n.resourcesReason,R={};for(let F of E)R[F.resourceId]=F;const O=()=>{Sx(n)>=.75?u():d()},k=[];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&&k.push(a.jsxs("span",{children:[a.jsx(Jn,{resource:F,userGuide:!1})," requires"," ",wx(L.map(ne=>a.jsx(Jn,{resource:ne,userGuide:!1},ne.resourceId)),"or"),"."]},F.resourceId))}}const P=k.length>0;let A;b?A=a.jsx(Ce,{color:"info",children:"Your exchange request has been submitted."}):S&&j.length>0&&j[0].includes("PI")&&j[0].includes("person status Unknown")?A=a.jsx(Ce,{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(Ce,{color:"danger",children:["Sorry, something went wrong: ",j.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."]}):C?A=a.jsx(Ce,{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(Ce,{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(Ce,{color:"warning",children:[k," Please adjust your balance values."]}));const D=N.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(v&&_){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=ii(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=v?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)?_r.edited:z.includes(F.resourceId)?"":_r.disabled));const Z=`Add ${J.length?"another":"a"} resource to your exchange...`,ae=F=>F.requested-F.used,ye=(F,L)=>{const ne=L.allocated-L.used,ee=po(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?po(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:D_(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(To,{icon:"table",onClick:()=>o(L.resourceRepositoryKey),target:"_blank",title:`${L.name} Usage Details`})," ",a.jsx(Po,{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 v&&Ae.push({key:"requested",name:"Balance",class:"text-end",rowClass:F=>_&&z.includes(F.resourceId)?_r.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(l2,{classes:"text-end w-100",clean:ee=>ye(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(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 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(a2,{requestId:e}):null,W&&(v||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(pn,{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(Jn,{resource:ne,userGuide:!1},L)}),a.jsx("span",{children:Se(ne)})]})}})}),J.length?null:a.jsx(go,{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,v&&_?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:y||!X&&!D&&!V,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:g,type:"button",className:"btn btn-secondary",disabled:y||!X||!D||P,onClick:f,children:y?"Submitting...":"Submit for Approval"})]}),X&&!P?a.jsx(go,{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 u2({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]:[]),v=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),j=b.target.checked?[...f,S]:f.filter(C=>C!=S);o(d,i,j)},h=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let y;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];y=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")y=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";y=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?v: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 y=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}),y]})}function d2({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(de,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:"Complete Your Exchange"})}),a.jsxs(de.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(u2,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(de.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 _w({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 f2({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(Ur,{});else if(r.usageDetailStatus==Ue.error)s=a.jsx(Ce,{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}=ii(c),m=r.resources.find(h=>h.resourceRepositoryKey==u),g=h=>rt(h,{decimalPlaces:m?m.decimalPlaces:void 0}),v={};for(let h of n.users)v[h.username]=h;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const x=[{key:"name",name:"Name",format:(h,{lastName:y,firstName:b,portalUsername:S})=>{const j=v[S];return j?a.jsx(_w,{user:j}):`${y}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:h=>{const y=v[h],b=y?y.resourceUsernames[m.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:h=>jx[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(pn,{rows:d,columns:x}):a.jsx(Ce,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(de,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:i})}),a.jsx(de.Body,{children:s})]})}var p2=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function h2(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=mn(e,p2),p=f.inputValue,m=w.useRef(void 0),g=w.useRef(!1),v=w.useState(Array.isArray(n)?n:void 0),x=Ve(v,2),h=x[0],y=x[1],b=w.useState(typeof p<"u"?p:""),S=Ve(b,2),j=S[0],C=S[1],_=w.useState(n===!0),E=Ve(_,2),N=E[0],R=E[1],O=w.useState(void 0),k=Ve(O,2),P=k[0],A=k[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),ye=Ve(ae,2),Se=ye[0],Ae=ye[1],F=w.useState(void 0),L=Ve(F,2),ne=L[0],ee=L[1];o!==ne&&(Z({}),ee(o)),n!==Se&&(y(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(j,function(It){g.current&&(y(It||[]),R(!!m.current))})},[]);var lt=w.useCallback(function(It,ct){var _e=UP(It,ct,c);if(!_e){m.current=void 0,C(""),A(""),T([]),R(!1),z(!1);return}if(o&&te[_e])C(_e),A(_e),T(te[_e]),R(!1),z(!1);else{var zn=m.current={};C(_e),R(!0),z(!P),oe(_e,function(Bn){g&&zn===m.current&&(m.current=void 0,R(!1),A(_e),T(Bn||[]),z(!1),Z(Bn?K(K({},te),{},so({},_e,Bn)):te))})}},[o,oe,P,te,c]),Pt=H?[]:j&&P?X:h||[];return K(K({},f),{},{options:Pt,isLoading:N||l,onInputChange:lt,filterOption:d})}var m2=w.forwardRef(function(e,t){var n=h2(e),r=Ab(n);return w.createElement(Ep,Q({ref:t},r))}),g2=m2;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 v2({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,v=n.usersStatus==c.error,x=n.users,h=d.resources.filter(ld),y=h.length==0,b=x.find(R=>R.hasChanges)!==void 0,S=x.find(R=>R.role!="pi")!==void 0;let j;g&&!b?j=a.jsx(Ce,{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."}):v?j=a.jsx(Ce,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?h.length?y&&(j=a.jsx(Ce,{color:"warning",children:"This project does not have any active resources."})):j=a.jsxs(Ce,{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."]}):j=a.jsxs(Ce,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Uf(n)," to request a change."]});const C=(R,O)=>{let k,P,A,D;if(O.key=="all"){k="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 k=`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(Jn,{resource:O,userGuide:!1}),a.jsx("br",{}),a.jsx(Rd,{description:k,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(_w,{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:k=>l(O.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:_.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];h.length&&E.push({key:"all",name:"All Resources",class:`text-center ${_r.important}`,disabled:!f||y,width:100,format:(R,O)=>a.jsx(Rd,{description:`all users for ${O.name}`,disabled:!f||y,onChange:k=>u(k,O.username),selectedLength:O.resourceIds.length,totalLength:h.length}),formatHeader:C});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,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:C});const N=x.map(R=>R.hasChanges?_r.edited:"");return a.jsxs(a.Fragment,{children:[j,a.jsx(pn,{rows:x,columns:E,frozenColumns:h.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&h.length&&!y?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(g2,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await qE(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&&(h.length&&!y||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 y2=(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}},x2=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:b2(t)},t))})]}):null;function b2(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const $o={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:[]},Ew=Lr({name:"publicationEdit",initialState:$o,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($o))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:w2,changePublicationType:Nd,dataLoaded:S2,deleteAuthor:j2,hideError:Rw,setFormValid:C2,setGrantNumber:Nw,setPublication:_2,setPublicationId:E2,setShowEditModal:kw,resetState:R2,toggleRequest:N2,toggleTag:tD,updateAuthor:k2,updateErrors:Xs,updateField:O2,updatePublication:va,updateSaving:eu,updateSelectedTags:T2,updateShowSaved:Ow}=Ew.actions,P2=e=>e.publicationEdit.publication,I2=e=>e.publicationEdit.publication.doi,$2=e=>e.publicationEdit.publication_types,Tw=e=>e.publicationEdit.publication.authors,M2=e=>e.publicationEdit.tag_categories,A2=e=>e.publicationEdit.projects,D2=e=>e.publicationEdit.publication.tags,F2=e=>e.publicationEdit.errors,Pw=e=>e.publicationEdit.data_loaded,Iw=e=>e.publicationEdit.publicationId,L2=e=>e.publicationEdit.showEditModal,U2=e=>e.publicationEdit.show_saved,nc=e=>e.publicationEdit.saving,$w=e=>e.publicationEdit.form_valid,V2=e=>e.publicationEdit.grant_number,z2=e=>!nc(e)&&Pw(e)&&$w(e)&&Mw(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0,Mw=e=>{const t=Tw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},B2=()=>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(Nd(s?s.publication_type:"Other")),e(_2(o))}else e(Xs(r))},()=>{e(Xs(r))})},q2=()=>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(w2(r)),e(Nw(""))},()=>{e(Xs("Unable to find a project with this grant number."))})},Np=e=>async t=>{t(E2(e)),t(kw(!0))},Aw=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(S2(r))})},H2=()=>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}=y2(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(g=>{e(Rw(g.id))});const m=x2(c);e(Xs(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(R2()),e(Aw())),e(Ow(!0)),e(eu(!1))},()=>{e(eu(!1)),e(Xs("There was an error saving this publication."))})},fi=Ew.reducer,fn=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()}),kp=tt("publicationsSearch/getFilters",async()=>(await(await fetch(re.routes.search_publications_filters_path())).json()).filters||[]),Zs={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},Dw=Lr({name:"publicationsSearch",initialState:Zs,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(fn.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(fn.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(fn.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(kp.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{addCreatedByUsername:W2,removeCreatedByUsername:K2,resetFilters:Y2,resetPublications:Rg,setUsePagination:Op,updateFilterSelection:kd}=Dw.actions,G2=e=>e.publicationsSearch.filterSelections,Q2=e=>e.publicationsSearch.publicationsLoaded,Fw=e=>e.publicationsSearch.publications,X2=e=>e.publicationsSearch.filterOptions,Z2=e=>e.publicationsSearch.page,J2=e=>e.publicationsSearch.usePagination,rc=Dw.reducer;function eM({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(Ur,{})]})}const tM="_citation_ru41y_1",nM="_tags_ru41y_7",Ng={citation:tM,tags:nM},rM=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Lw=e=>{const t=(e||"").match(rM);return t?t[0]:null};function Uw({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=Lw(n),v=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,"."]})," ",v]});if(["Conference Paper","Software"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",v]});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,"."]})," ",v]});if(o==="Dataset")return a.jsxs(a.Fragment,{children:[f," (",p,").",a.jsx("em",{children:m})," [Dataset]. ",u,". ",v]});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]}),"]. ",v]})}function oM({allowEdit:e=!0,last:t=!1,publication:n}){const r=me(),{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:Ng.citation,children:[a.jsx(Uw,{publication:n}),e&&n.can_edit&&a.jsx(To,{onClick:()=>r(Np(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:Ng.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}=ii(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=me(),{current:r,last:o}=G(Z2),s=G(Q2),i=G(J2),l=G(Fw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(eM,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(fn()),children:l.map((c,u)=>a.jsx(oM,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function sM(){const e=me(),t=G(I2);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(B2()),children:"Lookup Publication"})]})]})})}const iM=({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"})})})]})},aM=e=>({updateAuthor:t=>e(k2(t)),deleteAuthor:t=>e(j2(t))}),lM=T_(null,aM)(iM);function cM(){const e=me(),t=G(Tw),n=G(Mw),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(lM,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Eg()),children:"Add Author"})]})}function uM({category:e,index:t}){const n=me(),r=G(D2),o=w.useRef(null),s=()=>{const l=r.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n(T2({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 dM(){const e=me(),t=G(A2),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(N2(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function fM(){const e=me(),t=G(V2);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(Nw(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(q2()),children:"Find Project"})]})]})})}function pM(){const e=me(),t=G(P2),n=G($2),r=G(M2);G(z2);const o=G($w),s=p=>{e(C2(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(O2({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 v=["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:v.map((h,y)=>a.jsx("option",{value:y+1,children:h},`month_${y}`))})]})})]})},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(sM,{}),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(Nd(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(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(cM,{})})]}),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(go,{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(uM,{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(go,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(dM,{}),a.jsx("hr",{}),a.jsx(fM,{})]})]});return a.jsxs(a.Fragment,{children:[c,u,d,f]})}function Vw(){const e=me(),t=G(Pw),n=G(Iw);return w.useEffect(()=>{e(Aw(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(pM,{}):a.jsx(Ur,{})})}function Pp(){const e=me(),t=G(L2),n=G(Iw),r=o=>{o&&e(H2()),e(kw(!1))};return a.jsx(a.Fragment,{children:a.jsxs(de,{size:"xl",show:t,onHide:()=>r(!1),scrollable:!0,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsxs(de.Title,{children:[n?"Edit":"Add"," Publication"]})}),a.jsx(de.Body,{children:a.jsx(Vw,{})}),a.jsx(de.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 hM({grantNumber:e}){const t=me(),n=G(nc);return w.useEffect(()=>{n||(t(kd({name:"grantNumber",value:e})),t(Op(!1)),t(fn()))},[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 mM({grantNumber:e}){const t=w.useRef(Ln({reducer:{publicationEdit:fi,publicationsSearch:rc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Un,{store:t.current,children:a.jsx(hM,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:re.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function gM({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(Ce,{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(Ce,{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:yR.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(Ce,{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(Ce,{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(NN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(es,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(aT,{requestId:e,grantNumber:t})}),a.jsx(es,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(c2,{requestId:e})}),a.jsx(es,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(v2,{grantNumber:t})}),a.jsx(es,{eventKey:"publications",title:"Publications",children:a.jsx(mM,{grantNumber:t,requestId:e})}),a.jsx(es,{eventKey:"history",title:"History",children:a.jsx(AO,{requestId:e})})]}),a.jsx(PO,{grantNumber:t,requestId:e}),a.jsx(IO,{grantNumber:t,requestId:e}),a.jsx($O,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(d2,{grantNumber:t,requestId:e}),a.jsx(f2,{grantNumber:t,requestId:e})]})}function vM({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 yM({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(Ce,{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(vM,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(gM,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${Cm.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:Cm.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(Po,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function xM({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=hR(e);if(r)return a.jsx(Ur,{});if(n)return a.jsxs(Ce,{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(yM,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const zw={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:[]}},bM=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(qw(!0))),await n(Od()),await n(Rr()),n(wM())}),wM=tt("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(Bw({...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(Bw(i.filters))}),Rr=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=Lr({name:"projectsBrowser",initialState:zw,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(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(Od.pending,t=>{t.filtersLoaded=!1}).addCase(Od.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:SM,setApiUrl:nD,setShowPagination:kg,setTypeLists:Bw,toggleAllFos:jM,toggleFos:CM,toggleListFiltered:qw,toggleSingleEntry:Og,updateFilter:Td,updatePageData:Pd}=Ip.actions,_M=e=>e.projectsBrowser.filters,EM=e=>e.projectsBrowser.filtersLoaded,RM=e=>e.projectsBrowser.listIsFiltered,NM=e=>e.projectsBrowser.singleEntry,kM=e=>e.projectsBrowser.projectsLoaded,OM=e=>e.projectsBrowser.pageData,TM=e=>e.projectsBrowser.projects,PM=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,IM=e=>e.projectsBrowser.typeLists,$M=Ip.reducer;const MM=()=>{const e=me(),t=G(_M),n=G(IM),r=G(RM),o=n.orgs.map(v=>({label:v,value:v})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=v=>{e(Td({name:v.target.name,value:v.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(kg(!1)),e(Pd({current_page:1})),e(Rr())},f=()=>{l(null),e(kg(!1)),e(Pd({current_page:1})),e(SM()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=v=>{e(qw(v))},m=v=>{l(v),e(Td({name:"org",value:v.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(jM())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(v=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:v.fosTypeId,id:`fos_${v.fosTypeId}`,checked:v.checked,onChange:()=>e(CM(v))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${v.fosTypeId}`,children:v.fosName})]},`fos_${v.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:v=>u(v),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((v,x)=>a.jsx("option",{value:v,children:v},`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:v=>u(v),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((v,x)=>a.jsx("option",{value:v.resourceId,children:v.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:v=>u(v)})}),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 Tg=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),Pg=({publication:e,index:t,fontSize:n="18px"})=>{const r=e.authors.map(p=>`${p.last_name}, ${p.first_name.substring(0,1)}.`).join(", "),o=e.projects.map(p=>p.grant_number),s=e.publication_type==="Other"?"Publication":e.publication_type,i=e.projects,l=t%2==0?"bg-light":"",c={textIndent:"-50px",marginLeft:"50px",fontSize:n},u=e.publication_datas??[],d=p=>{switch(p){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/${Tg(e.doi)}`,target:"_blank",className:"fw-normal",children:Tg(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return u["Volume/Issue"]?u["Volume/Issue"]:!1;case"Pages":return u.Pages?u.Pages:!1;case"Publisher":return u.Publisher?u.Publisher:!1}},f=()=>{const p=d("Publication Year");let m=e.title;const g=d("Journal"),v=d("DOI"),x=d("Volume/Issue"),h=d("Pages"),y=d("Publisher");return m[m.length-1]!="."&&(m+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,g?a.jsxs("em",{className:"ms-1",children:[g,"."]}):"",x?a.jsxs("span",{className:"ms-1",children:[x,","]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,"."]}):"",v?a.jsx("span",{className:"ms-1",children:v}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,g?a.jsxs("em",{className:"ms-1",children:[g,"."]}):"",v?a.jsx("span",{className:"ms-1",children:v}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",v?a.jsx("span",{className:"ms-1",children:v}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m})," [Dataset]. ",y||"",".",v?a.jsx("span",{className:"ms-1",children:v}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),". [Doctoral dissertation",y?", "+y:"","].",v?a.jsx("span",{className:"ms-1",children:v}):""]}):""};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 ${l}`,children:[a.jsx("p",{style:c,children:f()}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",s]}),a.jsx("ul",{style:{...c,listStyleType:"none"},children:o.map((p,m)=>a.jsx("li",{id:`project_${m}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${p}`,id:`grant_link${m}`,target:"_blank",style:{fontWeight:"600"},children:p})},`grant_${m}`))})]})]})})})},AM=({project:e})=>{const t=e.resources,[n,r]=w.useState(!1),[o,s]=w.useState(!1),[i,l]=w.useState(!1);G(NM);const c=e.abstract.length>=300,u=c?`${e.abstract.substring(0,300)}...`:e.abstract,d=_=>{let E=_.units?_.units:_.resourceUnits;const N=_.allocation?_.allocation:_.amount;if(E=="[Yes = 1, No = 0]"||E=="Yes / No")return N=="1.0"?"Yes":"No";{let R="0";return parseInt(N)&&(R=parseInt(N).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),E=="ACCESS Credits"&&(E=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),E=="Dollars"?`$${R}`:a.jsxs(a.Fragment,{children:[R," ",E]})}},f=()=>{const{origin:_,pathname:E}=window.location,N=`${_}${E}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(N),setTimeout(()=>r(!1),2e3)},p=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",m=a.jsx(Vl,{id:"link-tooltip",children:"Link Copied!"}),g=()=>{if(p()){const _={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(dp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:m,children:a.jsx("button",{onClick:f,style:_,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,{})},v=()=>{const _=e.pi.split(",");return`${_[1]} ${_[0]}`},x=()=>!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(_=>`${_.name} (${_.organization})`).join(";")]})]}),h=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),y=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[p()," Start-Up: ",v(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[p()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),x()]}),b=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((_,E)=>a.jsxs("tr",{children:[a.jsx("td",{children:_.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:d(_)})]},`resource_${e.requestId}_${E}`))})]}),S=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:b})})]}),j=a.jsxs(de,{show:o,onHide:()=>s(!1),id:`publicationsModal_${e.projectId}`,children:[a.jsx(de.Header,{closeButton:!0,children:a.jsx(de.Title,{children:e.requestTitle})}),a.jsx(de.Body,{children:e.publications.map((_,E)=>a.jsx("div",{children:a.jsx(Pg,{publication:{..._,projects:[]},index:E})},`publication_${E}`))}),a.jsx(de.Footer,{children:a.jsx("button",{type:"button",className:"btn btn-secondary","data-bs-dismiss":"modal",onClick:()=>s(!1),children:"Close"})})]}),C=()=>e.allocationType==="NAIRR Start-Up"?S:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row fw-bold mt-2 border-bottom",children:a.jsx("span",{className:"col mb-1 pb-0",children:"Abstract"})}),a.jsx("div",{style:{whiteSpace:"pre-wrap",display:"inline"},children:i?e.abstract:u}),c&&a.jsx("button",{onClick:()=>l(!i),style:{display:"inline",border:"none",background:"none",cursor:"pointer",fontWeight:"bold"},children:i?"Show Less":"Read More"}),a.jsxs("div",{className:"row mt-2",children:[a.jsxs("div",{className:"col-lg-6 left-panel flex-fill",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Resources"})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:b})})]}),e.publications.length>0&&a.jsxs("div",{className:"col-lg-6 right-panel",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Publications"})})}),a.jsx("div",{className:"mt-2 pb-0",children:a.jsx(Pg,{publication:{...e.publications[0],projects:[]},index:0,fontSize:"16px"})},`publication_${e.projectId}_0`),e.publications.length>1&&a.jsxs("button",{className:"btn btn-primary",onClick:()=>s(!0),children:["View More (",e.publications.length,")"]}),j]})]})]});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:y()}),a.jsx("div",{children:g()})]})}),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:h()})]}),C()]})]})},DM=()=>{const e=G(TM);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(AM,{project:t},`project_${n}`))})};const Ig=()=>{const e=me(),t=G(OM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(g,v)=>v),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=g=>{const v=parseInt(g);e(Pd({current_page:g})),e(Rr(v))},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 v=1;v>0;v--)t.current_page-v>1&&g.push(t.current_page-v);g.push(["current",t.current_page]);for(var v=1;v<2;v++)t.current_page+v<=t.last_page&&g.push(t.current_page+v);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 v=1;v<=t.last_page;v++)v==t.current_page?g.push(["current",v]):g.push(v);r(g)},p=g=>{let v="";return typeof g=="object"?[g,v]=g:v=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:v})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(g),children:v})})},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,v)=>a.jsx(Re.Fragment,{children:p(g)},`page_${v}`)),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:">"})})]})})})},FM=({api_url:e})=>{const t=me(),n=G(kM),r=G(EM),o=G(PM),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(bM())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(MM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ig,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(DM,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ig,{scroll:"projects_browser_app"}):""})})]})]})})};function Hw(){const e=me();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(Np(null)),children:"Add a New Publication"})}function Ww(){const e=me(),t=G(F2),n=G(U2);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(Ow(!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(Rw(r.id))})]},`err_${r.id}`))]})}function LM(){const e=me(),t=G(nc);return w.useEffect(()=>{t||(e(Op(!1)),e(fn()),e(kp()))},[e,t]),a.jsxs(a.Fragment,{children:[a.jsx(Ww,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsx(Hw,{})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const UM=()=>{const e=me(),t=G(X2),n=G(G2),r=()=>{e(Rg()),window.scrollTo(0,0),e(fn())},o=()=>{e(Rg()),e(Y2()),window.scrollTo(0,0),e(fn())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(kd({name:l.target.name,value:l.target.value}))},i=l=>{e(kd({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:Lw(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"})]})]})})},VM=()=>{const e=me();return w.useEffect(()=>{e(fn()),e(kp())},[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(UM,{})}),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})})})})]})})})},Kw={selected:[]},Yw=Lr({name:"publicationsSelect",initialState:Kw,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:zM,toggleSelected:BM,clearSelected:rD}=Yw.actions,qM=e=>e.publicationsSelect.selected,HM=Yw.reducer;function WM({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=me(),o=G(nc),s=G(qM),i=G(Fw);w.useEffect(()=>{o||(r(Op(!1)),r(fn()))},[o,r]);const l=[{key:"publication",name:"Publication",format:(c,u)=>a.jsxs(a.Fragment,{children:[a.jsx(Uw,{publication:u}),t&&u.can_edit&&a.jsx(To,{onClick:()=>r(Np(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(BM(c))})},formatHeader:()=>a.jsx(Rd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(zM(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(pn,{columns:l,rows:i}),e&&a.jsx(Hw,{}),a.jsx(Pp,{})]})}function KM(){const e=me();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(W2(t.detail.username))),addEventListener("requestRemoveRole",t=>e(K2(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(Ww,{}),a.jsx(WM,{allowSelect:!0})]})}const YM={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($g(!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(ZM({data:r,params:e})),t($g(!0))});tt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(eA(e)),t(Qw())});const GM=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)}))},QM=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}=XM(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,XM=(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}},Gw=Lr({name:"resourceCatalog",initialState:YM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=QM(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=GM(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:ZM,processData:oD,resetFilters:JM,setResourcesLoaded:$g,toggleCatalog:eA,toggleFilter:Qw}=Gw.actions,Xw=e=>e.resourceCatalog.catalogs,tA=e=>e.resourceCatalog.filters,nA=e=>e.resourceCatalog.hasErrors,rA=e=>e.resourceCatalog.resourcesLoaded,oA=e=>e.resourceCatalog.filteredResources,sA=Gw.reducer,iA="_access_1yrq0_2",aA="_resourceName_1yrq0_6",lA="_description_1yrq0_11",cA="_filterBar_1yrq0_15",uA="_cardBg_1yrq0_20",dA="_active_1yrq0_25",fA="_plainButton_1yrq0_30",pA="_btnSecondary_1yrq0_40",hA="_filtersHidden_1yrq0_51",mA="_filtersVisible_1yrq0_57",At={access:iA,resourceName:aA,description:lA,filterBar:cA,cardBg:uA,active:dA,plainButton:fA,btnSecondary:pA,filtersHidden:hA,filtersVisible:mA},gA=({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"})]})})]})})})})},vA=({filter:e})=>{const t=me(),n=()=>{t(Qw(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})]})})})},yA=({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(vA,{filter:t},t.featureId))]})}),xA=({onReset:e})=>{const t=me(),n=G(Xw),r=G(tA),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(yA,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(JM()),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"})]})},bA=()=>{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(xA,{onReset:r})})]})})})})},wA=()=>{const e=G(oA);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(bA,{}),e.map(t=>a.jsx(gA,{resource:t},t.resourceId))]})})},SA=({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"}),"."]})]})})]}),jA=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=me(),o=G(rA),s=G(nA),i=G(Xw),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(SA,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(wA,{})})})]}):a.jsx(Ur,{})},CA={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(EA({data:r,params:e}))}),_A=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)}))},Mg=(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)},Zw=Lr({name:"resourceCatalog",initialState:CA,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 v=g.categoryId;g.categoryName=="ACCESS Resource Grouping"?p=g.features[0].name:(!u[v]&&Mg(i,r,g.categoryName)&&(u[v]={categoryId:v,categoryName:g.categoryName,categoryDescription:g.categoryDescription,features:{}}),g.features.forEach(x=>{const h={featureId:x.featureId,name:x.name,description:x.description,categoryId:v,selected:!1},y=Mg(l,o,h.name);y&&f.push(h),u[v]&&y&&!u[v].features[x.featureId]&&(u[v].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,v)=>g>v),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=_A(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:EA,processData:sD,resetFilters:RA,toggleFilter:NA}=Zw.actions,kA=e=>e.resourceCatalog.hasErrors,OA=e=>e.resourceCatalog.resourcesLoaded,TA=e=>e.resourceCatalog.filters,PA=e=>e.resourceCatalog.filteredResources,IA=Zw.reducer,$A=({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(fa.Item,{eventKey:e.resourceId,children:[a.jsx(fa.Header,{children:e.resourceName}),a.jsxs(fa.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)]})]})},MA=()=>{const e=G(PA);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(fa,{children:e.map(t=>a.jsx($A,{resource:t},t.resourceId))})]})},AA=({filter:e})=>{const t=me(),n=()=>{t(NA(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})]})})})},DA=({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(AA,{filter:t},t.featureId))]})}),FA=()=>{const e=me(),t=G(TA),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(DA,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(RA()),disabled:n.length==0,children:"Reset Filters"})]})},LA=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=me(),l=G(OA),c=G(kA);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(FA,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(MA,{})})]})}):a.jsx(Ur,{})};function UA(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 VA({target:e}){yt.createRoot(e).render(a.jsx(lE,{}))}function zA({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){yt.createRoot(o).render(a.jsx(RE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function BA({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){yt.createRoot(t).render(a.jsx(Px,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function qA({target:e,username:t,routes:n}){ai(n);const r=Ln({reducer:{api:pR}});yt.createRoot(e).render(a.jsx(Un,{store:r,children:a.jsx(xM,{username:t})}))}function HA({target:e,apiUrl:t}){const n=Ln({reducer:{projectsBrowser:$M},preloadedState:{projectsBrowser:{...zw,apiUrl:t}}});yt.createRoot(e).render(a.jsx(Un,{store:n,children:a.jsx(FM,{})}))}function WA({target:e,routes:t,authenticityToken:n}){ai(t);const r=Ln({reducer:{publicationsSearch:rc,publicationEdit:fi},preloadedState:{publicationEdit:{...$o,authenticityToken:n}}});yt.createRoot(e).render(a.jsx(Un,{store:r,children:a.jsx(VM,{})}))}function KA({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=Ln({reducer:{publicationEdit:fi},preloadedState:{publicationEdit:{...$o,authenticityToken:r}}});ai(n),yt.createRoot(t).render(a.jsx(Un,{store:o,children:a.jsx(Vw,{publicationId:e})}))}function YA({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=Ln({reducer:{publicationEdit:fi,publicationsSearch:rc,publicationsSelect:HM},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:o}},publicationEdit:{...$o,authenticityToken:e},publicationsSelect:{...Kw,selected:n}}});ai(t),yt.createRoot(r).render(a.jsx(Un,{store:s,children:a.jsx(KM,{})}))}function GA({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=Ln({reducer:{resourceCatalog:sA}});yt.createRoot(e).render(a.jsx(Un,{store:o,children:a.jsx(jA,{catalogSources:t,onRamps:n,baseUrl:r})}))}function QA({authenticityToken:e,routes:t,target:n,username:r}){ai(t);const o=Ln({reducer:{publicationEdit:fi,publicationsSearch:rc},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:[r]}},publicationEdit:{...$o,authenticityToken:e}}});yt.createRoot(n).render(a.jsx(Un,{store:o,children:a.jsx(LM,{})}))}function XA({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Ln({reducer:{resourceCatalog:IA}});yt.createRoot(e).render(a.jsx(Un,{store:l,children:a.jsx(LA,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function ZA({allocationTypes:e,target:t}){yt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=VA;exports.editResource=BA;exports.keywords=ZA;exports.myPublications=QA;exports.onRampsResourceCatalog=GA;exports.projects=qA;exports.projectsBrowser=HA;exports.publicationEdit=KA;exports.publicationsBrowser=WA;exports.publicationsSelect=YA;exports.resourceCatalog=XA;exports.resources=zA;exports.shadowTarget=UA;
70
+ `]))),kI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return W({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})},Yc=function(t){var n=t.delay,r=t.offset;return K("span",{css:bp({animation:"".concat(NI," 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"},"","")})},OI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=vn(t,bI);return K("div",G({},Pe(W(W({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),K(Yc,{delay:0,offset:r}),K(Yc,{delay:160,offset:!0}),K(Yc,{delay:320,offset:!r}))},TI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return W({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}})},PI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return K("div",G({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)},II=PI,$I=["data"],MI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},AI=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 K("div",G({},Pe(t,"group",{group:!0}),c),K(i,G({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),K("div",null,n))},DI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return W({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"})},FI=function(t){var n=ow(t);n.data;var r=vn(n,$I);return K("div",G({},Pe(t,"groupHeading",{"group-heading":!0}),r))},LI=AI,UI=["innerRef","isDisabled","isHidden","inputClassName"],VI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return W(W({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},zI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},pw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},zI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":W({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},pw)},BI=function(t){return W({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},pw)},qI=function(t){var n=t.cx,r=t.value,o=ow(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=vn(o,UI);return K("div",G({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),K("input",G({className:n({input:!0},c),ref:s,style:BI(l),disabled:i},u)))},HI=qI,WI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return W({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},KI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return W({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})},YI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return W({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}})},hw=function(t){var n=t.children,r=t.innerProps;return K("div",r,n)},GI=hw,QI=hw;function XI(e){var t=e.children,n=e.innerProps;return K("div",G({role:"button"},n),t||K(Cp,{size:14}))}var ZI=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 K(u,{data:o,innerProps:W(W({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},K(d,{data:o,innerProps:W({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),K(f,{data:o,innerProps:W(W({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},JI=ZI,e$=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return W({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}})},t$=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return K("div",G({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},n$=t$,r$=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return W({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},o$=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Pe(t,"placeholder",{placeholder:!0}),r),n)},s$=o$,i$=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return W({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})},a$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return K("div",G({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},l$=a$,c$={ClearIndicator:_I,Control:II,DropdownIndicator:jI,DownChevron:dw,CrossIcon:Cp,Group:LI,GroupHeading:FI,IndicatorsContainer:yI,IndicatorSeparator:RI,Input:HI,LoadingIndicator:OI,Menu:oI,MenuList:iI,MenuPortal:fI,LoadingMessage:uI,NoOptionsMessage:cI,MultiValue:JI,MultiValueContainer:GI,MultiValueLabel:QI,MultiValueRemove:XI,Option:n$,Placeholder:s$,SelectContainer:hI,SingleValue:l$,ValueContainer:gI},u$=function(t){return W(W({},c$),t.components)},fg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function d$(e,t){return!!(e===t||fg(e)&&fg(t))}function f$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!d$(e[n],t[n]))return!1;return!0}function p$(e,t){t===void 0&&(t=f$);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 h$={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"},m$=function(t){return K("span",G({css:h$},t))},pg=m$,g$={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,v){return y&&y.length?"".concat(y.indexOf(v)+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:"",".")}},v$=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,x=c.isMulti,y=c.isOptionDisabled,v=c.isSearchable,h=c.menuIsOpen,g=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,j=c.isLoading,C=c["aria-label"],E=c["aria-live"],_=w.useMemo(function(){return W(W({},g$),f||{})},[f]),N=w.useMemo(function(){var F="";if(n&&_.onChange){var V=n.option,Z=n.options,T=n.removedValue,L=n.removedValues,A=n.value,H=function(ue){return Array.isArray(ue)?null:ue},B=T||V||H(A),X=B?p(B):"",J=Z||L||void 0,ee=J?J.map(p):[],Q=W({isDisabled:B&&y(B,l),label:X,labels:ee},n);F=_.onChange(Q)}return F},[n,_,y,l,p]),R=w.useMemo(function(){var F="",V=r||o,Z=!!(r&&l&&l.includes(r));if(V&&_.onFocus){var T={focused:V,label:p(V),isDisabled:y(V,l),isSelected:Z,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};F=_.onFocus(T)}return F},[r,o,p,y,_,s,l,d]),O=w.useMemo(function(){var F="";if(h&&g.length&&!j&&_.onFilter){var V=b({count:s.length});F=_.onFilter({inputValue:m,resultsMessage:V})}return F},[s,m,h,_,g,b,j]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var F="";if(_.guidance){var V=o?"value":h?"menu":"input";F=_.guidance({"aria-label":C,context:V,isDisabled:r&&y(r,l),isMulti:x,isSearchable:v,tabSelectsValue:S,isInitialFocus:k})}return F},[C,r,o,x,y,v,h,_,l,S,k]),U=K(w.Fragment,null,K("span",{id:"aria-selection"},N),K("span",{id:"aria-focused"},R),K("span",{id:"aria-results"},O),K("span",{id:"aria-guidance"},P));return K(w.Fragment,null,K(pg,{id:u},k&&U),K(pg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&U))},y$=v$,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źẑżžẓẕƶȥɀⱬꝣ"}],x$=new RegExp("["+Ed.map(function(e){return e.letters}).join("")+"]","g"),mw={};for(var Gc=0;Gc<Ed.length;Gc++)for(var Qc=Ed[Gc],Xc=0;Xc<Qc.letters.length;Xc++)mw[Qc.letters[Xc]]=Qc.base;var gw=function(t){return t.replace(x$,function(n){return mw[n]})},b$=p$(gw),hg=function(t){return t.replace(/^\s+|\s+$/g,"")},w$=function(t){return"".concat(t.label," ").concat(t.value)},S$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=W({ignoreCase:!0,ignoreAccents:!0,stringify:w$,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=b$(d),f=gw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},j$=["innerRef"];function C$(e){var t=e.innerRef,n=vn(e,j$),r=QP(n,"onExited","in","enter","exit","appear");return K("input",G({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 _$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function E$(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(v,h){if(u.current!==null){var g=u.current,b=g.scrollTop,S=g.scrollHeight,j=g.clientHeight,C=u.current,E=h>0,_=S-j-b,N=!1;_>h&&i.current&&(r&&r(v),i.current=!1),E&&l.current&&(s&&s(v),l.current=!1),E&&h>_?(n&&!i.current&&n(v),C.scrollTop=S,N=!0,i.current=!0):!E&&-h>b&&(o&&!l.current&&o(v),C.scrollTop=0,N=!0,l.current=!0),N&&_$(v)}},[n,r,o,s]),f=w.useCallback(function(v){d(v,v.deltaY)},[d]),p=w.useCallback(function(v){c.current=v.changedTouches[0].clientY},[]),m=w.useCallback(function(v){var h=c.current-v.changedTouches[0].clientY;d(v,h)},[d]),x=w.useCallback(function(v){if(v){var h=KP?{passive:!1}:!1;v.addEventListener("wheel",f,h),v.addEventListener("touchstart",p,h),v.addEventListener("touchmove",m,h)}},[m,p,f]),y=w.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",p,!1),v.removeEventListener("touchmove",m,!1))},[m,p,f]);return w.useEffect(function(){if(t){var v=u.current;return x(v),function(){y(v)}}},[t,x,y]),function(v){u.current=v}}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 R$(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(x){var y=d&&d[x];o.current[x]=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(x){var y=gg[x];d&&(d[x]=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 N$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},k$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function O$(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=E$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=R$({isEnabled:n}),f=function(m){u(m),d(m)};return K(w.Fragment,null,n&&K("div",{onClick:N$,css:k$}),t(f))}var T$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},P$=function(t){var n=t.name,r=t.onFocus;return K("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:T$,value:"",onChange:function(){}})},I$=P$;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 $$(){return _p(/^iPhone/i)}function vw(){return _p(/^Mac/i)}function M$(){return _p(/^iPad/i)||vw()&&navigator.maxTouchPoints>1}function A$(){return $$()||M$()}function D$(){return vw()||A$()}var F$=function(t){return t.label},L$=function(t){return t.label},U$=function(t){return t.value},V$=function(t){return!!t.isDisabled},z$={clearIndicator:CI,container:pI,control:TI,dropdownIndicator:SI,group:MI,groupHeading:DI,indicatorsContainer:vI,indicatorSeparator:EI,input:VI,loadingIndicator:kI,loadingMessage:lI,menu:tI,menuList:sI,menuPortal:dI,multiValue:WI,multiValueLabel:KI,multiValueRemove:YI,noOptionsMessage:aI,option:e$,placeholder:r$,singleValue:i$,valueContainer:mI},B$={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%)"},q$=4,yw=4,H$=38,W$=yw*2,K$={baseUnit:yw,controlHeight:H$,menuGutter:W$},Zc={borderRadius:q$,colors:B$,spacing:K$},Y$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ug(),captureMenuScroll:!ug(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:S$(),formatGroupLabel:F$,getOptionLabel:L$,getOptionValue:U$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:V$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!HP(),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=ww(e,t,n),s=Sw(e,t,n),i=bw(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 Cg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Sg(e,n,t,r);return Cg(e,s)?s:void 0}).filter(YP)}function xw(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 jg(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 G$(e,t){return xw(ga(e,t))}function Cg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Cw(e)||!s)&&jw(e,{label:i,value:l,data:o},r)}function Q$(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 X$(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},bw=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function ww(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Sw(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 jw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Cw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Z$=1,Ep=function(e){mT(n,e);var t=yT(n);function n(r){var o;if(pT(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=D$(),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,x=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:x}),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,x=f&&o.isOptionSelected(c,m),y=o.isOptionDisabled(c,m);if(x){var v=o.getOptionValue(c);o.setValue(m.filter(function(h){return o.getOptionValue(h)!==v}),"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(x){return o.getOptionValue(x)!==f}),m=qi(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(qi(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=qi(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 jg(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 LP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return bw(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=z$[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 u$(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 xw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:W({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 Cw(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,x=u.isClearable,y=u.isDisabled,v=u.menuIsOpen,h=u.onKeyDown,g=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,j=S.focusedOption,C=S.focusedValue,E=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(C)o.removeValue(C);else{if(!f)return;d?o.popValue():x&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!v||!g||!j||b&&o.isOptionSelected(j,E))return;o.selectOption(j);break;case"Enter":if(c.keyCode===229)break;if(v){if(!j||o.isComposing)return;o.selectOption(j);break}return;case"Escape":v?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:m}),o.onMenuClose()):x&&p&&o.clearValue();break;case" ":if(m)return;if(!v){o.openMenu("first");break}if(!j)return;o.selectOption(j);break;case"ArrowUp":v?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":v?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!v)return;o.focusOption("pageup");break;case"PageDown":if(!v)return;o.focusOption("pagedown");break;case"Home":if(!v)return;o.focusOption("first");break;case"End":if(!v)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Z$),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 hT(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):W(W({},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,x=f.options,y=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:y,isMulti:p,isRtl:m,options:x,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 ww(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Sw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return jw(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(),x=m.Input,y=this.state,v=y.inputIsHidden,h=y.ariaSelection,g=this.commonProps,b=l||this.getElementId("input"),S=W(W(W({"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(x,G({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(C$,G({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,x=m.controlShouldRenderValue,y=m.isDisabled,v=m.isMulti,h=m.inputValue,g=m.placeholder,b=this.state,S=b.selectValue,j=b.focusedValue,C=b.isFocused;if(!this.hasValue()||!x)return h?null:w.createElement(f,G({},p,{key:"placeholder",isDisabled:y,isFocused:C,innerProps:{id:this.getElementId("placeholder")}}),g);if(v)return S.map(function(_,N){var R=_===j,O="".concat(o.getOptionLabel(_),"-").concat(o.getOptionValue(_));return w.createElement(i,G({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:y,key:O,index:N,removeProps:{onClick:function(){return o.removeValue(_)},onTouchEnd:function(){return o.removeValue(_)},onMouseDown:function(P){P.preventDefault()}},data:_}),o.formatOptionLabel(_,"value"))});if(h)return null;var E=S[0];return w.createElement(d,G({},p,{data:E,isDisabled:y}),this.formatOptionLabel(E,"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,G({},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,G({},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,G({},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,G({},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,x=this.commonProps,y=this.state.focusedOption,v=this.props,h=v.captureMenuScroll,g=v.inputValue,b=v.isLoading,S=v.loadingMessage,j=v.minMenuHeight,C=v.maxMenuHeight,E=v.menuIsOpen,_=v.menuPlacement,N=v.menuPosition,R=v.menuPortalTarget,O=v.menuShouldBlockScroll,k=v.menuShouldScrollIntoView,P=v.noOptionsMessage,U=v.onMenuScrollToTop,F=v.onMenuScrollToBottom;if(!E)return null;var V=function(X,J){var ee=X.type,Q=X.data,te=X.isDisabled,ue=X.isSelected,Ce=X.label,De=X.value,Xe=y===Q,me=te?void 0:function(){return o.onOptionHover(Q)},Ie=te?void 0:function(){return o.selectOption(Q)},M="".concat(o.getElementId("option"),"-").concat(J),D={id:M,onClick:Ie,onMouseMove:me,onMouseOver:me,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ue};return w.createElement(m,G({},x,{innerProps:D,data:Q,isDisabled:te,isSelected:ue,key:M,label:Ce,type:ee,value:De,isFocused:Xe,innerRef:Xe?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(X.data,"menu"))},Z;if(this.hasOptions())Z=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var X=B.data,J=B.options,ee=B.index,Q="".concat(o.getElementId("group"),"-").concat(ee),te="".concat(Q,"-heading");return w.createElement(i,G({},x,{key:Q,data:X,options:J,Heading:l,headingProps:{id:te,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(ue){return V(ue,"".concat(ee,"-").concat(ue.index))}))}else if(B.type==="option")return V(B,"".concat(B.index))});else if(b){var T=S({inputValue:g});if(T===null)return null;Z=w.createElement(f,x,T)}else{var L=P({inputValue:g});if(L===null)return null;Z=w.createElement(p,x,L)}var A={minMenuHeight:j,maxMenuHeight:C,menuPlacement:_,menuPosition:N,menuShouldScrollIntoView:k},H=w.createElement(nI,G({},x,A),function(B){var X=B.ref,J=B.placerProps,ee=J.placement,Q=J.maxHeight;return w.createElement(c,G({},x,A,{innerRef:X,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:ee}),w.createElement(O$,{captureEnabled:h,onTopArrive:U,onBottomArrive:F,lockEnabled:O},function(te){return w.createElement(u,G({},x,{innerRef:function(Ce){o.getMenuListRef(Ce),te(Ce)},innerProps:{role:"listbox","aria-multiselectable":x.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:Q,focusedOption:y}),Z)}))});return R||N==="fixed"?w.createElement(d,G({},x,{appendTo:R,controlElement:this.controlRef,menuPlacement:_,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(I$,{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,v){return w.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:o.getOptionValue(y)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,m)}else{var x=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:x})}}},{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(y$,G({},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,x=this.state.isFocused,y=this.commonProps=this.getCommonProps();return w.createElement(l,G({},y,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:x}),this.renderLiveRegion(),w.createElement(s,G({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:x,menuIsOpen:m}),w.createElement(c,G({},y,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,G({},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,x=o.value,y=o.menuIsOpen,v=o.inputValue,h=o.isMulti,g=lg(x),b={};if(i&&(x!==i.value||m!==i.options||y!==i.menuIsOpen||v!==i.inputValue)){var S=y?G$(o,g):[],j=y?jg(ga(o,g),"".concat(p,"-option")):[],C=l?Q$(s,g):null,E=X$(s,S),_=Jc(j,E);b={selectValue:g,focusedOption:E,focusedOptionId:_,focusableOptionsWithIds:j,focusedValue:C,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,O=d&&f;return d&&!O&&(R={value:qi(h,g,g[0]||null),options:g,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),W(W(W({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:O})}}]),n}(w.Component);Ep.defaultProps=Y$;var J$=w.forwardRef(function(e,t){var n=Ab(e);return w.createElement(Ep,G({ref:t},n))}),Rp=J$;function yo({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,x]=w.useState(p?localStorage.getItem(s)!="true":s),[y,v]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>v(!0),100)},[]);const h=()=>{p&&localStorage.setItem(s,"true")},g=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(),x(!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(Ib,{target:u.current,placement:c,show:m&&f&&y,children:g}):a.jsx(dp,{placement:c,onToggle:b=>{h(),x(b)},overlay:g,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 e2="_items_c2dbg_1",t2="_item_c2dbg_1",n2="_details_c2dbg_14",r2="_text_c2dbg_20",o2="_number_c2dbg_35",s2="_outer_c2dbg_50",i2="_inner_c2dbg_61",bn={items:e2,item:t2,details:n2,text:r2,number:o2,outer:s2,inner:i2},is=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function a2({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=nd}){const{request:o}=ut(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 x=m+1,v=rd(p)/s,h=p.requested-p.used,g=Math.max(0,h),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*g/b,C=`var(--bs-${p.isCredit?n:r[m%r.length]})`;if(v>0){const E=d,_=d+v/2,N=d+=v,R=v>.5?1:0,O=[`M ${is(E,100)}`,`A 100 100 0 ${R} 1 ${is(N,100)}`,`L ${is(N,50)}`,`A 50 50 0 ${R} 0 ${is(E,50)}`].join(" "),[k,P]=is(_,75).split(" ").map(U=>parseFloat(U));c.push(a.jsx("path",{d:O,style:{fill:C}},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:bn.number,children:x},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:bn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:it(g,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:bn.item,children:[a.jsx("span",{className:bn.number,children:x}),a.jsx("span",{className:`${bn.outer} ms-2 me-2`,style:{borderColor:C},children:a.jsx("span",{className:bn.inner,style:{backgroundColor:C,width:`${S}%`}})}),a.jsxs("strong",{className:bn.name,children:[a.jsx(_n,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:bn.details,children:[it(h,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",it(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:bn.items,children:f})})]})}const _g=e=>e;function l2({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 c2({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}=ut(e,t),{project:p}=kt(t||n&&n.grantNumber),m=w.useRef(null),x=w.useRef(null);if(!n||!p)return;const y="Exchange"in n.allowedActions,v="Renewal"in n.allowedActions,h="Supplement"in n.allowedActions,g=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,j=n.exchangeErrors,C=n.exchangeActionId!==null,E=n.exchangeActionEditable,_=n.resources,N=n.resourcesReason,R={};for(let M of _)R[M.resourceId]=M;const O=()=>{Sx(n)>=.75?u():d()},k=[];for(let M of _){let D=[];if(M.requested>0){for(let de of M.requires||[]){let re=R[de];if(re){if(re.requested>0){D=[];break}D.push(re)}}D.length&&k.push(a.jsxs("span",{children:[a.jsx(_n,{resource:M,userGuide:!1})," requires"," ",wx(D.map(de=>a.jsx(_n,{resource:de,userGuide:!1},de.resourceId)),"or"),"."]},M.resourceId))}}const P=k.length>0,U=M=>M.requested-M.used,F=M=>M.isNew&&0<M.requested&&M.requested<M.minimumExchange,V=[];for(let M of _)!M.isCredit&&F(M)&&V.push(a.jsxs("span",{children:["The minimum initial request for ",a.jsx(_n,{resource:M,userGuide:!1})," is ",M.minimumExchange," ",M.unit,". ",a.jsx("br",{})]},M.resourceId));const Z=V.length>0;let T;b?T=a.jsx(Se,{color:"info",children:"Your exchange request has been submitted."}):S&&j.length>0&&j[0].includes("PI")&&j[0].includes("person status Unknown")?T=a.jsx(Se,{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(M=>M.role==="pi").map(M=>`${M.firstName} ${M.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?T=a.jsxs(Se,{color:"danger",children:["Sorry, something went wrong: ",j.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."]}):C?T=a.jsx(Se,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?T=a.jsxs(Se,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Uf(p)," to request a change."]}):P?T=a.jsxs(Se,{color:"warning",children:[k," Please adjust your balance values."]}):Z&&(T=a.jsx(Se,{color:"warning",children:V}));const L=N.length>0;let A=!1,H=!1;for(let M of _)if(M.isNew&&(A=!0),M.allocated!=M.requested&&(H=!0),A&&H)break;const B=_.map(M=>M.resourceId),X={},J={},ee=[];if(y&&E){n.allowedActions.Exchange.resources.filter(M=>!B.includes(M.resourceId)).map(M=>{X[M.resourceId]=M;const D=`${M.type} Resources (${M.unit})`;J[D]=J[D]||[],J[D].push(M)});for(const[M,D]of Object.entries(J))ee.push({label:M,options:D.sort((de,re)=>de.exchangeRates.current.unitCost<re.exchangeRates.current.unitCost||de.exchangeRates.current.unitCost==re.exchangeRates.current.unitCost&&de.name<re.name?-1:1).map(de=>{const re=ii(de.name),dt=re.short?`${re.short} (${re.full.replace(/ \([^(]+\)/,"")})`:re.full;return{value:de.resourceId,label:dt}})}),ee.sort((de,re)=>de.label<re.label?-1:1)}const Q=y?n.allowedActions.Exchange.resources.map(M=>M.resourceId):[];let te;const ue=[],Ce=[];for(let M of _)M.isCredit?te=M:(ue.push(M),Ce.push(E&&(M.isNew||M.allocated!=M.requested)?_r.edited:Q.includes(M.resourceId)?"":_r.disabled));const De=`Add ${ue.length?"another":"a"} resource to your exchange...`,Xe=(M,D)=>{const de=D.allocated-D.used,re=mo(Number(M.replace(/[^0-9-.]/g,"")),D.decimalPlaces),dt=Math.min(0,de);if(re<dt)return dt;let ot=te.requested*te.exchangeRates.base.unitCost;const be=(D.allocated-D.requested)*D.exchangeRates.base.unitCost,qt=Math.min(ot,be);ot-=qt;let $t=D.requested-D.used+qt/D.exchangeRates.base.unitCost;return ot>0&&($t+=ot/D.exchangeRates.current.unitCost),re>$t?mo($t,D.decimalPlaces,"floor"):re},me=M=>M.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[te.icon]),a.jsx("span",{className:"ms-2",children:D_(M.unit,M.exchangeRates.current.unitCost,te.name)})]}),Ie=[{key:"name",name:"Resource",format:(M,D)=>a.jsxs(a.Fragment,{children:[a.jsx(_n,{resource:D}),(p.currentUser.resourceIds.includes(D.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(D.resourceId))&&a.jsx(Io,{icon:"table",onClick:()=>o(D.resourceRepositoryKey),target:"_blank",title:`${D.name} Usage Details`})," ",a.jsx($o,{status:D.isActive?"Active":D.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(M,D)=>me(D)}];return y&&Ie.push({key:"requested",name:"Balance",class:"text-end",rowClass:M=>E&&Q.includes(M.resourceId)?_r.input:"",format:(M,D)=>{const de=E&&Q.includes(D.resourceId);return D.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:M==1,disabled:!de,onChange:re=>i(D.resourceId,re.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[de?a.jsx(l2,{classes:"text-end w-100",clean:re=>Xe(re,D),format:it,label:`Balance for ${D.name}`,setValue:re=>{i(D.resourceId,re+D.used)},style:{padding:"0.1rem 0.5rem"},value:U(D)}):a.jsx("span",{children:it(U(D))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:D.unit})]})},formatHeader:M=>a.jsxs(a.Fragment,{children:[M,E?a.jsx(yo,{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:(M,D)=>{const re=-1*(D.requested-D.allocated)*D.exchangeRates.current.unitCost;return re!==0?a.jsxs("span",{className:`badge bg-${re>0?"primary":"danger"} rounded-pill`,children:[re>0?"+":"",it(re,te)," ",te.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[_.length?a.jsx(a2,{requestId:e}):null,te&&(y||v||h)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[Tn(ne.resourceTypeIcons.credit)," ",it(te.requested,te)," ",te.unit," available to exchange"]}),v||h?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:O,children:[Tn(ne.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,T,ue.length?a.jsx(mn,{columns:Ie,rows:ue,rowClasses:Ce,classes:ee.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."}),ee.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:ee,onChange:M=>r(M.value),placeholder:De,value:null,"aria-label":De,formatOptionLabel:({value:M,label:D})=>{const de=X[M];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(_n,{resource:de,userGuide:!1},D)}),a.jsx("span",{children:me(de)})]})}})}),ue.length?null:a.jsx(yo,{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:ne.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,y&&E?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:M=>l(M.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||!H&&!L&&!A,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:x,type:"button",className:"btn btn-secondary",disabled:g||!H||!L||P||Z,onClick:f,children:g?"Submitting...":"Submit for Approval"})]}),H&&!P?a.jsx(yo,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:x,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 u2({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=ut(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":"",x=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)))},v=b=>{const S=parseInt(b.target.value,10),j=b.target.checked?[...f,S]:f.filter(C=>C!=S);o(d,i,j)},h=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"?h:x})}else if(c=="textarea")g=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:x});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?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 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"?h:v}),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}),g]})}function d2({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=ut(e,t),{project:s}=kt(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?"+":"",it(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ce,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Complete Your Exchange"})}),a.jsxs(ce.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(u2,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ce.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 _w({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 f2({requestId:e,grantNumber:t}){const{project:n}=kt(t),{request:r,closeUsageDetailModal:o}=ut(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Ve.pending)s=a.jsx(Ur,{});else if(r.usageDetailStatus==Ve.error)s=a.jsx(Se,{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}=ii(c),m=r.resources.find(h=>h.resourceRepositoryKey==u),x=h=>it(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 v=[{key:"name",name:"Name",format:(h,{lastName:g,firstName:b,portalUsername:S})=>{const j=y[S];return j?a.jsx(_w,{user:j}):`${g}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:h=>{const g=y[h],b=g?g.resourceUsernames[m.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:h=>jx[h].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:x},{key:"lastMonth",name:"Last Month",class:"text-end",format:x},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:x},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:x},{key:"total",name:"All Time",class:"text-end",format:x}];s=d.length?a.jsx(mn,{rows:d,columns:v}):a.jsx(Se,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ce,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:i})}),a.jsx(ce.Body,{children:s})]})}var p2=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function h2(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=vn(e,p2),p=f.inputValue,m=w.useRef(void 0),x=w.useRef(!1),y=w.useState(Array.isArray(n)?n:void 0),v=ze(y,2),h=v[0],g=v[1],b=w.useState(typeof p<"u"?p:""),S=ze(b,2),j=S[0],C=S[1],E=w.useState(n===!0),_=ze(E,2),N=_[0],R=_[1],O=w.useState(void 0),k=ze(O,2),P=k[0],U=k[1],F=w.useState([]),V=ze(F,2),Z=V[0],T=V[1],L=w.useState(!1),A=ze(L,2),H=A[0],B=A[1],X=w.useState({}),J=ze(X,2),ee=J[0],Q=J[1],te=w.useState(void 0),ue=ze(te,2),Ce=ue[0],De=ue[1],Xe=w.useState(void 0),me=ze(Xe,2),Ie=me[0],M=me[1];o!==Ie&&(Q({}),M(o)),n!==Ce&&(g(Array.isArray(n)?n:void 0),De(n)),w.useEffect(function(){return x.current=!0,function(){x.current=!1}},[]);var D=w.useCallback(function(dt,ot){if(!s)return ot();var be=s(dt,ot);be&&typeof be.then=="function"&&be.then(ot,function(){return ot()})},[s]);w.useEffect(function(){n===!0&&D(j,function(dt){x.current&&(g(dt||[]),R(!!m.current))})},[]);var de=w.useCallback(function(dt,ot){var be=UP(dt,ot,c);if(!be){m.current=void 0,C(""),U(""),T([]),R(!1),B(!1);return}if(o&&ee[be])C(be),U(be),T(ee[be]),R(!1),B(!1);else{var qt=m.current={};C(be),R(!0),B(!P),D(be,function($t){x&&qt===m.current&&(m.current=void 0,R(!1),U(be),T($t||[]),B(!1),Q($t?W(W({},ee),{},ao({},be,$t)):ee))})}},[o,D,P,ee,c]),re=H?[]:j&&P?Z:h||[];return W(W({},f),{},{options:re,isLoading:N||l,onInputChange:de,filterOption:d})}var m2=w.forwardRef(function(e,t){var n=h2(e),r=Ab(n);return w.createElement(Ep,G({ref:t},r))}),g2=m2;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 v2({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=kt(e),{request:d}=n?ut(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,x=n.usersStatus==c.success,y=n.usersStatus==c.error,v=n.users,h=d.resources.filter(ld),g=h.length==0,b=v.find(R=>R.hasChanges)!==void 0,S=v.find(R=>R.role!="pi")!==void 0;let j;x&&!b?j=a.jsx(Se,{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?j=a.jsx(Se,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?h.length?g&&(j=a.jsx(Se,{color:"warning",children:"This project does not have any active resources."})):j=a.jsxs(Se,{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."]}):j=a.jsxs(Se,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Uf(n)," to request a change."]});const C=(R,O)=>{let k,P,U,F;if(O.key=="all"){k="all resources for all users",P=V=>u(V),U=0;for(let V of v)U+=V.resourceIds.length;F=v.length*h.length}else k=`all users for ${O.name}`,P=V=>u(V,null,O.key),U=v.filter(({resourceIds:V})=>V.includes(O.key)).length,F=v.length;return a.jsxs(a.Fragment,{children:[O.key=="all"?R:a.jsx(_n,{resource:O,userGuide:!1}),a.jsx("br",{}),a.jsx(Rd,{description:k,disabled:O.disabled,onChange:P,selectedLength:U,totalLength:F})]})},E=$l.map(({role:R,name:O})=>a.jsx("option",{value:R,children:O},R)),_=[{key:"name",name:"Name",width:200,format:(R,O)=>a.jsx(_w,{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:k=>l(O.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:E.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];h.length&&_.push({key:"all",name:"All Resources",class:`text-center ${_r.important}`,disabled:!f||g,width:100,format:(R,O)=>a.jsx(Rd,{description:`all users for ${O.name}`,disabled:!f||g,onChange:k=>u(k,O.username),selectedLength:O.resourceIds.length,totalLength:h.length}),formatHeader:C});for(let R of h)_.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(O,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:C});const N=v.map(R=>R.hasChanges?_r.edited:"");return a.jsxs(a.Fragment,{children:[j,a.jsx(mn,{rows:v,columns:_,frozenColumns:h.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&h.length&&!g?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(g2,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await qE(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&&(h.length&&!g||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 y2=(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}},x2=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:b2(t)},t))})]}):null;function b2(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const Ao={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:[]},Ew=Lr({name:"publicationEdit",initialState:Ao,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(Ao))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:w2,changePublicationType:Nd,dataLoaded:S2,deleteAuthor:j2,hideError:Rw,setFormValid:C2,setGrantNumber:Nw,setPublication:_2,setPublicationId:E2,setShowEditModal:kw,resetState:R2,toggleRequest:N2,toggleTag:tD,updateAuthor:k2,updateErrors:Xs,updateField:O2,updatePublication:va,updateSaving:eu,updateSelectedTags:T2,updateShowSaved:Ow}=Ew.actions,P2=e=>e.publicationEdit.publication,I2=e=>e.publicationEdit.publication.doi,$2=e=>e.publicationEdit.publication_types,Tw=e=>e.publicationEdit.publication.authors,M2=e=>e.publicationEdit.tag_categories,A2=e=>e.publicationEdit.projects,D2=e=>e.publicationEdit.publication.tags,F2=e=>e.publicationEdit.errors,Pw=e=>e.publicationEdit.data_loaded,Iw=e=>e.publicationEdit.publicationId,L2=e=>e.publicationEdit.showEditModal,U2=e=>e.publicationEdit.show_saved,nc=e=>e.publicationEdit.saving,$w=e=>e.publicationEdit.form_valid,V2=e=>e.publicationEdit.grant_number,z2=e=>!nc(e)&&Pw(e)&&$w(e)&&Mw(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0,Mw=e=>{const t=Tw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},B2=()=>async(e,t)=>{const n=t().publicationEdit.publication.doi,r="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(ne.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(Nd(s?s.publication_type:"Other")),e(_2(o))}else e(Xs(r))},()=>{e(Xs(r))})},q2=()=>async(e,t)=>{const n=t().publicationEdit.grant_number;await fetch(ne.routes.publications_find_project_path({grant_number:n})).then(r=>r.json()).then(r=>{e(w2(r)),e(Nw(""))},()=>{e(Xs("Unable to find a project with this grant number."))})},Np=e=>async t=>{t(E2(e)),t(kw(!0))},Aw=e=>async t=>{const n=e?`${ne.routes.edit_publication_path(e)}.json`:ne.routes.publication_path("new.json");await fetch(n,{headers:{accept:"application/json"}}).then(r=>r.json()).then(r=>{t(S2(r))})},H2=()=>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}=y2(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(x=>{e(Rw(x.id))});const m=x2(c);e(Xs(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=ne.routes.publication_path(s.publication_id),p="PATCH"):(f=ne.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(R2()),e(Aw())),e(Ow(!0)),e(eu(!1))},()=>{e(eu(!1)),e(Xs("There was an error saving this publication."))})},fi=Ew.reducer,hn=rt("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(ne.routes.search_publications_path(r),{headers:{Accept:"application/json"}})).json()}),kp=rt("publicationsSearch/getFilters",async()=>(await(await fetch(ne.routes.search_publications_filters_path())).json()).filters||[]),Zs={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},Dw=Lr({name:"publicationsSearch",initialState:Zs,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(hn.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(hn.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(hn.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(kp.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{addCreatedByUsername:W2,removeCreatedByUsername:K2,resetFilters:Y2,resetPublications:Rg,setUsePagination:Op,updateFilterSelection:kd}=Dw.actions,G2=e=>e.publicationsSearch.filterSelections,Q2=e=>e.publicationsSearch.publicationsLoaded,Fw=e=>e.publicationsSearch.publications,X2=e=>e.publicationsSearch.filterOptions,Z2=e=>e.publicationsSearch.page,J2=e=>e.publicationsSearch.usePagination,rc=Dw.reducer;function eM({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(Ur,{})]})}const tM="_citation_ru41y_1",nM="_tags_ru41y_7",Ng={citation:tM,tags:nM},rM=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Lw=e=>{const t=(e||"").match(rM);return t?t[0]:null};function Uw({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(v=>`${v.last_name}, ${v.first_name.substr(0,1)}.`).join(", "),p=s||"N/A",m=i.endsWith(".")?i:`${i}.`,x=Lw(n),y=x?a.jsx("a",{href:`https://doi.org/${x}`,target:"_blank",rel:"noreferrer",children:x}):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 oM({allowEdit:e=!0,last:t=!1,publication:n}){const r=ge(),{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:Ng.citation,children:[a.jsx(Uw,{publication:n}),e&&n.can_edit&&a.jsx(Io,{onClick:()=>r(Np(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:Ng.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}=ii(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=ge(),{current:r,last:o}=Y(Z2),s=Y(Q2),i=Y(J2),l=Y(Fw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(eM,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(hn()),children:l.map((c,u)=>a.jsx(oM,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function sM(){const e=ge(),t=Y(I2);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(B2()),children:"Lookup Publication"})]})]})})}const iM=({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"})})})]})},aM=e=>({updateAuthor:t=>e(k2(t)),deleteAuthor:t=>e(j2(t))}),lM=T_(null,aM)(iM);function cM(){const e=ge(),t=Y(Tw),n=Y(Mw),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(lM,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Eg()),children:"Add Author"})]})}function uM({category:e,index:t}){const n=ge(),r=Y(D2),o=w.useRef(null),s=()=>{const l=r.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n(T2({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 dM(){const e=ge(),t=Y(A2),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(N2(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function fM(){const e=ge(),t=Y(V2);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(Nw(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(q2()),children:"Find Project"})]})]})})}function pM(){const e=ge(),t=Y(P2),n=Y($2),r=Y(M2);Y(z2);const o=Y($w),s=p=>{e(C2(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:x=>e(O2({index:m,value:x.target.value}))})]})},`field_${p.csl_field_name}`)),l=()=>{const p=new Date().getFullYear()+2;let m=1980;const x=[];for(;m<=p;)x.push(m++);const y=["January","February","March","April","May","June","July","August","September","October","November","December"],v=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 ",v]}),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:x.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,g)=>a.jsx("option",{value:g+1,children:h},`month_${g}`))})]})})]})},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(sM,{}),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(Nd(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(yo,{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(cM,{})})]}),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(yo,{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(uM,{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(yo,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(dM,{}),a.jsx("hr",{}),a.jsx(fM,{})]})]});return a.jsxs(a.Fragment,{children:[c,u,d,f]})}function Vw(){const e=ge(),t=Y(Pw),n=Y(Iw);return w.useEffect(()=>{e(Aw(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(pM,{}):a.jsx(Ur,{})})}function Pp(){const e=ge(),t=Y(L2),n=Y(Iw),r=o=>{o&&e(H2()),e(kw(!1))};return a.jsx(a.Fragment,{children:a.jsxs(ce,{size:"xl",show:t,onHide:()=>r(!1),scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsxs(ce.Title,{children:[n?"Edit":"Add"," Publication"]})}),a.jsx(ce.Body,{children:a.jsx(Vw,{})}),a.jsx(ce.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 hM({grantNumber:e}){const t=ge(),n=Y(nc);return w.useEffect(()=>{n||(t(kd({name:"grantNumber",value:e})),t(Op(!1)),t(hn()))},[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 mM({grantNumber:e}){const t=w.useRef(zn({reducer:{publicationEdit:fi,publicationsSearch:rc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{store:t.current,children:a.jsx(hM,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:ne.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function gM({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,setRequest:o,setTab:s}=kt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(Se,{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(Se,{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:yR.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(Se,{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(Se,{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(NN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(ts,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(aT,{requestId:e,grantNumber:t})}),a.jsx(ts,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(c2,{requestId:e})}),a.jsx(ts,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(v2,{grantNumber:t})}),a.jsx(ts,{eventKey:"publications",title:"Publications",children:a.jsx(mM,{grantNumber:t,requestId:e})}),a.jsx(ts,{eventKey:"history",title:"History",children:a.jsx(AO,{requestId:e})})]}),a.jsx(PO,{grantNumber:t,requestId:e}),a.jsx(IO,{grantNumber:t,requestId:e}),a.jsx($O,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(d2,{grantNumber:t,requestId:e}),a.jsx(f2,{grantNumber:t,requestId:e})]})}function vM({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=ut(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 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 yM({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=kt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(Se,{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(vM,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(gM,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${Cm.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:Cm.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($o,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function xM({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=hR(e);if(r)return a.jsx(Ur,{});if(n)return a.jsxs(Se,{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(yM,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const zw={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:[]}},bM=rt("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(qw(!0))),await n(Od()),await n(Rr()),n(wM())}),wM=rt("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(Bw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),Od=rt("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(Bw(i.filters))}),Rr=rt("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=Lr({name:"projectsBrowser",initialState:zw,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(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(Od.pending,t=>{t.filtersLoaded=!1}).addCase(Od.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:SM,setApiUrl:nD,setShowPagination:kg,setTypeLists:Bw,toggleAllFos:jM,toggleFos:CM,toggleListFiltered:qw,toggleSingleEntry:Og,updateFilter:Td,updatePageData:Pd}=Ip.actions,_M=e=>e.projectsBrowser.filters,EM=e=>e.projectsBrowser.filtersLoaded,RM=e=>e.projectsBrowser.listIsFiltered,NM=e=>e.projectsBrowser.singleEntry,kM=e=>e.projectsBrowser.projectsLoaded,OM=e=>e.projectsBrowser.pageData,TM=e=>e.projectsBrowser.projects,PM=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,IM=e=>e.projectsBrowser.typeLists,$M=Ip.reducer;const MM=()=>{const e=ge(),t=Y(_M),n=Y(IM),r=Y(RM),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(kg(!1)),e(Pd({current_page:1})),e(Rr())},f=()=>{l(null),e(kg(!1)),e(Pd({current_page:1})),e(SM()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=y=>{e(qw(y))},m=y=>{l(y),e(Td({name:"org",value:y.value}))},x=()=>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(jM())}}),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(CM(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,v)=>a.jsx("option",{value:y,children:y},`allocation_type_${v}`))]})}),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,v)=>a.jsx("option",{value:y.resourceId,children:y.resourceName},`resource_${v}`))]})}),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:x(),onClick:f,children:"Reset"})]})]})})};const Tg=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),Pg=({publication:e,index:t,fontSize:n="18px"})=>{const r=e.authors.map(p=>`${p.last_name}, ${p.first_name.substring(0,1)}.`).join(", "),o=e.projects.map(p=>p.grant_number),s=e.publication_type==="Other"?"Publication":e.publication_type,i=e.projects,l=t%2==0?"bg-light":"",c={textIndent:"-50px",marginLeft:"50px",fontSize:n},u=e.publication_datas??[],d=p=>{switch(p){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/${Tg(e.doi)}`,target:"_blank",className:"fw-normal",children:Tg(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return u["Volume/Issue"]?u["Volume/Issue"]:!1;case"Pages":return u.Pages?u.Pages:!1;case"Publisher":return u.Publisher?u.Publisher:!1}},f=()=>{const p=d("Publication Year");let m=e.title;const x=d("Journal"),y=d("DOI"),v=d("Volume/Issue"),h=d("Pages"),g=d("Publisher");return m[m.length-1]!="."&&(m+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,x?a.jsxs("em",{className:"ms-1",children:[x,"."]}):"",v?a.jsxs("span",{className:"ms-1",children:[v,","]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,x?a.jsxs("em",{className:"ms-1",children:[x,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),g?a.jsxs("em",{className:"ms-1",children:[g,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m})," [Dataset]. ",g||"",".",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),". [Doctoral dissertation",g?", "+g:"","].",y?a.jsx("span",{className:"ms-1",children:y}):""]}):""};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 ${l}`,children:[a.jsx("p",{style:c,children:f()}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",s]}),a.jsx("ul",{style:{...c,listStyleType:"none"},children:o.map((p,m)=>a.jsx("li",{id:`project_${m}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${p}`,id:`grant_link${m}`,target:"_blank",style:{fontWeight:"600"},children:p})},`grant_${m}`))})]})]})})})},AM=({project:e})=>{var E;const t=e.resources,[n,r]=w.useState(!1),[o,s]=w.useState(!1),[i,l]=w.useState(!1);Y(NM);const c=e.abstract.length>=300,u=c?`${e.abstract.substring(0,300)}...`:e.abstract,d=_=>{let N=_.units?_.units:_.resourceUnits;const R=_.allocation?_.allocation:_.amount;if(N=="[Yes = 1, No = 0]"||N=="Yes / No")return R=="1.0"?"Yes":"No";{let O="0";return parseInt(R)&&(O=parseInt(R).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),N=="ACCESS Credits"&&(N=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),N=="Dollars"?`$${O}`:a.jsxs(a.Fragment,{children:[O," ",N]})}},f=()=>{const{origin:_,pathname:N}=window.location,R=`${_}${N}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(R),setTimeout(()=>r(!1),2e3)},p=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",m=a.jsx(Vl,{id:"link-tooltip",children:"Link Copied!"}),x=()=>{if(p()){const _={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(dp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:m,children:a.jsx("button",{onClick:f,style:_,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,{})},y=()=>{const _=e.pi.split(",");return`${_[1]} ${_[0]}`},v=()=>!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(_=>`${_.name} (${_.organization})`).join(";")]})]}),h=()=>!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:[p()," Start-Up: ",y(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[p()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),v()]}),b=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((_,N)=>a.jsxs("tr",{children:[a.jsx("td",{children:_.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:d(_)})]},`resource_${e.requestId}_${N}`))})]}),S=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:b})})]}),j=a.jsxs(ce,{show:o,onHide:()=>s(!1),id:`publicationsModal_${e.projectId}`,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:e.requestTitle})}),a.jsx(ce.Body,{children:(E=e==null?void 0:e.publications)==null?void 0:E.map((_,N)=>a.jsx("div",{children:a.jsx(Pg,{publication:{..._,projects:[]},index:N})},`publication_${N}`))}),a.jsx(ce.Footer,{children:a.jsx("button",{type:"button",className:"btn btn-secondary","data-bs-dismiss":"modal",onClick:()=>s(!1),children:"Close"})})]}),C=()=>{var _,N;return e.allocationType==="NAIRR Start-Up"?S:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row fw-bold mt-2 border-bottom",children:a.jsx("span",{className:"col mb-1 pb-0",children:"Abstract"})}),a.jsx("div",{style:{whiteSpace:"pre-wrap",display:"inline"},children:i?e.abstract:u}),c&&a.jsx("button",{onClick:()=>l(!i),style:{display:"inline",border:"none",background:"none",cursor:"pointer",fontWeight:"bold"},children:i?"Show Less":"Read More"}),a.jsxs("div",{className:"row mt-2",children:[a.jsxs("div",{className:"col-lg-6 left-panel flex-fill",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Resources"})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:b})})]}),((_=e==null?void 0:e.publications)==null?void 0:_.length)>0&&a.jsxs("div",{className:"col-lg-6 right-panel",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Publications"})})}),a.jsx("div",{className:"mt-2 pb-0",children:a.jsx(Pg,{publication:{...e.publications[0],projects:[]},index:0,fontSize:"16px"})},`publication_${e.projectId}_0`),((N=e==null?void 0:e.publications)==null?void 0:N.length)>1&&a.jsxs("button",{className:"btn btn-primary",onClick:()=>s(!0),children:["View More (",e.publications.length,")"]}),j]})]})]})};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:x()})]})}),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:h()})]}),C()]})]})},DM=()=>{const e=Y(TM);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(AM,{project:t},`project_${n}`))})};const Ig=()=>{const e=ge(),t=Y(OM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(v,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{m()},[t]);const u=v=>{const h=parseInt(v);e(Pd({current_page:v})),e(Rr(h))},d=v=>(event.preventDefault(),s("0"),u(v),!1),f=()=>{u(parseInt(t.current_page)+1)},p=()=>{u(parseInt(t.current_page)-1)},m=()=>{const v=[];if(t.last_page>l)if(t.current_page>4){v.push(1),v.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&v.push(t.current_page-h);v.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&v.push(t.current_page+h);t.last_page-t.current_page>1&&(v.push("spacer"),v.push(t.last_page))}else[1,2,3,4,5].forEach(g=>{g==t.current_page?v.push(["current",g]):v.push(g)}),v.push("spacer"),v.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?v.push(["current",h]):v.push(h);r(v)},x=v=>{let h="";return typeof v=="object"?[v,h]=v:h=v,v=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):v=="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(v),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:v=>d(v.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(v=>a.jsx("option",{value:v+1,children:v+1},`page_option_${v}`))]})});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:p,disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((v,h)=>a.jsx(Re.Fragment,{children:x(v)},`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:f,disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},FM=({api_url:e})=>{const t=ge(),n=Y(kM),r=Y(EM),o=Y(PM),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(bM())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(MM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ig,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(DM,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ig,{scroll:"projects_browser_app"}):""})})]})]})})};function Hw(){const e=ge();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(Np(null)),children:"Add a New Publication"})}function Ww(){const e=ge(),t=Y(F2),n=Y(U2);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(Ow(!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(Rw(r.id))})]},`err_${r.id}`))]})}function LM(){const e=ge(),t=Y(nc);return w.useEffect(()=>{t||(e(Op(!1)),e(hn()),e(kp()))},[e,t]),a.jsxs(a.Fragment,{children:[a.jsx(Ww,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsx(Hw,{})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const UM=()=>{const e=ge(),t=Y(X2),n=Y(G2),r=()=>{e(Rg()),window.scrollTo(0,0),e(hn())},o=()=>{e(Rg()),e(Y2()),window.scrollTo(0,0),e(hn())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(kd({name:l.target.name,value:l.target.value}))},i=l=>{e(kd({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:Lw(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"})]})]})})},VM=()=>{const e=ge();return w.useEffect(()=>{e(hn()),e(kp())},[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(UM,{})}),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})})})})]})})})},Kw={selected:[]},Yw=Lr({name:"publicationsSelect",initialState:Kw,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:zM,toggleSelected:BM,clearSelected:rD}=Yw.actions,qM=e=>e.publicationsSelect.selected,HM=Yw.reducer;function WM({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=ge(),o=Y(nc),s=Y(qM),i=Y(Fw);w.useEffect(()=>{o||(r(Op(!1)),r(hn()))},[o,r]);const l=[{key:"publication",name:"Publication",format:(c,u)=>a.jsxs(a.Fragment,{children:[a.jsx(Uw,{publication:u}),t&&u.can_edit&&a.jsx(Io,{onClick:()=>r(Np(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(BM(c))})},formatHeader:()=>a.jsx(Rd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(zM(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(mn,{columns:l,rows:i}),e&&a.jsx(Hw,{}),a.jsx(Pp,{})]})}function KM(){const e=ge();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(W2(t.detail.username))),addEventListener("requestRemoveRole",t=>e(K2(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(Ww,{}),a.jsx(WM,{allowSelect:!0})]})}const YM={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=rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t($g(!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(ZM({data:r,params:e})),t($g(!0))});rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(eA(e)),t(Qw())});const GM=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)}))},QM=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}=XM(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,XM=(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}},Gw=Lr({name:"resourceCatalog",initialState:YM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=QM(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=GM(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:ZM,processData:oD,resetFilters:JM,setResourcesLoaded:$g,toggleCatalog:eA,toggleFilter:Qw}=Gw.actions,Xw=e=>e.resourceCatalog.catalogs,tA=e=>e.resourceCatalog.filters,nA=e=>e.resourceCatalog.hasErrors,rA=e=>e.resourceCatalog.resourcesLoaded,oA=e=>e.resourceCatalog.filteredResources,sA=Gw.reducer,iA="_access_1yrq0_2",aA="_resourceName_1yrq0_6",lA="_description_1yrq0_11",cA="_filterBar_1yrq0_15",uA="_cardBg_1yrq0_20",dA="_active_1yrq0_25",fA="_plainButton_1yrq0_30",pA="_btnSecondary_1yrq0_40",hA="_filtersHidden_1yrq0_51",mA="_filtersVisible_1yrq0_57",Dt={access:iA,resourceName:aA,description:lA,filterBar:cA,cardBg:uA,active:dA,plainButton:fA,btnSecondary:pA,filtersHidden:hA,filtersVisible:mA},gA=({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"})]})})]})})})})},vA=({filter:e})=>{const t=ge(),n=()=>{t(Qw(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})]})})})},yA=({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(vA,{filter:t},t.featureId))]})}),xA=({onReset:e})=>{const t=ge(),n=Y(Xw),r=Y(tA),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(yA,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(JM()),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"})]})},bA=()=>{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(xA,{onReset:r})})]})})})})},wA=()=>{const e=Y(oA);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(bA,{}),e.map(t=>a.jsx(gA,{resource:t},t.resourceId))]})})},SA=({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"}),"."]})]})})]}),jA=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=ge(),o=Y(rA),s=Y(nA),i=Y(Xw),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 ${Dt.access}`,children:[t?a.jsx(SA,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(wA,{})})})]}):a.jsx(Ur,{})},CA={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=rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(EA({data:r,params:e}))}),_A=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)}))},Mg=(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)},Zw=Lr({name:"resourceCatalog",initialState:CA,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(x=>x.categoryIsFilter).forEach(x=>{const y=x.categoryId;x.categoryName=="ACCESS Resource Grouping"?p=x.features[0].name:(!u[y]&&Mg(i,r,x.categoryName)&&(u[y]={categoryId:y,categoryName:x.categoryName,categoryDescription:x.categoryDescription,features:{}}),x.features.forEach(v=>{const h={featureId:v.featureId,name:v.name,description:v.description,categoryId:y,selected:!1},g=Mg(l,o,h.name);g&&f.push(h),u[y]&&g&&!u[y].features[v.featureId]&&(u[y].features[v.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(x=>x.name).sort((x,y)=>x>y),featureIds:f.map(x=>x.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,x)=>m.name>x.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=_A(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:EA,processData:sD,resetFilters:RA,toggleFilter:NA}=Zw.actions,kA=e=>e.resourceCatalog.hasErrors,OA=e=>e.resourceCatalog.resourcesLoaded,TA=e=>e.resourceCatalog.filters,PA=e=>e.resourceCatalog.filteredResources,IA=Zw.reducer,$A=({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(fa.Item,{eventKey:e.resourceId,children:[a.jsx(fa.Header,{children:e.resourceName}),a.jsxs(fa.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)]})]})},MA=()=>{const e=Y(PA);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(fa,{children:e.map(t=>a.jsx($A,{resource:t},t.resourceId))})]})},AA=({filter:e})=>{const t=ge(),n=()=>{t(NA(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})]})})})},DA=({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(AA,{filter:t},t.featureId))]})}),FA=()=>{const e=ge(),t=Y(TA),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(DA,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(RA()),disabled:n.length==0,children:"Reset Filters"})]})},LA=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=ge(),l=Y(OA),c=Y(kA);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(FA,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(MA,{})})]})}):a.jsx(Ur,{})};function UA(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 VA({target:e}){bt.createRoot(e).render(a.jsx(lE,{}))}function zA({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){bt.createRoot(o).render(a.jsx(RE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function BA({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){bt.createRoot(t).render(a.jsx(Px,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function qA({target:e,username:t,routes:n}){ai(n);const r=zn({reducer:{api:pR}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(xM,{username:t})}))}function HA({target:e,apiUrl:t}){const n=zn({reducer:{projectsBrowser:$M},preloadedState:{projectsBrowser:{...zw,apiUrl:t}}});bt.createRoot(e).render(a.jsx(Bn,{store:n,children:a.jsx(FM,{})}))}function WA({target:e,routes:t,authenticityToken:n}){ai(t);const r=zn({reducer:{publicationsSearch:rc,publicationEdit:fi},preloadedState:{publicationEdit:{...Ao,authenticityToken:n}}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(VM,{})}))}function KA({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=zn({reducer:{publicationEdit:fi},preloadedState:{publicationEdit:{...Ao,authenticityToken:r}}});ai(n),bt.createRoot(t).render(a.jsx(Bn,{store:o,children:a.jsx(Vw,{publicationId:e})}))}function YA({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=zn({reducer:{publicationEdit:fi,publicationsSearch:rc,publicationsSelect:HM},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:o}},publicationEdit:{...Ao,authenticityToken:e},publicationsSelect:{...Kw,selected:n}}});ai(t),bt.createRoot(r).render(a.jsx(Bn,{store:s,children:a.jsx(KM,{})}))}function GA({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=zn({reducer:{resourceCatalog:sA}});bt.createRoot(e).render(a.jsx(Bn,{store:o,children:a.jsx(jA,{catalogSources:t,onRamps:n,baseUrl:r})}))}function QA({authenticityToken:e,routes:t,target:n,username:r}){ai(t);const o=zn({reducer:{publicationEdit:fi,publicationsSearch:rc},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:[r]}},publicationEdit:{...Ao,authenticityToken:e}}});bt.createRoot(n).render(a.jsx(Bn,{store:o,children:a.jsx(LM,{})}))}function XA({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=zn({reducer:{resourceCatalog:IA}});bt.createRoot(e).render(a.jsx(Bn,{store:l,children:a.jsx(LA,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function ZA({allocationTypes:e,target:t}){bt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=VA;exports.editResource=BA;exports.keywords=ZA;exports.myPublications=QA;exports.onRampsResourceCatalog=GA;exports.projects=qA;exports.projectsBrowser=HA;exports.publicationEdit=KA;exports.publicationsBrowser=WA;exports.publicationsSelect=YA;exports.resourceCatalog=XA;exports.resources=zA;exports.shadowTarget=UA;