diff --git a/assets/index-JWGDfHe2.js b/assets/index-8emld-rq.js similarity index 98% rename from assets/index-JWGDfHe2.js rename to assets/index-8emld-rq.js index d37ef42..9b98bc8 100644 --- a/assets/index-JWGDfHe2.js +++ b/assets/index-8emld-rq.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 Zs=C;function Gj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kj=typeof Object.is=="function"?Object.is:Gj,qj=Zs.useSyncExternalStore,Yj=Zs.useRef,Xj=Zs.useEffect,Qj=Zs.useMemo,Zj=Zs.useDebugValue;Wx.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=Yj(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Qj(function(){function l(h){if(!u){if(u=!0,c=h,h=n(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return d=y}return d=h}if(y=d,Kj(c,h))return y;var S=n(h);return o!==void 0&&o(y,S)?y:(c=h,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=qj(e,i[0],i[1]);return Xj(function(){s.hasValue=!0,s.value=a},[a]),Zj(a),a};Vx.exports=Wx;var Jj=Vx.exports,bt="default"in yl?Yn:yl,Iy=Symbol.for("react-redux-context"),jy=typeof globalThis<"u"?globalThis:{};function e8(){if(!bt.createContext)return{};const e=jy[Iy]??(jy[Iy]=new Map);let t=e.get(bt.createContext);return t||(t=bt.createContext(null),e.set(bt.createContext,t)),t}var vn=e8(),t8=()=>{throw new Error("uSES not initialized!")};function Fp(e=vn){return function(){return bt.useContext(e)}}var Ux=Fp(),Hx=t8,r8=e=>{Hx=e},n8=(e,t)=>e===t;function o8(e=vn){const t=e===vn?Ux:Fp(e),r=(n,o={})=>{const{equalityFn:i=n8,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:a,subscription:l,getServerState:u,stabilityCheck:c,identityFunctionCheck:d}=t();bt.useRef(!0);const f=bt.useCallback({[n.name](y){return n(y)}}[n.name],[n,c,s.stabilityCheck]),h=Hx(l.addNestedSub,a.getState,u||a.getState,f,i);return bt.useDebugValue(h),h};return Object.assign(r,{withTypes:()=>r}),r}var Op=o8();function i8(e){e()}function s8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){i8(()=>{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 Dy={notify(){},get:()=>[]};function a8(e,t){let r,n=Dy,o=0,i=!1;function s(S){c();const w=n.subscribe(S);let g=!1;return()=>{g||(g=!0,w(),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=s8())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=Dy)}function f(){i||(i=!0,c())}function h(){i&&(i=!1,d())}const y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>n};return y}var l8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u8=l8?bt.useLayoutEffect:bt.useEffect;function c8({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const s=bt.useMemo(()=>{const u=a8(e);return{store:e,subscription:u,getServerState:n?()=>n:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,n,o,i]),a=bt.useMemo(()=>e.getState(),[e]);u8(()=>{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||vn;return bt.createElement(l.Provider,{value:s},r)}var d8=c8;function Gx(e=vn){const t=e===vn?Ux:Fp(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var f8=Gx();function h8(e=vn){const t=e===vn?f8:Gx(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Lp=h8();r8(Jj.useSyncExternalStoreWithSelector);const p8=YA({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 m8=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fy=m8,yd=()=>Math.random().toString(36).substring(7).split("").join("."),g8={INIT:`@@redux/INIT${yd()}`,REPLACE:`@@redux/REPLACE${yd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yd()}`},iu=g8;function Bp(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 Kx(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(Kx)(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((w,g)=>{s.set(g,w)}))}function c(){if(l)throw new Error(Be(3));return o}function d(w){if(typeof w!="function")throw new Error(Be(4));if(l)throw new Error(Be(5));let g=!0;u();const p=a++;return s.set(p,w),function(){if(g){if(l)throw new Error(Be(6));g=!1,u(),s.delete(p),i=null}}}function f(w){if(!Bp(w))throw new Error(Be(7));if(typeof w.type>"u")throw new Error(Be(8));if(typeof w.type!="string")throw new Error(Be(17));if(l)throw new Error(Be(9));try{l=!0,o=n(o,w)}finally{l=!1}return(i=s).forEach(p=>{p()}),w}function h(w){if(typeof w!="function")throw new Error(Be(10));n=w,f({type:iu.REPLACE})}function y(){const w=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Be(11));function p(){const x=g;x.next&&x.next(c())}return p(),{unsubscribe:w(p)}},[Fy](){return this}}}return f({type:iu.INIT}),{dispatch:f,subscribe:d,getState:c,replaceReducer:h,[Fy]:y}}function y8(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:iu.INIT})>"u")throw new Error(Be(12));if(typeof r(void 0,{type:iu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function v8(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!==h}return l=l||n.length!==Object.keys(s).length,l?u:s}}function su(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function S8(...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=su(...a)(o.dispatch),{...o,dispatch:i}}}function b8(e){return Bp(e)&&"type"in e&&typeof e.type=="string"}var qx=Symbol.for("immer-nothing"),Oy=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state");function Xt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ri=Object.getPrototypeOf;function Sn(e){return!!e&&!!e[Tt]}function Lr(e){var t;return e?Yx(e)||Array.isArray(e)||!!e[Oy]||!!((t=e.constructor)!=null&&t[Oy])||Zu(e)||Ju(e):!1}var x8=Object.prototype.constructor.toString();function Yx(e){if(!e||typeof e!="object")return!1;const t=ri(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)===x8}function js(e,t){Qu(e)===0?Object.entries(e).forEach(([r,n])=>{t(r,n,e)}):e.forEach((r,n)=>t(n,r,e))}function Qu(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Zu(e)?2:Ju(e)?3:0}function Wf(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xx(e,t,r){const n=Qu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function w8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function In(e){return e.copy_||e.base_}function Uf(e,t){if(Zu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Yx(e))return ri(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];let n=Reflect.ownKeys(r);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=_8),Object.freeze(e),t&&js(e,(r,n)=>Np(n,!0))),e}function _8(){Xt(2)}function ec(e){return Object.isFrozen(e)}var k8={};function to(e){const t=k8[e];return t||Xt(0,e),t}var Ds;function Qx(){return Ds}function C8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ly(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hf(e){Gf(e),e.drafts_.forEach(T8),e.drafts_=null}function Gf(e){e===Ds&&(Ds=e.parent_)}function By(e){return Ds=C8(Ds,e)}function T8(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ny(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Tt].modified_&&(Hf(t),Xt(4)),Lr(e)&&(e=au(t,e),t.parent_||lu(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(r[Tt].base_,e,t.patches_,t.inversePatches_)):e=au(t,r,[]),Hf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qx?e:void 0}function au(e,t,r){if(ec(t))return t;const n=t[Tt];if(!n)return js(t,(o,i)=>Vy(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return lu(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)=>Vy(e,n,o,a,l,r,s)),lu(e,o,!1),r&&e.patches_&&to("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Vy(e,t,r,n,o,i,s){if(Sn(o)){const a=i&&t&&t.type_!==3&&!Wf(t.assigned_,n)?i.concat(n):void 0,l=au(e,o,a);if(Xx(r,n,l),Sn(l))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(Lr(o)&&!ec(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;au(e,o),(!t||!t.scope_.parent_)&&lu(e,o)}}function lu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Np(t,r)}function P8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Qx(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Vp;r&&(o=[n],i=Fs);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var Vp={get(e,t){if(t===Tt)return e;const r=In(e);if(!Wf(r,t))return E8(e,r,t);const n=r[t];return e.finalized_||!Lr(n)?n:n===vd(e.base_,t)?(Sd(e),e.copy_[t]=qf(n,e)):n},has(e,t){return t in In(e)},ownKeys(e){return Reflect.ownKeys(In(e))},set(e,t,r){const n=Zx(In(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=vd(In(e),t),i=o==null?void 0:o[Tt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(w8(r,o)&&(r!==void 0||Wf(e.base_,t)))return!0;Sd(e),Kf(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 vd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Sd(e),Kf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=In(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 ri(e.base_)},setPrototypeOf(){Xt(12)}},Fs={};js(Vp,(e,t)=>{Fs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fs.deleteProperty=function(e,t){return Fs.set.call(this,e,t,void 0)};Fs.set=function(e,t,r){return Vp.set.call(this,e[0],t,r,e[0])};function vd(e,t){const r=e[Tt];return(r?In(r):e)[t]}function E8(e,t,r){var o;const n=Zx(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Zx(e,t){if(!(t in e))return;let r=ri(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ri(r)}}function Kf(e){e.modified_||(e.modified_=!0,e.parent_&&Kf(e.parent_))}function Sd(e){e.copy_||(e.copy_=Uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var R8=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(Lr(t)){const i=By(this),s=qf(t,void 0);let a=!0;try{o=r(s),a=!1}finally{a?Hf(i):Gf(i)}return Ly(i,n),Ny(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===qx&&(o=void 0),this.autoFreeze_&&Np(o,!0),n){const i=[],s=[];to("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){Lr(e)||Xt(8),Sn(e)&&(e=Jx(e));const t=By(this),r=qf(e,void 0);return r[Tt].isManual_=!0,Gf(t),r}finishDraft(e,t){const r=e&&e[Tt];(!r||!r.isManual_)&&Xt(9);const{scope_:n}=r;return Ly(n,t),Ny(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=to("Patches").applyPatches_;return Sn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function qf(e,t){const r=Zu(e)?to("MapSet").proxyMap_(e,t):Ju(e)?to("MapSet").proxySet_(e,t):P8(e,t);return(t?t.scope_:Qx()).drafts_.push(r),r}function Jx(e){return Sn(e)||Xt(10,e),ew(e)}function ew(e){if(!Lr(e)||ec(e))return e;const t=e[Tt];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Uf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Uf(e,!0);return js(r,(n,o)=>{Xx(r,n,ew(o))}),t&&(t.finalized_=!1),r}var Pt=new R8,tw=Pt.produce;Pt.produceWithPatches.bind(Pt);Pt.setAutoFreeze.bind(Pt);Pt.setUseStrictShallowCopy.bind(Pt);Pt.applyPatches.bind(Pt);Pt.createDraft.bind(Pt);Pt.finishDraft.bind(Pt);function $8(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function A8(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function z8(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 Wy=e=>Array.isArray(e)?e:[e];function M8(e){const t=Array.isArray(e[0])?e[0]:e;return z8(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function I8(e,t){const r=[],{length:n}=e;for(let o=0;o{r=Ba(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function rw(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()),$8(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=Wp,argsMemoizeOptions:y=[],devModeChecks:S={}}=c,w=Wy(f),g=Wy(y),p=M8(o),m=d(function(){return i++,u.apply(null,arguments)},...w),x=h(function(){s++;const $=I8(p,arguments);return a=m.apply(null,$),a},...g);return Object.assign(x,{resultFunc:u,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var O8=rw(Wp),L8=Object.assign((e,t=O8)=>{A8(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:()=>L8});function nw(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var B8=nw(),N8=nw,V8=(...e)=>{const t=rw(...e),r=Object.assign((...n)=>{const o=t(...n),i=(s,...a)=>o(Sn(s)?Jx(s):s,...a);return Object.assign(i,o),i},{withTypes:()=>r});return r};V8(Wp);var W8=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?su:su.apply(null,arguments)};function ni(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(ht(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=>b8(n)&&n.type===e,r}var ow=class Li extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Li.prototype)}static get[Symbol.species](){return Li}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Li(...t[0].concat(this)):new Li(...t.concat(this))}};function Hy(e){return Lr(e)?tw(e,()=>{}):e}function Gy(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(ht(10));const n=r.insert(t,e);return e.set(t,n),n}function U8(e){return typeof e=="boolean"}var H8=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let s=new ow;return r&&(U8(r)?s.push(B8):s.push(N8(r.extraArgument))),s},G8="RTK_autoBatch",iw=e=>t=>{setTimeout(t,e)},K8=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:iw(10),q8=(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"?K8:e.type==="callback"?e.queueNotification:iw(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[G8]),i=!o,i&&(s||(s=!0,l(u))),n.dispatch(c)}finally{o=!0}}})},Y8=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new ow(e);return n&&o.push(q8(typeof n=="object"?n:void 0)),o},X8=!0;function Q8(e){const t=H8(),{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(Bp(r))a=v8(r);else throw new Error(ht(1));let l;typeof n=="function"?l=n(t):l=t();let u=su;o&&(u=W8({trace:!X8,...typeof o=="object"&&o}));const c=S8(...l),d=Y8(c);let f=typeof s=="function"?s(d):d();const h=u(...f);return Kx(a,i,h)}function sw(e){const t={},r=[];let n;const o={addCase(i,s){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(ht(28));if(a in t)throw new Error(ht(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 Z8(e){return typeof e=="function"}function J8(e,t){let[r,n,o]=sw(t),i;if(Z8(e))i=()=>Hy(e());else{const a=Hy(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(Sn(c)){const h=d(c,l);return h===void 0?c:h}else{if(Lr(c))return tw(c,f=>d(f,l));{const f=d(c,l);if(f===void 0){if(c===null)return c;throw new Error(ht(9))}return f}}return c},a)}return s.getInitialState=i,s}var eD="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",tD=(e=21)=>{let t="",r=e;for(;r--;)t+=eD[Math.random()*64|0];return t},rD=Symbol.for("rtk-slice-createasyncthunk");function nD(e,t){return`${e}/${t}`}function oD({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[rD];return function(o){const{name:i,reducerPath:s=i}=o;if(!i)throw new Error(ht(11));typeof process<"u";const a=(typeof o.reducers=="function"?o.reducers(aD()):o.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,x){const T=typeof m=="string"?m:m.type;if(!T)throw new Error(ht(12));if(T in u.sliceCaseReducersByType)throw new Error(ht(13));return u.sliceCaseReducersByType[T]=x,c},addMatcher(m,x){return u.sliceMatchers.push({matcher:m,reducer:x}),c},exposeAction(m,x){return u.actionCreators[m]=x,c},exposeCaseReducer(m,x){return u.sliceCaseReducersByName[m]=x,c}};l.forEach(m=>{const x=a[m],T={reducerName:m,type:nD(i,m),createNotation:typeof o.reducers=="function"};uD(x)?dD(T,x,c,t):lD(T,x,c)});function d(){const[m={},x=[],T=void 0]=typeof o.extraReducers=="function"?sw(o.extraReducers):[o.extraReducers],$={...m,...u.sliceCaseReducersByType};return J8(o.initialState,E=>{for(let R in $)E.addCase(R,$[R]);for(let R of u.sliceMatchers)E.addMatcher(R.matcher,R.reducer);for(let R of x)E.addMatcher(R.matcher,R.reducer);T&&E.addDefaultCase(T)})}const f=m=>m,h=new Map;let y;function S(m,x){return y||(y=d()),y(m,x)}function w(){return y||(y=d()),y.getInitialState()}function g(m,x=!1){function T(E){let R=E[m];return typeof R>"u"&&x&&(R=w()),R}function $(E=f){const R=Gy(h,x,{insert:()=>new WeakMap});return Gy(R,E,{insert:()=>{const j={};for(const[D,xe]of Object.entries(o.selectors??{}))j[D]=iD(xe,E,w,x);return j}})}return{reducerPath:m,getSelectors:$,get selectors(){return $(T)},selectSlice:T}}const p={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...g(s),injectInto(m,{reducerPath:x,...T}={}){const $=x??s;return m.inject({reducerPath:$,reducer:S},T),{...p,...g($,!0)}}};return p}}function iD(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 sD=oD();function aD(){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 lD({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!cD(n))throw new Error(ht(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ni(e,s):ni(e))}function uD(e){return e._reducerDefinitionType==="asyncThunk"}function cD(e){return e._reducerDefinitionType==="reducerWithPrepare"}function dD({type:e,reducerName:t},r,n,o){if(!o)throw new Error(ht(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||Na,pending:a||Na,rejected:l||Na,settled:u||Na})}function Na(){}var fD=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},Up="listenerMiddleware",hD=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ni(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(ht(21));return fD(i),{predicate:o,type:t,effect:i}},pD=Object.assign(e=>{const{type:t,predicate:r,effect:n}=hD(e);return{id:tD(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>pD}),mD=Object.assign(ni(`${Up}/add`),{withTypes:()=>mD});ni(`${Up}/removeAll`);var gD=Object.assign(ni(`${Up}/remove`),{withTypes:()=>gD});function ht(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 aw=sD({name:"main",initialState:{selectedContent:"eic",selectedScenario:1},reducers:{selectContent:(e,t)=>{e.selectedContent=t.payload},selectScenario:(e,t)=>{e.selectedScenario=t.payload}}}),{selectContent:lw,selectScenario:uw}=aw.actions,yD=aw.reducer,vD=Q8({reducer:{main:yD}}),SD=()=>b.jsx(ut,{bgColor:"#242424",color:"white",justifyContent:"space-between",alignItems:"center",p:4,borderBottom:"1px solid #FFFFFF",children:b.jsxs(ut,{alignItems:"center",children:[b.jsx(Mx,{src:"/EIC-Monitor/logo.png",alt:"Logo",mr:2,height:"50px"}),b.jsx(W,{fontSize:"3xl",children:"EIC Monitor"})]})}),bD=()=>{const e=Lp(),t=Op(n=>n.main.selectedContent),r=n=>{e(lw(n))};return b.jsx(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:b.jsxs(ut,{justifyContent:"space-around",width:"lg",maxWidth:"100%",children:[b.jsx(zr,{colorScheme:"blue",variant:t==="scenarios"?"solid":"outline",onClick:()=>r("scenarios"),children:"Scenarios"}),b.jsx(zr,{colorScheme:"blue",variant:t==="layers"?"solid":"outline",onClick:()=>r("layers"),children:"Layers"}),b.jsx(zr,{colorScheme:"blue",variant:t==="eic"?"solid":"outline",onClick:()=>r("eic"),children:"EIC"})]})})},Ky={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"]},xD={1:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&scenario=1&l=OrbitTracks_Terra_Descending(opacity=0.9),Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false",2:"http://localhost:3000/?v=-218.05641352247375,-98.53068072538338,146.49566203427042,106.52986177528524&ics=true&ici=5&icd=10&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.77),GOES-East_ABI_GeoColor,GOES-West_ABI_GeoColor,Himawari_AHI_Band3_Red_Visible_1km&lg=false&scenario=2",3:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_Day,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=true&scenario=3",4:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.63),VIIRS_SNPP_DayNightBand_At_Sensor_Radiance&lg=true&scenario=4",5:"http://localhost:3000/?v=-205.72171420740915,-98.53068072538338,206.78657152152607,106.52986177528524&df=true&kiosk=true&eic=si&l=IMERG_Precipitation_Rate,Land_Mask&lg=false&scenario=5",6:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.71),GHRSST_L4_MUR_Sea_Surface_Temperature(palette=divergent_1)&lg=true&scenario=6",7:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,MODIS_Aqua_Land_Surface_Temp_Day,MODIS_Aqua_CorrectedReflectance_TrueColor(opacity=0.8)&lg=true&scenario=7",10:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=10",11:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,OMI_Nitrogen_Dioxide_Tropo_Column(palette=rainbow_5,max=14800000000000000,squash=true),VIIRS_NOAA20_CorrectedReflectance_TrueColor&lg=false&scenario=11",12:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day&lg=false&scenario=12",13:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=13"},qy={1:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&scenario=1&l=OrbitTracks_Terra_Descending(opacity=0.9),Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false",2:"https://worldview.earthdata.nasa.gov/?v=-218.05641352247375,-98.53068072538338,146.49566203427042,106.52986177528524&ics=true&ici=5&icd=10&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.77),GOES-East_ABI_GeoColor,GOES-West_ABI_GeoColor,Himawari_AHI_Band3_Red_Visible_1km&lg=false&scenario=2",3:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_Day,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=true&scenario=3",4:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.63),VIIRS_SNPP_DayNightBand_At_Sensor_Radiance&lg=true&scenario=4",5:"https://worldview.earthdata.nasa.gov/?v=-205.72171420740915,-98.53068072538338,206.78657152152607,106.52986177528524&df=true&kiosk=true&eic=si&l=IMERG_Precipitation_Rate,Land_Mask&lg=false&scenario=5",6:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.71),GHRSST_L4_MUR_Sea_Surface_Temperature(palette=divergent_1)&lg=true&scenario=6",7:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,MODIS_Aqua_Land_Surface_Temp_Day,MODIS_Aqua_CorrectedReflectance_TrueColor(opacity=0.8)&lg=true&scenario=7",10:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=10",11:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,OMI_Nitrogen_Dioxide_Tropo_Column(palette=rainbow_5,max=14800000000000000,squash=true),VIIRS_NOAA20_CorrectedReflectance_TrueColor&lg=false&scenario=11",12:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day&lg=false&scenario=12",13:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=13"},wD={1:"True color imagery from Terra satellite",2:"Geostationary imagery from NOAA and JAXA Satellites",3:"Active fires detected by Suomi NPP satellite",4:"Black Marble night time imagery from Suomi NPP satellite",5:"Rain and Snow",6:"Sea Surface Temperature",7:"Land Surface Temperature",10:"Active fires detected by NOAA-20 satellite",11:"Nitrogen Dioxide (NO2) by Aura satellite",12:"Carbon Monoxide (CO) by Aqua satellite",13:"Aerosol Optical Depth (AOD) by Suomi NPP satellite"},_D=()=>{const e=Lp(),t=l=>{e(lw(l))},r=l=>{e(uw(l))},[n,o]=C.useState([]),i=async()=>{const l="https://uhkookzof2.execute-api.us-west-2.amazonaws.com/dev/all-scenarios";try{const c=await(await fetch(l)).json();o(c.items)}catch(u){console.log(u)}},s=l=>{r(l),t("eic")};C.useEffect(()=>{i()},[]);const a=()=>{if(n.length){const u=(()=>{const c=[],d=n.reduce((f,h)=>(f[h.item_id]=h.resolution_date,f),{});return Object.keys(Ky).forEach(f=>{const h=d[f]||"No valid date found",y=Ky[f];c.push({id:f,layers:y,date:h})}),c.sort((f,h)=>parseInt(f.id)-parseInt(h.id)),c})();return b.jsx(Uj,{children:b.jsxs(Bx,{children:[b.jsx(Nx,{color:"whiteAlpha.900",fontSize:"md",children:"Resolution date represents the most recent date that each layer in a scenario shares available imagery"}),b.jsx(Wj,{children:b.jsxs(My,{children:[b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Scenario"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Layers"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Resolution Date"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"EIC"})]})}),b.jsx(Hj,{children:u.map(c=>b.jsxs(My,{children:[b.jsx(Oa,{textAlign:"center",children:c.id}),b.jsx(Oa,{children:c.layers.map((d,f)=>b.jsx(W,{as:"div",textAlign:"center",children:d},f))}),b.jsx(Oa,{textAlign:"center",children:c.date}),b.jsx(Oa,{children:xD[c.id]&&b.jsx(zr,{colorScheme:"blue",variant:"solid",onClick:()=>s(c.id),children:"See EIC"})})]},c.id))})]})})}else return b.jsx(ut,{justifyContent:"center",alignItems:"center",children:b.jsx(Qs,{size:"xl",color:"red.500"})})};return b.jsxs(ut,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[b.jsxs(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[b.jsx(W,{as:"h1",fontSize:"3xl",children:"Scenarios"}),b.jsx(zr,{colorScheme:"blue",variant:"solid",ml:"4",onClick:()=>i(),children:"Refresh Scenarios"})]}),a()]})},Yy=()=>{const[e,t]=C.useState([]),r=async()=>{const o="https://uhkookzof2.execute-api.us-west-2.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,h=d>s?"red":"green",y=o.last_successful_request;return b.jsxs(ut,{direction:"column",my:"2",p:"2",boxShadow:"md",width:"80%",borderRadius:"md",children:[b.jsx(Dx,{mb:"2"}),b.jsx(W,{fontSize:"2xl",fontWeight:"bold",mb:"2",children:i}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Period:"}),b.jsx(W,{fontSize:"md",children:a.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Threshold:"}),b.jsx(W,{fontSize:"md",children:s})]}),b.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST REQUEST"}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),b.jsx(W,{fontSize:"md",children:u.time_of_search}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),b.jsx(W,{fontSize:"md",children:u.date}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),b.jsx(W,{fontSize:"md",children:u.status.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),b.jsx(W,{fontSize:"md",children:u.failure_reason.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),b.jsx(W,{fontSize:"md",children:d}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),b.jsx(W,{fontSize:"md",fontWeight:"bold",color:h,children:f}),b.jsx(zr,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(c,"_blank"),children:"View Imagery"})]}),b.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST SUCCESSFUL REQUEST"}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),b.jsx(W,{fontSize:"md",children:y.time_of_search}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),b.jsx(W,{fontSize:"md",children:y.date}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),b.jsx(W,{fontSize:"md",children:y.status.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),b.jsx(W,{fontSize:"md",children:y.failure_reason.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),b.jsx(W,{fontSize:"md",children:y.black_pixels}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),b.jsx(W,{fontSize:"md",fontWeight:"bold",color:"green",children:y.difference}),b.jsx(zr,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(y.url,"_blank"),children:"View Imagery"})]}),b.jsx(W,{fontSize:"lg",fontWeight:"semibold",mt:"4",children:"Successful Dates:"}),b.jsx(Dp,{pl:"150px",children:l.map((S,w)=>b.jsx(W,{fontSize:"md",children:S},w))})]},i)}):b.jsx(ut,{justifyContent:"center",alignItems:"center",children:b.jsx(Qs,{size:"xl",color:"red.500"})});return C.useEffect(()=>{r()},[]),b.jsxs(ut,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[b.jsxs(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[b.jsx(W,{as:"h1",fontSize:"3xl",children:"Layers"}),b.jsx(zr,{colorScheme:"blue",variant:"solid",ml:"4",onClick:r,children:"Refresh Layers"})]}),n()]})},kD=()=>{const e=Lp(),t=i=>{e(uw(i))},r=Op(i=>i.main.selectedScenario),n={height:"800px",width:"100%"},o=i=>{const s=i.target.value;t(s)};return b.jsx(b.Fragment,{children:b.jsxs(ut,{direction:"column",align:"center",justify:"center",p:4,width:"100%",children:[b.jsx(Ox,{placeholder:"Select scenario",onChange:o,value:r,mb:4,children:Object.keys(qy).map(i=>b.jsxs("option",{value:i,children:["Scenario ",i,": ",wD[i]]},i))}),b.jsx("div",{className:"embed-container",style:n,children:b.jsx("iframe",{src:qy[r],role:"application",sandbox:"allow-modals allow-scripts allow-same-origin allow-forms allow-popups",width:"100%",height:"100%",allow:"fullscreen; autoplay;",loading:"lazy"})})]})})},CD=()=>{const e=Op(r=>r.main.selectedContent),t=()=>{switch(e){case"scenarios":return b.jsx(_D,{});case"layers":return b.jsx(Yy,{});case"eic":return b.jsx(kD,{});default:return b.jsx(Yy,{})}};return b.jsx(ut,{width:"80%",border:"1px solid #FFFFFF",minHeight:"75vh",mt:"4",m:"auto",children:t()})};function TD(){return b.jsxs(b.Fragment,{children:[b.jsx(SD,{}),b.jsx(bD,{}),b.jsx(CD,{})]})}bd.createRoot(document.getElementById("root")).render(b.jsx(Yn.StrictMode,{children:b.jsx(d8,{store:vD,children:b.jsx(wj,{theme:p8,children:b.jsx(TD,{})})})})); + */var Zs=C;function Gj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kj=typeof Object.is=="function"?Object.is:Gj,qj=Zs.useSyncExternalStore,Yj=Zs.useRef,Xj=Zs.useEffect,Qj=Zs.useMemo,Zj=Zs.useDebugValue;Wx.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var i=Yj(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Qj(function(){function l(h){if(!u){if(u=!0,c=h,h=n(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return d=y}return d=h}if(y=d,Kj(c,h))return y;var S=n(h);return o!==void 0&&o(y,S)?y:(c=h,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=qj(e,i[0],i[1]);return Xj(function(){s.hasValue=!0,s.value=a},[a]),Zj(a),a};Vx.exports=Wx;var Jj=Vx.exports,bt="default"in yl?Yn:yl,Iy=Symbol.for("react-redux-context"),jy=typeof globalThis<"u"?globalThis:{};function e8(){if(!bt.createContext)return{};const e=jy[Iy]??(jy[Iy]=new Map);let t=e.get(bt.createContext);return t||(t=bt.createContext(null),e.set(bt.createContext,t)),t}var vn=e8(),t8=()=>{throw new Error("uSES not initialized!")};function Fp(e=vn){return function(){return bt.useContext(e)}}var Ux=Fp(),Hx=t8,r8=e=>{Hx=e},n8=(e,t)=>e===t;function o8(e=vn){const t=e===vn?Ux:Fp(e),r=(n,o={})=>{const{equalityFn:i=n8,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:a,subscription:l,getServerState:u,stabilityCheck:c,identityFunctionCheck:d}=t();bt.useRef(!0);const f=bt.useCallback({[n.name](y){return n(y)}}[n.name],[n,c,s.stabilityCheck]),h=Hx(l.addNestedSub,a.getState,u||a.getState,f,i);return bt.useDebugValue(h),h};return Object.assign(r,{withTypes:()=>r}),r}var Op=o8();function i8(e){e()}function s8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){i8(()=>{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 Dy={notify(){},get:()=>[]};function a8(e,t){let r,n=Dy,o=0,i=!1;function s(S){c();const w=n.subscribe(S);let g=!1;return()=>{g||(g=!0,w(),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=s8())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=Dy)}function f(){i||(i=!0,c())}function h(){i&&(i=!1,d())}const y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>n};return y}var l8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u8=l8?bt.useLayoutEffect:bt.useEffect;function c8({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const s=bt.useMemo(()=>{const u=a8(e);return{store:e,subscription:u,getServerState:n?()=>n:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,n,o,i]),a=bt.useMemo(()=>e.getState(),[e]);u8(()=>{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||vn;return bt.createElement(l.Provider,{value:s},r)}var d8=c8;function Gx(e=vn){const t=e===vn?Ux:Fp(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var f8=Gx();function h8(e=vn){const t=e===vn?f8:Gx(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Lp=h8();r8(Jj.useSyncExternalStoreWithSelector);const p8=YA({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 m8=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fy=m8,yd=()=>Math.random().toString(36).substring(7).split("").join("."),g8={INIT:`@@redux/INIT${yd()}`,REPLACE:`@@redux/REPLACE${yd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yd()}`},iu=g8;function Bp(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 Kx(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(Kx)(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((w,g)=>{s.set(g,w)}))}function c(){if(l)throw new Error(Be(3));return o}function d(w){if(typeof w!="function")throw new Error(Be(4));if(l)throw new Error(Be(5));let g=!0;u();const p=a++;return s.set(p,w),function(){if(g){if(l)throw new Error(Be(6));g=!1,u(),s.delete(p),i=null}}}function f(w){if(!Bp(w))throw new Error(Be(7));if(typeof w.type>"u")throw new Error(Be(8));if(typeof w.type!="string")throw new Error(Be(17));if(l)throw new Error(Be(9));try{l=!0,o=n(o,w)}finally{l=!1}return(i=s).forEach(p=>{p()}),w}function h(w){if(typeof w!="function")throw new Error(Be(10));n=w,f({type:iu.REPLACE})}function y(){const w=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Be(11));function p(){const x=g;x.next&&x.next(c())}return p(),{unsubscribe:w(p)}},[Fy](){return this}}}return f({type:iu.INIT}),{dispatch:f,subscribe:d,getState:c,replaceReducer:h,[Fy]:y}}function y8(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:iu.INIT})>"u")throw new Error(Be(12));if(typeof r(void 0,{type:iu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function v8(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!==h}return l=l||n.length!==Object.keys(s).length,l?u:s}}function su(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function S8(...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=su(...a)(o.dispatch),{...o,dispatch:i}}}function b8(e){return Bp(e)&&"type"in e&&typeof e.type=="string"}var qx=Symbol.for("immer-nothing"),Oy=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state");function Xt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ri=Object.getPrototypeOf;function Sn(e){return!!e&&!!e[Tt]}function Lr(e){var t;return e?Yx(e)||Array.isArray(e)||!!e[Oy]||!!((t=e.constructor)!=null&&t[Oy])||Zu(e)||Ju(e):!1}var x8=Object.prototype.constructor.toString();function Yx(e){if(!e||typeof e!="object")return!1;const t=ri(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)===x8}function js(e,t){Qu(e)===0?Object.entries(e).forEach(([r,n])=>{t(r,n,e)}):e.forEach((r,n)=>t(n,r,e))}function Qu(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Zu(e)?2:Ju(e)?3:0}function Wf(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xx(e,t,r){const n=Qu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function w8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function In(e){return e.copy_||e.base_}function Uf(e,t){if(Zu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Yx(e))return ri(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];let n=Reflect.ownKeys(r);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=_8),Object.freeze(e),t&&js(e,(r,n)=>Np(n,!0))),e}function _8(){Xt(2)}function ec(e){return Object.isFrozen(e)}var k8={};function to(e){const t=k8[e];return t||Xt(0,e),t}var Ds;function Qx(){return Ds}function C8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ly(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hf(e){Gf(e),e.drafts_.forEach(T8),e.drafts_=null}function Gf(e){e===Ds&&(Ds=e.parent_)}function By(e){return Ds=C8(Ds,e)}function T8(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ny(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Tt].modified_&&(Hf(t),Xt(4)),Lr(e)&&(e=au(t,e),t.parent_||lu(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(r[Tt].base_,e,t.patches_,t.inversePatches_)):e=au(t,r,[]),Hf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qx?e:void 0}function au(e,t,r){if(ec(t))return t;const n=t[Tt];if(!n)return js(t,(o,i)=>Vy(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return lu(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)=>Vy(e,n,o,a,l,r,s)),lu(e,o,!1),r&&e.patches_&&to("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Vy(e,t,r,n,o,i,s){if(Sn(o)){const a=i&&t&&t.type_!==3&&!Wf(t.assigned_,n)?i.concat(n):void 0,l=au(e,o,a);if(Xx(r,n,l),Sn(l))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(Lr(o)&&!ec(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;au(e,o),(!t||!t.scope_.parent_)&&lu(e,o)}}function lu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Np(t,r)}function P8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Qx(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Vp;r&&(o=[n],i=Fs);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var Vp={get(e,t){if(t===Tt)return e;const r=In(e);if(!Wf(r,t))return E8(e,r,t);const n=r[t];return e.finalized_||!Lr(n)?n:n===vd(e.base_,t)?(Sd(e),e.copy_[t]=qf(n,e)):n},has(e,t){return t in In(e)},ownKeys(e){return Reflect.ownKeys(In(e))},set(e,t,r){const n=Zx(In(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=vd(In(e),t),i=o==null?void 0:o[Tt];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(w8(r,o)&&(r!==void 0||Wf(e.base_,t)))return!0;Sd(e),Kf(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 vd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Sd(e),Kf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=In(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 ri(e.base_)},setPrototypeOf(){Xt(12)}},Fs={};js(Vp,(e,t)=>{Fs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fs.deleteProperty=function(e,t){return Fs.set.call(this,e,t,void 0)};Fs.set=function(e,t,r){return Vp.set.call(this,e[0],t,r,e[0])};function vd(e,t){const r=e[Tt];return(r?In(r):e)[t]}function E8(e,t,r){var o;const n=Zx(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Zx(e,t){if(!(t in e))return;let r=ri(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ri(r)}}function Kf(e){e.modified_||(e.modified_=!0,e.parent_&&Kf(e.parent_))}function Sd(e){e.copy_||(e.copy_=Uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var R8=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(Lr(t)){const i=By(this),s=qf(t,void 0);let a=!0;try{o=r(s),a=!1}finally{a?Hf(i):Gf(i)}return Ly(i,n),Ny(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===qx&&(o=void 0),this.autoFreeze_&&Np(o,!0),n){const i=[],s=[];to("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){Lr(e)||Xt(8),Sn(e)&&(e=Jx(e));const t=By(this),r=qf(e,void 0);return r[Tt].isManual_=!0,Gf(t),r}finishDraft(e,t){const r=e&&e[Tt];(!r||!r.isManual_)&&Xt(9);const{scope_:n}=r;return Ly(n,t),Ny(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=to("Patches").applyPatches_;return Sn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function qf(e,t){const r=Zu(e)?to("MapSet").proxyMap_(e,t):Ju(e)?to("MapSet").proxySet_(e,t):P8(e,t);return(t?t.scope_:Qx()).drafts_.push(r),r}function Jx(e){return Sn(e)||Xt(10,e),ew(e)}function ew(e){if(!Lr(e)||ec(e))return e;const t=e[Tt];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Uf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Uf(e,!0);return js(r,(n,o)=>{Xx(r,n,ew(o))}),t&&(t.finalized_=!1),r}var Pt=new R8,tw=Pt.produce;Pt.produceWithPatches.bind(Pt);Pt.setAutoFreeze.bind(Pt);Pt.setUseStrictShallowCopy.bind(Pt);Pt.applyPatches.bind(Pt);Pt.createDraft.bind(Pt);Pt.finishDraft.bind(Pt);function $8(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function A8(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function z8(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 Wy=e=>Array.isArray(e)?e:[e];function M8(e){const t=Array.isArray(e[0])?e[0]:e;return z8(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function I8(e,t){const r=[],{length:n}=e;for(let o=0;o{r=Ba(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function rw(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()),$8(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...r,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=Wp,argsMemoizeOptions:y=[],devModeChecks:S={}}=c,w=Wy(f),g=Wy(y),p=M8(o),m=d(function(){return i++,u.apply(null,arguments)},...w),x=h(function(){s++;const $=I8(p,arguments);return a=m.apply(null,$),a},...g);return Object.assign(x,{resultFunc:u,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var O8=rw(Wp),L8=Object.assign((e,t=O8)=>{A8(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:()=>L8});function nw(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var B8=nw(),N8=nw,V8=(...e)=>{const t=rw(...e),r=Object.assign((...n)=>{const o=t(...n),i=(s,...a)=>o(Sn(s)?Jx(s):s,...a);return Object.assign(i,o),i},{withTypes:()=>r});return r};V8(Wp);var W8=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?su:su.apply(null,arguments)};function ni(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(ht(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=>b8(n)&&n.type===e,r}var ow=class Li extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Li.prototype)}static get[Symbol.species](){return Li}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Li(...t[0].concat(this)):new Li(...t.concat(this))}};function Hy(e){return Lr(e)?tw(e,()=>{}):e}function Gy(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(ht(10));const n=r.insert(t,e);return e.set(t,n),n}function U8(e){return typeof e=="boolean"}var H8=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let s=new ow;return r&&(U8(r)?s.push(B8):s.push(N8(r.extraArgument))),s},G8="RTK_autoBatch",iw=e=>t=>{setTimeout(t,e)},K8=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:iw(10),q8=(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"?K8:e.type==="callback"?e.queueNotification:iw(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[G8]),i=!o,i&&(s||(s=!0,l(u))),n.dispatch(c)}finally{o=!0}}})},Y8=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new ow(e);return n&&o.push(q8(typeof n=="object"?n:void 0)),o},X8=!0;function Q8(e){const t=H8(),{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(Bp(r))a=v8(r);else throw new Error(ht(1));let l;typeof n=="function"?l=n(t):l=t();let u=su;o&&(u=W8({trace:!X8,...typeof o=="object"&&o}));const c=S8(...l),d=Y8(c);let f=typeof s=="function"?s(d):d();const h=u(...f);return Kx(a,i,h)}function sw(e){const t={},r=[];let n;const o={addCase(i,s){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(ht(28));if(a in t)throw new Error(ht(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 Z8(e){return typeof e=="function"}function J8(e,t){let[r,n,o]=sw(t),i;if(Z8(e))i=()=>Hy(e());else{const a=Hy(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(Sn(c)){const h=d(c,l);return h===void 0?c:h}else{if(Lr(c))return tw(c,f=>d(f,l));{const f=d(c,l);if(f===void 0){if(c===null)return c;throw new Error(ht(9))}return f}}return c},a)}return s.getInitialState=i,s}var eD="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",tD=(e=21)=>{let t="",r=e;for(;r--;)t+=eD[Math.random()*64|0];return t},rD=Symbol.for("rtk-slice-createasyncthunk");function nD(e,t){return`${e}/${t}`}function oD({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[rD];return function(o){const{name:i,reducerPath:s=i}=o;if(!i)throw new Error(ht(11));typeof process<"u";const a=(typeof o.reducers=="function"?o.reducers(aD()):o.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,x){const T=typeof m=="string"?m:m.type;if(!T)throw new Error(ht(12));if(T in u.sliceCaseReducersByType)throw new Error(ht(13));return u.sliceCaseReducersByType[T]=x,c},addMatcher(m,x){return u.sliceMatchers.push({matcher:m,reducer:x}),c},exposeAction(m,x){return u.actionCreators[m]=x,c},exposeCaseReducer(m,x){return u.sliceCaseReducersByName[m]=x,c}};l.forEach(m=>{const x=a[m],T={reducerName:m,type:nD(i,m),createNotation:typeof o.reducers=="function"};uD(x)?dD(T,x,c,t):lD(T,x,c)});function d(){const[m={},x=[],T=void 0]=typeof o.extraReducers=="function"?sw(o.extraReducers):[o.extraReducers],$={...m,...u.sliceCaseReducersByType};return J8(o.initialState,E=>{for(let R in $)E.addCase(R,$[R]);for(let R of u.sliceMatchers)E.addMatcher(R.matcher,R.reducer);for(let R of x)E.addMatcher(R.matcher,R.reducer);T&&E.addDefaultCase(T)})}const f=m=>m,h=new Map;let y;function S(m,x){return y||(y=d()),y(m,x)}function w(){return y||(y=d()),y.getInitialState()}function g(m,x=!1){function T(E){let R=E[m];return typeof R>"u"&&x&&(R=w()),R}function $(E=f){const R=Gy(h,x,{insert:()=>new WeakMap});return Gy(R,E,{insert:()=>{const j={};for(const[D,xe]of Object.entries(o.selectors??{}))j[D]=iD(xe,E,w,x);return j}})}return{reducerPath:m,getSelectors:$,get selectors(){return $(T)},selectSlice:T}}const p={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...g(s),injectInto(m,{reducerPath:x,...T}={}){const $=x??s;return m.inject({reducerPath:$,reducer:S},T),{...p,...g($,!0)}}};return p}}function iD(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 sD=oD();function aD(){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 lD({type:e,reducerName:t,createNotation:r},n,o){let i,s;if("reducer"in n){if(r&&!cD(n))throw new Error(ht(17));i=n.reducer,s=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ni(e,s):ni(e))}function uD(e){return e._reducerDefinitionType==="asyncThunk"}function cD(e){return e._reducerDefinitionType==="reducerWithPrepare"}function dD({type:e,reducerName:t},r,n,o){if(!o)throw new Error(ht(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||Na,pending:a||Na,rejected:l||Na,settled:u||Na})}function Na(){}var fD=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},Up="listenerMiddleware",hD=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=ni(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(ht(21));return fD(i),{predicate:o,type:t,effect:i}},pD=Object.assign(e=>{const{type:t,predicate:r,effect:n}=hD(e);return{id:tD(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>pD}),mD=Object.assign(ni(`${Up}/add`),{withTypes:()=>mD});ni(`${Up}/removeAll`);var gD=Object.assign(ni(`${Up}/remove`),{withTypes:()=>gD});function ht(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 aw=sD({name:"main",initialState:{selectedContent:"eic",selectedScenario:1},reducers:{selectContent:(e,t)=>{e.selectedContent=t.payload},selectScenario:(e,t)=>{e.selectedScenario=t.payload}}}),{selectContent:lw,selectScenario:uw}=aw.actions,yD=aw.reducer,vD=Q8({reducer:{main:yD}}),SD=()=>b.jsx(ut,{bgColor:"#242424",color:"white",justifyContent:"space-between",alignItems:"center",p:4,borderBottom:"1px solid #FFFFFF",children:b.jsxs(ut,{alignItems:"center",children:[b.jsx(Mx,{src:"/EIC-Monitor/logo.png",alt:"Logo",mr:2,height:"50px"}),b.jsx(W,{fontSize:"3xl",children:"EIC Monitor"})]})}),bD=()=>{const e=Lp(),t=Op(n=>n.main.selectedContent),r=n=>{e(lw(n))};return b.jsx(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:b.jsxs(ut,{justifyContent:"space-around",width:"lg",maxWidth:"100%",children:[b.jsx(zr,{colorScheme:"blue",variant:t==="scenarios"?"solid":"outline",onClick:()=>r("scenarios"),children:"Scenarios"}),b.jsx(zr,{colorScheme:"blue",variant:t==="layers"?"solid":"outline",onClick:()=>r("layers"),children:"Layers"}),b.jsx(zr,{colorScheme:"blue",variant:t==="eic"?"solid":"outline",onClick:()=>r("eic"),children:"EIC"})]})})},Ky={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"]},xD={1:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&scenario=1&l=OrbitTracks_Terra_Descending(opacity=0.9),Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false",2:"http://localhost:3000/?v=-218.05641352247375,-98.53068072538338,146.49566203427042,106.52986177528524&ics=true&ici=5&icd=10&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.77),GOES-East_ABI_GeoColor,GOES-West_ABI_GeoColor,Himawari_AHI_Band3_Red_Visible_1km&lg=false&scenario=2",3:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_Day,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=true&scenario=3",4:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.63),VIIRS_SNPP_DayNightBand_At_Sensor_Radiance&lg=true&scenario=4",5:"http://localhost:3000/?v=-205.72171420740915,-98.53068072538338,206.78657152152607,106.52986177528524&df=true&kiosk=true&eic=si&l=IMERG_Precipitation_Rate,Land_Mask&lg=false&scenario=5",6:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.71),GHRSST_L4_MUR_Sea_Surface_Temperature(palette=divergent_1)&lg=true&scenario=6",7:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,MODIS_Aqua_Land_Surface_Temp_Day,MODIS_Aqua_CorrectedReflectance_TrueColor(opacity=0.8)&lg=true&scenario=7",10:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=10",11:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,OMI_Nitrogen_Dioxide_Tropo_Column(palette=rainbow_5,max=14800000000000000,squash=true),VIIRS_NOAA20_CorrectedReflectance_TrueColor&lg=false&scenario=11",12:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day&lg=false&scenario=12",13:"http://localhost:3000/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=13"},qy={1:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&scenario=1&l=OrbitTracks_Terra_Descending(opacity=0.9),Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false",2:"https://worldview.earthdata.nasa.gov/?v=-218.05641352247375,-98.53068072538338,146.49566203427042,106.52986177528524&ics=true&ici=5&icd=10&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.77),GOES-East_ABI_GeoColor,GOES-West_ABI_GeoColor,Himawari_AHI_Band3_Red_Visible_1km&lg=false&scenario=2",3:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_Day,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=true&scenario=3",4:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.63),VIIRS_SNPP_DayNightBand_At_Sensor_Radiance&lg=true&scenario=4",5:"https://worldview.earthdata.nasa.gov/?v=-205.72171420740915,-98.53068072538338,206.78657152152607,106.52986177528524&df=true&kiosk=true&eic=si&l=IMERG_Precipitation_Rate,Land_Mask&lg=false&scenario=5",6:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m(opacity=0.71),GHRSST_L4_MUR_Sea_Surface_Temperature(palette=divergent_1)&lg=true&scenario=6",7:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,MODIS_Aqua_Land_Surface_Temp_Day,MODIS_Aqua_CorrectedReflectance_TrueColor(opacity=0.8)&lg=true&scenario=7",10:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=10",11:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,OMI_Nitrogen_Dioxide_Tropo_Column(palette=rainbow_5,max=14800000000000000,squash=true),VIIRS_NOAA20_CorrectedReflectance_TrueColor&lg=false&scenario=11",12:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day&lg=false&scenario=12",13:"https://worldview.earthdata.nasa.gov/?v=-181.74360912131363,-98.53068072538338,182.80846643543055,106.52986177528524&df=true&kiosk=true&eic=si&l=Coastlines_15m,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,VIIRS_SNPP_CorrectedReflectance_TrueColor&lg=false&scenario=13"},wD={1:"True color imagery from Terra satellite",2:"Geostationary imagery from NOAA and JAXA Satellites",3:"Active fires detected by Suomi NPP satellite",4:"Black Marble night time imagery from Suomi NPP satellite",5:"Rain and Snow",6:"Sea Surface Temperature",7:"Land Surface Temperature",10:"Active fires detected by NOAA-20 satellite",11:"Nitrogen Dioxide (NO2) by Aura satellite",12:"Carbon Monoxide (CO) by Aqua satellite",13:"Aerosol Optical Depth (AOD) by Suomi NPP satellite"},_D=()=>{const e=Lp(),t=l=>{e(lw(l))},r=l=>{e(uw(l))},[n,o]=C.useState([]),i=async()=>{const l="https://worldview.earthdata.nasa.gov/eic/all-scenarios";try{const c=await(await fetch(l)).json();o(c.items)}catch(u){console.log(u)}},s=l=>{r(l),t("eic")};C.useEffect(()=>{i()},[]);const a=()=>{if(n.length){const u=(()=>{const c=[],d=n.reduce((f,h)=>(f[h.item_id]=h.resolution_date,f),{});return Object.keys(Ky).forEach(f=>{const h=d[f]||"No valid date found",y=Ky[f];c.push({id:f,layers:y,date:h})}),c.sort((f,h)=>parseInt(f.id)-parseInt(h.id)),c})();return b.jsx(Uj,{children:b.jsxs(Bx,{children:[b.jsx(Nx,{color:"whiteAlpha.900",fontSize:"md",children:"Resolution date represents the most recent date that each layer in a scenario shares available imagery"}),b.jsx(Wj,{children:b.jsxs(My,{children:[b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Scenario"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Layers"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"Resolution Date"}),b.jsx(La,{color:"whiteAlpha.900",fontSize:"lg",textAlign:"center",children:"EIC"})]})}),b.jsx(Hj,{children:u.map(c=>b.jsxs(My,{children:[b.jsx(Oa,{textAlign:"center",children:c.id}),b.jsx(Oa,{children:c.layers.map((d,f)=>b.jsx(W,{as:"div",textAlign:"center",children:d},f))}),b.jsx(Oa,{textAlign:"center",children:c.date}),b.jsx(Oa,{children:xD[c.id]&&b.jsx(zr,{colorScheme:"blue",variant:"solid",onClick:()=>s(c.id),children:"See EIC"})})]},c.id))})]})})}else return b.jsx(ut,{justifyContent:"center",alignItems:"center",children:b.jsx(Qs,{size:"xl",color:"red.500"})})};return b.jsxs(ut,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[b.jsxs(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[b.jsx(W,{as:"h1",fontSize:"3xl",children:"Scenarios"}),b.jsx(zr,{colorScheme:"blue",variant:"solid",ml:"4",onClick:()=>i(),children:"Refresh Scenarios"})]}),a()]})},Yy=()=>{const[e,t]=C.useState([]),r=async()=>{const o="https://worldview.earthdata.nasa.gov/eic/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,h=d>s?"red":"green",y=o.last_successful_request;return b.jsxs(ut,{direction:"column",my:"2",p:"2",boxShadow:"md",width:"80%",borderRadius:"md",children:[b.jsx(Dx,{mb:"2"}),b.jsx(W,{fontSize:"2xl",fontWeight:"bold",mb:"2",children:i}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Period:"}),b.jsx(W,{fontSize:"md",children:a.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Threshold:"}),b.jsx(W,{fontSize:"md",children:s})]}),b.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST REQUEST"}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),b.jsx(W,{fontSize:"md",children:u.time_of_search}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),b.jsx(W,{fontSize:"md",children:u.date}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),b.jsx(W,{fontSize:"md",children:u.status.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),b.jsx(W,{fontSize:"md",children:u.failure_reason.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),b.jsx(W,{fontSize:"md",children:d}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),b.jsx(W,{fontSize:"md",fontWeight:"bold",color:h,children:f}),b.jsx(zr,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(c,"_blank"),children:"View Imagery"})]}),b.jsx(W,{fontSize:"lg",fontWeight:"bold",mt:"4",mb:"2",children:"LAST SUCCESSFUL REQUEST"}),b.jsxs(gl,{templateColumns:"minmax(150px, auto) 1fr",gap:2,alignItems:"center",children:[b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Time of Search:"}),b.jsx(W,{fontSize:"md",children:y.time_of_search}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Imagery Date:"}),b.jsx(W,{fontSize:"md",children:y.date}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Status:"}),b.jsx(W,{fontSize:"md",children:y.status.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Failure Reason:"}),b.jsx(W,{fontSize:"md",children:y.failure_reason.toUpperCase()}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Black Pixels:"}),b.jsx(W,{fontSize:"md",children:y.black_pixels}),b.jsx(W,{fontSize:"md",fontWeight:"semibold",children:"Difference:"}),b.jsx(W,{fontSize:"md",fontWeight:"bold",color:"green",children:y.difference}),b.jsx(zr,{colorScheme:"blue",size:"sm",mb:"2",onClick:()=>window.open(y.url,"_blank"),children:"View Imagery"})]}),b.jsx(W,{fontSize:"lg",fontWeight:"semibold",mt:"4",children:"Successful Dates:"}),b.jsx(Dp,{pl:"150px",children:l.map((S,w)=>b.jsx(W,{fontSize:"md",children:S},w))})]},i)}):b.jsx(ut,{justifyContent:"center",alignItems:"center",children:b.jsx(Qs,{size:"xl",color:"red.500"})});return C.useEffect(()=>{r()},[]),b.jsxs(ut,{width:"full",justifyContent:"start",alignItems:"center",flexDirection:"column",children:[b.jsxs(ut,{justifyContent:"center",alignItems:"center",width:"full",mt:"4",mb:"4",children:[b.jsx(W,{as:"h1",fontSize:"3xl",children:"Layers"}),b.jsx(zr,{colorScheme:"blue",variant:"solid",ml:"4",onClick:r,children:"Refresh Layers"})]}),n()]})},kD=()=>{const e=Lp(),t=i=>{e(uw(i))},r=Op(i=>i.main.selectedScenario),n={height:"800px",width:"100%"},o=i=>{const s=i.target.value;t(s)};return b.jsx(b.Fragment,{children:b.jsxs(ut,{direction:"column",align:"center",justify:"center",p:4,width:"100%",children:[b.jsx(Ox,{placeholder:"Select scenario",onChange:o,value:r,mb:4,children:Object.keys(qy).map(i=>b.jsxs("option",{value:i,children:["Scenario ",i,": ",wD[i]]},i))}),b.jsx("div",{className:"embed-container",style:n,children:b.jsx("iframe",{src:qy[r],role:"application",sandbox:"allow-modals allow-scripts allow-same-origin allow-forms allow-popups",width:"100%",height:"100%",allow:"fullscreen; autoplay;",loading:"lazy"})})]})})},CD=()=>{const e=Op(r=>r.main.selectedContent),t=()=>{switch(e){case"scenarios":return b.jsx(_D,{});case"layers":return b.jsx(Yy,{});case"eic":return b.jsx(kD,{});default:return b.jsx(Yy,{})}};return b.jsx(ut,{width:"80%",border:"1px solid #FFFFFF",minHeight:"75vh",mt:"4",m:"auto",children:t()})};function TD(){return b.jsxs(b.Fragment,{children:[b.jsx(SD,{}),b.jsx(bD,{}),b.jsx(CD,{})]})}bd.createRoot(document.getElementById("root")).render(b.jsx(Yn.StrictMode,{children:b.jsx(d8,{store:vD,children:b.jsx(wj,{theme:p8,children:b.jsx(TD,{})})})})); diff --git a/index.html b/index.html index f9b18bd..ba7ba8b 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ EIC Monitor - +