test de déploiement du build depuis gitlab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
62 KiB

import{i as e,o as t,t as n}from"./chunk-jRWAZmH_.js";import{n as r}from"./jsx-runtime-CEixWuwE.js";import{K as i,St as a,a as o,cr as s,i as c,s as l}from"./axios-DOscJEDN.js";var u=t(r());function d(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 f=typeof Symbol==`function`&&Symbol.observable||`@@observable`,p=()=>Math.random().toString(36).substring(7).split(``).join(`.`),m={INIT:`@@redux/INIT${p()}`,REPLACE:`@@redux/REPLACE${p()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${p()}`};function h(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function g(e,t,n){if(typeof e!=`function`)throw Error(d(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(d(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(d(1));return n(g)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(d(3));return i}function p(e){if(typeof e!=`function`)throw Error(d(4));if(c)throw Error(d(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(d(6));t=!1,l(),o.delete(n),a=null}}}function ee(e){if(!h(e))throw Error(d(7));if(e.type===void 0)throw Error(d(8));if(typeof e.type!=`string`)throw Error(d(17));if(c)throw Error(d(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function _(e){if(typeof e!=`function`)throw Error(d(10));r=e,ee({type:m.REPLACE})}function v(){let e=p;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(d(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[f](){return this}}}return ee({type:m.INIT}),{dispatch:ee,subscribe:p,getState:u,replaceReducer:_,[f]:v}}function ee(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:m.INIT})===void 0)throw Error(d(12));if(n(void 0,{type:m.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(d(13))})}function _(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ee(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(d(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function v(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function te(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(d(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=v(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function ne(e){return h(e)&&`type`in e&&typeof e.type==`string`}var re=Symbol.for(`immer-nothing`),y=Symbol.for(`immer-draftable`),b=Symbol.for(`immer-state`);function x(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var S=Object,C=S.getPrototypeOf,w=`constructor`,T=`prototype`,ie=`configurable`,E=`enumerable`,ae=`writable`,oe=`value`,D=e=>!!e&&!!e[b];function O(e){return e?le(e)||he(e)||!!e[y]||!!e[w]?.[y]||ge(e)||_e(e):!1}var se=S[T][w].toString(),ce=new WeakMap;function le(e){if(!e||!ve(e))return!1;let t=C(e);if(t===null||t===S[T])return!0;let n=S.hasOwnProperty.call(t,w)&&t[w];if(n===Object)return!0;if(!A(n))return!1;let r=ce.get(n);return r===void 0&&(r=Function.toString.call(n),ce.set(n,r)),r===se}function ue(e,t,n=!0){k(e)===0?(n?Reflect.ownKeys(e):S.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function k(e){let t=e[b];return t?t.type_:he(e)?1:ge(e)?2:_e(e)?3:0}var de=(e,t,n=k(e))=>n===2?e.has(t):S[T].hasOwnProperty.call(e,t),fe=(e,t,n=k(e))=>n===2?e.get(t):e[t],pe=(e,t,n,r=k(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function me(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var he=Array.isArray,ge=e=>e instanceof Map,_e=e=>e instanceof Set,ve=e=>typeof e==`object`,A=e=>typeof e==`function`,ye=e=>typeof e==`boolean`;function be(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var j=e=>e.copy_||e.base_,M=e=>e.modified_?e.copy_:e.base_;function N(e,t){if(ge(e))return new Map(e);if(_e(e))return new Set(e);if(he(e))return Array[T].slice.call(e);let n=le(e);if(t===!0||t===`class_only`&&!n){let t=S.getOwnPropertyDescriptors(e);delete t[b];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[ae]===!1&&(a[ae]=!0,a[ie]=!0),(a.get||a.set)&&(t[i]={[ie]:!0,[ae]:!0,[E]:a[E],[oe]:e[i]})}return S.create(C(e),t)}else{let t=C(e);if(t!==null&&n)return{...e};let r=S.create(t);return S.assign(r,e)}}function P(e,t=!1){return I(e)||D(e)||!O(e)?e:(k(e)>1&&S.defineProperties(e,{set:F,add:F,clear:F,delete:F}),S.freeze(e),t&&ue(e,(e,t)=>{P(t,!0)},!1),e)}function xe(){x(2)}var F={[oe]:xe};function I(e){return e===null||!ve(e)?!0:S.isFrozen(e)}var L=`MapSet`,Se=`Patches`,Ce=`ArrayMethods`,we={};function R(e){let t=we[e];return t||x(0,e),t}var Te=e=>!!we[e],z,Ee=()=>z,De=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Te(L)?R(L):void 0,arrayMethodsPlugin_:Te(Ce)?R(Ce):void 0});function Oe(e,t){t&&(e.patchPlugin_=R(Se),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ke(e){Ae(e),e.drafts_.forEach(Me),e.drafts_=null}function Ae(e){e===z&&(z=e.parent_)}var je=e=>z=De(z,e);function Me(e){let t=e[b];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ne(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[b].modified_&&(ke(t),x(4)),O(e)&&(e=B(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[b].base_,e,t)}else e=B(t,n);return Pe(t,e,!0),ke(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===re?void 0:e}function B(e,t){if(I(t))return t;let n=t[b];if(!n)return Ve(t,e.handledSet_,e);if(!V(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);ze(n,e)}return n.copy_}function Pe(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&P(t,n)}function Fe(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var V=(e,t)=>e.scope_===t,Ie=[];function Le(e,t,n,r){let i=j(e),a=e.type_;if(r!==void 0&&fe(i,r,a)===t){pe(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ue(i,(e,n)=>{if(D(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Ie;for(let e of o)pe(i,e,n,a)}function Re(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!V(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=M(i);Le(e,i.draft_??i,a,n),ze(i,r)})}function ze(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Fe(e)}}function Be(e,t,n){let{scope_:r}=e;if(D(n)){let i=n[b];V(i,r)&&i.callbacks_.push(function(){Ye(e),Le(e,n,M(i),t)})}else O(n)&&e.callbacks_.push(function(){let i=j(e);e.type_===3?i.has(n)&&Ve(n,r.handledSet_,r):fe(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ve(fe(e.copy_,t,e.type_),r.handledSet_,r)})}function Ve(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||D(e)||t.has(e)||!O(e)||I(e)?e:(t.add(e),ue(e,(r,i)=>{if(D(i)){let t=i[b];V(t,n)&&(pe(e,r,M(t),e.type_),Fe(t))}else O(i)&&Ve(i,t,n)}),e)}function He(e,t){let n=he(e),r={type_:+!!n,scope_:t?t.scope_:Ee(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Ue;n&&(i=[r],a=H);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ue={get(e,t){if(t===b)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=j(e);if(!de(i,t,e.type_))return Ke(e,i,t);let a=i[t];if(e.finalized_||!O(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&be(t))return a;if(a===We(e.base_,t)||Ge(e,t,a)){Ye(e);let n=e.type_===1?+t:t,r=Ze(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in j(e)},ownKeys(e){return Reflect.ownKeys(j(e))},set(e,t,n){let r=qe(j(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=We(j(e),t),i=r?.[b];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(me(n,r)&&(n!==void 0||de(e.base_,t,e.type_)))return!0;Ye(e),Je(e)}return e.copy_[t]===n&&(n!==void 0||de(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Be(e,t,n),!0)},deleteProperty(e,t){return Ye(e),We(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Je(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=j(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ae]:!0,[ie]:e.type_!==1||t!==`length`,[E]:r[E],[oe]:n[t]}},defineProperty(){x(11)},getPrototypeOf(e){return C(e.base_)},setPrototypeOf(){x(12)}},H={};for(let e in Ue){let t=Ue[e];H[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,n){return Ue.set.call(this,e[0],t,n,e[0])};function We(e,t){let n=e[b];return(n?j(n):e)[t]}function Ge(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!O(n)||n[b]?!1:e.baseRefs_.has(n)}function Ke(e,t,n){let r=qe(t,n);return r?oe in r?r[oe]:r.get?.call(e.draft_):void 0}function qe(e,t){if(!(t in e))return;let n=C(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=C(n)}}function Je(e){e.modified_||(e.modified_=!0,e.parent_&&Je(e.parent_))}function Ye(e){e.copy_||=(e.assigned_=new Map,N(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(A(e)&&!A(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}A(t)||x(6),n!==void 0&&!A(n)&&x(7);let r;if(O(e)){let i=je(this),a=Ze(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ke(i):Ae(i)}return Oe(i,n),Ne(r,i)}else if(!e||!ve(e)){if(r=t(e),r===void 0&&(r=e),r===re&&(r=void 0),this.autoFreeze_&&P(r,!0),n){let t=[],i=[];R(Se).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else x(1,e)},this.produceWithPatches=(e,t)=>{if(A(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ye(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ye(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ye(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){O(e)||x(8),D(e)&&(e=Qe(e));let t=je(this),n=Ze(t,e,void 0);return n[b].isManual_=!0,Ae(t),n}finishDraft(e,t){let n=e&&e[b];(!n||!n.isManual_)&&x(9);let{scope_:r}=n;return Oe(r,t),Ne(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=R(Se).applyPatches_;return D(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Ze(e,t,n,r){let[i,a]=ge(t)?R(L).proxyMap_(t,n):_e(t)?R(L).proxySet_(t,n):He(t,n);return(n?.scope_??Ee()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Re(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Qe(e){return D(e)||x(10,e),$e(e)}function $e(e){if(!O(e)||I(e))return e;let t=e[b],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=N(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=N(e,!0);return ue(n,(e,t)=>{pe(n,e,$e(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var et=new Xe().produce;function tt(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var nt=tt(),rt=tt,it=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?v:v.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function U(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(X(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>ne(t)&&t.type===e,n}var at=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function ot(e){return O(e)?et(e,()=>{}):e}function W(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function st(e){return typeof e==`boolean`}var G=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new at;return t&&(st(t)?a.push(nt):a.push(rt(t.extraArgument))),a},ct=`RTK_autoBatch`,K=e=>t=>{setTimeout(t,e)},lt=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},ut=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?lt(window.requestAnimationFrame,100):K(10):e.type===`callback`?e.queueNotification:K(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[ct],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},dt=e=>function(t){let{autoBatch:n=!0}=t??{},r=new at(e);return n&&r.push(ut(typeof n==`object`?n:void 0)),r};function ft(e){let t=G(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(h(n))c=_(n);else throw Error(X(1));let l;l=typeof r==`function`?r(t):t();let u=v;i&&(u=it({trace:!1,...typeof i==`object`&&i}));let d=dt(te(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return g(c,o,p)}function pt(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(X(28));if(r in t)throw Error(X(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function mt(e){return typeof e==`function`}function ht(e,t){let[n,r,i]=pt(t),a;if(mt(e))a=()=>ot(e());else{let t=ot(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(D(e)){let r=n(e,t);return r===void 0?e:r}else if(O(e))return et(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var gt=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,_t=(e=21)=>{let t=``,n=e;for(;n--;)t+=gt[Math.random()*64|0];return t},vt=Symbol.for(`rtk-slice-createasyncthunk`);function yt(e,t){return`${e}/${t}`}function bt({creators:e}={}){let t=e?.asyncThunk?.[vt];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(X(11));let i=(typeof e.reducers==`function`?e.reducers(St()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(X(12));if(n in o.sliceCaseReducersByType)throw Error(X(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:yt(n,r),createNotation:typeof e.reducers==`function`};wt(a)?Et(o,a,s,t):Ct(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?pt(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return ht(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=W(d,r,m)),i}function i(t=l){return W(W(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=xt(a,t,()=>W(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function xt(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var q=bt();function St(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Ct({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Tt(r))throw Error(X(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?U(e,o):U(e))}function wt(e){return e._reducerDefinitionType===`asyncThunk`}function Tt(e){return e._reducerDefinitionType===`reducerWithPrepare`}function Et({type:e,reducerName:t},n,r,i){if(!i)throw Error(X(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||Dt,pending:s||Dt,rejected:c||Dt,settled:l||Dt})}function Dt(){}var Ot=`task`,kt=`listener`,At=`completed`,jt=`cancelled`,Mt=`task-${jt}`,Nt=`task-${At}`,Pt=`${kt}-${jt}`,Ft=`${kt}-${At}`,It=class{constructor(e){this.code=e,this.message=`${Ot} ${jt} (reason: ${e})`}code;name=`TaskAbortError`;message},Lt=(e,t)=>{if(typeof e!=`function`)throw TypeError(X(32))},Rt=()=>{},zt=(e,t=Rt)=>(e.catch(t),e),Bt=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),J=e=>{if(e.aborted)throw new It(e.reason)};function Vt(e,t){let n=Rt;return new Promise((r,i)=>{let a=()=>i(new It(e.reason));if(e.aborted){a();return}n=Bt(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Rt})}var Ht=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof It?`cancelled`:`rejected`,error:e}}finally{t?.()}},Ut=e=>t=>zt(Vt(e,t).then(t=>(J(e),t))),Wt=e=>{let t=Ut(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Y}=Object,Gt={},Kt=`listenerMiddleware`,qt=(e,t)=>{let n=t=>Bt(e,()=>t.abort(e.reason));return(r,i)=>{Lt(r,`taskExecutor`);let a=new AbortController;n(a);let o=Ht(async()=>{J(e),J(a.signal);let t=await r({pause:Ut(a.signal),delay:Wt(a.signal),signal:a.signal});return J(a.signal),t},()=>a.abort(Nt));return i?.autoJoin&&t.push(o.catch(Rt)),{result:Ut(e)(o),cancel(){a.abort(Mt)}}}},Jt=(e,t)=>{let n=async(n,r)=>{J(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Vt(t,Promise.race(a));return J(t),e}finally{i()}};return((e,t)=>zt(n(e,t)))},Yt=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=U(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(X(21));return Lt(a,`options.listener`),{predicate:i,type:t,effect:a}},Xt=Y(e=>{let{type:t,predicate:n,effect:r}=Yt(e);return{id:_t(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(X(22))}}},{withTypes:()=>Xt}),Zt=(e,t)=>{let{type:n,effect:r,predicate:i}=Yt(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Qt=e=>{e.pending.forEach(e=>{e.abort(Pt)})},$t=(e,t)=>()=>{for(let e of t.keys())Qt(e);e.clear()},en=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},tn=Y(U(`${Kt}/add`),{withTypes:()=>tn}),nn=U(`${Kt}/removeAll`),rn=Y(U(`${Kt}/remove`),{withTypes:()=>rn}),an=(...e)=>{console.error(`${Kt}/error`,...e)},on=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=an}=e;Lt(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Qt(e)}),c=(e=>s(Zt(t,e)??Xt(e)));Y(c,{withTypes:()=>c});let l=e=>{let n=Zt(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Qt(n)),!!n};Y(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Jt(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Y({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Wt(u.signal),pause:Ut(u.signal),extra:a,signal:u.signal,fork:qt(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Pt),n.delete(e))})},cancel:()=>{u.abort(Pt),e.pending.delete(u)},throwIfCancelled:()=>{J(u.signal)}})))}catch(e){e instanceof It||en(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Ft),i(e),e.pending.delete(u)}},d=$t(t,n);return{middleware:e=>n=>r=>{if(!ne(r))return n(r);if(tn.match(r))return c(r.payload);if(nn.match(r)){d();return}if(rn.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Gt)throw Error(X(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,en(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Gt}return s},startListening:c,stopListening:l,clearListeners:d}};function X(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Z={lightBlue:`#98C1D9`,moutarde:`#FCBF49`,lightOrange:`#FFB488`,green:`#73BA9B`,red:`#FD5A5D`,lightGreen:`#CCD5AE`,primaryColor:`#FF8801`,blue:`#3D5A80`,lightBrown:`#E4D2B3`,yellow:`#FDD85D`,lightGrey:`#B4B8C5`,lightPurple:`#EABFCB`,primaryBlue:`#012B43`,terraCota:`#EB5E28`,pink:`#FF9B9B`,darkBrown:`#7F5539`,bluePastel:`#E9EBF8`,brown:`#D4A373`,grey:`#929292`,purple:`#C08497`,inactiveGrey:`#b1b1b1`},sn=`MENU_DRAWER`,cn=`MENU_CLASSIC`,ln=q({name:`cti/ui`,initialState:{filters:{visible:!1,editor:!1},primaryColor:`#FF8801`,tab:null,showShortcuts:!1,generatePDF:!1,pdfSize:{width:550,height:560},showOverlay:!1,bugTracker:0,showMenus:!0,menuMode:cn,siderIsCollapsed:!1,devMode:!1,graphDisplayPreference:`always`,graphColors:{columnChart:[Z.lightBlue,Z.moutarde,Z.lightOrange,Z.green,Z.red,Z.lightGreen,Z.primaryColor,Z.blue,Z.lightBrown,Z.yellow,Z.lightGrey,Z.lightPurple,Z.primaryBlue,Z.terraCota,Z.pink,Z.darkBrown,Z.bluePastel,Z.brown,Z.grey,Z.purple],pieChart:[Z.yellow,Z.lightBlue,Z.lightOrange,Z.lightGreen,Z.brown,Z.red,Z.blue,Z.pink,Z.primaryColor,Z.grey,Z.lightBrown,Z.purple],lineChart:[Z.lightBlue,Z.lightOrange,Z.lightGreen,Z.pink,Z.yellow],sexChart:[Z.lightBlue,Z.pink]}},reducers:{setMenuMode(e,t){t.payload==null?e.menuMode=e.menuMode===`MENU_CLASSIC`?sn:cn:e.menuMode=t.payload},setSiderIsCollapsed(e,t){t.payload==null?e.siderIsCollapsed=!e.siderIsCollapsed:e.siderIsCollapsed=t.payload},showFiltersDrawer:{reducer(e,t){e.filters.visible=t.payload.visible,e.filters.editor=t.payload.editor},prepare(e,t=!1){return{payload:{visible:e,editor:t}}}},setSelectedTab(e,t){e.tab=t.payload},showShortcuts(e,t){e.showShortcuts=t.payload},setGeneratePDF(e,t){e.generatePDF=t.payload},setShowOverlay(e,t){e.showOverlay=t.payload},setBugTracker(e,t){e.bugTracker=t.payload==null?e.bugTracker+1:t.payload},setShowMenus(e,t){e.showMenus=t.payload},setDevMode(e,t){e.devMode=t.payload},setPrimaryColor(e,t){e.primaryColor=t.payload},setGraphDisplayPreference(e,t){e.graphDisplayPreference=t.payload}}}),{setMenuMode:un,setSiderIsCollapsed:dn,showFiltersDrawer:fn,setSelectedTab:pn,showShortcuts:mn,setGeneratePDF:hn,setShowOverlay:gn,setBugTracker:_n,setShowMenus:vn,setDevMode:yn,setPrimaryColor:bn,setGraphDisplayPreference:xn}=ln.actions,Sn=ln.reducer,Cn=q({name:`cti/tablePrefs`,initialState:{hiddenColumns:{},columnOrderByTab:[]},reducers:{setHiddenColumns:{reducer(e,t){e.hiddenColumns[t.payload.viewName]=t.payload.columns},prepare(e,t){return{payload:{viewName:e,columns:t}}}},setColumnFiltered:{reducer(e,t){let{tabName:n,columnsFiltered:r}=t.payload,i=e.columnOrderByTab.findIndex(e=>e.tabName===n);i===-1?e.columnOrderByTab.push({tabName:n,columnsFiltered:r}):e.columnOrderByTab[i]={tabName:n,columnsFiltered:r}},prepare(e,t){return{payload:{tabName:e,columnsFiltered:t}}}},resetColumnOrder(e){e.columnOrderByTab=[]}}}),{setHiddenColumns:wn,setColumnFiltered:Tn,resetColumnOrder:En}=Cn.actions,Dn=Cn.reducer,On=t(n(((t,n)=>{(function(e){if(typeof t==`object`&&n!==void 0)n.exports=e();else if(typeof define==`function`&&define.amd)define([],e);else{var r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.localforage=e()}})(function(){return(function t(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof e==`function`&&e;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,t,n,r,i)}return r[s].exports}for(var o=typeof e==`function`&&e,s=0;s<i.length;s++)a(i[s]);return a})({1:[function(e,t,n){(function(e){var n=e.MutationObserver||e.WebKitMutationObserver,r;if(n){var i=0,a=new n(u),o=e.document.createTextNode(``);a.observe(o,{characterData:!0}),r=function(){o.data=i=++i%2}}else if(!e.setImmediate&&e.MessageChannel!==void 0){var s=new e.MessageChannel;s.port1.onmessage=u,r=function(){s.port2.postMessage(0)}}else r=`document`in e&&`onreadystatechange`in e.document.createElement(`script`)?function(){var t=e.document.createElement(`script`);t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};var c,l=[];function u(){c=!0;for(var e,t,n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}c=!1}t.exports=d;function d(e){l.push(e)===1&&!c&&r()}}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var a={},o=[`REJECTED`],s=[`FULFILLED`],c=[`PENDING`];t.exports=l;function l(e){if(typeof e!=`function`)throw TypeError(`resolver must be a function`);this.state=c,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if(typeof e!=`function`&&this.state===s||typeof t!=`function`&&this.state===o)return this;var n=new this.constructor(i);return this.state===c?this.queue.push(new u(n,e,t)):d(n,this.state===s?e:t,this.outcome),n};function u(e,t,n){this.promise=e,typeof t==`function`&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof n==`function`&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}u.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){a.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)};function d(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return a.reject(e,t)}r===e?a.reject(e,TypeError(`Cannot resolve promise with itself`)):a.resolve(e,r)})}a.resolve=function(e,t){var n=m(f,t);if(n.status===`error`)return a.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},a.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e};function f(e){var t=e&&e.then;if(e&&(typeof e==`object`||typeof e==`function`)&&typeof t==`function`)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,a.reject(e,t))}function i(t){n||(n=!0,a.resolve(e,t))}function o(){t(i,r)}var s=m(o);s.status===`error`&&r(s.value)}function m(e,t){var n={};try{n.value=e(t),n.status=`success`}catch(e){n.status=`error`,n.value=e}return n}l.resolve=h;function h(e){return e instanceof this?e:a.resolve(new this(i),e)}l.reject=g;function g(e){var t=new this(i);return a.reject(t,e)}l.all=ee;function ee(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=Array(n),s=0,c=-1,l=new this(i);++c<n;)u(e[c],c);return l;function u(e,i){t.resolve(e).then(c,function(e){r||(r=!0,a.reject(l,e))});function c(e){o[i]=e,++s===n&&!r&&(r=!0,a.resolve(l,o))}}}l.race=_;function _(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=-1,s=new this(i);++o<n;)c(e[o]);return s;function c(e){t.resolve(e).then(function(e){r||(r=!0,a.resolve(s,e))},function(e){r||(r=!0,a.reject(s,e))})}}},{1:1}],3:[function(e,t,n){(function(t){typeof t.Promise!=`function`&&(t.Promise=e(2))}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{2:2}],4:[function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(){try{if(typeof indexedDB<`u`)return indexedDB;if(typeof webkitIndexedDB<`u`)return webkitIndexedDB;if(typeof mozIndexedDB<`u`)return mozIndexedDB;if(typeof OIndexedDB<`u`)return OIndexedDB;if(typeof msIndexedDB<`u`)return msIndexedDB}catch{return}}var o=a();function s(){try{if(!o||!o.open)return!1;var e=typeof openDatabase<`u`&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t=typeof fetch==`function`&&fetch.toString().indexOf(`[native code`)!==-1;return(!e||t)&&typeof indexedDB<`u`&&typeof IDBKeyRange<`u`}catch{return!1}}function c(e,t){e||=[],t||={};try{return new Blob(e,t)}catch(i){if(i.name!==`TypeError`)throw i;for(var n=new(typeof BlobBuilder<`u`?BlobBuilder:typeof MSBlobBuilder<`u`?MSBlobBuilder:typeof MozBlobBuilder<`u`?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}typeof Promise>`u`&&e(3);var l=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){typeof t==`function`&&e.then(t),typeof n==`function`&&e.catch(n)}function f(e){return typeof e!=`string`&&(console.warn(e+` used as a key, but it is not a string.`),e=String(e)),e}function p(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var m=`local-forage-detect-blob-support`,h=void 0,g={},ee=Object.prototype.toString,_=`readonly`,v=`readwrite`;function te(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function ne(e){return new l(function(t){var n=e.transaction(m,v),r=c([``]);n.objectStore(m).put(r,`key`),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);t(navigator.userAgent.match(/Edge\//)||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function re(e){return typeof h==`boolean`?l.resolve(h):ne(e).then(function(e){return h=e,h})}function y(e){var t=g[e.name],n={};n.promise=new l(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function b(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function x(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new l(function(n,r){if(g[e.name]=g[e.name]||se(),e.db)if(t)y(e),e.db.close();else return n(e.db);var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if(n.name===`ConstraintError`)console.warn(`The database "`+e.name+`" has been upgraded from version `+t.oldVersion+` to version `+t.newVersion+`, but the storage "`+e.storeName+`" already exists.`);else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),b(e)}})}function C(e){return S(e,!1)}function w(e){return S(e,!0)}function T(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn(`The database "`+e.name+`" can't be downgraded from version `+e.db.version+` to version `+e.version+`.`),e.version=e.db.version),i||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function ie(e){return new l(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){t({__local_forage_encoded_blob:!0,data:btoa(n.target.result||``),type:e.type})},r.readAsBinaryString(e)})}function E(e){return c([te(atob(e.data))],{type:e.type})}function ae(e){return e&&e.__local_forage_encoded_blob}function oe(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function D(e){y(e);for(var t=g[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,C(e).then(function(t){return e.db=t,T(e)?w(e):t}).then(function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r}).catch(function(t){throw x(e,t),t})}function O(e,t,n,r){r===void 0&&(r=1);try{n(null,e.db.transaction(e.storeName,t))}catch(i){if(r>0&&(!e.db||i.name===`InvalidStateError`||i.name===`NotFoundError`))return l.resolve().then(function(){if(!e.db||i.name===`NotFoundError`&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),w(e)}).then(function(){return D(e).then(function(){O(e,t,n,r-1)})}).catch(n);n(i)}}function se(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ce(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=se(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=oe);var a=[];function o(){return l.resolve()}for(var s=0;s<i.forages.length;s++){var c=i.forages[s];c!==t&&a.push(c._initReady().catch(o))}var u=i.forages.slice(0);return l.all(a).then(function(){return n.db=i.db,C(n)}).then(function(e){return n.db=e,T(n,t._defaultConfig.version)?w(n):e}).then(function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var a=u[r];a!==t&&(a._dbInfo.db=n.db,a._dbInfo.version=n.version)}})}function le(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){O(n._dbInfo,_,function(i,a){if(i)return r(i);try{var o=a.objectStore(n._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;e===void 0&&(e=null),ae(e)&&(e=E(e)),t(e)},o.onerror=function(){r(o.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r}function ue(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){O(n._dbInfo,_,function(i,a){if(i)return r(i);try{var o=a.objectStore(n._dbInfo.storeName).openCursor(),s=1;o.onsuccess=function(){var n=o.result;if(n){var r=n.value;ae(r)&&(r=E(r));var i=e(r,n.key,s++);i===void 0?n.continue():t(i)}else t()},o.onerror=function(){r(o.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r}function k(e,t,n){var r=this;e=f(e);var i=new l(function(n,i){var a;r.ready().then(function(){return a=r._dbInfo,ee.call(t)===`[object Blob]`?re(a.db).then(function(e){return e?t:ie(t)}):t}).then(function(t){O(r._dbInfo,v,function(a,o){if(a)return i(a);try{var s=o.objectStore(r._dbInfo.storeName);t===null&&(t=void 0);var c=s.put(t,e);o.oncomplete=function(){t===void 0&&(t=null),n(t)},o.onabort=o.onerror=function(){i(c.error?c.error:c.transaction.error)}}catch(e){i(e)}})}).catch(i)});return u(i,n),i}function de(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){O(n._dbInfo,v,function(i,a){if(i)return r(i);try{var o=a.objectStore(n._dbInfo.storeName).delete(e);a.oncomplete=function(){t()},a.onerror=function(){r(o.error)},a.onabort=function(){r(o.error?o.error:o.transaction.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r}function fe(e){var t=this,n=new l(function(e,n){t.ready().then(function(){O(t._dbInfo,v,function(r,i){if(r)return n(r);try{var a=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){n(a.error?a.error:a.transaction.error)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n}function pe(e){var t=this,n=new l(function(e,n){t.ready().then(function(){O(t._dbInfo,_,function(r,i){if(r)return n(r);try{var a=i.objectStore(t._dbInfo.storeName).count();a.onsuccess=function(){e(a.result)},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n}function me(e,t){var n=this,r=new l(function(t,r){if(e<0){t(null);return}n.ready().then(function(){O(n._dbInfo,_,function(i,a){if(i)return r(i);try{var o=a.objectStore(n._dbInfo.storeName),s=!1,c=o.openKeyCursor();c.onsuccess=function(){var n=c.result;if(!n){t(null);return}e===0||s?t(n.key):(s=!0,n.advance(e))},c.onerror=function(){r(c.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r}function he(e){var t=this,n=new l(function(e,n){t.ready().then(function(){O(t._dbInfo,_,function(r,i){if(r)return n(r);try{var a=i.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];a.onsuccess=function(){var t=a.result;if(!t){e(o);return}o.push(t.key),t.continue()},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n}function ge(e,t){t=p.apply(this,arguments);var n=this.config();e=typeof e!=`function`&&e||{},e.name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r=this,i;if(!e.name)i=l.reject(`Invalid arguments`);else{var a=e.name===n.name&&r._dbInfo.db?l.resolve(r._dbInfo.db):C(e).then(function(t){var n=g[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t});i=e.storeName?a.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;y(e);var r=g[e.name],i=r.forages;t.close();for(var a=0;a<i.length;a++){var s=i[a];s._dbInfo.db=null,s._dbInfo.version=n}return new l(function(t,r){var i=o.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,b(n._dbInfo)}}).catch(function(t){throw(x(e,t)||l.resolve()).catch(function(){}),t})}}):a.then(function(t){y(e);var n=g[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++){var a=r[i];a._dbInfo.db=null}return new l(function(t,n){var r=o.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn(`dropInstance blocked for database "`+e.name+`" until all open connections are closed`)},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++){var i=r[t];b(i._dbInfo)}}).catch(function(t){throw(x(e,t)||l.resolve()).catch(function(){}),t})})}return u(i,t),i}var _e={_driver:`asyncStorage`,_initStorage:ce,_support:s(),iterate:ue,getItem:le,setItem:k,removeItem:de,clear:fe,length:pe,key:me,keys:he,dropInstance:ge};function ve(){return typeof openDatabase==`function`}var A=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,ye=`~~local_forage_type~`,be=/^~~local_forage_type~([^~]+)~/,j=`__lfsc__:`,M=j.length,N=`arbf`,P=`blob`,xe=`si08`,F=`ui08`,I=`uic8`,L=`si16`,Se=`si32`,Ce=`ur16`,we=`ui32`,R=`fl32`,Te=`fl64`,z=M+N.length,Ee=Object.prototype.toString;function De(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=A.indexOf(e[r]),o=A.indexOf(e[r+1]),s=A.indexOf(e[r+2]),c=A.indexOf(e[r+3]),u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l}function Oe(e){var t=new Uint8Array(e),n=``,r;for(r=0;r<t.length;r+=3)n+=A[t[r]>>2],n+=A[(t[r]&3)<<4|t[r+1]>>4],n+=A[(t[r+1]&15)<<2|t[r+2]>>6],n+=A[t[r+2]&63];return t.length%3==2?n=n.substring(0,n.length-1)+`=`:t.length%3==1&&(n=n.substring(0,n.length-2)+`==`),n}function ke(e,t){var n=``;if(e&&(n=Ee.call(e)),e&&(n===`[object ArrayBuffer]`||e.buffer&&Ee.call(e.buffer)===`[object ArrayBuffer]`)){var r,i=j;e instanceof ArrayBuffer?(r=e,i+=N):(r=e.buffer,n===`[object Int8Array]`?i+=xe:n===`[object Uint8Array]`?i+=F:n===`[object Uint8ClampedArray]`?i+=I:n===`[object Int16Array]`?i+=L:n===`[object Uint16Array]`?i+=Ce:n===`[object Int32Array]`?i+=Se:n===`[object Uint32Array]`?i+=we:n===`[object Float32Array]`?i+=R:n===`[object Float64Array]`?i+=Te:t(Error(`Failed to get type for BinaryArray`))),t(i+Oe(r))}else if(n===`[object Blob]`){var a=new FileReader;a.onload=function(){var n=ye+e.type+`~`+Oe(this.result);t(j+P+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error(`Couldn't convert value into a JSON string: `,e),t(null,n)}}function Ae(e){if(e.substring(0,M)!==j)return JSON.parse(e);var t=e.substring(z),n=e.substring(M,z),r;if(n===P&&be.test(t)){var i=t.match(be);r=i[1],t=t.substring(i[0].length)}var a=De(t);switch(n){case N:return a;case P:return c([a],{type:r});case xe:return new Int8Array(a);case F:return new Uint8Array(a);case I:return new Uint8ClampedArray(a);case L:return new Int16Array(a);case Ce:return new Uint16Array(a);case Se:return new Int32Array(a);case we:return new Uint32Array(a);case R:return new Float32Array(a);case Te:return new Float64Array(a);default:throw Error(`Unkown type: `+n)}}var je={serialize:ke,deserialize:Ae,stringToBuffer:De,bufferToString:Oe};function Me(e,t,n,r){e.executeSql(`CREATE TABLE IF NOT EXISTS `+t.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],n,r)}function Ne(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=typeof e[r]==`string`?e[r]:e[r].toString();var i=new l(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){Me(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=je,i}function B(e,t,n,r,i,a){e.executeSql(n,r,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[t.storeName],function(e,s){s.rows.length?a(e,o):Me(e,t,function(){e.executeSql(n,r,i,a)},a)},a):a(e,o)},a)}function Pe(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){B(n,i,`SELECT * FROM `+i.storeName+` WHERE key = ? LIMIT 1`,[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&=i.serializer.deserialize(r),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Fe(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){B(n,i,`SELECT * FROM `+i.storeName,[],function(n,r){for(var a=r.rows,o=a.length,s=0;s<o;s++){var c=a.item(s),l=c.value;if(l&&=i.serializer.deserialize(l),l=e(l,c.key,s+1),l!==void 0){t(l);return}}t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function V(e,t,n,r){var i=this;e=f(e);var a=new l(function(a,o){i.ready().then(function(){t===void 0&&(t=null);var s=t,c=i._dbInfo;c.serializer.serialize(t,function(t,l){l?o(l):c.db.transaction(function(n){B(n,c,`INSERT OR REPLACE INTO `+c.storeName+` (key, value) VALUES (?, ?)`,[e,t],function(){a(s)},function(e,t){o(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0){a(V.apply(i,[e,s,n,r-1]));return}o(t)}})})}).catch(o)});return u(a,n),a}function Ie(e,t,n){return V.apply(this,[e,t,n,1])}function Le(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){B(n,i,`DELETE FROM `+i.storeName+` WHERE key = ?`,[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Re(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){B(t,r,`DELETE FROM `+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function ze(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){B(t,r,`SELECT COUNT(key) as c FROM `+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Be(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){B(n,i,`SELECT key FROM `+i.storeName+` WHERE id = ? LIMIT 1`,[e+1],function(e,n){t(n.rows.length?n.rows.item(0).key:null)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Ve(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){B(t,r,`SELECT key FROM `+r.storeName,[],function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function He(e){return new l(function(t,n){e.transaction(function(r){r.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'`,[],function(n,r){for(var i=[],a=0;a<r.rows.length;a++)i.push(r.rows.item(a).name);t({db:e,storeNames:i})},function(e,t){n(t)})},function(e){n(e)})})}function Ue(e,t){t=p.apply(this,arguments);var n=this.config();e=typeof e!=`function`&&e||{},e.name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r=this,i=e.name?new l(function(t){var i=e.name===n.name?r._dbInfo.db:openDatabase(e.name,``,``,0);e.storeName?t({db:i,storeNames:[e.storeName]}):t(He(i))}).then(function(e){return new l(function(t,n){e.db.transaction(function(r){function i(e){return new l(function(t,n){r.executeSql(`DROP TABLE IF EXISTS `+e,[],function(){t()},function(e,t){n(t)})})}for(var a=[],o=0,s=e.storeNames.length;o<s;o++)a.push(i(e.storeNames[o]));l.all(a).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):l.reject(`Invalid arguments`);return u(i,t),i}var H={_driver:`webSQLStorage`,_initStorage:Ne,_support:ve(),iterate:Fe,getItem:Pe,setItem:Ie,removeItem:Le,clear:Re,length:ze,key:Be,keys:Ve,dropInstance:Ue};function We(){try{return typeof localStorage<`u`&&`setItem`in localStorage&&!!localStorage.setItem}catch{return!1}}function Ge(e,t){var n=e.name+`/`;return e.storeName!==t.storeName&&(n+=e.storeName+`/`),n}function Ke(){var e=`_localforage_support_test`;try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function qe(){return!Ke()||localStorage.length>0}function Je(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Ge(e,t._defaultConfig),qe()?(t._dbInfo=n,n.serializer=je,l.resolve()):l.reject()}function Ye(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);r.indexOf(e)===0&&localStorage.removeItem(r)}});return u(n,e),n}function Xe(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&=t.serializer.deserialize(r),r});return u(r,t),r}function Ze(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,a=localStorage.length,o=1,s=0;s<a;s++){var c=localStorage.key(s);if(c.indexOf(r)===0){var l=localStorage.getItem(c);if(l&&=t.serializer.deserialize(l),l=e(l,c.substring(i),o++),l!==void 0)return l}}});return u(r,t),r}function Qe(e,t){var n=this,r=n.ready().then(function(){var t=n._dbInfo,r;try{r=localStorage.key(e)}catch{r=null}return r&&=r.substring(t.keyPrefix.length),r});return u(r,t),r}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var a=localStorage.key(i);a.indexOf(e.keyPrefix)===0&&r.push(a.substring(e.keyPrefix.length))}return r});return u(n,e),n}function et(e){var t=this.keys().then(function(e){return e.length});return u(t,e),t}function tt(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return u(r,t),r}function nt(e,t,n){var r=this;e=f(e);var i=r.ready().then(function(){t===void 0&&(t=null);var n=t;return new l(function(i,a){var o=r._dbInfo;o.serializer.serialize(t,function(t,r){if(r)a(r);else try{localStorage.setItem(o.keyPrefix+e,t),i(n)}catch(e){(e.name===`QuotaExceededError`||e.name===`NS_ERROR_DOM_QUOTA_REACHED`)&&a(e),a(e)}})})});return u(i,n),i}function rt(e,t){if(t=p.apply(this,arguments),e=typeof e!=`function`&&e||{},!e.name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r=this,i=e.name?new l(function(t){e.storeName?t(Ge(e,r._defaultConfig)):t(e.name+`/`)}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);n.indexOf(e)===0&&localStorage.removeItem(n)}}):l.reject(`Invalid arguments`);return u(i,t),i}var it={_driver:`localStorageWrapper`,_initStorage:Je,_support:We(),iterate:Ze,getItem:Xe,setItem:nt,removeItem:tt,clear:Ye,length:et,key:Qe,keys:$e,dropInstance:rt},U=function(e,t){return e===t||typeof e==`number`&&typeof t==`number`&&isNaN(e)&&isNaN(t)},at=function(e,t){for(var n=e.length,r=0;r<n;){if(U(e[r],t))return!0;r++}return!1},ot=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`},W={},st={},G={INDEXEDDB:_e,WEBSQL:H,LOCALSTORAGE:it},ct=[G.INDEXEDDB._driver,G.WEBSQL._driver,G.LOCALSTORAGE._driver],K=[`dropInstance`],lt=[`clear`,`getItem`,`iterate`,`key`,`keys`,`length`,`removeItem`,`setItem`].concat(K),ut={description:``,driver:ct.slice(),name:`localforage`,size:4980736,storeName:`keyvaluepairs`,version:1};function dt(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function ft(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(ot(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}t.exports=new(function(){function e(t){for(var n in i(this,e),G)if(G.hasOwnProperty(n)){var r=G[n],a=r._driver;this[n]=a,W[a]||this.defineDriver(r)}this._defaultConfig=ft({},ut),this._config=ft({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if((e===void 0?`undefined`:r(e))===`object`){if(this._ready)return Error(`Can't call config() after localforage has been used.`);for(var t in e){if(t===`storeName`&&(e[t]=e[t].replace(/\W/g,`_`)),t===`version`&&typeof e[t]!=`number`)return Error(`Database version must be a number.`);this._config[t]=e[t]}return`driver`in e&&e.driver?this.setDriver(this._config.driver):!0}else if(typeof e==`string`)return this._config[e];else return this._config},e.prototype.defineDriver=function(e,t,n){var r=new l(function(t,n){try{var r=e._driver,i=Error(`Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver`);if(!e._driver){n(i);return}for(var a=lt.concat(`_initStorage`),o=0,s=a.length;o<s;o++){var c=a[o];if((!at(K,c)||e[c])&&typeof e[c]!=`function`){n(i);return}}(function(){for(var t=function(e){return function(){var t=Error(`Method `+e+` is not implemented by the current driver`),n=l.reject(t);return u(n,arguments[arguments.length-1]),n}},n=0,r=K.length;n<r;n++){var i=K[n];e[i]||(e[i]=t(i))}})();var d=function(n){W[r]&&console.info(`Redefining LocalForage driver: `+r),W[r]=e,st[r]=n,t()};`_support`in e?e._support&&typeof e._support==`function`?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=W[e]?l.resolve(W[e]):l.reject(Error(`Driver not found.`));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=l.resolve(je);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return t._ready===null&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;ot(e)||(e=[e]);var i=this._getSupportedDrivers(e);function a(){r._config.driver=r.driver()}function o(e){return r._extend(e),a(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(o).catch(n)}a();var s=Error(`No available storage method found.`);return r._driverSet=l.reject(s),r._driverSet}return n()}}var c=this._driverSet===null?l.resolve():this._driverSet.catch(function(){return l.resolve()});return this._driverSet=c.then(function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,a(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(i)})}).catch(function(){a();var e=Error(`No available storage method found.`);return r._driverSet=l.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!st[e]},e.prototype._extend=function(e){ft(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=lt.length;e<t;e++)dt(this,lt[e])},e.prototype.createInstance=function(t){return new e(t)},e}())},{3:3}]},{},[4])(4)})}))()),Q=On.default.createInstance({name:s().replace(/\//g,``)}),kn=On.default.createInstance({name:`cti_ccn`}),An=async()=>{let e=[`ccn`,`sider`,`menuMode`,`devMode`],t=[];await Q.iterate((n,r)=>{e.includes(r)||t.push(r)}),await Promise.all(t.map(e=>Q.removeItem(e)))},jn=()=>Q.removeItem(`REACT_QUERY_OFFLINE_CACHE`).catch(()=>{}),Mn=on();Mn.startListening({actionCreator:un,effect:(e,t)=>{let n=t.getState();Q.setItem(`menuMode`,n.cti.ui.menuMode)}}),Mn.startListening({actionCreator:dn,effect:(e,t)=>{let n=t.getState();Q.setItem(`sider`,n.cti.ui.siderIsCollapsed)}}),Mn.startListening({actionCreator:yn,effect:(e,t)=>{let n=t.getState();Q.setItem(`devMode`,n.cti.ui.devMode)}});var Nn=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Pn=t(Nn()),Fn=q({name:`cti/dynamicSelects`,initialState:[],reducers:{setSelects(e,t){return t.payload}},selectors:{}}),{setSelects:In}=Fn.actions,Ln=e=>(t,n)=>{let r=n().cti.dynamicSelects;(0,Pn.default)(r,e)||t(In(e))},Rn=Fn.reducer,zn=q({name:`cti/globalVariables`,initialState:{},reducers:{setGlobalVariables(e,t){return t.payload}}}),{setGlobalVariables:Bn}=zn.actions,Vn=zn.reducer,Hn=q({name:`cti/history`,initialState:{modules:{},expand:{},columns:{},sort:{}},reducers:{historySetModule:{reducer(e,t){e.modules[t.payload.module]=t.payload.item},prepare(e,t){return{payload:{module:e,item:t}}}},historySetExpand:{reducer(e,t){e.expand[t.payload.view]=t.payload.keys},prepare(e,t){return{payload:{view:e,keys:t}}}},historySetColumns:{reducer(e,t){e.columns[t.payload.view]=t.payload.columns},prepare(e,t){return{payload:{view:e,columns:t}}}},historySetSort(e,t){e.sort=t.payload}}}),{historySetModule:Un,historySetExpand:Wn,historySetColumns:Gn,historySetSort:Kn}=Hn.actions,qn=Hn.reducer,Jn=q({name:`cti/viewlinks`,initialState:{cell:{row:null,column:null},row:null},reducers:{view_set_row(e,t){e.row=t.payload},view_set_cell:{reducer(e,t){e.cell=t.payload},prepare(e,t){return{payload:{row:e,column:t}}}},view_reset_selection(e){e.row=null,e.cell={row:null,column:null}}}}),{view_set_row:Yn,view_set_cell:Xn,view_reset_selection:Zn}=Jn.actions,Qn=Jn.reducer,$n=ft({reducer:{cti:_({history:qn,ui:Sn,viewlinks:Qn,dynamicSelects:Rn,tablePrefs:Dn,globalVariables:Vn})},middleware:e=>e().prepend(Mn.middleware),devTools:!1}),er=class extends c{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||tr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=o({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),l.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function tr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var nr=115,rr=({type:e=`info`,message:t=`Accueil`,description:n,key:r,icon:a,duration:o=4}={})=>{i[e]({message:t,description:n,duration:o,placement:`topRight`,top:nr,icon:a,key:r})},ir=({description:e=``,message:t=`Une erreur s'est produite`,key:n,icon:r,duration:a=4})=>{i.warning({message:t,description:e,duration:a,placement:`topRight`,top:nr,icon:r,key:n})},ar=({description:e=``,message:t=`Une erreur s'est produite`,key:n,icon:r,duration:a=4})=>{i.error({message:t,description:e,duration:a,placement:`topRight`,top:nr,icon:r,key:n})},or=({description:e=``,message:t=`Succes`,key:n,icon:r,duration:a=4})=>{i.success({message:t,description:e,duration:a,placement:`topRight`,top:nr,icon:r,key:n})},sr=700,cr=6e4,lr=2,$=new Map,ur=e=>{let t=$.get(e);if($.delete(e),t?.pendingSuccess){let{message:n,description:r}=t.pendingSuccess;or({key:e,message:n,description:r,duration:lr})}else i.close(e)},dr=(e,t,n=`Chargement en cours...`)=>{let r=$.get(e);if(r){r.count+=1,r.closeTimer&&=(clearTimeout(r.closeTimer),null),r.safetyTimer||=setTimeout(()=>ur(e),cr);return}let i=$n.getState().cti.ui.primaryColor;rr({message:t,description:n,key:e,duration:0,icon:(0,u.createElement)(a,{style:{color:i}})}),$.set(e,{count:1,shownAt:Date.now(),safetyTimer:setTimeout(()=>ur(e),cr),closeTimer:null,pendingSuccess:null})},fr=(e,t)=>{let n=$.get(e);if(!n){t?or({key:e,message:t.message,description:t.description,duration:lr}):i.close(e);return}if(t&&(n.pendingSuccess=t),--n.count,n.count>0)return;n.safetyTimer&&=(clearTimeout(n.safetyTimer),null);let r=sr-(Date.now()-n.shownAt);if(r<=0){ur(e);return}n.closeTimer=setTimeout(()=>{$.get(e)?.count<=0&&ur(e)},r)},pr=(e,t,n)=>{rr({type:`error`,message:t,description:n})};export{_n as A,fn as B,An as C,wn as D,Tn as E,bn as F,Z as H,pn as I,vn as L,hn as M,xn as N,cn as O,un as P,gn as R,kn as S,En as T,mn as V,Kn as _,rr as a,Nn as b,er as c,Zn as d,Xn as f,Un as g,Wn as h,ar as i,yn as j,sn as k,tr as l,Gn as m,pr as n,or as o,Yn as p,dr as r,ir as s,fr as t,$n as u,Bn as v,jn as w,Q as x,Ln as y,dn as z};