From 292021609c29561b0a3bdf6f49ed678723cc0ee9 Mon Sep 17 00:00:00 2001 From: ryanweiler92 Date: Wed, 21 Feb 2024 12:22:48 -0500 Subject: [PATCH] Updates --- assets/{index-rFih6al8.js => index-DS7c_w5r.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-rFih6al8.js => index-DS7c_w5r.js} (98%) diff --git a/assets/index-rFih6al8.js b/assets/index-DS7c_w5r.js similarity index 98% rename from assets/index-rFih6al8.js rename to assets/index-DS7c_w5r.js index d2ca14d..6fc2956 100644 --- a/assets/index-rFih6al8.js +++ b/assets/index-DS7c_w5r.js @@ -353,4 +353,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qs=_;function kI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CI=typeof Object.is=="function"?Object.is:kI,_I=Qs.useSyncExternalStore,TI=Qs.useRef,PI=Qs.useEffect,EI=Qs.useMemo,$I=Qs.useDebugValue;Mx.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=TI(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=EI(function(){function l(p){if(!u){if(u=!0,c=p,p=n(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return d=y}return d=p}if(y=d,CI(c,p))return y;var S=n(p);return o!==void 0&&o(y,S)?y:(c=p,d=S)}var u=!1,c,d,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,n,o]);var a=_I(e,i[0],i[1]);return PI(function(){s.hasValue=!0,s.value=a},[a]),$I(a),a};Ax.exports=Mx;var zI=Ax.exports,St="default"in pl?Gn:pl,Ey=Symbol.for("react-redux-context"),$y=typeof globalThis<"u"?globalThis:{};function RI(){if(!St.createContext)return{};const e=$y[Ey]??($y[Ey]=new Map);let t=e.get(St.createContext);return t||(t=St.createContext(null),e.set(St.createContext,t)),t}var mn=RI(),AI=()=>{throw new Error("uSES not initialized!")};function Mp(e=mn){return function(){return St.useContext(e)}}var jx=Mp(),Dx=AI,MI=e=>{Dx=e},jI=(e,t)=>e===t;function DI(e=mn){const t=e===mn?jx:Mp(e),r=(n,o={})=>{const{equalityFn:i=jI,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:a,subscription:l,getServerState:u,stabilityCheck:c,identityFunctionCheck:d}=t();St.useRef(!0);const f=St.useCallback({[n.name](y){return n(y)}}[n.name],[n,c,s.stabilityCheck]),p=Dx(l.addNestedSub,a.getState,u||a.getState,f,i);return St.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var Ix=DI();function II(e){e()}function FI(){let e=null,t=null;return{clear(){e=null,t=null},notify(){II(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var zy={notify(){},get:()=>[]};function OI(e,t){let r,n=zy,o=0,i=!1;function s(S){c();const C=n.subscribe(S);let g=!1;return()=>{g||(g=!0,C(),d())}}function a(){n.notify()}function l(){y.onStateChange&&y.onStateChange()}function u(){return i}function c(){o++,r||(r=t?t.addNestedSub(l):e.subscribe(l),n=FI())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=zy)}function f(){i||(i=!0,c())}function p(){i&&(i=!1,d())}const y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>n};return y}var LI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BI=LI?St.useLayoutEffect:St.useEffect;function VI({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const s=St.useMemo(()=>{const u=OI(e);return{store:e,subscription:u,getServerState:n?()=>n:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,n,o,i]),a=St.useMemo(()=>e.getState(),[e]);BI(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);const l=t||mn;return St.createElement(l.Provider,{value:s},r)}var NI=VI;function Fx(e=mn){const t=e===mn?jx:Mp(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var WI=Fx();function UI(e=mn){const t=e===mn?WI:Fx(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var HI=UI();MI(zI.useSyncExternalStoreWithSelector);const GI=IA({styles:{global:{body:{bg:"#242424",color:"white"}}}});function Be(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 KI=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ry=KI,pd=()=>Math.random().toString(36).substring(7).split("").join("."),YI={INIT:`@@redux/INIT${pd()}`,REPLACE:`@@redux/REPLACE${pd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pd()}`},ru=YI;function jp(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 Ox(e,t,r){if(typeof e!="function")throw new Error(Be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Ox)(e,t)}let n=e,o=t,i=new Map,s=i,a=0,l=!1;function u(){s===i&&(s=new Map,i.forEach((C,g)=>{s.set(g,C)}))}function c(){if(l)throw new Error(Be(3));return o}function d(C){if(typeof C!="function")throw new Error(Be(4));if(l)throw new Error(Be(5));let g=!0;u();const h=a++;return s.set(h,C),function(){if(g){if(l)throw new Error(Be(6));g=!1,u(),s.delete(h),i=null}}}function f(C){if(!jp(C))throw new Error(Be(7));if(typeof C.type>"u")throw new Error(Be(8));if(typeof C.type!="string")throw new Error(Be(17));if(l)throw new Error(Be(9));try{l=!0,o=n(o,C)}finally{l=!1}return(i=s).forEach(h=>{h()}),C}function p(C){if(typeof C!="function")throw new Error(Be(10));n=C,f({type:ru.REPLACE})}function y(){const C=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Be(11));function h(){const b=g;b.next&&b.next(c())}return h(),{unsubscribe:C(h)}},[Ry](){return this}}}return f({type:ru.INIT}),{dispatch:f,subscribe:d,getState:c,replaceReducer:p,[Ry]:y}}function XI(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ru.INIT})>"u")throw new Error(Be(12));if(typeof r(void 0,{type:ru.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function qI(e){const t=Object.keys(e),r={};for(let i=0;i"u")throw a&&a.type,new Error(Be(14));u[d]=y,l=l||y!==p}return l=l||n.length!==Object.keys(s).length,l?u:s}}function nu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function QI(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(Be(15))};const s={getState:o.getState,dispatch:(l,...u)=>i(l,...u)},a=e.map(l=>l(s));return i=nu(...a)(o.dispatch),{...o,dispatch:i}}}function ZI(e){return jp(e)&&"type"in e&&typeof e.type=="string"}var Lx=Symbol.for("immer-nothing"),Ay=Symbol.for("immer-draftable"),_t=Symbol.for("immer-state");function Xt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ti=Object.getPrototypeOf;function gn(e){return!!e&&!!e[_t]}function Fr(e){var t;return e?Bx(e)||Array.isArray(e)||!!e[Ay]||!!((t=e.constructor)!=null&&t[Ay])||Yu(e)||Xu(e):!1}var JI=Object.prototype.constructor.toString();function Bx(e){if(!e||typeof e!="object")return!1;const t=ti(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===JI}function js(e,t){Ku(e)===0?Object.entries(e).forEach(([r,n])=>{t(r,n,e)}):e.forEach((r,n)=>t(n,r,e))}function Ku(e){const t=e[_t];return t?t.type_:Array.isArray(e)?1:Yu(e)?2:Xu(e)?3:0}function Lf(e,t){return Ku(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vx(e,t,r){const n=Ku(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yu(e){return e instanceof Map}function Xu(e){return e instanceof Set}function Rn(e){return e.copy_||e.base_}function Bf(e,t){if(Yu(e))return new Map(e);if(Xu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Bx(e))return ti(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[_t];let n=Reflect.ownKeys(r);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=tF),Object.freeze(e),t&&js(e,(r,n)=>Dp(n,!0))),e}function tF(){Xt(2)}function qu(e){return Object.isFrozen(e)}var rF={};function Zn(e){const t=rF[e];return t||Xt(0,e),t}var Ds;function Nx(){return Ds}function nF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function My(e,t){t&&(Zn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vf(e){Nf(e),e.drafts_.forEach(oF),e.drafts_=null}function Nf(e){e===Ds&&(Ds=e.parent_)}function jy(e){return Ds=nF(Ds,e)}function oF(e){const t=e[_t];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Dy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[_t].modified_&&(Vf(t),Xt(4)),Fr(e)&&(e=ou(t,e),t.parent_||iu(t,e)),t.patches_&&Zn("Patches").generateReplacementPatches_(r[_t].base_,e,t.patches_,t.inversePatches_)):e=ou(t,r,[]),Vf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Lx?e:void 0}function ou(e,t,r){if(qu(t))return t;const n=t[_t];if(!n)return js(t,(o,i)=>Iy(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return iu(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),js(i,(a,l)=>Iy(e,n,o,a,l,r,s)),iu(e,o,!1),r&&e.patches_&&Zn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Iy(e,t,r,n,o,i,s){if(gn(o)){const a=i&&t&&t.type_!==3&&!Lf(t.assigned_,n)?i.concat(n):void 0,l=ou(e,o,a);if(Vx(r,n,l),gn(l))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(Fr(o)&&!qu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ou(e,o),(!t||!t.scope_.parent_)&&iu(e,o)}}function iu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dp(t,r)}function iF(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Nx(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Ip;r&&(o=[n],i=Is);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var Ip={get(e,t){if(t===_t)return e;const r=Rn(e);if(!Lf(r,t))return sF(e,r,t);const n=r[t];return e.finalized_||!Fr(n)?n:n===md(e.base_,t)?(gd(e),e.copy_[t]=Uf(n,e)):n},has(e,t){return t in Rn(e)},ownKeys(e){return Reflect.ownKeys(Rn(e))},set(e,t,r){const n=Wx(Rn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=md(Rn(e),t),i=o==null?void 0:o[_t];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eF(r,o)&&(r!==void 0||Lf(e.base_,t)))return!0;gd(e),Wf(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return md(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gd(e),Wf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Rn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Xt(11)},getPrototypeOf(e){return ti(e.base_)},setPrototypeOf(){Xt(12)}},Is={};js(Ip,(e,t)=>{Is[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Is.deleteProperty=function(e,t){return Is.set.call(this,e,t,void 0)};Is.set=function(e,t,r){return Ip.set.call(this,e[0],t,r,e[0])};function md(e,t){const r=e[_t];return(r?Rn(r):e)[t]}function sF(e,t,r){var o;const n=Wx(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Wx(e,t){if(!(t in e))return;let r=ti(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ti(r)}}function Wf(e){e.modified_||(e.modified_=!0,e.parent_&&Wf(e.parent_))}function gd(e){e.copy_||(e.copy_=Bf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aF=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const i=r;r=t;const s=this;return function(l=i,...u){return s.produce(l,c=>r.call(this,c,...u))}}typeof r!="function"&&Xt(6),n!==void 0&&typeof n!="function"&&Xt(7);let o;if(Fr(t)){const i=jy(this),s=Uf(t,void 0);let a=!0;try{o=r(s),a=!1}finally{a?Vf(i):Nf(i)}return My(i,n),Dy(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Lx&&(o=void 0),this.autoFreeze_&&Dp(o,!0),n){const i=[],s=[];Zn("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else Xt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let n,o;return[this.produce(t,r,(s,a)=>{n=s,o=a}),n,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){Fr(e)||Xt(8),gn(e)&&(e=Ux(e));const t=jy(this),r=Uf(e,void 0);return r[_t].isManual_=!0,Nf(t),r}finishDraft(e,t){const r=e&&e[_t];(!r||!r.isManual_)&&Xt(9);const{scope_:n}=r;return My(n,t),Dy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Zn("Patches").applyPatches_;return gn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Uf(e,t){const r=Yu(e)?Zn("MapSet").proxyMap_(e,t):Xu(e)?Zn("MapSet").proxySet_(e,t):iF(e,t);return(t?t.scope_:Nx()).drafts_.push(r),r}function Ux(e){return gn(e)||Xt(10,e),Hx(e)}function Hx(e){if(!Fr(e)||qu(e))return e;const t=e[_t];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Bf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Bf(e,!0);return js(r,(n,o)=>{Vx(r,n,Hx(o))}),t&&(t.finalized_=!1),r}var Tt=new aF,Gx=Tt.produce;Tt.produceWithPatches.bind(Tt);Tt.setAutoFreeze.bind(Tt);Tt.setUseStrictShallowCopy.bind(Tt);Tt.applyPatches.bind(Tt);Tt.createDraft.bind(Tt);Tt.finishDraft.bind(Tt);function lF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cF(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Fy=e=>Array.isArray(e)?e:[e];function dF(e){const t=Array.isArray(e[0])?e[0]:e;return cF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function fF(e,t){const r=[],{length:n}=e;for(let o=0;o{r=Fa(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Kx(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),lF(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=Fp,argsMemoizeOptions:y=[],devModeChecks:S={}}=c,C=Fy(f),g=Fy(y),h=dF(o),m=d(function(){return i++,u.apply(null,arguments)},...C),b=p(function(){s++;const $=fF(h,arguments);return a=m.apply(null,$),a},...g);return Object.assign(b,{resultFunc:u,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var gF=Kx(Fp),yF=Object.assign((e,t=gF)=>{uF(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((s,a,l)=>(s[r[l]]=a,s),{}))},{withTypes:()=>yF});function Yx(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var vF=Yx(),SF=Yx,bF=(...e)=>{const t=Kx(...e),r=Object.assign((...n)=>{const o=t(...n),i=(s,...a)=>o(gn(s)?Ux(s):s,...a);return Object.assign(i,o),i},{withTypes:()=>r});return r};bF(Fp);var xF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nu:nu.apply(null,arguments)};function ri(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(dt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>ZI(n)&&n.type===e,r}var Xx=class Oi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oi.prototype)}static get[Symbol.species](){return Oi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oi(...t[0].concat(this)):new Oi(...t.concat(this))}};function Ly(e){return Fr(e)?Gx(e,()=>{}):e}function By(e,t,r){if(e.has(t)){let o=e.get(t);return r.update&&(o=r.update(o,t,e),e.set(t,o)),o}if(!r.insert)throw new Error(dt(10));const n=r.insert(t,e);return e.set(t,n),n}function wF(e){return typeof e=="boolean"}var kF=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let s=new Xx;return r&&(wF(r)?s.push(vF):s.push(SF(r.extraArgument))),s},CF="RTK_autoBatch",qx=e=>t=>{setTimeout(t,e)},_F=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qx(10),TF=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,i=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?_F:e.type==="callback"?e.queueNotification:qx(e.timeout),u=()=>{s=!1,i&&(i=!1,a.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const d=()=>o&&c(),f=n.subscribe(d);return a.add(c),()=>{f(),a.delete(c)}},dispatch(c){var d;try{return o=!((d=c==null?void 0:c.meta)!=null&&d[CF]),i=!o,i&&(s||(s=!0,l(u))),n.dispatch(c)}finally{o=!0}}})},PF=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Xx(e);return n&&o.push(TF(typeof n=="object"?n:void 0)),o},EF=!0;function $F(e){const t=kF(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(jp(r))a=qI(r);else throw new Error(dt(1));let l;typeof n=="function"?l=n(t):l=t();let u=nu;o&&(u=xF({trace:!EF,...typeof o=="object"&&o}));const c=QI(...l),d=PF(c);let f=typeof s=="function"?s(d):d();const p=u(...f);return Ox(a,i,p)}function Qx(e){const t={},r=[];let n;const o={addCase(i,s){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(dt(28));if(a in t)throw new Error(dt(29));return t[a]=s,o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function zF(e){return typeof e=="function"}function RF(e,t){let[r,n,o]=Qx(t),i;if(zF(e))i=()=>Ly(e());else{const a=Ly(e);i=()=>a}function s(a=i(),l){let u=[r[l.type],...n.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[o]),u.reduce((c,d)=>{if(d)if(gn(c)){const p=d(c,l);return p===void 0?c:p}else{if(Fr(c))return Gx(c,f=>d(f,l));{const f=d(c,l);if(f===void 0){if(c===null)return c;throw new Error(dt(9))}return f}}return c},a)}return s.getInitialState=i,s}var AF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",MF=(e=21)=>{let t="",r=e;for(;r--;)t+=AF[Math.random()*64|0];return t},jF=Symbol.for("rtk-slice-createasyncthunk");function DF(e,t){return`${e}/${t}`}function IF({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[jF];return function(o){const{name:i,reducerPath:s=i}=o;if(!i)throw new Error(dt(11));typeof process<"u";const a=(typeof o.reducers=="function"?o.reducers(LF()):o.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,b){const P=typeof m=="string"?m:m.type;if(!P)throw new Error(dt(12));if(P in u.sliceCaseReducersByType)throw new Error(dt(13));return u.sliceCaseReducersByType[P]=b,c},addMatcher(m,b){return u.sliceMatchers.push({matcher:m,reducer:b}),c},exposeAction(m,b){return u.actionCreators[m]=b,c},exposeCaseReducer(m,b){return u.sliceCaseReducersByName[m]=b,c}};l.forEach(m=>{const b=a[m],P={reducerName:m,type:DF(i,m),createNotation:typeof o.reducers=="function"};VF(b)?WF(P,b,c,t):BF(P,b,c)});function d(){const[m={},b=[],P=void 0]=typeof o.extraReducers=="function"?Qx(o.extraReducers):[o.extraReducers],$={...m,...u.sliceCaseReducersByType};return RF(o.initialState,E=>{for(let z in $)E.addCase(z,$[z]);for(let z of u.sliceMatchers)E.addMatcher(z.matcher,z.reducer);for(let z of b)E.addMatcher(z.matcher,z.reducer);P&&E.addDefaultCase(P)})}const f=m=>m,p=new Map;let y;function S(m,b){return y||(y=d()),y(m,b)}function C(){return y||(y=d()),y.getInitialState()}function g(m,b=!1){function P(E){let z=E[m];return typeof z>"u"&&b&&(z=C()),z}function $(E=f){const z=By(p,b,{insert:()=>new WeakMap});return By(z,E,{insert:()=>{const D={};for(const[I,xe]of Object.entries(o.selectors??{}))D[I]=FF(xe,E,C,b);return D}})}return{reducerPath:m,getSelectors:$,get selectors(){return $(P)},selectSlice:P}}const h={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:C,...g(s),injectInto(m,{reducerPath:b,...P}={}){const $=b??s;return m.inject({reducerPath:$,reducer:S},P),{...h,...g($,!0)}}};return h}}function FF(e,t,r,n){function o(i,...s){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...s)}return o.unwrapped=e,o}var OF=IF();function LF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function BF({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!NF(n))throw new Error(dt(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ri(e,s):ri(e))}function VF(e){return e._reducerDefinitionType==="asyncThunk"}function NF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function WF({type:e,reducerName:t},r,n,o){if(!o)throw new Error(dt(18));const{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:u,options:c}=r,d=o(e,i,c);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),a&&n.addCase(d.pending,a),l&&n.addCase(d.rejected,l),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:s||Oa,pending:a||Oa,rejected:l||Oa,settled:u||Oa})}function Oa(){}var UF=(e,t)=>{if(typeof e!="function")throw new Error(dt(32))},Op="listenerMiddleware",HF=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ri(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(dt(21));return UF(i),{predicate:o,type:t,effect:i}},GF=Object.assign(e=>{const{type:t,predicate:r,effect:n}=HF(e);return{id:MF(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(dt(22))}}},{withTypes:()=>GF}),KF=Object.assign(ri(`${Op}/add`),{withTypes:()=>KF});ri(`${Op}/removeAll`);var YF=Object.assign(ri(`${Op}/remove`),{withTypes:()=>YF});function dt(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. `}const Zx=OF({name:"main",initialState:{selectedContent:"layers"},reducers:{selectContent:(e,t)=>{e.selectedContent=t.payload}}}),{selectContent:XF}=Zx.actions,qF=Zx.reducer,QF=$F({reducer:{main:qF}}),ZF=()=>k.jsx(vt,{bgColor:"#242424",color:"white",justifyContent:"space-between",alignItems:"center",p:4,borderBottom:"1px solid #FFFFFF",children:k.jsxs(vt,{alignItems:"center",children:[k.jsx(Px,{src:"/logo.png",alt:"Logo",mr:2,height:"50px"}),k.jsx(W,{fontSize:"3xl",children:"EIC Monitor"})]})}),JF=()=>{const e=HI(),t=Ix(n=>n.main.selectedContent),r=n=>{e(XF(n))};return k.jsx(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:k.jsxs(vt,{justifyContent:"space-around",width:"lg",maxWidth:"100%",children:[k.jsx(cn,{colorScheme:"blue",variant:t==="scenarios"?"solid":"outline",onClick:()=>r("scenarios"),children:"Scenarios"}),k.jsx(cn,{colorScheme:"blue",variant:t==="layers"?"solid":"outline",onClick:()=>r("layers"),children:"Layers"}),k.jsx(cn,{colorScheme:"blue",variant:t==="worldview"?"solid":"outline",onClick:()=>r("worldview"),children:"Worldview"})]})})},Vy={1:["MODIS_Terra_CorrectedReflectance_TrueColor"],2:["GOES-East_ABI_GeoColor","GOES-West_ABI_GeoColor","Himawari_AHI_Band3_Red_Visible_1km"],3:["VIIRS_SNPP_CorrectedReflectance_TrueColor"],4:["VIIRS_SNPP_DayNightBand_At_Sensor_Radiance"],5:["IMERG_Precipitation_Rate"],6:["GHRSST_L4_MUR_Sea_Surface_Temperature"],7:["MODIS_Aqua_Land_Surface_Temp_Day","MODIS_Aqua_CorrectedReflectance_TrueColor"],8:["AMSRU2_Sea_Ice_Concentration_12km"],9:["AMSRU2_Sea_Ice_Concentration_12km"],10:["VIIRS_SNPP_CorrectedReflectance_TrueColor"],11:["OMI_Nitrogen_Dioxide_Tropo_Column","VIIRS_NOAA20_CorrectedReflectance_TrueColor"],12:["AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night","AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day"],13:["VIIRS_SNPP_AOT_Dark_Target_Land_Ocean","VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate","VIIRS_SNPP_CorrectedReflectance_TrueColor"]},eO=()=>{const[e,t]=_.useState([]),r=async()=>{const o="https://nsj8g82r8j.execute-api.us-east-1.amazonaws.com/dev/all-scenarios";try{const s=await(await fetch(o)).json();t(s.items)}catch(i){console.log(i)}};_.useEffect(()=>{r()},[]);const n=()=>{if(e.length){const i=(()=>{const s=[],a=e.reduce((l,u)=>(l[u.item_id]=u.resolution_date,l),{});return Object.keys(Vy).forEach(l=>{const u=a[l]||"No valid date found",c=Vy[l];s.push({id:l,layers:c,date:u})}),s.sort((l,u)=>parseInt(l.id)-parseInt(u.id)),s})();return k.jsx(xI,{children:k.jsxs(zx,{children:[k.jsx(Rx,{color:"whiteAlpha.900",fontSize:"md",children:"Resolution date represents the most recent date that each layer in a scenario shares available imagery"}),k.jsx(bI,{children:k.jsxs(Py,{children:[k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Scenario"}),k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Layers"}),k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",children:"Resolution Date"})]})}),k.jsx(wI,{children:i.map(s=>k.jsxs(Py,{children:[k.jsx(fd,{textAlign:"center",children:s.id}),k.jsx(fd,{children:s.layers.map((a,l)=>k.jsx(W,{as:"div",textAlign:"center",children:a},l))}),k.jsx(fd,{textAlign:"center",children:s.date})]},s.id))})]})})}else return k.jsx(vt,{justifyContent:"center",alignItems:"center",children:k.jsx(qs,{size:"xl",color:"red.500"})})};return k.jsxs(vt,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[k.jsxs(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[k.jsx(W,{as:"h1",fontSize:"3xl",children:"Scenarios"}),k.jsx(cn,{colorScheme:"blue",variant:"solid",ml:"4",onClick:()=>r(),children:"Refresh Scenarios"})]}),n()]})},Ny=()=>{const[e,t]=_.useState([]),r=async()=>{const o="https://nsj8g82r8j.execute-api.us-east-1.amazonaws.com/dev/all-layers";try{const s=await(await fetch(o)).json();t(s.Items)}catch(i){console.log(i.message)}},n=()=>e.length?e.map(o=>{const i=o.item_id,{threshold:s,period:a}=o.config,l=(o==null?void 0:o.successful_dates)||[],u=o.last_request,c=o.last_request.url,d=o.last_request.black_pixels,f=o.last_request.difference,p=d>s?"red":"green",y=o.last_successful_request;return k.jsxs(vt,{direction:"column",my:"2",p:"2",boxShadow:"md",width:"80%",borderRadius:"md",children:[k.jsx($x,{mb:"2"}),k.jsx(W,{fontSize:"2xl",fontWeight:"bold",mb:"2",children:i}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Period:"}),k.jsx(W,{fontSize:"md",children:a.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Threshold:"}),k.jsx(W,{fontSize:"md",children:s})]}),k.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST REQUEST"}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),k.jsx(W,{fontSize:"md",children:u.time_of_search}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),k.jsx(W,{fontSize:"md",children:u.date}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),k.jsx(W,{fontSize:"md",children:u.status.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),k.jsx(W,{fontSize:"md",children:u.failure_reason.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),k.jsx(W,{fontSize:"md",children:d}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),k.jsx(W,{fontSize:"md",fontWeight:"bold",color:p,children:f}),k.jsx(cn,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(c,"_blank"),children:"View Imagery"})]}),k.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST SUCCESSFUL REQUEST"}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),k.jsx(W,{fontSize:"md",children:y.time_of_search}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),k.jsx(W,{fontSize:"md",children:y.date}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),k.jsx(W,{fontSize:"md",children:y.status.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),k.jsx(W,{fontSize:"md",children:y.failure_reason.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),k.jsx(W,{fontSize:"md",children:y.black_pixels}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),k.jsx(W,{fontSize:"md",fontWeight:"bold",color:"green",children:y.difference}),k.jsx(cn,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(y.url,"_blank"),children:"View Imagery"})]}),k.jsx(W,{fontSize:"lg",fontWeight:"semibold",mt:"4",children:"Successful Dates:"}),k.jsx(Ap,{pl:"150px",children:l.map((S,C)=>k.jsx(W,{fontSize:"md",children:S},C))})]},i)}):k.jsx(vt,{justifyContent:"center",alignItems:"center",children:k.jsx(qs,{size:"xl",color:"red.500"})});return _.useEffect(()=>{r()},[]),k.jsxs(vt,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[k.jsxs(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[k.jsx(W,{as:"h1",fontSize:"3xl",children:"Layers"}),k.jsx(cn,{colorScheme:"blue",variant:"solid",ml:"4",onClick:r,children:"Refresh Layers"})]}),n()]})},tO=()=>{const e=Ix(r=>r.main.selectedContent),t=()=>{switch(e){case"scenarios":return k.jsx(eO,{});case"layers":return k.jsx(Ny,{});default:return k.jsx(Ny,{})}};return k.jsx(vt,{width:"80%",border:"1px solid #FFFFFF",minHeight:"75vh",mt:"4",m:"auto",children:t()})};function rO(){return k.jsxs(k.Fragment,{children:[k.jsx(ZF,{}),k.jsx(JF,{}),k.jsx(tO,{})]})}yd.createRoot(document.getElementById("root")).render(k.jsx(Gn.StrictMode,{children:k.jsx(NI,{store:QF,children:k.jsx(uI,{theme:GI,children:k.jsx(rO,{})})})})); + */var Qs=_;function kI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CI=typeof Object.is=="function"?Object.is:kI,_I=Qs.useSyncExternalStore,TI=Qs.useRef,PI=Qs.useEffect,EI=Qs.useMemo,$I=Qs.useDebugValue;Mx.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=TI(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=EI(function(){function l(p){if(!u){if(u=!0,c=p,p=n(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return d=y}return d=p}if(y=d,CI(c,p))return y;var S=n(p);return o!==void 0&&o(y,S)?y:(c=p,d=S)}var u=!1,c,d,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,n,o]);var a=_I(e,i[0],i[1]);return PI(function(){s.hasValue=!0,s.value=a},[a]),$I(a),a};Ax.exports=Mx;var zI=Ax.exports,St="default"in pl?Gn:pl,Ey=Symbol.for("react-redux-context"),$y=typeof globalThis<"u"?globalThis:{};function RI(){if(!St.createContext)return{};const e=$y[Ey]??($y[Ey]=new Map);let t=e.get(St.createContext);return t||(t=St.createContext(null),e.set(St.createContext,t)),t}var mn=RI(),AI=()=>{throw new Error("uSES not initialized!")};function Mp(e=mn){return function(){return St.useContext(e)}}var jx=Mp(),Dx=AI,MI=e=>{Dx=e},jI=(e,t)=>e===t;function DI(e=mn){const t=e===mn?jx:Mp(e),r=(n,o={})=>{const{equalityFn:i=jI,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:a,subscription:l,getServerState:u,stabilityCheck:c,identityFunctionCheck:d}=t();St.useRef(!0);const f=St.useCallback({[n.name](y){return n(y)}}[n.name],[n,c,s.stabilityCheck]),p=Dx(l.addNestedSub,a.getState,u||a.getState,f,i);return St.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var Ix=DI();function II(e){e()}function FI(){let e=null,t=null;return{clear(){e=null,t=null},notify(){II(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var zy={notify(){},get:()=>[]};function OI(e,t){let r,n=zy,o=0,i=!1;function s(S){c();const C=n.subscribe(S);let g=!1;return()=>{g||(g=!0,C(),d())}}function a(){n.notify()}function l(){y.onStateChange&&y.onStateChange()}function u(){return i}function c(){o++,r||(r=t?t.addNestedSub(l):e.subscribe(l),n=FI())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=zy)}function f(){i||(i=!0,c())}function p(){i&&(i=!1,d())}const y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>n};return y}var LI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BI=LI?St.useLayoutEffect:St.useEffect;function VI({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const s=St.useMemo(()=>{const u=OI(e);return{store:e,subscription:u,getServerState:n?()=>n:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,n,o,i]),a=St.useMemo(()=>e.getState(),[e]);BI(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);const l=t||mn;return St.createElement(l.Provider,{value:s},r)}var NI=VI;function Fx(e=mn){const t=e===mn?jx:Mp(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var WI=Fx();function UI(e=mn){const t=e===mn?WI:Fx(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var HI=UI();MI(zI.useSyncExternalStoreWithSelector);const GI=IA({styles:{global:{body:{bg:"#242424",color:"white"}}}});function Be(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 KI=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ry=KI,pd=()=>Math.random().toString(36).substring(7).split("").join("."),YI={INIT:`@@redux/INIT${pd()}`,REPLACE:`@@redux/REPLACE${pd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pd()}`},ru=YI;function jp(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 Ox(e,t,r){if(typeof e!="function")throw new Error(Be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Ox)(e,t)}let n=e,o=t,i=new Map,s=i,a=0,l=!1;function u(){s===i&&(s=new Map,i.forEach((C,g)=>{s.set(g,C)}))}function c(){if(l)throw new Error(Be(3));return o}function d(C){if(typeof C!="function")throw new Error(Be(4));if(l)throw new Error(Be(5));let g=!0;u();const h=a++;return s.set(h,C),function(){if(g){if(l)throw new Error(Be(6));g=!1,u(),s.delete(h),i=null}}}function f(C){if(!jp(C))throw new Error(Be(7));if(typeof C.type>"u")throw new Error(Be(8));if(typeof C.type!="string")throw new Error(Be(17));if(l)throw new Error(Be(9));try{l=!0,o=n(o,C)}finally{l=!1}return(i=s).forEach(h=>{h()}),C}function p(C){if(typeof C!="function")throw new Error(Be(10));n=C,f({type:ru.REPLACE})}function y(){const C=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Be(11));function h(){const b=g;b.next&&b.next(c())}return h(),{unsubscribe:C(h)}},[Ry](){return this}}}return f({type:ru.INIT}),{dispatch:f,subscribe:d,getState:c,replaceReducer:p,[Ry]:y}}function XI(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ru.INIT})>"u")throw new Error(Be(12));if(typeof r(void 0,{type:ru.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function qI(e){const t=Object.keys(e),r={};for(let i=0;i"u")throw a&&a.type,new Error(Be(14));u[d]=y,l=l||y!==p}return l=l||n.length!==Object.keys(s).length,l?u:s}}function nu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function QI(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(Be(15))};const s={getState:o.getState,dispatch:(l,...u)=>i(l,...u)},a=e.map(l=>l(s));return i=nu(...a)(o.dispatch),{...o,dispatch:i}}}function ZI(e){return jp(e)&&"type"in e&&typeof e.type=="string"}var Lx=Symbol.for("immer-nothing"),Ay=Symbol.for("immer-draftable"),_t=Symbol.for("immer-state");function Xt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ti=Object.getPrototypeOf;function gn(e){return!!e&&!!e[_t]}function Fr(e){var t;return e?Bx(e)||Array.isArray(e)||!!e[Ay]||!!((t=e.constructor)!=null&&t[Ay])||Yu(e)||Xu(e):!1}var JI=Object.prototype.constructor.toString();function Bx(e){if(!e||typeof e!="object")return!1;const t=ti(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===JI}function js(e,t){Ku(e)===0?Object.entries(e).forEach(([r,n])=>{t(r,n,e)}):e.forEach((r,n)=>t(n,r,e))}function Ku(e){const t=e[_t];return t?t.type_:Array.isArray(e)?1:Yu(e)?2:Xu(e)?3:0}function Lf(e,t){return Ku(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vx(e,t,r){const n=Ku(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yu(e){return e instanceof Map}function Xu(e){return e instanceof Set}function Rn(e){return e.copy_||e.base_}function Bf(e,t){if(Yu(e))return new Map(e);if(Xu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Bx(e))return ti(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[_t];let n=Reflect.ownKeys(r);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=tF),Object.freeze(e),t&&js(e,(r,n)=>Dp(n,!0))),e}function tF(){Xt(2)}function qu(e){return Object.isFrozen(e)}var rF={};function Zn(e){const t=rF[e];return t||Xt(0,e),t}var Ds;function Nx(){return Ds}function nF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function My(e,t){t&&(Zn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vf(e){Nf(e),e.drafts_.forEach(oF),e.drafts_=null}function Nf(e){e===Ds&&(Ds=e.parent_)}function jy(e){return Ds=nF(Ds,e)}function oF(e){const t=e[_t];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Dy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[_t].modified_&&(Vf(t),Xt(4)),Fr(e)&&(e=ou(t,e),t.parent_||iu(t,e)),t.patches_&&Zn("Patches").generateReplacementPatches_(r[_t].base_,e,t.patches_,t.inversePatches_)):e=ou(t,r,[]),Vf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Lx?e:void 0}function ou(e,t,r){if(qu(t))return t;const n=t[_t];if(!n)return js(t,(o,i)=>Iy(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return iu(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),js(i,(a,l)=>Iy(e,n,o,a,l,r,s)),iu(e,o,!1),r&&e.patches_&&Zn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Iy(e,t,r,n,o,i,s){if(gn(o)){const a=i&&t&&t.type_!==3&&!Lf(t.assigned_,n)?i.concat(n):void 0,l=ou(e,o,a);if(Vx(r,n,l),gn(l))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(Fr(o)&&!qu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ou(e,o),(!t||!t.scope_.parent_)&&iu(e,o)}}function iu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dp(t,r)}function iF(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Nx(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Ip;r&&(o=[n],i=Is);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var Ip={get(e,t){if(t===_t)return e;const r=Rn(e);if(!Lf(r,t))return sF(e,r,t);const n=r[t];return e.finalized_||!Fr(n)?n:n===md(e.base_,t)?(gd(e),e.copy_[t]=Uf(n,e)):n},has(e,t){return t in Rn(e)},ownKeys(e){return Reflect.ownKeys(Rn(e))},set(e,t,r){const n=Wx(Rn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=md(Rn(e),t),i=o==null?void 0:o[_t];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eF(r,o)&&(r!==void 0||Lf(e.base_,t)))return!0;gd(e),Wf(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return md(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gd(e),Wf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Rn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Xt(11)},getPrototypeOf(e){return ti(e.base_)},setPrototypeOf(){Xt(12)}},Is={};js(Ip,(e,t)=>{Is[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Is.deleteProperty=function(e,t){return Is.set.call(this,e,t,void 0)};Is.set=function(e,t,r){return Ip.set.call(this,e[0],t,r,e[0])};function md(e,t){const r=e[_t];return(r?Rn(r):e)[t]}function sF(e,t,r){var o;const n=Wx(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Wx(e,t){if(!(t in e))return;let r=ti(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ti(r)}}function Wf(e){e.modified_||(e.modified_=!0,e.parent_&&Wf(e.parent_))}function gd(e){e.copy_||(e.copy_=Bf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aF=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const i=r;r=t;const s=this;return function(l=i,...u){return s.produce(l,c=>r.call(this,c,...u))}}typeof r!="function"&&Xt(6),n!==void 0&&typeof n!="function"&&Xt(7);let o;if(Fr(t)){const i=jy(this),s=Uf(t,void 0);let a=!0;try{o=r(s),a=!1}finally{a?Vf(i):Nf(i)}return My(i,n),Dy(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Lx&&(o=void 0),this.autoFreeze_&&Dp(o,!0),n){const i=[],s=[];Zn("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else Xt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let n,o;return[this.produce(t,r,(s,a)=>{n=s,o=a}),n,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){Fr(e)||Xt(8),gn(e)&&(e=Ux(e));const t=jy(this),r=Uf(e,void 0);return r[_t].isManual_=!0,Nf(t),r}finishDraft(e,t){const r=e&&e[_t];(!r||!r.isManual_)&&Xt(9);const{scope_:n}=r;return My(n,t),Dy(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Zn("Patches").applyPatches_;return gn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Uf(e,t){const r=Yu(e)?Zn("MapSet").proxyMap_(e,t):Xu(e)?Zn("MapSet").proxySet_(e,t):iF(e,t);return(t?t.scope_:Nx()).drafts_.push(r),r}function Ux(e){return gn(e)||Xt(10,e),Hx(e)}function Hx(e){if(!Fr(e)||qu(e))return e;const t=e[_t];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Bf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Bf(e,!0);return js(r,(n,o)=>{Vx(r,n,Hx(o))}),t&&(t.finalized_=!1),r}var Tt=new aF,Gx=Tt.produce;Tt.produceWithPatches.bind(Tt);Tt.setAutoFreeze.bind(Tt);Tt.setUseStrictShallowCopy.bind(Tt);Tt.applyPatches.bind(Tt);Tt.createDraft.bind(Tt);Tt.finishDraft.bind(Tt);function lF(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uF(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cF(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Fy=e=>Array.isArray(e)?e:[e];function dF(e){const t=Array.isArray(e[0])?e[0]:e;return cF(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function fF(e,t){const r=[],{length:n}=e;for(let o=0;o{r=Fa(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Kx(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,s=0,a,l={},u=o.pop();typeof u=="object"&&(l=u,u=o.pop()),lF(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=Fp,argsMemoizeOptions:y=[],devModeChecks:S={}}=c,C=Fy(f),g=Fy(y),h=dF(o),m=d(function(){return i++,u.apply(null,arguments)},...C),b=p(function(){s++;const $=fF(h,arguments);return a=m.apply(null,$),a},...g);return Object.assign(b,{resultFunc:u,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var gF=Kx(Fp),yF=Object.assign((e,t=gF)=>{uF(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((s,a,l)=>(s[r[l]]=a,s),{}))},{withTypes:()=>yF});function Yx(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var vF=Yx(),SF=Yx,bF=(...e)=>{const t=Kx(...e),r=Object.assign((...n)=>{const o=t(...n),i=(s,...a)=>o(gn(s)?Ux(s):s,...a);return Object.assign(i,o),i},{withTypes:()=>r});return r};bF(Fp);var xF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nu:nu.apply(null,arguments)};function ri(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(dt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>ZI(n)&&n.type===e,r}var Xx=class Oi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oi.prototype)}static get[Symbol.species](){return Oi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oi(...t[0].concat(this)):new Oi(...t.concat(this))}};function Ly(e){return Fr(e)?Gx(e,()=>{}):e}function By(e,t,r){if(e.has(t)){let o=e.get(t);return r.update&&(o=r.update(o,t,e),e.set(t,o)),o}if(!r.insert)throw new Error(dt(10));const n=r.insert(t,e);return e.set(t,n),n}function wF(e){return typeof e=="boolean"}var kF=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let s=new Xx;return r&&(wF(r)?s.push(vF):s.push(SF(r.extraArgument))),s},CF="RTK_autoBatch",qx=e=>t=>{setTimeout(t,e)},_F=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qx(10),TF=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,i=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?_F:e.type==="callback"?e.queueNotification:qx(e.timeout),u=()=>{s=!1,i&&(i=!1,a.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const d=()=>o&&c(),f=n.subscribe(d);return a.add(c),()=>{f(),a.delete(c)}},dispatch(c){var d;try{return o=!((d=c==null?void 0:c.meta)!=null&&d[CF]),i=!o,i&&(s||(s=!0,l(u))),n.dispatch(c)}finally{o=!0}}})},PF=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Xx(e);return n&&o.push(TF(typeof n=="object"?n:void 0)),o},EF=!0;function $F(e){const t=kF(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(jp(r))a=qI(r);else throw new Error(dt(1));let l;typeof n=="function"?l=n(t):l=t();let u=nu;o&&(u=xF({trace:!EF,...typeof o=="object"&&o}));const c=QI(...l),d=PF(c);let f=typeof s=="function"?s(d):d();const p=u(...f);return Ox(a,i,p)}function Qx(e){const t={},r=[];let n;const o={addCase(i,s){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(dt(28));if(a in t)throw new Error(dt(29));return t[a]=s,o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function zF(e){return typeof e=="function"}function RF(e,t){let[r,n,o]=Qx(t),i;if(zF(e))i=()=>Ly(e());else{const a=Ly(e);i=()=>a}function s(a=i(),l){let u=[r[l.type],...n.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[o]),u.reduce((c,d)=>{if(d)if(gn(c)){const p=d(c,l);return p===void 0?c:p}else{if(Fr(c))return Gx(c,f=>d(f,l));{const f=d(c,l);if(f===void 0){if(c===null)return c;throw new Error(dt(9))}return f}}return c},a)}return s.getInitialState=i,s}var AF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",MF=(e=21)=>{let t="",r=e;for(;r--;)t+=AF[Math.random()*64|0];return t},jF=Symbol.for("rtk-slice-createasyncthunk");function DF(e,t){return`${e}/${t}`}function IF({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[jF];return function(o){const{name:i,reducerPath:s=i}=o;if(!i)throw new Error(dt(11));typeof process<"u";const a=(typeof o.reducers=="function"?o.reducers(LF()):o.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,b){const P=typeof m=="string"?m:m.type;if(!P)throw new Error(dt(12));if(P in u.sliceCaseReducersByType)throw new Error(dt(13));return u.sliceCaseReducersByType[P]=b,c},addMatcher(m,b){return u.sliceMatchers.push({matcher:m,reducer:b}),c},exposeAction(m,b){return u.actionCreators[m]=b,c},exposeCaseReducer(m,b){return u.sliceCaseReducersByName[m]=b,c}};l.forEach(m=>{const b=a[m],P={reducerName:m,type:DF(i,m),createNotation:typeof o.reducers=="function"};VF(b)?WF(P,b,c,t):BF(P,b,c)});function d(){const[m={},b=[],P=void 0]=typeof o.extraReducers=="function"?Qx(o.extraReducers):[o.extraReducers],$={...m,...u.sliceCaseReducersByType};return RF(o.initialState,E=>{for(let z in $)E.addCase(z,$[z]);for(let z of u.sliceMatchers)E.addMatcher(z.matcher,z.reducer);for(let z of b)E.addMatcher(z.matcher,z.reducer);P&&E.addDefaultCase(P)})}const f=m=>m,p=new Map;let y;function S(m,b){return y||(y=d()),y(m,b)}function C(){return y||(y=d()),y.getInitialState()}function g(m,b=!1){function P(E){let z=E[m];return typeof z>"u"&&b&&(z=C()),z}function $(E=f){const z=By(p,b,{insert:()=>new WeakMap});return By(z,E,{insert:()=>{const D={};for(const[I,xe]of Object.entries(o.selectors??{}))D[I]=FF(xe,E,C,b);return D}})}return{reducerPath:m,getSelectors:$,get selectors(){return $(P)},selectSlice:P}}const h={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:C,...g(s),injectInto(m,{reducerPath:b,...P}={}){const $=b??s;return m.inject({reducerPath:$,reducer:S},P),{...h,...g($,!0)}}};return h}}function FF(e,t,r,n){function o(i,...s){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...s)}return o.unwrapped=e,o}var OF=IF();function LF(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function BF({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!NF(n))throw new Error(dt(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ri(e,s):ri(e))}function VF(e){return e._reducerDefinitionType==="asyncThunk"}function NF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function WF({type:e,reducerName:t},r,n,o){if(!o)throw new Error(dt(18));const{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:u,options:c}=r,d=o(e,i,c);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),a&&n.addCase(d.pending,a),l&&n.addCase(d.rejected,l),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:s||Oa,pending:a||Oa,rejected:l||Oa,settled:u||Oa})}function Oa(){}var UF=(e,t)=>{if(typeof e!="function")throw new Error(dt(32))},Op="listenerMiddleware",HF=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ri(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(dt(21));return UF(i),{predicate:o,type:t,effect:i}},GF=Object.assign(e=>{const{type:t,predicate:r,effect:n}=HF(e);return{id:MF(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(dt(22))}}},{withTypes:()=>GF}),KF=Object.assign(ri(`${Op}/add`),{withTypes:()=>KF});ri(`${Op}/removeAll`);var YF=Object.assign(ri(`${Op}/remove`),{withTypes:()=>YF});function dt(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. `}const Zx=OF({name:"main",initialState:{selectedContent:"layers"},reducers:{selectContent:(e,t)=>{e.selectedContent=t.payload}}}),{selectContent:XF}=Zx.actions,qF=Zx.reducer,QF=$F({reducer:{main:qF}}),ZF=()=>k.jsx(vt,{bgColor:"#242424",color:"white",justifyContent:"space-between",alignItems:"center",p:4,borderBottom:"1px solid #FFFFFF",children:k.jsxs(vt,{alignItems:"center",children:[k.jsx(Px,{src:"/EIC-Monitor/logo.png",alt:"Logo",mr:2,height:"50px"}),k.jsx(W,{fontSize:"3xl",children:"EIC Monitor"})]})}),JF=()=>{const e=HI(),t=Ix(n=>n.main.selectedContent),r=n=>{e(XF(n))};return k.jsx(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:k.jsxs(vt,{justifyContent:"space-around",width:"lg",maxWidth:"100%",children:[k.jsx(cn,{colorScheme:"blue",variant:t==="scenarios"?"solid":"outline",onClick:()=>r("scenarios"),children:"Scenarios"}),k.jsx(cn,{colorScheme:"blue",variant:t==="layers"?"solid":"outline",onClick:()=>r("layers"),children:"Layers"}),k.jsx(cn,{colorScheme:"blue",variant:t==="worldview"?"solid":"outline",onClick:()=>r("worldview"),children:"Worldview"})]})})},Vy={1:["MODIS_Terra_CorrectedReflectance_TrueColor"],2:["GOES-East_ABI_GeoColor","GOES-West_ABI_GeoColor","Himawari_AHI_Band3_Red_Visible_1km"],3:["VIIRS_SNPP_CorrectedReflectance_TrueColor"],4:["VIIRS_SNPP_DayNightBand_At_Sensor_Radiance"],5:["IMERG_Precipitation_Rate"],6:["GHRSST_L4_MUR_Sea_Surface_Temperature"],7:["MODIS_Aqua_Land_Surface_Temp_Day","MODIS_Aqua_CorrectedReflectance_TrueColor"],8:["AMSRU2_Sea_Ice_Concentration_12km"],9:["AMSRU2_Sea_Ice_Concentration_12km"],10:["VIIRS_SNPP_CorrectedReflectance_TrueColor"],11:["OMI_Nitrogen_Dioxide_Tropo_Column","VIIRS_NOAA20_CorrectedReflectance_TrueColor"],12:["AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night","AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day"],13:["VIIRS_SNPP_AOT_Dark_Target_Land_Ocean","VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate","VIIRS_SNPP_CorrectedReflectance_TrueColor"]},eO=()=>{const[e,t]=_.useState([]),r=async()=>{const o="https://m80gyw03f7.execute-api.us-east-1.amazonaws.com/dev/all-scenarios";try{const s=await(await fetch(o)).json();t(s.items)}catch(i){console.log(i)}};_.useEffect(()=>{r()},[]);const n=()=>{if(e.length){const i=(()=>{const s=[],a=e.reduce((l,u)=>(l[u.item_id]=u.resolution_date,l),{});return Object.keys(Vy).forEach(l=>{const u=a[l]||"No valid date found",c=Vy[l];s.push({id:l,layers:c,date:u})}),s.sort((l,u)=>parseInt(l.id)-parseInt(u.id)),s})();return k.jsx(xI,{children:k.jsxs(zx,{children:[k.jsx(Rx,{color:"whiteAlpha.900",fontSize:"md",children:"Resolution date represents the most recent date that each layer in a scenario shares available imagery"}),k.jsx(bI,{children:k.jsxs(Py,{children:[k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Scenario"}),k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Layers"}),k.jsx(hd,{color:"whiteAlpha.900",fontSize:"lg",children:"Resolution Date"})]})}),k.jsx(wI,{children:i.map(s=>k.jsxs(Py,{children:[k.jsx(fd,{textAlign:"center",children:s.id}),k.jsx(fd,{children:s.layers.map((a,l)=>k.jsx(W,{as:"div",textAlign:"center",children:a},l))}),k.jsx(fd,{textAlign:"center",children:s.date})]},s.id))})]})})}else return k.jsx(vt,{justifyContent:"center",alignItems:"center",children:k.jsx(qs,{size:"xl",color:"red.500"})})};return k.jsxs(vt,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[k.jsxs(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[k.jsx(W,{as:"h1",fontSize:"3xl",children:"Scenarios"}),k.jsx(cn,{colorScheme:"blue",variant:"solid",ml:"4",onClick:()=>r(),children:"Refresh Scenarios"})]}),n()]})},Ny=()=>{const[e,t]=_.useState([]),r=async()=>{const o="https://m80gyw03f7.execute-api.us-east-1.amazonaws.com/dev/all-layers";try{const s=await(await fetch(o)).json();t(s.Items)}catch(i){console.log(i.message)}},n=()=>e.length?e.map(o=>{const i=o.item_id,{threshold:s,period:a}=o.config,l=(o==null?void 0:o.successful_dates)||[],u=o.last_request,c=o.last_request.url,d=o.last_request.black_pixels,f=o.last_request.difference,p=d>s?"red":"green",y=o.last_successful_request;return k.jsxs(vt,{direction:"column",my:"2",p:"2",boxShadow:"md",width:"80%",borderRadius:"md",children:[k.jsx($x,{mb:"2"}),k.jsx(W,{fontSize:"2xl",fontWeight:"bold",mb:"2",children:i}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Period:"}),k.jsx(W,{fontSize:"md",children:a.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Threshold:"}),k.jsx(W,{fontSize:"md",children:s})]}),k.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST REQUEST"}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),k.jsx(W,{fontSize:"md",children:u.time_of_search}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),k.jsx(W,{fontSize:"md",children:u.date}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),k.jsx(W,{fontSize:"md",children:u.status.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),k.jsx(W,{fontSize:"md",children:u.failure_reason.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),k.jsx(W,{fontSize:"md",children:d}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),k.jsx(W,{fontSize:"md",fontWeight:"bold",color:p,children:f}),k.jsx(cn,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(c,"_blank"),children:"View Imagery"})]}),k.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST SUCCESSFUL REQUEST"}),k.jsxs(hl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),k.jsx(W,{fontSize:"md",children:y.time_of_search}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),k.jsx(W,{fontSize:"md",children:y.date}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),k.jsx(W,{fontSize:"md",children:y.status.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),k.jsx(W,{fontSize:"md",children:y.failure_reason.toUpperCase()}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),k.jsx(W,{fontSize:"md",children:y.black_pixels}),k.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),k.jsx(W,{fontSize:"md",fontWeight:"bold",color:"green",children:y.difference}),k.jsx(cn,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(y.url,"_blank"),children:"View Imagery"})]}),k.jsx(W,{fontSize:"lg",fontWeight:"semibold",mt:"4",children:"Successful Dates:"}),k.jsx(Ap,{pl:"150px",children:l.map((S,C)=>k.jsx(W,{fontSize:"md",children:S},C))})]},i)}):k.jsx(vt,{justifyContent:"center",alignItems:"center",children:k.jsx(qs,{size:"xl",color:"red.500"})});return _.useEffect(()=>{r()},[]),k.jsxs(vt,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[k.jsxs(vt,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[k.jsx(W,{as:"h1",fontSize:"3xl",children:"Layers"}),k.jsx(cn,{colorScheme:"blue",variant:"solid",ml:"4",onClick:r,children:"Refresh Layers"})]}),n()]})},tO=()=>{const e=Ix(r=>r.main.selectedContent),t=()=>{switch(e){case"scenarios":return k.jsx(eO,{});case"layers":return k.jsx(Ny,{});default:return k.jsx(Ny,{})}};return k.jsx(vt,{width:"80%",border:"1px solid #FFFFFF",minHeight:"75vh",mt:"4",m:"auto",children:t()})};function rO(){return k.jsxs(k.Fragment,{children:[k.jsx(ZF,{}),k.jsx(JF,{}),k.jsx(tO,{})]})}yd.createRoot(document.getElementById("root")).render(k.jsx(Gn.StrictMode,{children:k.jsx(NI,{store:QF,children:k.jsx(uI,{theme:GI,children:k.jsx(rO,{})})})})); diff --git a/index.html b/index.html index a92c5e5..d22cb2c 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ EIC Monitor - +