System.register([],function(b){"use strict";return{execute:function(){b("createJSONStorage",T);const A=b("redux",(d,c)=>(s,a,n)=>(n.dispatch=e=>(s(g=>d(g,e),!1,e),e),n.dispatchFromDevtools=!0,{dispatch:(...e)=>n.dispatch(...e),...c})),I=new Map,w=d=>{const c=I.get(d);return c?Object.fromEntries(Object.entries(c.stores).map(([s,a])=>[s,a.getState()])):{}},E=(d,c,s)=>{if(d===void 0)return{type:"untracked",connection:c.connect(s)};const a=I.get(s.name);if(a)return{type:"tracked",store:d,...a};const n={connection:c.connect(s),stores:{}};return I.set(s.name,n),{type:"tracked",store:d,...n}},P=b("devtools",(d,c={})=>(s,a,n)=>{const{enabled:e,anonymousActionType:g,store:u,...p}=c;let m;try{m=(e!=null?e:!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(r){}if(!m)return d(s,a,n);const{connection:l,...S}=E(u,m,p);let h=!0;n.setState=(r,o,i)=>{const t=s(r,o);if(!h)return t;const f=i===void 0?{type:g||"anonymous"}:typeof i=="string"?{type:i}:i;return u===void 0?(l==null||l.send(f,a()),t):(l==null||l.send({...f,type:`${u}/${f.type}`},{...w(p.name),[u]:n.getState()}),t)};const v=(...r)=>{const o=h;h=!1,s(...r),h=o},y=d(n.setState,a,n);if(S.type==="untracked"?l==null||l.init(y):(S.stores[S.store]=n,l==null||l.init(Object.fromEntries(Object.entries(S.stores).map(([r,o])=>[r,r===S.store?y:o.getState()])))),n.dispatchFromDevtools&&typeof n.dispatch=="function"){const r=n.dispatch;n.dispatch=(...o)=>{r(...o)}}return l.subscribe(r=>{var o;switch(r.type){case"ACTION":if(typeof r.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return _(r.payload,i=>{if(i.type==="__setState"){if(u===void 0){v(i.state);return}Object.keys(i.state).length!==1&&console.error(` [zustand devtools middleware] Unsupported __setState action format. When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } `);const t=i.state[u];if(t==null)return;JSON.stringify(n.getState())!==JSON.stringify(t)&&v(t);return}n.dispatchFromDevtools&&typeof n.dispatch=="function"&&n.dispatch(i)});case"DISPATCH":switch(r.payload.type){case"RESET":return v(y),u===void 0?l==null?void 0:l.init(n.getState()):l==null?void 0:l.init(w(p.name));case"COMMIT":if(u===void 0){l==null||l.init(n.getState());return}return l==null?void 0:l.init(w(p.name));case"ROLLBACK":return _(r.state,i=>{if(u===void 0){v(i),l==null||l.init(n.getState());return}v(i[u]),l==null||l.init(w(p.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return _(r.state,i=>{if(u===void 0){v(i);return}JSON.stringify(n.getState())!==JSON.stringify(i[u])&&v(i[u])});case"IMPORT_STATE":{const{nextLiftedState:i}=r.payload,t=(o=i.computedStates.slice(-1)[0])==null?void 0:o.state;if(!t)return;v(u===void 0?t:t[u]),l==null||l.send(null,i);return}case"PAUSE_RECORDING":return h=!h}return}}),y}),_=(d,c)=>{let s;try{s=JSON.parse(d)}catch(a){console.error("[zustand devtools middleware] Could not parse the received json",a)}s!==void 0&&c(s)},H=b("subscribeWithSelector",d=>(c,s,a)=>{const n=a.subscribe;return a.subscribe=(e,g,u)=>{let p=e;if(g){const m=(u==null?void 0:u.equalityFn)||Object.is;let l=e(a.getState());p=S=>{const h=e(S);if(!m(l,h)){const v=l;g(l=h,v)}},u!=null&&u.fireImmediately&&g(l,l)}return n(p)},d(c,s,a)}),R=b("combine",(d,c)=>(...s)=>Object.assign({},d,c(...s)));function T(d,c){let s;try{s=d()}catch(a){return}return{getItem:a=>{var n;const e=u=>u===null?null:JSON.parse(u,c==null?void 0:c.reviver),g=(n=s.getItem(a))!=null?n:null;return g instanceof Promise?g.then(e):e(g)},setItem:(a,n)=>s.setItem(a,JSON.stringify(n,c==null?void 0:c.replacer)),removeItem:a=>s.removeItem(a)}}const O=d=>c=>{try{const s=d(c);return s instanceof Promise?s:{then(a){return O(a)(s)},catch(a){return this}}}catch(s){return{then(a){return this},catch(a){return O(a)(s)}}}},N=(d,c)=>(s,a,n)=>{let e={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:o=>o,version:0,merge:(o,i)=>({...i,...o}),...c},g=!1;const u=new Set,p=new Set;let m;try{m=e.getStorage()}catch(o){}if(!m)return d((...o)=>{console.warn(`[zustand persist middleware] Unable to update item '${e.name}', the given storage is currently unavailable.`),s(...o)},a,n);const l=O(e.serialize),S=()=>{const o=e.partialize({...a()});let i;const t=l({state:o,version:e.version}).then(f=>m.setItem(e.name,f)).catch(f=>{i=f});if(i)throw i;return t},h=n.setState;n.setState=(o,i)=>{h(o,i),S()};const v=d((...o)=>{s(...o),S()},a,n);let y;const r=()=>{var o;if(!m)return;g=!1,u.forEach(t=>t(a()));const i=((o=e.onRehydrateStorage)==null?void 0:o.call(e,a()))||void 0;return O(m.getItem.bind(m))(e.name).then(t=>{if(t)return e.deserialize(t)}).then(t=>{if(t)if(typeof t.version=="number"&&t.version!==e.version){if(e.migrate)return e.migrate(t.state,t.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return t.state}).then(t=>{var f;return y=e.merge(t,(f=a())!=null?f:v),s(y,!0),S()}).then(()=>{i==null||i(y,void 0),g=!0,p.forEach(t=>t(y))}).catch(t=>{i==null||i(void 0,t)})};return n.persist={setOptions:o=>{e={...e,...o},o.getStorage&&(m=o.getStorage())},clearStorage:()=>{m==null||m.removeItem(e.name)},getOptions:()=>e,rehydrate:()=>r(),hasHydrated:()=>g,onHydrate:o=>(u.add(o),()=>{u.delete(o)}),onFinishHydration:o=>(p.add(o),()=>{p.delete(o)})},r(),y||v},z=(d,c)=>(s,a,n)=>{let e={storage:T(()=>localStorage),partialize:r=>r,version:0,merge:(r,o)=>({...o,...r}),...c},g=!1;const u=new Set,p=new Set;let m=e.storage;if(!m)return d((...r)=>{console.warn(`[zustand persist middleware] Unable to update item '${e.name}', the given storage is currently unavailable.`),s(...r)},a,n);const l=()=>{const r=e.partialize({...a()});return m.setItem(e.name,{state:r,version:e.version})},S=n.setState;n.setState=(r,o)=>{S(r,o),l()};const h=d((...r)=>{s(...r),l()},a,n);n.getInitialState=()=>h;let v;const y=()=>{var r,o;if(!m)return;g=!1,u.forEach(t=>{var f;return t((f=a())!=null?f:h)});const i=((o=e.onRehydrateStorage)==null?void 0:o.call(e,(r=a())!=null?r:h))||void 0;return O(m.getItem.bind(m))(e.name).then(t=>{if(t)if(typeof t.version=="number"&&t.version!==e.version){if(e.migrate)return e.migrate(t.state,t.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return t.state}).then(t=>{var f;return v=e.merge(t,(f=a())!=null?f:h),s(v,!0),l()}).then(()=>{i==null||i(v,void 0),v=a(),g=!0,p.forEach(t=>t(v))}).catch(t=>{i==null||i(void 0,t)})};return n.persist={setOptions:r=>{e={...e,...r},r.storage&&(m=r.storage)},clearStorage:()=>{m==null||m.removeItem(e.name)},getOptions:()=>e,rehydrate:()=>y(),hasHydrated:()=>g,onHydrate:r=>(u.add(r),()=>{u.delete(r)}),onFinishHydration:r=>(p.add(r),()=>{p.delete(r)})},e.skipHydration||y(),v||h},$=b("persist",(d,c)=>"getStorage"in c||"serialize"in c||"deserialize"in c?N(d,c):z(d,c))}}});